Skip to content

Instantly share code, notes, and snippets.

View fdiasr's full-sized avatar

Fernando Dias fdiasr

View GitHub Profile
@fdiasr
fdiasr / gist:4661937
Created January 29, 2013 04:59
Jenkins start and stop
-- stop
sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist
-- start
sudo launchctl load /Library/LaunchDaemons/org.jenkins-ci.plist
@fdiasr
fdiasr / gist:5265181
Created March 28, 2013 17:29
find by name
find . -name name
@fdiasr
fdiasr / gist:5444252
Created April 23, 2013 14:56
win8 font-face
@font-face {
font-family: 'wf_SegoeUILight';
src: url('http://i.s-microsoft.com/fonts/Segoe-UI/East-European/Light/latest.eot');
src: url('http://i.s-microsoft.com/fonts/Segoe-UI/East-European/Light/latest.eot?#iefix') format('embedded-opentype'),
url('http://i.s-microsoft.com/fonts/Segoe-UI/East-European/Light/latest.woff') format('woff'),
url('http://i.s-microsoft.com/fonts/Segoe-UI/East-European/Light/latest.ttf') format('truetype'),
url('http://i.s-microsoft.com/fonts/Segoe-UI/East-European/Light/latest.svg#web') format('svg');
font-weight: normal;
font-style: normal;
}
@fdiasr
fdiasr / gist:5514795
Created May 3, 2013 22:34
git conflicts
A --- B --- C --- D
\
E --- F --- G
A --- B --- E --- F --- G --- (M)
A --- B --- E --- F --- G --- (M) --- H --- I
@fdiasr
fdiasr / gist:6780633
Created October 1, 2013 15:50
phpcs - complexidade ciclomatica
phpcs <dir|file> -p -s --sniffs=Generic.Metrics.CyclomaticComplexity --standard=Squiz
@fdiasr
fdiasr / gist:6895335
Created October 9, 2013 02:42
port listening
nmap -sT -O localhost
@fdiasr
fdiasr / gist:6998311
Created October 15, 2013 20:39
Git - changing commit author info
# -- simple way
git filter-branch -f --commit-filter '
GIT_AUTHOR_EMAIL="new.email@gmail.com";
GIT_COMMITTER_EMAIL="new.email@gmail.com";
git commit-tree "$@";
' HEAD
# -- with conditionals
git filter-branch --commit-filter '
if [ "$GIT_AUTHOR_EMAIL" = "<old.email@gmail.com>" ];
@fdiasr
fdiasr / contact-labels.js
Last active December 29, 2015 00:59
Script to convert custom labels (with brazilian phone operators) to default labels on Google Contact, using Google Script. It can be necessary when you have a mobile or app that dont show numbers with this custom labels.
/**
* you nedd enable some access, and create a spreedsheat called 'contact-data', before it
* the script need to be run on google script - https://script.google.com
*/
function contactLabelChange()
{
backupContacts();
var contacts = getMyContacts();
@fdiasr
fdiasr / acentuacao
Last active December 30, 2015 08:49
osx pt br
Agudo (É): Option + E + a letra desejada
C Cedilha (Ç): Option + C = Ç
Til (Ã): Option + N + a letra desejada = Ã , Õ
Circunflexo (Ê): Option + I + a letra desejada = Ê, Ô
Trema (Ü): Option + U + a letra desejada Ü

a simple git branching model

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

The gist