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
@guilhermewop
guilhermewop / vagrant.md
Created February 7, 2014 14:51
vagrant instructions

Vagrant

Instalação do Vagrant

http://files.vagrantup.com/packages/7ec0ee1d00a916f80b109a298bab08e391945243/vagrant_1.2.7_i686.deb
#!/usr/bin/python3
# Estimates time spent on a project from commit timestamps
#
# If two commits are less than INERTIA time apart, the time
# between them is considered spent, otherwise SINGLE_COMMIT
# time is taken.
import os
@guilhermewop
guilhermewop / git-useful-commands.md
Last active October 22, 2018 18:32
Git useful commands

GIT Useful commands

Keeping a clean git fork

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

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
#!/bin/bash
php_cs_fixer='php-cs-fixer.phar'
if [ ! -e $php_cs_fixer ]; then
echo -e "\nBaixando PHP CS Fixer\n"
wget http://cs.sensiolabs.org/get/php-cs-fixer.phar
else
echo "Atualizando PHP CS Fixer"
php php-cs-fixer.phar self-update
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order:
@guilhermewop
guilhermewop / buscape-genet-footer.html
Last active December 16, 2015 12:58
shop-buscape-gazetaesportiva-footer.html
@guilhermewop
guilhermewop / buscape-genet-header.html
Created April 22, 2013 19:24
shop-buscape-gazetaesportiva-header.html
<div id="header"><div class="headerGazeta">
<div id="box-topo">
<div class="container-width">
<div class="links-uteis">
<ul>
<li>
<a href="http://gazetaesportiva.net/comercial">comercial</a>
</li>
<li>|</li>
<?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.
@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