Skip to content

Instantly share code, notes, and snippets.

View jessejlt's full-sized avatar

Jesse Thompson jessejlt

View GitHub Profile
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active April 27, 2024 18:27
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
@vsouza
vsouza / .bashrc
Last active April 9, 2024 05:27
Golang setup in Mac OSX with HomeBrew. Set `GOPATH` and `GOROOT` variables in zshell, fish or bash.
# Set variables in .bashrc file
# don't forget to change your path correctly!
export GOPATH=$HOME/golang
export GOROOT=/usr/local/opt/go/libexec
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin
@bketelsen
bketelsen / nsqadmin-service.json
Last active March 20, 2024 07:10
This gist represents all the manifests you'll need to run a redundant and fault-tolerant NSQ cluster on Kubernetes. NSQ Admin's http interface is available on port 14171 on any node. There's an issue with NSQ Admin if you're running more than one lookupd service, so I recommend running just one lookupd until I figure it out.
{
"id": "nsqadmin-http",
"kind": "Service",
"apiVersion": "v1beta1",
"port": 14171,
"protocol": "TCP",
"selector": { "name": "nsqadmin" }
}
@johnbender
johnbender / prefs.js
Created February 23, 2013 06:20
Set up Chrome Secure Shell to handle solarized terminal colors
// Disable bold.
term_.prefs_.set('enable-bold', false)
// Use this for Solarized Dark
term_.prefs_.set('background-color', "#002b36");
term_.prefs_.set('foreground-color', "#839496");
term_.prefs_.set('color-palette-overrides', [
'#073642',
'#dc322f',
@Daniel15
Daniel15 / 1_README.md
Last active February 12, 2024 19:14
Complete Google Drive File Picker example

Google Drive File Picker Example

This is an example of how to use the Google Drive file picker and Google Drive API to retrieve files from Google Drive using pure JavaScript. At the time of writing (14th July 2013), Google have good examples for using these two APIs separately, but no documentation on using them together.

Note that this is just sample code, designed to be concise to demonstrate the API. In a production environment, you should include more error handling.

See a demo at http://stuff.dan.cx/js/filepicker/google/

@rustle
rustle / gist:4115414
Created November 20, 2012 01:45
Source Tree with Kaleidoscope 2 beta

SourceTree does not yet officially support Kaleidoscope 2, so here is how to set it up:

In Preferences, under Diff:

Screen Shot

You can try selecting Kaleidoscope, but we have had reports of mixed results. Some people have rebuilt their launch services database and restarted and been able to use Kaleidoscope this way:

/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain use

@tbranyen
tbranyen / server.js
Last active July 4, 2021 18:44
backbone/node.js pushState enabled server
// Require libraries
var os = require("os");
var fs = require("fs");
var readline = require("readline");
var cluster = require("cluster");
var express = require("express");
var site = express();
// Var up, bro
var i, read;
@eleclerc
eleclerc / Solarized (Dark).tmTheme
Created February 25, 2012 00:38
Solarized theme (dark & light) with markdown support for Sublime Text 2 editor
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Solarized (dark)</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>
@legumbre
legumbre / foo.md
Created June 29, 2012 00:14
resolving merge conflicts with magit-ediff

Use magit-ediff to resolve merge conflicts

Use magit-ediff or 'e' on an unmerged item to resolve merge conflicts with ediff. Magit will set up an ediff with three buffers A, B and C. A and B are the original (conflicting) files, and C is the conflicted merge.

Use 'n'/'p' to move to the next/previous conflict, use 'a'/'b' to choose which changes (those in a A or B) should be the ones to keep in the merged file.

You can always just switch to buffer C and edit what the merged version should look like.