Skip to content

Instantly share code, notes, and snippets.

View hugosenari's full-sized avatar
🌞

Hugo Sena Ribeiro hugosenari

🌞
View GitHub Profile
@hugosenari
hugosenari / check_changes.py
Created July 4, 2012 23:01
python to run command when something changes in directory
#THANKS TO: http://timgolden.me.uk/python/win32_how_do_i/watch_directory_for_changes.html
#time for pooling in seconds
TIME = 2
#path to watch this version don't recursive
PATH = "."
#command to execute when something changes
COMMAND = "dir"
import os, time
@hugosenari
hugosenari / content.md
Created July 18, 2012 19:51
Checklist para recebimento de wirefram/psd

Coisas que eu sempre tenho que verificar quando recebo um wire frame/psd:

Básico:

  • Trata todos os casos de sucesso e erro?
  • É viável e aceitável?
  • Trata todas as telas?

Opcional:

  • Isto vai ficar leve?
  • Isto é usável?
@hugosenari
hugosenari / README.md
Last active October 7, 2015 18:48
Bash util for git

Bash Script to use with git

With this your console print:

USER_NAME@MACHINE_NAME DIR_NAME (BRANCH_NAME:STATUS)$
```c 

Where status are:
M when current repo has modified
@hugosenari
hugosenari / .gitconfig
Created August 14, 2012 19:03
Configure Git To use with wimerge (wine)
[merge]
tool = winmerge
[mergetool "winmerge"]
cmd = /home/hugosenari/.bin/winmerge.sh \"$LOCAL\" \"$BASE\" \"$REMOTE\" \"$MERGED\"
trustExitCode = false
keepBackup = false
[mergetool]
prompt = false
@hugosenari
hugosenari / makefile
Created September 12, 2012 14:55
make
CSS = Content/css/style.css
CSS_MIN = Content/css/style.min.css
CSS_META = Content/css/meta-css/style.less
LESS = 'Content/css/meta-css/.*\.less'
JSS = $(wildcard Scripts/*.js)
JSS_NAMES = $(basename ${JSS})
DATE=$(shell date +%I:%M%p)
@hugosenari
hugosenari / teste.md
Last active October 12, 2015 01:07
teste automatizado orientado a logs

Parse Logs

Create applications where logs are parsed by other applications that test and check if is working fine

Good For:

  • Automated Tests;
  • Health check.
@hugosenari
hugosenari / gist:4323219
Created December 17, 2012 22:58
Time is on my side
var times = $$('li').map(function(e){
time = e.innerHTML.split(" ")[1].split(":");
return [time[0], time[1], time[2], 0];
})
horas = (times[1][0] - times[0][0]) + (times[3][0] - times[2][0])
minutos = (times[1][1] - times[0][1]) + (times[3][1] - times[2][1])
htom = horas * 60
sum = minutos + htom;
console.log(parseInt(sum / 60), sum % 60)
@hugosenari
hugosenari / gist:4979241
Created February 18, 2013 17:54
Formas de se trabalhar com um computador
User Input:
Mouse;
Teclado;
Touchscreen;
Mouse + Teclado;
@hugosenari
hugosenari / utils.console.implementation.js
Last active December 14, 2015 20:59
javascript console log wrapper 1 - utls.console.iface.js: interface definition (required) 2 - utils.console.implementation.js: interface implementation (requires only when you want activate console logs)
//implementação do log
utils = utils || {};
utils.console = utils.console || {};
//define se deve ou não mostrar erro no log (para ver stack);
utils.console._showCaller = true;
@hugosenari
hugosenari / groupWindows.md
Created March 19, 2013 20:29
draft idea: Group one or more window in same window as tabs

This Idea:

Group one or more window in same window as tabs

Objective:

Group different programs in same window, and change across the programs like changing tab.