Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
| Ctrl+C | copy current line (if no selection) |
| Ctrl+X | cut current line (if no selection) |
| Ctrl+⇧+K | delete line |
| Ctrl+↩ | insert line after |
| require 'active_record' | |
| ActiveRecord::Base.logger = Logger.new( STDOUT ) | |
| ActiveRecord::Base.establish_connection( | |
| :adapter => "postgresql", | |
| :host => "localhost", | |
| :username => "philco", | |
| :password => "", | |
| :database => "amazon_db" |
| namespace :travis do | |
| desc "Prepare DB and run Tests" | |
| task :run do | |
| ["rake db:create", "rake db:migrate RAILS_ENV=test", "rake db:seed" | |
| "rspec spec", "rake jasmine:ci"].each do |cmd| | |
| puts "Starting to run #{cmd}..." | |
| system("bundle exec #{cmd}") | |
| raise "#{cmd} failed!" unless $?.exitstatus == 0 | |
| end |
| =Navigating= | |
| visit('/projects') | |
| visit(post_comments_path(post)) | |
| =Clicking links and buttons= | |
| click_link('id-of-link') | |
| click_link('Link Text') | |
| click_button('Save') | |
| click('Link Text') # Click either a link or a button | |
| click('Button Value') |
| # README | |
| # pass in this file when creating a rails project | |
| # | |
| # for example: | |
| # rails _3.2.14_ new awesome_app -d postgresql -m ~/rails_setup.rb | |
| remove_file "README.rdoc" | |
| create_file "README.md", "TODO" | |
| gem_group :development, :test do |
| # README | |
| # pass in this file when creating a rails project | |
| # | |
| # for example: | |
| # rails _3.2.14_ new awesome_app -T -d postgresql -m ~/.kickhash_template.rb | |
| remove_file "README.rdoc" | |
| create_file "README.md", "TODO" | |
| gem_group :development, :test do |
Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
| Ctrl+C | copy current line (if no selection) |
| Ctrl+X | cut current line (if no selection) |
| Ctrl+⇧+K | delete line |
| Ctrl+↩ | insert line after |
| # Adapted from the javascript implementation at http://sedition.com/perl/javascript-fy.html | |
| # Randomizes the order of elements in the passed in array in place. | |
| fisherYates = (arr) -> | |
| i = arr.length; | |
| if i == 0 then return false | |
| while --i | |
| j = Math.floor(Math.random() * (i+1)) | |
| tempi = arr[i] |
| [ | |
| "5 Days With 5 Scholars: History, NAS, Marine Resources, US Constitution, and Hum", | |
| "Across the Dakotas: Adventure Along the Missouri River", | |
| "Alaska Up and Down: From the Arctic Coast to the North Pacific Fjords", | |
| "Another Day, Another Scholar", | |
| "America''s Musical Theater/Astronomy/History of Lake Arrowhead", | |
| "Wolf: An In-Depth Study/Introduction to Astronomy/Walk in the Clouds: View of Li", | |
| "W.E.B. Dubois and the Black Experience", | |
| "Different View of Santa Fe: A Vantage Point That Will Surprise You!", | |
| "The Grand Canyon: Natural & Human History & the Historic Grand Canyon Railway", |
I've sniffed most of the Tinder API to see how it works. You can use this to create bots (etc) very trivially. Some example python bot code is here -> https://gist.github.com/rtt/5a2e0cfa638c938cca59 (horribly quick and dirty, you've been warned!)
Note: this was written in April/May 2014 and the API may have changed since