#TheSriLankanGeek

Unum anulum regere omnes

Custom 404 page (how i made mine)

I have always been amazed by cool and creative 404 pages (i even did a blog post about them). By definition coming across  404 error is not a good thing  as it means what ever you where looking for was not found. This is where brilliantly designed pages can put a smile on the users face and even help find their way back to what they where actually looking for. Some great examples can be found here : http://thenextweb.com/dd/2015/04/21/the-art-of-error-12-clever-404-pages/

So Here is my brilliant custom 404 page.

custom 404 page
http://gajalakshan.com/page

I used JQUERY.MB.YTPLAYER from http://pupunzi.open-lab.com/ to embed a YouTube video and automatically play it as a background of the page. It help add colour to a traditional black and white dull page. I got my server to redirect to the 404 page by following the instructions here.

(JQUERY.MB.YTPLAYER)

How to position absolute inside another element

I have always searched for an easy solution to setting an element to have an absolute position relative to its parent rather than the page. The solution might be simple to some but it took me a long time to come across it. Preveiouly i ended up using combination of javascript and css to archive something that could be archived with CSS only.

This can be archived by setting the parent elements position to relative.

 

In the example i want to try and fox the red box to the top right corner of the gray box.

Parent without position relative (look at red box on result tab)

 

Parent with position relative (look at red box on result)

ADB over WiFi to debug web content on android

I couldn’t figure out how to debug chrome on my android from my computer. As a we developer who specialises in responsive design and having recently started to develop a hybrid app debugging my android smartphone from my computer is a must have feature for me. I have been previously using a usb cable plugged in to my laptop to debug (guide for that here). However, if i could use ADB over WiFi it give me more freedom and one less cable I need to carry around. 

So when i finally figuerd it out i though i would create a guide.

On you android

  1. Enable developer option. To make it visible, go to Settings > About phone and tap Build number seven times. Return to the previous screen to find Developer options at the bottom.
  2. In developer setting turn on USB debugging and ADB over network
    Developer option
  3. Note down the IP address and port under ADB over network option. In my case 192.168.1.157:5555 (where, “ip address”:”port”)

On you computer

  1. open command prompt and navigate to where the android sdk is located on you computer. Then platform-tools folder. (android sdk)
  2. in command prompt enter: (where 5555 is your port number)
    adb tcpip 5555
    

    adb tcpip 5555
    It doesn’t matter if you get any errors

  3. then enter: (what you noted down from your phone)

    adb connect 192.168.0.101:5555
    
    adb connect 192.168.0.101:5555
  4. It should say connected, If not try again

  5. Once connected go to chrome://inspect/#devices from chrome on your computer, you should now be able to inspect and debug web content on your device from you computer over wifichrome://inspect/#deviceschrome://inspect/#devices tab

If you want to return to debugging with USB enter :

adb usb

ADB over WiFi is not set up, Good luck!

For a healthy mind and body….. Talk to a psychologist

mockDrop_iPhone 6 plus(1)

“For a healthy mind and body….. Talk to a psychologist” is the novel idea at the heart of our startup. We are building an app to make talking to a psychologist simple and hassle free. Thrivo is a messaging app that allows you to message a dedicated psychologist for support on achieving goals and managing life’s many problems securely and discreetly.
We are looking for testers to help develop the app. Help shape our revolutionary service by signing up and sharing this with your friends. Together we can Thrivo.

Sign up at:

http://thrivo.uk/

Swiss hills

Swiss drive

Music to get more work done

This time the music is more energetic and less chilled. Perfect for Programming, writing and screaming.

Playlist

Music to get work done

Message from server: Gone. Check in YouTube if the id PLLpBtd2sPixWJOIexFRHT9wpw8o_HLc6P belongs to a playlist. To locate the id of your playlist check the FAQ of the plugin.

My 2014

Quote of the day app

Screenshot_2014-12-13-12-47-01_framed

 

Download now on the google play store.

Get it on Google Play

Crawley walk