Skip to content

Instantly share code, notes, and snippets.

@uncreative
uncreative / post-checkout
Last active November 11, 2017 06:10 — forked from betorobson/post-checkout
git hook to run a command after `git pull` and `git checkout` if a specified file was change for example, package.json or bower.json
#!/usr/bin/env bash
changed_files="$(git diff-tree -r --name-only --no-commit-id $1 $2)"
check_run() {
echo "$changed_files" | grep --quiet "$1" && eval "$2"
}
post_checkout(){
make_reqs
@uncreative
uncreative / SetSyntaxHighlight.py
Created August 2, 2012 20:06 — forked from fnando/SetSyntaxHighlight.py
Sublime Text 2 plugin for setting syntax highlighting automatically. Just put it on your Packages/User directory.
import sublime, sublime_plugin
import os
import re
from functools import partial
class SetSyntaxHighlightCommand(sublime_plugin.EventListener):
""" Sets the file grammar to whatever you want.
Author: Nando Vieira <http://nandovieira.com.br>
"""