Skip to content

Instantly share code, notes, and snippets.

View jrhorn424's full-sized avatar
🌟
Always be dreaming

Jeffrey Horn jrhorn424

🌟
Always be dreaming
View GitHub Profile
@jrhorn424
jrhorn424 / _readme.md
Created November 16, 2013 04:59 — forked from mislav/_readme.md

I use tmux splits (panes). Inside one of these panes there's a Vim process, and it has its own splits (windows).

In Vim I have key bindings C-h/j/k/l set to switch windows in the given direction. (Vim default mappings for windows switching are the same, but prefixed with C-W.) I'd like to use the same keystrokes for switching tmux panes.

An extra goal that I've solved with a dirty hack is to toggle between last active panes with C-\.

Here's how it should work:

# Check this into the features that have different schemas as you develop
# Before you merge to master you either comment this out or remove the file
export DATABASE_NAME=cool_story_bro
# First, copy your settings over
ActionMailer::Base.smtp_settings = {
:address => "smtp.mandrillapp.com",
:port => 587,
:domain => "ices-experiments.org",
:user_name => Settings.mandrill_user,
:password => Settings.mandrill_password,
:authentication => "login"
}
@jrhorn424
jrhorn424 / attempting_to_curl.md
Last active November 10, 2015 19:26 — forked from jcmeyer10/gist:ccddcc239676d58094dd
Commands and Error Messages When Trying to POST to my table through CURL

I am trying to run this. I am able to post to the table through Rails C, so I have access from there.

curl --request POST --header "Authorization: Token token="d168c8333a2b72bf7ad7bfe4bb9c669d" --header "Content-Type: application/json" -d '{
  "beer": {
    "name":"UFO"
    "brewery":"Harpoon"
    "style":"Hefe"
    "location_id":"11"
 }
//Verison 0
'use strict';
var counterFactory = function counterFactory() {
return function() {};
};
var firstCounter = counterFactory();
// firstCounter contains a reference to
// a new instance of the minimal function
@jrhorn424
jrhorn424 / age.js
Created October 6, 2015 15:02 — forked from gaand/age.js
var age = function age() {
var dob = new Date(this.dob);
var today = new Date();
var thisYear = today.getFullYear();
if (dob.getMonth() > today.getMonth() ||
dob.getMonth() === today.getMonth() &&
dob.getDate() >= today.getDate()) {
thisYear -= 1;
}
@jrhorn424
jrhorn424 / hack.sh
Created March 31, 2012 22:35 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# Modified to suit my preferences by jrhorn424
# http://github.com/jrhorn424
#
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:

vimdiff cheat sheet

##git mergetool

In the middle file (future merged file), you can navigate between conflicts with ]c and [c.

Choose which version you want to keep with :diffget //2 or :diffget //3 (the //2 and //3 are unique identifiers for the target/master copy and the merge/branch copy file names).

:diffupdate (to remove leftover spacing issues)

:only (once you’re done reviewing all conflicts, this shows only the middle/merged file)

#!/usr/bin/env ruby
require 'rubygems'
require 'twitter'
require 'json'
require 'faraday'
# things you must configure
PATH_TO_DROPBOX = "/Users/your_name/Dropbox/backup/tweets/" # you need to create this folder
TWITTER_USER = "your_twitter_username"

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2: