Drift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
/* 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 */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
/* 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 */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GET /projects/new | |
def new | |
@project = Project.new | |
render :layout => "projects_editing" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Video < ActiveRecord::Base | |
validates_presence_of :title, :embed_code | |
def self.published | |
find :first, :conditions => "state = 'published'" | |
end | |
def published? | |
state == "published" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Video < ActiveRecord::Base | |
validates_presence_of :title, :embed_code | |
def self.published | |
find :first, :conditions => "state = 'published'" | |
end | |
def published? | |
state == "published" | |
end |