Skip to content

Instantly share code, notes, and snippets.

View dirtystylus's full-sized avatar

Mark Llobrera dirtystylus

View GitHub Profile
#!/bin/bash
cat .gitignore | egrep -v "^#|^$" | while read line; do
if [ -n "$line" ]; then
OLD_IFS=$IFS; IFS=""
for ignored_file in $( git ls-files "$line" ); do
git rm --cached "$ignored_file"
done
IFS=$OLD_IFS
fi
@cowboy
cowboy / github_post_recieve.php
Created October 11, 2010 02:04
GitHub PHP webhook to auto-pull on repo push
<?php
// Use in the "Post-Receive URLs" section of your GitHub repo.
if ( $_POST['payload'] ) {
shell_exec( 'cd /srv/www/git-repo/ && git reset --hard HEAD && git pull' );
}
?>hi
@brandonkelly
brandonkelly / Make 'git difftool' use Changes.app
Created October 30, 2010 13:41
Make 'git difftool' use Changes.app
After clicking Changes > Install Terminal Utility…, add this to ~/.gitconfig:
[diff]
tool = changes-app
[difftool "changes-app"]
cmd = /usr/bin/chdiff $LOCAL $REMOTE
[difftool]
@mja
mja / .gitconfig-changes-difftool
Created December 16, 2010 18:40
Using Changes.app as the difftool for git
[diff]
tool = chdiff
[difftool]
prompt = false
[difftool "chdiff"]
cmd = /usr/bin/env chdiff "$LOCAL" "$REMOTE"
@danott
danott / modernizr-tests.js
Created March 4, 2011 16:55
Custom Modernizr tests that are useful.
/* modernizr-test.js
* Daniel Ott
* 3 March 2011
* Custom Tests using Modernizr's addTest API
*/
/* iOS
* There may be times when we need a quick way to reference whether iOS is in play or not.
* While a primative means, will be helpful for that.
*/
@artero
artero / launch_sublime_from_terminal.markdown
Last active May 15, 2024 03:38 — forked from olivierlacan/launch_sublime_from_terminal.markdown
Launch Sublime Text 2 from the Mac OS X Terminal

Launch Sublime Text 2 from the Mac OS X Terminal

Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.

open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl

You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html

Installation

@indytechcook
indytechcook / custom_bean.info
Created December 11, 2011 14:18
Bean Listing Exammple
name = Custom Beans
description = My Custom Beans
core = 7.x
files[] = "custom_bean.listing.inc"
@Postobject
Postobject / 1- Reading List
Last active December 30, 2016 15:06
Reading List
Here is list of books that are near and dear to me. Things I wish everyone else had a chance to read
and love and read again,the way I have and hope to continue to do. All the books on this list have
informed who I am and how I think about the things I love to think about. It will stop growing when
I stop growing. If you read any of these and find yourself in a better place, I'll be very happy. Enjoy.
@nicoleslaw
nicoleslaw / 1_Tiny_Content_Framework.md
Last active January 23, 2024 02:28
Tiny Content Framework

Tiny Content Framework

About the project

This is a tiny content strategy framework focused on goals, messages, and branding. This is not a checklist. Use what you need and scrap the rest. Rewrite it or add to it. These topics should help you get to the bottom of things with clients and other people you work with.

Give me feedback on Twitter (@nicoleslaw) or by email (nicole@nicolefenton.com).

Contents

@aarongustafson
aarongustafson / watchResize.js
Last active September 16, 2019 14:37
Efficient callback management for window.onresize
(function( window ){
window.watchResize = function( callback ){
var resizing;
callback.size = 0;
function done()
{
var curr_size = window.innerWidth;
clearTimeout( resizing );
resizing = null;
// only run on a true resize