Skip to content

Instantly share code, notes, and snippets.

View MarkVaughn's full-sized avatar
🤡

Mark Vaughn MarkVaughn

🤡
View GitHub Profile
@MarkVaughn
MarkVaughn / pre-commit.lint
Last active June 27, 2018 17:59 — forked from mindbat/pre-commit.lint
Git pre-commit script to run all the modified files through php-lint. Won't let you commit php file with a syntax error.
#!/bin/sh
#
# Hook script to check the changed files with php lint
# Called by "git commit" with no arguments.
#
# To enable this hook, rename this file to "pre-commit".
if git rev-parse --verify HEAD >/dev/null 2>&1
then
against=HEAD
@MarkVaughn
MarkVaughn / Reset form with jQuery
Last active December 13, 2015 21:08 — forked from dantoncancella/gist:4564386
Chaining reset function for jQuery, pass a function to bind on the reset event.
(function($){
$.fn.reset = function(fn) {
return fn ? this.bind("reset", fn) : this.trigger("reset");
};
})(jQuery);