Skip to content

Instantly share code, notes, and snippets.

View guilhermewop's full-sized avatar
😎
Coders gonna code

Guilherme Pereira guilhermewop

😎
Coders gonna code
View GitHub Profile
-----------------------------------------
Novos branches
-----------------------------------------
1 - Criar branch
1.1 - Atualizar repositório do trunk
svn up
1.2 - Fazer cópia do trunk para a pasta dos branches
svn cp http://svn.fcl.com.br/svn/<nome-do-projeto>/trunk http://svn.fcl.com.br/svn/<nome-do-projeto>/branches/<nome-do-branch> -m "Comentário..."
@guilhermewop
guilhermewop / 42.js
Created September 12, 2012 21:34
Resposta para a vida o universo e tudo mais
/* A resposta para a vida o universo e tudo mais = 42. Douglas Adams (Guia do mochileiro das galáxias)
*
* Google: https://www.google.com/webhp?sourceid=chrome-instant&ie=UTF-8&ion=1#hl=pt-BR&safe=off&sclient=psy- ab&q=resposta%20para%20a%20vida%20o%20universo%20e%20tudo%20mais&oq=&gs_l=&pbx=1&fp=e8f2ebbc99d26e1a&ion=1&bav=on.2,or.r_gc.r_pw.r_cp.r_qf.&biw=1920&bih=915
*
* What the fuck Javascript: http://wtfjs.com/2011/11/11/the-universe-answers-and-JavaScript-still-makes-us-wtf
*/
var resposta = "3" -+-+-+ "1" + "1" / "3" * "6" + "2";
alert(resposta);
@guilhermewop
guilhermewop / .zshrc
Created September 28, 2012 19:02
My .zshrc
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
# export ZSH_THEME="random"
export ZSH_THEME="prose"
@guilhermewop
guilhermewop / prose.zsh-theme
Last active October 11, 2015 04:17 — forked from gurgeh/gist:3800072
Theme for zsh
# Theme based on:
# http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/
# http://fendrich.se/blog/2012/09/28/no/
function prompt_char {
git branch >/dev/null 2>/dev/null && echo '±' && return
hg root >/dev/null 2>/dev/null && echo '☿' && return
echo '%(!.!.➜)'
}
# Removing a branch
Local : git branch -D <branch>
Remote : git push origin :<branch>
#---------------------------
# Rename commit message
# ref: http://darrinholst.com/post/359817782
@guilhermewop
guilhermewop / linux-useful-commands.sh
Last active March 25, 2020 21:04
Linux useful commands
#=====================================
# locale
locale-gen pt_BR pt_BR.UTF-8
dpkg-reconfigure locales
#=====================================
# timezone
# change non interactive
@guilhermewop
guilhermewop / gist:3822991
Created October 2, 2012 20:09
Lamp stack+
# apache - mysql - mongo - redis - php5 - ruby + python + postgresql + gearman + memcache
# Refs:
# https://help.ubuntu.com/community/ApacheMySQLPHP
# https://docs.google.com/document/d/1m4xb0lmgxzmi4OnLPZp5A7Thab-xL-_SfZi1bq7c18Q/edit
# :: Apache ::
# :: PHP ::
@guilhermewop
guilhermewop / zf2_submenu_partial.php
Created December 5, 2012 18:03
zf2_submenu_partial
<?php
$subMenu = $this->navigation('Navigation')->findById('premio');
$partial = array('admin/left_menu', 'default');
echo $this->navigation('Navigation')
->menu()
->setPartial($partial)
->renderPartial($subMenu);
@guilhermewop
guilhermewop / ruby-builtin.bat
Last active January 18, 2018 14:10
ruby-builtin-windows
@echo off
cls
:: Especifica para o rails o ambiente da aplicação
set RAILS_ENV=production
:: Diretório corrente
set current_path=%CD%
:: Diretório da aplicação
set application_path=%CD%\application
:: Diretório dos binários do ruby
<?php
/**
* SplClassLoader implementation that implements the technical interoperability
* standards for PHP 5.3 namespaces and class names.
*
* http://groups.google.com/group/php-standards/web/final-proposal
*
* // Example which loads classes for the Doctrine Common package in the
* // Doctrine\Common namespace.