Numbers
1 + 1
``
##heroku | |
alias hp="heroku_helper production" | |
alias hs="heroku_helper staging" | |
alias hpc="heroku_helper production run console" | |
alias hpl="heroku_helper production logs" | |
alias hprdbm="heroku_helper production run rake db:migrate" | |
alias hsc="heroku_helper staging run console" | |
alias hsl="heroku_helper staging logs" |
I hereby claim:
To claim this, I am signing this object:
defmodule TspSolver.Fitness do | |
import TspSolver.Helpers | |
@city_distances HashDict.new( | |
[ | |
{ {:Aberdeen, :Dundee}, 67 }, | |
{ {:Aberdeen, :Edinburgh}, 129 }, | |
{ {:Aberdeen, :Glasgow}, 146 }, | |
{ {:Aberdeen, :Inverness}, 105 }, | |
{ {:Aberdeen, :Perth}, 84 }, |
{ | |
"color_scheme": "Packages/Theme - Railscasts/Railscasts.tmTheme", | |
"font_face": "monaco", | |
"font_size": 14, | |
"save_on_focus_lost": true, | |
"tab_size": 2, | |
"translate_tabs_to_spaces": true, | |
"trim_trailing_white_space_on_save": true | |
} |
#!/usr/bin/env ruby | |
class NaNoBot | |
TARGET_WORDS = 50000 | |
TOTAL_DAYS = 30 | |
WELL_DONE = [ | |
"Get in!", | |
"Doing great!", | |
"Nice job!", |
#!/usr/bin/env ruby | |
## | |
# script to amend a commit which should be been created with the previous script | |
## | |
commit_message = `git log --format=%B -1`.strip | |
branch_name = `git rev-parse --abbrev-ref HEAD`.strip | |
matches = branch_name.match (/\w\-(\d+)\Z/i) |
def create | |
user = User.find_by_omniauth(request.env["omniauth.auth"]) | |
if user | |
path = root_url | |
else | |
user = User.create_with_omniauth(request.env["omniauth.auth"]) | |
path = edit_user_path(user) | |
session[:new_user] = true | |
end | |
session[:user_id] = user.id |
" Default color scheme | |
color vibrantink | |
" Change cursor in insert mode | |
if exists('$TMUX') | |
let &t_SI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=1\x7\<Esc>\\" | |
let &t_EI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=0\x7\<Esc>\\" | |
else | |
let &t_SI = "\<Esc>]50;CursorShape=1\x7" | |
let &t_EI = "\<Esc>]50;CursorShape=0\x7" |
## README | |
# This is a quick script I hacked out to migrate all my heroku apps | |
# to the new free individual postgres DBs. To use it: | |
# - install the heroku gem if you don't already have it | |
# - set the value of IGNORE_OTHERS_APPS to true if you only want to | |
# run the script against apps you've created yourself | |
# - add any apps you want to ignore because they don't use PostgreSQL | |
# (or for any other reason) to the IGNORE_LIST | |
## CAVEAT!! |