Skip to content

Instantly share code, notes, and snippets.

@sindresorhus
sindresorhus / .profile
Created Apr 6, 2016 — forked from bmhatfield/.profile
Automatic Git commit signing with GPG on OSX
View .profile
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running.
# Add the following to your shell init to set up gpg-agent automatically for every shell
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then
source ~/.gnupg/.gpg-agent-info
export GPG_AGENT_INFO
else
@threedaymonk
threedaymonk / .gitignore
Last active Jan 3, 2016
Little Schemer group, chapter 1
View .gitignore
*.pdf
*.dot
View jump_to_project.sh
#!/usr/bin/env bash
function p() {
PROJECT_PATH=~/Sites
results=(`find $PROJECT_PATH -type d -maxdepth 3 -iname "*$1*"`)
count=${#results[@]}
if [ $count -gt 1 ]; then
echo ""
View insane-magic.spec
$ rspec ~/insane-magic.spec
F
Failures:
1) Rspec should not allow you to make shit up
Failure/Error: [1, 2, 3].should have(4).potatoes
expected 4 potatoes, got 3
# /Users/graham/insane-magic.spec:5
@caike
caike / Riffle.js
Created Mar 27, 2011
encapsulation
View Riffle.js
function Rifle(rounds) {
var _rounds = rounds
, _reloadingMechanism;
function _setRound(roundNumber){
_rounds = roundNumber;
}
@jgwhite
jgwhite / Pre-flight
Created Dec 1, 2010
Pre-flight QA Checklist
View Pre-flight
- airbrake
- newrelic
- todos
- robots.txt
- favicon
- apple-touch-icon
- caching
- meta description
- title
- browser compatibility
View nginx, php-fpm on ubuntu (no mysql server)
#!/bin/bash
# WEB SERVER
sudo apt-get update
sudo apt-get install nginx
# APPS FROM SOURCE
cd /usr/local/src/
# PHP (w/FPM for NGINX)
You can’t perform that action at this time.