Skip to content

Instantly share code, notes, and snippets.

View jacob414's full-sized avatar
💭
Retired but semi-active, hobby projects & activism

Jacob Oscarson jacob414

💭
Retired but semi-active, hobby projects & activism
View GitHub Profile
@johanbrook
johanbrook / Johan-dark.css
Created July 10, 2011 13:35
Quick and dirty styling for the Highlight.js (http://softwaremaniacs.org/soft/highlight/en/) syntax highlighter to match my Textmate theme. Todo: Add Sass support.
/*
Custom style for Wordpress Highlight.js plugin.
By Johan Brook (dark on light colours).
*/
pre code {
color: #c4cdc5;
}
@shanbhardwaj
shanbhardwaj / getemacs.sh
Created November 27, 2011 07:26
full screen emacs 24 on osx snow leopard/lion
# Git Emacs 24 from the main Savannah (savannah.gnu.org) repository and apply typester's fullscreen patch
rm -fr emacs
git clone git://git.savannah.gnu.org/emacs.git
cd emacs
wget http://cloud.github.com/downloads/typester/emacs/feature-fullscreen.patch
patch -p1 -i feature-fullscreen.patch
cd ..
curl -O http://ftp.gnu.org/gnu/m4/m4-1.4.13.tar.gz
tar -xzvf m4-1.4.13.tar.gz
cd m4-1.4.13
@pmuellr
pmuellr / weinre-split.html
Created March 1, 2012 13:56
Run weinre and the demo in a single window within a frameset
<!-- ====================================================================== -->
<script>
function onLoad() {
var weinre = 'http://www.example.com/' // <- change to your weinre server base URL
var id = 'testing-1-2-3'
var targetURL = weinre + 'client#' + id
var clientURL = weinre + 'demo/weinre-demo.html#' + id
document.getElementById('target').src = targetURL
@joshaber
joshaber / gist:4230872
Created December 7, 2012 04:57
ReactiveCocoa stopwatch
self.startButton.rac_command = [RACCommand command];
self.stopButton.rac_command = [RACCommand command];
__unsafe_unretained id weakSelf = self;
id<RACSignal> tick = [[[[self.startButton.rac_command
map:^(id _) {
RTAFirstView *strongSelf = weakSelf;
// Map each start button click to a new signal that fires every second
// and stops when the stop button is clicked.
return [[RACSignal interval:1] takeUntil:strongSelf.stopButton.rac_command];
@quiver
quiver / README.md
Last active April 3, 2024 15:47
Who says PostgreSQL can't Pub/Sub like Redis?

Pub/Sub pattern with PostgreSQL's LISTEN/NOTIFY command

This is a simple chat-like program using pub-sub pattern, backed by PostgreSQL's LISTEN/NOTIFY command.

Publish

publish message to foo channel from user nickname.

$ python pub.py foo nickname
PUBLISH to channel #foo
@taldanzig
taldanzig / osxvpnrouting.markdown
Created January 24, 2013 22:14
Routing tips for VPNs on OS X

Routing tips for VPNs on OS X

When VPNs Just Work™, they're a fantastic way of allowing access to a private network from remote locations. When they don't work it can be an experience in frustration. I've had situations where I can connect to a VPN from my Mac, but various networking situations cause routing conflicts. Here are a couple of cases and how I've been able to get around them.

Specific cases

Case 1: conflicting additional routes.

In this example the VPN we are connecting to has a subnet that does not conflict with our local IP, but has additional routes that conflict in some way with our local network's routing. In my example the remote subnet is 10.0.x.0/24, my local subnet is 10.0.y.0/24, and the conflicting route is 10.0.0.0/8. Without the later route, I can't access all hosts on the VPN without manually adding the route after connecting to the VPN:

# MAC manipulators
alias random_mac='sudo ifconfig en0 ether `openssl rand -hex 6 | sed "s/\(..\)/\1:/g; s/.$//"`'
alias restore_mac='sudo ifconfig en0 ether YOUR_ORIGINAL_MAC_ADDRESS_GOES_HERE'
@jwreagor
jwreagor / EmacsKeyBinding.dict
Created March 20, 2014 18:41
Global Emacs Key Bindings for OS X
{
/* Keybindings for emacs emulation. Compiled by Jacob Rus.
*
* This is a pretty good set, especially considering that many emacs bindings
* such as C-o, C-a, C-e, C-k, C-y, C-v, C-f, C-b, C-p, C-n, C-t, and
* perhaps a few more, are already built into the system.
*
* BEWARE:
* This file uses the Option key as a meta key. This has the side-effect
* of overriding Mac OS keybindings for the option key, which generally
@kevinelliott
kevinelliott / osx-10.10-setup.md
Last active December 1, 2023 08:21
Mac OS X 10.10 Yosemite Setup

Mac OS X 10.10 Yosemite

Custom recipe to get OS X 10.10 Yosemite running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.

Install Software