Skip to content

Instantly share code, notes, and snippets.

Avatar

Guilherme J. Tramontina gtramontina

View GitHub Profile
View setup
#!/bin/sh -e
curl -L http://install.ohmyz.sh | sh
exec $SHELL -l
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
brew install caskroom/cask/brew-cask
brew tap jenv/jenv
brew update
@gtramontina
gtramontina / zsh
Created Sep 4, 2014
Install Prezto
View zsh
fancy_echo "Installing Prezto – Instantly Awesome Zsh…"
git_clone_or_pull 'https://github.com/sorin-ionescu/prezto.git' "${ZDOTDIR:-$HOME}/.zprezto"
TMP_RC_FILE=$(mktemp -t rcfile); cat << EOF > $TMP_RC_FILE
setopt EXTENDED_GLOB
for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^README.md(.N); do
ln -f -s "\$rcfile" "\${ZDOTDIR:-$HOME}/.\${rcfile:t}"
done
rm -f $TMP_RC_FILE
EOF
zsh --rcs $TMP_RC_FILE
View homebrew
fancy_echo "Installing Homebrew Cask, so you don't drag'n'drop applications anymore…"
brew tap caskroom/cask
brew tap caskroom/versions
brew_install_or_upgrade 'brew-cask'
@gtramontina
gtramontina / shared-functions
Created Sep 4, 2014
git_clone_or_pull '<remote_path>' '<local_repo_dir>'
View shared-functions
git_clone_or_pull() {
local REPOSRC=$1
local LOCALREPO=$2
local LOCALREPO_VC_DIR=$LOCALREPO/.git
if [ ! -d $LOCALREPO_VC_DIR ]; then
git clone --recursive $REPOSRC $LOCALREPO
else
pushd $LOCALREPO
git pull $REPOSRC && git submodule update --init --recursive
popd
@gtramontina
gtramontina / dockerize
Last active Aug 29, 2015
Given a git repository with a `Dockerfile`, this runs the given command within the container in the context of your repository.
View dockerize
#!/usr/bin/env bash -e
if [[ -z "$1" ]]
then
echo "Please specify a command to run inside the container."
exit 1
fi
COMMAND=$1
IMAGE=`git rev-parse HEAD`
View keybase.md

Keybase proof

I hereby claim:

  • I am gtramontina on github.
  • I am gtramontina (https://keybase.io/gtramontina) on keybase.
  • I have a public key whose fingerprint is 4D7C 2D7B 0C49 EEF7 0455 DE04 7655 A276 F38C 7CF9

To claim this, I am signing this object:

View gist:969067
$border-radius = 25px
@keyframes movingBorder
from
border-top-left-radius $border-radius
border-top-right-radius 0
border-bottom-right-radius $border-radius
border-bottom-left-radius 0
50%
border-top-left-radius 0
border-top-right-radius $border-radius
@gtramontina
gtramontina / gist:969393
Created May 12, 2011
freenode.net #Node.js log 05/12/2011
View gist:969393
[17:51] gtramont1na: Hey tjholowaychuk, I'm having a hard time using variables inside a @keyframes... Any ideas?
[17:52] tjholowaychuk: gtramont1na: hmm can you send me a gist? I'll take a look
[17:52] gtramont1na: https://gist.github.com/969067
...
[17:53] gtramont1na: Im using the $ as an identifier for me to know the variables in my .styl
[17:54] gtramont1na: I also tried moving the '$border-radius = 25px' to inside that @keyframes but then it doesn't even compile
...
[17:55] tjholowaychuk: gtramont1na: one sec ill try
[17:55] gtramont1na: tks
...
View gist:969111
@keyframes movingBorder
$border-radius = 25px
from
border-top-left-radius $border-radius
border-top-right-radius 0
border-bottom-right-radius $border-radius
border-bottom-left-radius 0
text-shadow 0 0 10px yellowgreen
color yellowgreen
50%
View gist:970925
getRoom = (roomId) ->
room = nowjs.getGroup roomId
return room if room.augumented
room.drawings = []
room.now.sendStartDrawing = (x, y) ->
room.currentDrawing = [ x: x, y: y ]
room.now.startDrawing x, y
room.now.sendDraw = (x, y) ->
You can’t perform that action at this time.