Skip to content

Instantly share code, notes, and snippets.

View cp's full-sized avatar
:shipit:

Colby Aley cp

:shipit:
View GitHub Profile
// import { ERROR_API_MIDDLEWARE } from '../constants/actions';
import { IAppState } from '../stateTypes';
import { Middleware, Dispatch } from 'redux';
/**
* Middleware that wraps `redux-pack` so that we may provide an API client factory
*/
type Client = any;
type CreateClient = (
dispatch: Dispatch<IAppState>,
@holman
holman / example.png
Created November 5, 2014 05:35
A quick Hubot script to display Uber surge pricing from a particular point (LIKE AN OFFICE).
example.png
@grugq
grugq / gist:03167bed45e774551155
Last active April 6, 2024 10:12
operational pgp - draft

Operational PGP

This is a guide on how to email securely.

There are many guides on how to install and use PGP to encrypt email. This is not one of them. This is a guide on secure communication using email with PGP encryption. If you are not familiar with PGP, please read another guide first. If you are comfortable using PGP to encrypt and decrypt emails, this guide will raise your security to the next level.

# HAIL RUBY
# My response to https://github.com/JacksonGariety/jesus
# Authentication configured through environment variables, per http://rdoc.info/gems/twitter.
require 'twitter'
require 'teller'
loop do
Twitter.unfollow("JacksonGariety")
@RunnerRick
RunnerRick / .sails-ember-bootstrap.md
Last active May 8, 2016 17:24
How To Integrate Sails, Ember, and Twitter Bootstrap
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@mshafrir
mshafrir / states_hash.json
Created May 9, 2012 17:05
US states in JSON form
{
"AL": "Alabama",
"AK": "Alaska",
"AS": "American Samoa",
"AZ": "Arizona",
"AR": "Arkansas",
"CA": "California",
"CO": "Colorado",
"CT": "Connecticut",
"DE": "Delaware",

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@mbostock
mbostock / .block
Last active February 9, 2016 00:51
D3 PJAX
license: gpl-3.0
@jesseproudman
jesseproudman / Auto Scale API Mashup.rb
Created March 16, 2011 18:51
Logic for simple Auto Scale setup
require 'rubygems'; require 'active_resource'; require 'new_relic_api'
servers = File.open("server_count.txt", "r").first.to_i
instances_per_server = 6
cpu_burn_for_system = 1000.0 * 0.20
NewRelicApi.api_key = "<Your API Key>"
account = NewRelicApi::Account.find(:first);
application = account.applications[3];