Skip to content

Instantly share code, notes, and snippets.

View dbiagi's full-sized avatar

Diego de Biagi dbiagi

View GitHub Profile
@dbiagi
dbiagi / .gitconfig
Created July 27, 2017 14:22
Git config aliases
[alias]
ll = "log -10 --oneline"
nicelog = "log -10 --format='%C(yellow)%h%Creset %C(magenta)%an%Creset %C(blue)%ad%Creset %s' --date=short"
@dbiagi
dbiagi / php.ini
Last active December 12, 2016 14:03
Nodejs script used as protocol handler for open xdebug file link with phpstorm.
[xdebug]
xdebug.file_link_format="phpstorm://%l&&%f"
@dbiagi
dbiagi / finishtyping.js
Last active April 22, 2016 23:49
Javascript finish typing event.
(function() {
var timerId = null,
waitingTime = 2000,
selector = 'input[type="text"],textarea',
isValid = function(keycode) {
return (keycode > 47 && keycode < 58) || // number keys
keycode == 32 || keycode == 13 || // spacebar & return key(s) (if you want to allow carriage returns)
(keycode > 64 && keycode < 91) || // letter keys
(keycode > 95 && keycode < 112) || // numpad keys
(keycode > 185 && keycode < 193) || // ;=,-./` (in order)
@dbiagi
dbiagi / post-receive
Last active August 29, 2015 14:25
git post-merge hook : update / install composer packages & composer itself
#!/bin/sh
GIT_BARE_DIR="/var/repo/tccapp.git"
GIT_WORK_TREE="/var/www/tcc.dbiagi.com.br"
echo "Ok, lets build the app ...."
echo ""
if [ ! -d $GIT_WORK_TREE ]; then
echo "Creating working dir"