Monday, December 10, 2012

Todoist : Solving cross domain security policy


From https://todoist.com/API/help

Solving cross domain security policy [top]

You cannot use AJAX to directly communicate with Todoist, this is due to browser security policy. You can solve this by communicating with Todoist using a script tag:
var script = document.createElement('script');
script.type = 'text/javascript';
document.getElementsByTagName('head')[0].appendChild(script);
The response data will look like this (callbackFunction will be called):
callbackFunction({ JSON data here });

Sunday, December 2, 2012

GNU Screen Cheat-Sheet

Taken from http://neophob.com/2007/04/gnu-screen-cheat-sheet/
Basics:
–ctrl a c           -> cre­ate new win­dow
–ctrl a A           -> set win­dow name
–ctrl a w           -> show all win­dow
–ctrl a 1|2|3|…   -> switch to win­dow n
–ctrl a ”           -> choose win­dow
–ctrl a ctrl a      -> switch between win­dow
–ctrl a d           -> detach win­dow
–ctrl a ?           -> help
–ctrl a [           -> start copy, move cur­sor to the copy loca­tion, press ENTER, select the chars, press ENTER to copy the selected char­ac­ters to the buffer
–ctrl a ]           -> paste from buffer
How to start screen:

–screen –DR            -> list of detached screen
–screen –r PID         -> attach detached screen ses­sion
–screen –dmS MySes­sion -> start a detached screen ses­sion
–screen –r MySes­sion   -> attach screen ses­sion with name MySession
Advanced:

–ctrl a S       -> cre­ate split screen
–ctrl a TAB     -> switch between split screens
If you cre­ated a new split screen, the cur­rent win­dow is empty. either select an exist­ing win­dow (ctrl a ”) or cre­ate a new split screen (ctrl a n).

–ctrl a Q       -> Kill all regions but the cur­rent one.
–ctrl a X       -> remove active win­dow from split screen
–ctrl a O       -> logout active win­dow (dis­able out­put)
–ctrl a I       -> login active win­dow (enable output)