Skip to content

Instantly share code, notes, and snippets.

View thomasjo's full-sized avatar
🍉

Thomas Johansen thomasjo

🍉
View GitHub Profile
@thomasjo
thomasjo / subl_icon.sh
Created January 23, 2014 17:29
Shell script that replaces the default Sublime Text icon on OS X with a much nicer looking icon
#!/usr/bin/bash
cp /Applications/Sublime\ Text.app/Contents/Resources/Sublime\ Text.icns /Applications/Sublime\ Text.app/Contents/Resources/Sublime\ Text.icns.orig
curl https://raw.github.com/dmatarazzo/Sublime-Text-2-Icon/master/Sublime%20Text%202.icns -o /Applications/Sublime\ Text.app/Contents/Resources/Sublime\ Text.icns
cp -R /Applications/Sublime\ Text.app /Applications/Sublime\ Text.app.hack
rm -rf /Applications/Sublime\ Text.app
mv /Applications/Sublime\ Text.app.hack /Applications/Sublime\ Text.app

Installing Mono 3.2.5 from source on Ubuntu 12.04 LTS

The first step is optional, but assumed throughout the rest of this guide for the sake of brevity;

$ sudo -s

First we'll need to install some prerequisites

$ apt-get install autoconf automake libtool g++ gettext libglib2.0-dev libfontconfig1-dev

@thomasjo
thomasjo / gist:3312521
Created August 10, 2012 08:06
Useful Git aliases
[alias]
# Lists commits in current branch not present on upstream tracking branch
new = log @{u}..
@thomasjo
thomasjo / jquery.spin.js
Created May 29, 2012 19:12 — forked from innotekservices/jquery.spin.js
jQuery Plugin for Spin.js
/*
You can now create a spinner using any of the variants below:
$("#el").spin(); // Produces default Spinner using the text color of #el.
$("#el").spin("small"); // Produces a 'small' Spinner using the text color of #el.
$("#el").spin("large", "white"); // Produces a 'large' Spinner in white (or any valid CSS color).
$("#el").spin({ ... }); // Produces a Spinner using your custom settings.
$("#el").spin(false); // Kills the spinner.
@thomasjo
thomasjo / object_utils.rb
Created March 9, 2012 07:14
Useful Object extensions
class Object
def local_methods(obj = self)
(obj.methods - obj.class.superclass.instance_methods).sort
end
end
@thomasjo
thomasjo / gist:1066628
Created July 6, 2011 05:30
Bloated WCF binding
<binding
name="AdaptiveAuthenticationInterface"
closeTimeout="00:01:00"
openTimeout="00:01:00"
receiveTimeout="00:10:00"
sendTimeout="00:01:00"
allowCookies="false"
bypassProxyOnLocal="false"
hostNameComparisonMode="StrongWildcard"
maxBufferSize="65536"
@thomasjo
thomasjo / if_unless.cs
Created May 20, 2011 01:15
if vs. unless
if (!someVar && !someOtherVar) {
}
// If we had unless, we could do this
unless (someVar && someOtherVar) {
}
@thomasjo
thomasjo / vim.rb
Created April 26, 2011 08:55 — forked from uasi/vim.rb
Vim formula for Homebrew
require 'formula'
class Vim < Formula
homepage 'http://www.vim.org/'
url 'ftp://ftp.vim.org/pub/vim/unix/vim-7.3.tar.bz2'
sha256 '5c5d5d6e07f1bbc49b6fe3906ff8a7e39b049928b68195b38e3e3d347100221d'
version '7.3.162'
def features; %w(tiny small normal big huge) end
def interp; %w(lua mzscheme perl python python3 tcl ruby) end
@thomasjo
thomasjo / Chirpy.ConsoleRedux.cs
Created April 5, 2011 23:40
NOTE: This code sample is not great, but it works.
using System;
using System.IO;
using Zippy.Chirp;
using Zippy.Chirp.Engines;
namespace Chirpy.ConsoleRedux
{
public class Program
{
public static void Main(string[] args)
prin·ci·ple/ˈprinsəpəl/Noun
1. A fundamental truth or proposition that serves as the foundation for a system of belief or behavior or for a chain of reasoning.
2. A rule or belief governing one's personal behavior.