Skip to content

Instantly share code, notes, and snippets.

View sathiyaseelan's full-sized avatar

sathya sathiyaseelan

  • Singapore
View GitHub Profile
@siddharthkrish
siddharthkrish / common.js
Created December 13, 2017 10:09
simple web page instrumentation
function notify( event ) {
$.post('https://requestb.in/1g52ujz1',
{ "button_name": $(this).attr('name'),
"position": $(this).attr('data-position') });
}
$(function(){
$( "button" ).on( "click", notify );
});
@wacko
wacko / pre-commit
Last active September 16, 2020 22:57
Git hook to avoid commit debug lines (binding.pry console.log debugger...)
#!/usr/bin/env ruby
# Validates that you don't commit forbidden keywords to the repo
# You can skip this checking with 'git commit --no-verify'
exit 0 if ARGV.include?('--no-verify')
# Update this list with your own forbidden keywords
KEYWORDS = %w(binding.pry console.log debugger)
def red(text) "\033[31m#{text}\033[0m"; end
@alexbevi
alexbevi / pre-commit.sh
Created August 23, 2012 12:05
Git pre-commit hook that checks ruby source files for Pry breakpoints
# Git pre-commit hook to check all staged Ruby (*.rb/haml/coffee) files
# for Pry binding references
#
# Installation
#
# ln -s /path/to/pre-commit.sh /path/to/project/.git/hooks/pre-commit
#
# Based on
#
# http://codeinthehole.com/writing/tips-for-using-a-git-pre-commit-hook/
@amejiarosario
amejiarosario / rails_migration_cheatsheet.md
Created June 18, 2012 21:40
Rails Migration - Cheatsheet