Skip to content

Instantly share code, notes, and snippets.

View jayallen's full-sized avatar

Jay Allen jayallen

View GitHub Profile
#!/usr/bin/perl
# MT registry cookbook
use strict;
use warnings;
use lib qw( lib extlib ../lib ../extlib);
use utf8;
use MT;
use MT::Component;
use Test::More;
@cowboy
cowboy / clone_fast.rb
Created April 12, 2011 21:19
Ruby: Clone Yer GitHub Repos, Fast!
# /usr/bin/env ruby
puts <<-EOF
Clone Yer GitHub Repos, Fast! - v0.2.1 - 4/13/2011
http://benalman.com/
For when you're on a new computer and need all your stuff, fast!
EOF
copyright = <<-EOF
@Simbul
Simbul / pre-commit
Created February 9, 2012 18:06
Git hook to prevent commits on a staging/production branch
#!/usr/bin/env ruby
# This pre-commit hook will prevent any commit to forbidden branches
# (by default, "staging" and "production").
# Put this file in your local repo, in the .git/hooks folder
# and make sure it is executable.
# The name of the file *must* be "pre-commit" for Git to pick it up.
FORBIDDEN_BRANCHES = ["staging", "production"]
@zxcvbnm4709
zxcvbnm4709 / gist:2656197
Created May 10, 2012 22:06
include jQuery in Chrome Console
var script = document.createElement("script");
script.setAttribute("src", "http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js");
script.addEventListener('load', function() {
var script = document.createElement("script");
document.body.appendChild(script);
}, false);
document.body.appendChild(script);
@kmikael
kmikael / README.md
Created July 29, 2012 10:16
Alfred Extensions to create new reminders or notes

Alfred Extensions to create new reminders or notes

OS X Mountain Lion ships with two new apps, Reminders and Notes, which are basically OS X counterparts of the standard iOS apps with the same names. One nice thing about these new apps is that they are scriptable.

This means that I was able to create two simple AppleScripts and thus an Alfred extensions to make a new reminder in the default list and to make a new note in the default folder.

You can view the sources of the AppleScripts below.

Examples

@kvnsmth
kvnsmth / example-subtree-usage.md
Last active March 5, 2023 21:58
A real world usage for git subtrees.

Let's say you have an iOS project, and you want to use some external library, like AFNetworking. How do you integrate it?

With submodules

Add the project to your repo:

git submodule add git@github.com:AFNetworking/AFNetworking.git Vendor/AFNetworking

or something to that effect.

@hjuutilainen
hjuutilainen / Fantastical log messages
Created November 19, 2013 11:47
Log messages by Fantastical (OS X)
19.11.2013 13.41.32,403 secd[540]: securityd_xpc_dictionary_handler Fantastical[1799] copy_matching The operation couldn’t be completed. (OSStatus error -34018 - client has neither application-identifier nor keychain-access-groups entitlements)
19.11.2013 13.41.32,403 Fantastical[1799]: SecOSStatusWith error:[-34018] The operation couldn’t be completed. (OSStatus error -34018 - Remote error : The operation couldn‚Äôt be completed. (OSStatus error -34018 - client has neither application-identifier nor keychain-access-groups entitlements))
19.11.2013 13.41.32,406 secd[540]: securityd_xpc_dictionary_handler Fantastical[1799] copy_matching The operation couldn’t be completed. (OSStatus error -34018 - client has neither application-identifier nor keychain-access-groups entitlements)
19.11.2013 13.41.32,406 Fantastical[1799]: SecOSStatusWith error:[-34018] The operation couldn’t be completed. (OSStatus error -34018 - Remote error : The operation couldn‚Äôt be completed. (OSStatus error -34018 - client has neith