Skip to content

Instantly share code, notes, and snippets.

[user]
name = Justin Williams
email = justinjohnwilliams@gmail.com
signingkey = <yo momma>
[pull]
rebase = true
[alias]
exclude = !sh -c 'echo "$1" >> .git/info/exclude' -
lg = log --color --graph --abbrev-commit --pretty=format:'%C(magenta)%h%Creset -%C(yellow)%d%Creset %C(cyan)%s%Creset %Cgreen(%cr) %C(bold blue)<%an>%Creset'
commits = for-each-ref --count=30 --sort=-committerdate refs/heads/ --format='%(refname:short)'
@jtibbertsma
jtibbertsma / actions.js
Last active December 28, 2020 06:23
react-native-navigation redux middleware example
import { createAction } from 'redux-actions';
import {
NAVIGATION_PUSH,
NAVIGATION_POP,
NAVIGATION_RESET_TO,
NAVIGATION_POP_TO_ROOT
} from './actions';
export const push = createAction(NAVIGATION_PUSH);
export const pop = createAction(NAVIGATION_POP);
@mxriverlynn
mxriverlynn / foo.js
Created September 5, 2012 19:58
a very basic nested model structure
var data = {
name: "foo",
subFoos: [
{name: "bar"},
{name: "baz"},
]
@trcarden
trcarden / gist:3295935
Created August 8, 2012 15:28
Rails 3.2.7 SSL Localhost (no red warnings, no apache config)
# SSL self signed localhost for rails start to finish, no red warnings.
# 1) Create your private key (any password will do, we remove it below)
$ openssl genrsa -des3 -out server.orig.key 2048
# 2) Remove the password
$ openssl rsa -in server.orig.key -out server.key
@jkappers
jkappers / css.css
Last active October 19, 2015 11:07
Micro Optimized CSS for Phark an Gilder/Levin Image Replacement
/* `Utilities
/******************************/
/* Gilder/Levin & Phark image replacement */
a.ir, a.phark { cursor:pointer; text-decoration:none }
a.ir:active, a.phark:active { outline:0 }
.ir, .phark { display:block; position:relative; overflow:hidden }
.ir span { display:block; height:100%; width:100%; position:absolute; top:0; left:0; background:no-repeat 0 0 }
.phark{text-indent:-999em}
@kares
kares / scheduled_job.rb
Created June 14, 2011 11:31
Recurring Job using Delayed::Job
#
# Recurring Job using Delayed::Job
#
# Setup Your job the "plain-old" DJ (perform) way, include this module
# and Your handler will re-schedule itself every time it succeeds.
#
# Sample :
#
# class MyJob
# include Delayed::ScheduledJob