Skip to content

Instantly share code, notes, and snippets.

This document has moved!

It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.

Common Rails Commands

rake db:create

  • Creates all the databases specified in config/database.yml

rake db:migrate

  • Run existing migrations in db/migrate
  • Generates the schema.rb file
@pboling
pboling / slim_vs_haml.md
Last active February 11, 2024 16:33
Slim vs Haml

Analysis of Slim vs. Haml Project Health

  • Static data as of April 13, 2015, some updates as of October 1, 2015
# Metric Haml Slim Winner
1 Issues Open Issues Open Issues Slim
2 Stars Stars Open Issues Slim
3 Quality Code Climate technical debt Code Climate maintainability -- Haml
4 Test Coverage ![Code Climate coverage](https://i

GA Logo

WDI Admissions Assignment

For Opportunity Fund Applicants

We'd love to learn more about you and your interest in programming. In order to be successful in WDI, you really have to enjoy programming, and the only way to truly know that is for you to try it. With that in mind, we'd like you to do some coding before your next interview, and then chat with us about your work. Specifically, we'd like you to:

  1. First, complete the introductory tutorials on Dash. Please complete all parts of the first two projects – you'll learn how to create a simple personal website and build a responsive blog. The other sections are certainly helpful, but you won't need to incorporate what you learn from part 3 onwards into your personal website.

  2. Get set up with your own environment. Watch the video here to learn how t

@iangreenleaf
iangreenleaf / gist:b206d09c587e8fc6399e
Last active December 20, 2024 19:50
Rails naming conventions

Rails naming conventions

General Ruby conventions

Class names are CamelCase.

Methods and variables are snake_case.

Methods with a ? suffix will return a boolean.

@bachya
bachya / Add File to Evernote.scpt
Created September 5, 2014 05:28
Simple Applescript to add a file to Evernote
tell application "Evernote"
activate
create note from file theFile notebook {"Personal Archive"} tags {"receipt/statement"}
end tell
--------------------------------------------------
--------------------------------------------------
-- Import tasks from Things to OmniFocus
--------------------------------------------------
--------------------------------------------------
--
-- Script taken from: http://forums.omnigroup.com/showthread.php?t=14846&page=2
-- Added: creation date, due date, start date functionality
-- Empty your Things Trash first.
-- Note that this won't move over scheduled recurring tasks.
@trey
trey / git-commit-author-rewrite.md
Last active December 18, 2024 05:46
Change the email address for a git commit.

Change the email address for a git commit.

$ git commit --amend --author="Author Name <email@address.com>"

or

$ git commit --amend --reset-author
@jbenet
jbenet / simple-git-branching-model.md
Last active November 9, 2024 04:55
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

@tomas-stefano
tomas-stefano / Capybara.md
Last active December 6, 2024 09:30
Capybara cheatsheet

Capybara Actions

# Anchor
click_link 'Save'

# Button
click_button 'awesome'

# Both above