Skip to content

Instantly share code, notes, and snippets.

View hugooliveirad's full-sized avatar

Hugo de Oliveira hugooliveirad

View GitHub Profile
@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 / .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 / 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 / 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 / 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 / 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 / readme.md
Created May 18, 2015 18:30
Diff two command outputs (stdout) without using files
@hugooliveirad
hugooliveirad / om.cljs
Created May 24, 2015 07:00
My first 100 lines of ClojureScript
(ns ^:figwheel-always om-tut.core
(:require-macros [cljs.core.async.macros :refer [go]])
(:require [om.core :as om :include-macros true]
[om.dom :as dom :include-macros true]
[cljs.core.async :refer [put! chan <!]]
[clojure.data :as data]
[clojure.string :as string]))
(enable-console-print!)
@hugooliveirad
hugooliveirad / comp.md
Last active June 2, 2017 11:44
Composing styles

Composing styles

CSS Wizardry recently wrote a great post about styling: Contextual Styling: UI Components, Nesting, and Implementation Detail. He showed three ways to solve the problem of implementation details in a component's styles. I want to propose another way to solve this problem, one that uses composition.

The original styles of a .nav-primary component are:

.nav-primary {
  /* This is how the nav should always look: */
 margin: 0;
@hugooliveirad
hugooliveirad / a.sh
Created June 24, 2015 11:30
Run Node REPL with require support
node -e "require('repl').start({ignoreUndefined: true})"