Skip to content

Instantly share code, notes, and snippets.

@marcboeker
marcboeker / authme.sh
Last active June 27, 2016 13:52 — forked from nutrun/gist:252619
SSH password less auth
# twitter.com/michael_jones wrote me
# Put in ~/.profile, or similar
# Use like "authme someuser@someserver"
function authme {
ssh $1 'cat >>~/.ssh/authorized_keys' <~/.ssh/id_rsa.pub
}
@defunkt
defunkt / installing-Mustache.tmbundle.md
Created March 6, 2010 10:27
Installing Mustache.tmbundle
@mjangda
mjangda / console-error.js
Created April 29, 2010 19:37
Protects you from console.log() errors for your IE and Firebug-less Firefox users.
// In case we forget to take out console statements. IE becomes very unhappy when we forget. Let's not make IE unhappy
if(typeof(console) === 'undefined') {
var console = {}
console.log = console.error = console.info = console.debug = console.warn = console.trace = console.dir = console.dirxml = console.group = console.groupEnd = console.time = console.timeEnd = console.assert = console.profile = function() {};
}
@kevinold
kevinold / git-flow_test.sh
Created August 19, 2010 16:45
testing git-flow on existing git repo
# In reply to my own question
# (http://jeffkreeftmeijer.com/2010/why-arent-you-using-git-flow/#comment-69995567)
# about using git-flow with existing git repos I experimented with a dummy
# git repo and it appears rather straight-forward
kold@Macintosh-27 $ git init test_git_flow
Initialized empty Git repository in /private/tmp/test_git_flow/.git/
(/tmp)
kold@Macintosh-27 $ cd test_git_flow/
@mathieucarbou
mathieucarbou / jquery.xdomain.js
Created July 29, 2011 23:45
jQuery CORS Plugin - transparently add CORS support for IE8+ in jQuery using XDomainRequest. Support cookies.
PROJECT MOVED TO https://github.com/Ovea/cors
/**
* https://gist.github.com/1114981
*
* By default, support transferring session cookie with XDomainRequest for IE. The cookie value is by default 'jsessionid'
*
* You can change the session cookie value like this, before including this script:
*
* window.SESSION_COOKIE_NAME = 'PHP_SESSION';
@alexras
alexras / .screenrc
Created August 14, 2011 03:52
My .screenrc file
# Screen Options ##
shell bash # Tell screen your default shell
startup_message off # Turn off start message
defscrollback = 5000
shelltitle '$ |bash' # Dynamic window titled for running program
msgwait 1 # Set messages timeout to one second
nethack on # Turn on nethack error messages
backtick 0 0 0 whoami # Set "%0`" to equal the output of "whoami"
escape ^Oo
@canton7
canton7 / 0main.md
Last active November 7, 2023 08:16
Local versions of tracked config files

How to have local versions of tracked config files in git

This is a fairly common question, and there isn't a One True Answer.

These are the most common techniques:

If you can modify your application

@trey
trey / gist:1645894
Created January 20, 2012 07:02
Git + TextMate

To use TextMate to edit your commit messages, put the following in your ~/.bashrc or ~/.bash_profile (or other dot goodness):

export GIT_EDITOR="mate -w"
@trey
trey / insert_jquery.js
Created February 14, 2012 23:05
Load jQuery into your browser console
s = document.createElement('script');
s.src = 'http://code.jquery.com/jquery-latest.min.js';
document.body.appendChild(s)
@trey
trey / host_switch.php
Created February 15, 2012 23:28
Host name switching in PHP
<?php
switch($_SERVER['HTTP_HOST'])
{
case 'something.dev':
case 'something-else.dev':
// Development settings
break;
case 'something.com':