Skip to content

Instantly share code, notes, and snippets.

Welcome to Drift!

Drift is an always-already versioned, cloud-backed text editor. You can use it to take notes, and save them in the GitHub cloud.

Your gists are always saved locally, and any changes you make will get pushed to GitHub's servers.

To name a gist, touch its name in the toolbar.

You can use the share button at the top-right to copy a link to one of your gists, or view it on the web in Safari.

class Test
def test(test)
Test
end
end
# (c) 2012 Luca Guidi (lucaguidi.com) – Released under MIT License
#
# It prompts:
# *[master][~/Developer/epts]% rb:1.9.3-p0
#
# Meaning:
# - The asterisk is for mark uncommitted git changes
# - In the square brackets are respectively: for the current git branch
# and for the current directory
# - The percent is the prompt
# Custom server level rewrites go here.
# This means that you can also enter custom rewrite locations here.
# Only apply redirects to GET requests
if ($request_method = 'GET') {
rewrite ^/people/(.*)/projects$ /authors/$1 redirect;
rewrite ^/people/(.*)/results$ /authors/$1 redirect;
rewrite ^/people/(.*)/projects/work_in_progress$ /authors/$1/projects/work_in_progress redirect;
rewrite ^/people/(.*)/projects/realized_works$ /authors/$1/projects/realized_works redirect;
rewrite ^/people/(.*)/projects/competitions$ /authors/$1/projects/competitions redirect;
rewrite ^/sources/(.*)/results(.*)$ /results redirect;
rewrite ^/countries/(.*)/results(.*)$ /results redirect;
rewrite ^/projects.css(.*)$ /projects redirect;
rewrite ^/regions/(.*)/results(.*)$ /results redirect;
rewrite ^/projects.html(.*)$ /projects redirect;
rewrite ^/categories/(.*)/results(.*)$ /results redirect;
rewrite ^/provinces/(.*)/results(.*)$ /results redirect;
rewrite ^/sources/(.*)/results(.*)$ /results redirect;
rewrite ^/countries/(.*)/results(.*)$ /results redirect;
rewrite ^/projects.css(.*)$ /projects redirect;
rewrite ^/regions/(.*)/results(.*)$ /results redirect;
rewrite ^/projects.html(.*)$ /projects redirect;
rewrite ^/categories/(.*)/results(.*)$ /results redirect;

Drift

Welcome to Drift!

Drift is an always-already versioned, cloud-backed text editor. You can use it to take notes, and save them in the GitHub cloud.

Your gists are always saved locally, and any changes you make will get pushed to GitHub's servers.

To name a gist, touch its name in the toolbar.

You can use the share button at the top-right to copy a link to one of your gists, or view it on the web in Safari.

{
/* Modifier keys: start with C-m */
"^m" = {
"^ " = ("insertText:", "\U2423"); /* C-space space */
"^e" = ("insertText:", "\U21A9"); /* C-e return */
"e" = ("insertText:", "\U2305"); /* e enter */
"^t" = ("insertText:", "\U21E5"); /* C-t tab */
"t" = ("insertText:", "\U21E4"); /* t backtab */