Skip to content

Instantly share code, notes, and snippets.

View jmeridth's full-sized avatar
:shipit:
ship to learn

JM (Jason Meridth) jmeridth

:shipit:
ship to learn
View GitHub Profile
@endolith
endolith / gcd_and_lcm.py
Last active June 22, 2022 23:33
GCD and LCM functions in Python for several numbers
# 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
--------
@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=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')
@jmeridth
jmeridth / WindowsInstallList.txt
Created September 1, 2010 15:30
Windows Install List
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
@carlosantoniodasilva
carlosantoniodasilva / post-receive
Created February 9, 2011 01:28
Basic git post-receive hook file to deploy a Rails app.
#!/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"
@rstacruz
rstacruz / index.md
Last active November 3, 2023 09:56
Rails models cheatsheet

Rails Models

Generating models

$ rails g model User

Associations

belongs_to

has_one

@JoshuaEstes
JoshuaEstes / 000-Cheat-Sheets.md
Last active May 1, 2024 04:03
Developer Cheat Sheets for bash, git, gpg, irssi, mutt, tmux, and vim. See my dotfiles repository for extra info.
@MattDietz
MattDietz / Team Philosophy
Last active August 28, 2017 16:35
Team Philosophy
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.
@rconradharris
rconradharris / git ls
Created October 18, 2013 15:02
Useful alias for seeing recent branches
[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{}' {}
@rusllonrails
rusllonrails / UBUNTU DOCKER FIG ERROR
Created August 14, 2014 12:16
UBUNTU DOCKER FIG ERROR
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
@dtan4
dtan4 / Dockerfile
Created January 21, 2015 06:51
Minimal Sinatra Application on Docker
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