Skip to content

Instantly share code, notes, and snippets.

View hugooliveirad's full-sized avatar

Hugo de Oliveira hugooliveirad

View GitHub Profile
@hugooliveirad
hugooliveirad / prefs.json
Created January 20, 2015 12:33
Sublime Prefs
{
"caret_extra_width": 2,
"caret_style": "phase",
"color_scheme": "Packages/User/base16-ocean.dark (SL).tmTheme",
"dictionary": "Packages/Dictionaries/Portuguese (Brazilian).dic",
"ensure_newline_at_eof_on_save": true,
"folder_exclude_patterns":
[
".svn",
".git",
@hugooliveirad
hugooliveirad / ideia-serviços.md
Last active August 29, 2015 14:08
Ideias para criação de serviços bem simples

Serviços bem simples baseados em API públicas que tenham como objetivo facilitar a vida na cidade.

Algumas ideias do que é possível fazer:

@hugooliveirad
hugooliveirad / TerminalPranks.md
Last active January 24, 2021 07:00
Terminal Pranks

Use without caution

while :; do echo "I will kill you later" | say -v Whisper; sleep 50; done &
@hugooliveirad
hugooliveirad / wordpress-zip.sh
Last active August 29, 2015 14:04
Generate zip from WordPress project (excluding node_modules and bower_components)
# Run it in the root of your wordpress project
# Create .zip from project, without node_modules and bower_components
projectname=${PWD##*/}; zip -x '*.git*' -x 'wp-content/uploads*' -x '*node_modules*' -x '*bower_components*' -r $projectname.zip .
@hugooliveirad
hugooliveirad / .yeopress
Last active August 29, 2015 14:03
.yeopress mkt-virtual-theme
{
"dbHost": "localhost",
"dbUser": "root",
"dbPass": "root",
"git": true,
"installTheme": true,
"themeDir": "mkt-virtual-theme",
"themeType": "git",
"themeUser": "mktvirtual",
"themeRepo": "mkt-virtual-theme",
@hugooliveirad
hugooliveirad / rsync-from-ftp.sh
Last active June 21, 2018 14:11
Rsync from FTP server
# Mounts FTP server
open -a Finder ftp://login:password@ftp_host/path
# Rsync from there (add --dry-run option to simulate transfer)
rsync -arvz --no-o --no-g /Volumes/ftp_host/path/ ./
# WIN!
@hugooliveirad
hugooliveirad / git-useful.md
Last active December 5, 2019 16:27
git-useful

git-useful

a collection of useful commands to use Git and GitHub.

Add

add files interactively

git add <file> --patch

# working example
@hugooliveirad
hugooliveirad / git-aliases.sh
Last active February 25, 2019 14:15
Git Aliases
# Mais usados --
alias ga="git add"
alias gc="git commit -m"
alias gca="git commit -am"
alias gs="git status"
alias gp="git push"
alias gpl="git pull"
# Diff --
alias gd="git diff"
@hugooliveirad
hugooliveirad / git-sync-fork.sh
Created February 21, 2014 21:33
Sync Fork On GitHub
# Sync fork with original repository
#
# Requires an "upstream" remote, pointing to original repo
# e.g. `git remote add upstream git@github.com:user/repo.git`
alias git-sync-fork="git fetch upstream; git checkout master; git merge upstream/master"
@hugooliveirad
hugooliveirad / git-ahead-behind.sh
Last active August 29, 2015 13:55
Git ahead and behind info
# add this function to your .bash_profile to be able to use it everywhere
# usage: git-ahead-behind [local-branch] [remote-branch]
function git-ahead-behind() {
branch="`git symbolic-ref --short -q HEAD`";
loc="${1-$branch}";
remote="${2-origin/$loc}";
git fetch $remote &> /dev/null
wait