Skip to content

Instantly share code, notes, and snippets.

View gufranco-zz's full-sized avatar

Gustavo Franco gufranco-zz

View GitHub Profile
@gufranco-zz
gufranco-zz / .zshrc
Created August 13, 2014 15:44
f5 alias
if [[ `uname` == 'Linux' ]]; then
alias f5="sudo apt-get -y update && sudo apt-get -y upgrade && sudo apt-get -y dist-upgrade && cd ~/.dotfiles && git pull-sub && source ~/.zshrc"
else
alias f5="brew update && brew upgrade && cd ~/.dotfiles && git pull-sub && source ~/.zshrc"
fi
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
trim_trailing_whitespace = true
[*.html]
@gufranco-zz
gufranco-zz / biscoito.js
Last active December 28, 2015 12:59
Ta na hora de molhar o biscoito ; )
// https://www.facebook.com/photo.php?fbid=447072162065063&set=a.135862593186023.23269.135845729854376&type=1
// Feito com apenas 78 bytes. Quem faz com menos? ; )
for(i=1;i<9;)console.log(++i>8?'Ta na hora de molhar o biscoito':i^6?i:'meia')
@gufranco-zz
gufranco-zz / mysql.md
Last active December 20, 2015 15:59
MySQL - External Access using root user
  1. Edit /etc/mysql/my.cnf;
#bind-address = 127.0.0.1
bind-address  = 0.0.0.0
  1. Restart MySQL;
sudo service mysql restart
  1. Connect to MySQL;
@gufranco-zz
gufranco-zz / phpInstaller.sh
Last active December 19, 2015 10:29
PHP Installer
#!/bin/sh
#
# One line installer
# sudo apt-get -y update && sudo apt-get -y upgrade && sudo apt-get -y dist-upgrade && sudo apt-get -y install language-pack-pt curl git-core mysql-server mysql-client libmysqlclient-dev postgresql postgresql-client libpq-dev apache2 php5 libapache2-mod-php5 php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-mhash php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl php5-json
# Locale
echo "Changing locale"
sudo apt-get -y install language-pack-pt
clear
@gufranco-zz
gufranco-zz / Car.js
Last active December 19, 2015 04:29
JavaScript Prototypal Inheritance
/**
* Car object
*
* @author Gustavo Franco
* @since 2013-06-30
*/
;var Car = (function(Vehicle, $, window, document, undefined) {
'use strict';
/**
@gufranco-zz
gufranco-zz / FooBar.js
Last active March 11, 2024 13:50
JavaScript object prototype
/**
* FooBar object
*
* @author Gustavo Franco
* @since 2013-06-27
*/
;var FooBar = (function($, window, document, undefined) {
'use strict';
/**
@gufranco-zz
gufranco-zz / ubuntuInitialConfiguration.sh
Last active December 17, 2015 06:49
My Ubuntu 13.10 initial configuration
#!/bin/sh
# System upgrade
echo "Updating repositories and upgrading system"
sudo apt-get -y update && sudo apt-get -y upgrade && sudo apt-get -y dist-upgrade && sudo apt-get -y autoremove
clear
# Install Unity Tweak Tool
echo "Installing Unity Tweak Tool"
sudo apt-get -y install unity-tweak-tool
@gufranco-zz
gufranco-zz / railsInstaller.sh
Last active September 22, 2020 19:48
How to install Ruby, Git, Rails, PostgreSQL and MySQL on Ubuntu
#!/bin/sh
# System update
sudo apt-get update
# Curl
sudo apt-get -y install curl
# Git
sudo apt-get -y install git-core