Skip to content

Instantly share code, notes, and snippets.

View jpemberthy's full-sized avatar

Juan Pemberthy jpemberthy

View GitHub Profile
@vermagav
vermagav / learning_go.md
Last active April 9, 2023 22:23
Learning Go
@justintanner
justintanner / emacs_hammerspoon.lua
Last active April 29, 2023 23:58
Emacs Hammerspoon Script
--- Emacs Hammerspoon Script
-- Author: Justin Tanner
-- Email: work@jwtanner.com
-- License: MIT
--- What does this thing do?
-- Allows you to have Emacs *like* keybindings in apps other than Emacs.
-- You can use Ctrl-Space to mark and cut text just like Emacs. Also enables Emacs prefix keys such as Ctrl-xs (save).
--- Installation
@jpemberthy
jpemberthy / statsd.md
Last active June 4, 2018 00:58
StatsD + Graphite on Mavericks

StatsD + Graphite backend on Mavericks.

I highly recommend using virtualenv for this.

Create your env

mkdir statsd
virtualenv env
env/bin/activate
# source-file ...
# Use C-a for the prefix
set -g prefix C-a
unbind C-b
# Basic settings
set -sg escape-time 1
set -g base-index 1
set -g pane-base-index 1
@trusktr
trusktr / DefaultKeyBinding.dict
Last active May 11, 2024 02:46
My DefaultKeyBinding.dict for Mac OS X
/* ~/Library/KeyBindings/DefaultKeyBinding.Dict
This file remaps the key bindings of a single user on Mac OS X 10.5 to more
closely match default behavior on Windows systems. This makes the Command key
behave like Windows Control key. To use Control instead of Command, either swap
Control and Command in Apple->System Preferences->Keyboard->Modifier Keys...
or replace @ with ^ in this file.
Here is a rough cheatsheet for syntax.
Key Modifiers
@staltz
staltz / introrx.md
Last active May 10, 2024 12:08
The introduction to Reactive Programming you've been missing
@zackdever
zackdever / gist:8701478
Created January 30, 2014 02:23
arc diff off another diff
taken directly from https://sites.google.com/a/khanacademy.org/forge/for-developers/code-review-policy/using-phabricator
Advanced topic: Dependent Phabricator reviews
Say you have an upstream called master, and a feature branch F1, and a second change that depends on F1, (call it F2).
git checkout master
git checkout -b F1
# work work
git commit -a
arc diff
@avendael
avendael / vimium.conf
Created October 17, 2013 17:06
Emacs keybindings for vimium. Paste this into vimium's advanced settings.
map <c-n> scrollDown
map <c-p> scrollUp
map <c-b> scrollLeft
map <c-f> scrollFullPageDown
map <c-b> scrollFullPageUp
map <c-v> scrollFullPageDown
map <a-v> scrollFullPageUp
map <c-w> copyCurrentUrl
map <a-w> copyCurrentUrl
map <c-k> copyCurrentUrl
100 = :continue
101 = :switching_protocols
102 = :processing
200 = :ok
201 = :created
202 = :accepted
203 = :non_authoritative_information
204 = :no_content
205 = :reset_content
206 = :partial_content
@jpemberthy
jpemberthy / foo.rb
Last active December 15, 2015 11:59
class Foo
def threaded_upload
t1 = Time.now
threads = []
100.times do |i|
threads << Thread.new(i) do |i|
uploader = Attachment::Uploader.new
uploader.upload("0" * 20 * 1024, "threaded/#{i}")
end