git remote add upstream <git-url-project>
git fetch upstream
git merge --ff-only upstream/master
git pull --ff-only upstream master
git push origin master
git fetch --all
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#===================================== | |
# locale | |
locale-gen pt_BR pt_BR.UTF-8 | |
dpkg-reconfigure locales | |
#===================================== | |
# timezone | |
# change non interactive |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'mail' | |
require 'csv' | |
FILE = ARGV[0] | |
Mail.defaults do | |
delivery_method :smtp, { | |
address: '', | |
port: 587, | |
domain: '', | |
user_name: '', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# vim: set sts=4 sw=4 et tw=0 : | |
# | |
# License: BSD | |
AUTOMAGIC_MODE="true" | |
OPACITY_100="0xffffffff" | |
OPACITY_0="0x0" | |
: ${XWININFO:=$(type -P xwininfo)} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Removing a branch | |
Local : git branch -D <branch> | |
Remote : git push origin :<branch> | |
#--------------------------- | |
# Rename commit message | |
# ref: http://darrinholst.com/post/359817782 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get update -y && apt-get upgrade -y | |
sudo apt-get install vim \ | |
git \ | |
tree \ | |
libldap2-dev \ | |
libldap-2.4-2 \ | |
libtool-bin \ | |
libzip-dev \ | |
lbzip2 \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
class SistemaDeArquivo: | |
def __init__(self, nome, tamanho = 0): | |
self.nome = nome | |
self.tamanho = tamanho | |
def get_nome(self): | |
return self.nome |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Conta a quantidade de letras de uma determinada palavra | |
* | |
* @param $palavra String Palavra a ser analisada pelo contador | |
* @param $letras Array|String Letras que deseja contar na palavra | |
* @throws InvalidArgumentException Lança exceção caso não passe pelo menos uma letra para contar na palavra | |
* @return Int Quantidade de ocorrências de $letras na $palavra | |
*/ | |
function contarLetras($palavra, $letras = ['a', 'e', 'i', 'o', 'u']) |
NewerOlder