Skip to content

Instantly share code, notes, and snippets.

View rhannequin's full-sized avatar

Rémy Hannequin rhannequin

View GitHub Profile
@pcreux
pcreux / Gemfile
Last active December 11, 2023 20:24
Fast Rails + Heroku Configuration
group :production do
gem 'unicorn'
# Enable gzip compression on heroku, but don't compress images.
gem 'heroku-deflater'
# Heroku injects it if it's not in there already
gem 'rails_12factor'
end
function Animal(name, age){
var animal = this
// animal is the object
animal.name = name
animal.age = age
return animal
}
Animal.prototype.addYears = addYears
function addYears(years){
@madx
madx / .gitconfig
Created March 13, 2013 16:41
Speed up conflict resolution in Git!
[alias]
resolve = !sh -c 'git conflicts && $EDITOR $(git conflicts) +\"/<<<<\"'
conflicts = !sh -c 'git status -sb | grep ^UU | sed "s/UU\\ //"'
@madx
madx / irsay.sh
Last active April 2, 2019 22:51
A minimalist IRC client in Bash. Could also be used as a bot.
#!/bin/bash
[ -z "$channel" ] && channel="#bobot"
[ -z "$server" ] && server="irc.freenode.net"
[ -z "$port" ] && port="6667"
[ -z "$user" ] && user=$USER
function irc_session () {
# Login phase
echo "USER $user 0 * :$user"
echo "NICK $user"
@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')
@technoweenie
technoweenie / github_oauth_busy_developer_guide.md
Created May 30, 2010 18:34
GitHub OAuth Busy Developer's Guide

GitHub OAuth Busy Developer's Guide

This is a quick guide to OAuth2 support in GitHub for developers. This is still experimental and could change at any moment. This Gist will serve as a living document until it becomes finalized at Develop.GitHub.com.

OAuth2 is a protocol that lets external apps request authorization to private details in your GitHub account without getting your password. All developers need to register their application before getting started.

Web Application Flow

  • Redirect to this link to request GitHub access: