Skip to content

Instantly share code, notes, and snippets.

View ainformatico's full-sized avatar

Alejandro Dev. ainformatico

View GitHub Profile
ainformatico / getElementById.js
Created April 26, 2013 08:14
getElementById alias
$ = function()
var args =, 0),
doc = document;
return doc.getElementById.apply(doc, args);
ainformatico /
Last active December 14, 2015 02:19
Validator for commit messages when creating a new commit. You should rename the ruby file as `commit-msg` and place it in `repo/.git/hooks` and do not forget `chmod +x commit-msg`


Validator for commit messages when creating a new commit.


Rename the other attached file as commit-msg and place it in repo/.git/hooks do not forget chmod +x commit-msg if needed.

Add your own validations

ainformatico / gist:1994933
Created March 7, 2012 18:24
Print all fingerprints for public keys
cd ~/.ssh;for a in `ls *.pub`; do ssh-keygen -lf $a;done
ainformatico / gist:1975109
Created March 4, 2012 22:22
quick rename
for a in `ls`; do mv $a "_$a" ;done;
ainformatico / script.bat
Created November 8, 2011 12:05
Executing Cygwin Bash scripts on Windows
:: Execute a bash script with the same filename, source:
@echo off
if not exist "" echo Script "" not found & exit 2
set _CYGBIN=C:\cygwin\bin
if not exist "%_CYGBIN%" echo Couldn't find Cygwin at "%_CYGBIN%" & exit 3
:: Resolve to /cygdrive based *nix path and store in %_CYGSCRIPT%
for /f "delims=" %%A in ('%_CYGBIN%\cygpath.exe ""') do set _CYGSCRIPT=%%A
:: Throw away temporary env vars and invoke script, passing any args that were passed to us
endlocal & %_CYGBIN%\bash --login "%_CYGSCRIPT%" %*