$ rails g model User
belongs_to
has_one
# Greatest common divisor of 1 or more numbers. | |
from functools import reduce | |
def gcd(*numbers): | |
""" | |
Return the greatest common divisor of 1 or more integers | |
Examples | |
-------- |
=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') |
Windows 7 OS | |
Microsoft Security Essentials | |
Virtual CloneDrive (to mount ISOs) | |
http://static.slysoft.com/SetupVirtualCloneDrive.exe | |
Notepad++ | |
Visual Studio 2008 w/ SP1 | |
Visual Studio 2010 Ultimate | |
ReSharper | |
Console2 | |
msysgit |
#!/bin/bash | |
APP_NAME="your-app-name-goes-here" | |
APP_PATH=/home/deploy/${APP_NAME} | |
# Production environment | |
export RAILS_ENV="production" | |
# This loads RVM into a shell session. Uncomment if you're using RVM system wide. | |
# [[ -s "/usr/local/lib/rvm" ]] && . "/usr/local/lib/rvm" |
This is an ivory tower, but we're going to aim high. Patches Accepted. | |
No dissent goes undiscussed. Everyone has equal say. | |
You won't always get your way. | |
All debates must end with a constructive conclusion and a direction forward, and the sooner the better. | |
Encourage Sharing: Everyone has legimitate ideas worthy of validation | |
We only succeed or fail as a team | |
Always present a possible solution after presenting a problem | |
We will communicate with our teammates if any issues arise | |
Educating your peers is never a waste of time. |
[alias] | |
ls = ! git for-each-ref --sort='-committerdate' --format='%(refname:short)' refs/heads | xargs -n1 -I{} git log -n1 --pretty=format:'%Cblue%cr%Creset%x09{}' {} |
FIX FOR: Couldn't connect to Docker daemon at http+unix://var/run/docker.sock - is it running? | |
Change the DOCKER_OPTS in /etc/default/docker to: | |
DOCKER_OPTS="-H tcp://127.0.0.1:4243 -H unix:///var/run/docker.sock" | |
Ruslan Khamidullin [1:57 PM] netstat -ant |grep 4243 | |
tcp 0 0 127.0.0.1:4243 0.0.0.0:* LISTEN | |
Ruslan Khamidullin [1:57 PM] export DOCKER_HOST=tcp://localhost:4243 |
FROM ruby:2.2.0 | |
RUN bundle config --global frozen 1 | |
RUN mkdir -p /usr/src/app | |
WORKDIR /usr/src/app | |
ADD Gemfile /usr/src/app/ | |
ADD Gemfile.lock /usr/src/app/ | |
RUN bundle install --without test development --system |