Skip to content

Instantly share code, notes, and snippets.

View fielding's full-sized avatar
🙊

Fielding Johnston fielding

🙊
View GitHub Profile
@fielding
fielding / git-multi-status.sh
Last active August 29, 2015 14:12 — forked from c0wfunk/git-multi-status.sh
script to recursively view the status of multiple git repositories
#!/bin/bash
# original at https://gist.github.com/c0wfunk/3666392
# revised by Fielding Johnston for personal use
# most recent available at
# https://gist.github.com/justfielding/f64f7729ae1c0683e3c9
# usage: $0 source_dir [source_dir] ...
# where source_dir args are directories containing git repositories
@fielding
fielding / wowcolorconvert.py
Created March 7, 2015 00:47
Warcraft Class colors converted to their closest 256-color match
#!/usr/bin/env python
import json
from colored import fg, bg, attr
classes = json.loads('{'
'"Priest": "231",'
'"Rogue": "227",'
'"Mage": "81",'
'"Paladin": "211",'
@fielding
fielding / hash.js
Created June 14, 2015 16:09
node script to generate john the ripper wordlist to crack insanity+ rar instead of following Hopsin's crazy engrish instructions
// this was a lazy hack, so use:
//
// sudo launchctl limit maxfiles 1000000 1000000
//
//
// to get past the kqueue error on writing to the wordlist file
var ascii = 'abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ<>{}()[]":;-+=*&?^%$#@!~`_/|,.';
var hkeys = "0123456789";
@fielding
fielding / prl_tools-2.6.37.patch
Created February 11, 2012 13:28
prl_tools-2.6.37.patch
diff -cr prl_mod/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c prl_mod_patched/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c
*** prl_mod/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c 2010-12-20 20:53:25.000000000 +0100
--- prl_mod_patched/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c 2011-01-09 00:35:59.084213064 +0100
***************
*** 368,374 ****
init_buffer_descriptor(&bd, &pattr, PATTR_STRUCT_SIZE, 0, 0);
ret = host_request_attr(sb, p, buflen, &bd);
if (ret == 0)
! ret = inode_setattr(dentry->d_inode, attr);
dentry->d_time = 0;
@fielding
fielding / conditional-url-forwarding.js
Created March 13, 2012 01:58 — forked from tomeast/conditional-url-forwarding.js
Conditional URL rewrite forwarding
var http = require('http'),
httpProxy = require('http-proxy');
//
// Create a new instance of HttProxy to use in your server
//
var proxy = new httpProxy.HttpProxy();
//will match the root url or
//a request for any html pages
@fielding
fielding / config.ru
Created March 26, 2012 13:24
config.ru for node.js projects with pow
require "net/http"
class ProxyApp
def call(env)
begin
request = Rack::Request.new(env)
headers = {}
env.each do |key, value|
if key =~ /^http_(.*)/i
headers[$1] = value
@fielding
fielding / gist:2318434
Created April 6, 2012 09:18
gfm-pre-processor
#!/usr/bin/env ruby
require 'rubygems'
require 'redcarpet'
require 'Pygments'
class HTMLwithPygments < Redcarpet::Render::XHTML
# def doc_header()
# puts Pygments.styles()
# monokai
@fielding
fielding / d3status.scpt
Created June 26, 2012 12:22
d3 Americas Server Status
global d3status
on run
set d3status to ""
end run
on idle
if d3status is not "Available" then
set thesource to do shell script "curl us.battle.net/d3/en/status"
set atid to AppleScript's text item delimiters
@fielding
fielding / Entity.h
Created June 12, 2013 22:23
Early version of entities as more than just IDs
#include <unordered_map>
#include "common.h"
class Entity
{
public:
Entity();
template<typename T> void addComponent(T* comp)
{
@fielding
fielding / mbsetup.md
Last active December 25, 2015 17:59
MBAIR setup

Macbook Air Setup

App Installation

  • Installed Apps from the Apple App Store
    • Xcode
    • DayOne
    • Apptivate
    • Marked
  • Twitter