Skip to content

Instantly share code, notes, and snippets.

View gabrielpires's full-sized avatar

Gabriel Pires gabrielpires

View GitHub Profile
@gabrielpires
gabrielpires / install-mcrypt-yosemite-10.10.xx
Last active August 29, 2015 14:22
Install mcrypt into Mac OSX Yosemite 10.10.*
tar -zxvf libmcrypt-2.5.8.tar.gz &&
tar -zxvf php-5.5.9.tar.gz &&
rm *.gz &&
cd libmcrypt-2.5.8 &&
./configure &&
make &&
sudo make install &&
cd .. &&
curl -O http://ftp.gnu.org/gnu/autoconf/autoconf-latest.tar.gz &&
tar xvfz autoconf-latest.tar.gz &&
@gabrielpires
gabrielpires / ble.ino
Last active August 29, 2015 14:06
[Skecth] Arduino using HM-10 Bluetooth module
#include <SoftwareSerial.h>
SoftwareSerial bluetooth(10,11); // TX, RX
void setup()
{
Serial.begin(14400);
while (!Serial) {
@gabrielpires
gabrielpires / compressor.sh
Created January 10, 2013 20:37
Simple bash script to walk and minify .js and .css files using yuicompressor by Yahoo!
#!/bin/bash
projectPath=null
fileToCompressPattern="/([a-zA-Z0-9+-_]+).(css|js)$";
fileCompressedPattern="([a-zA-Z0-9+-_]+).min.(css|js)$";
minifyPattern=".min."
#WARNING!!!!!!!!!!!!!
#CHANGE THIS TO YOUR COMPRESSOR PATH
g_compressor_command="java -jar <YOUR_PATH_OF_yuicompressor.jar>";
@gabrielpires
gabrielpires / robot.js
Created December 5, 2012 04:16
1337c4nn0n
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.ahead(100);
@gabrielpires
gabrielpires / .bash_profile
Created September 1, 2012 18:58
My bash profile
#EXPORT
export PATH="/usr/local/bin:$PATH"
export AWS_RDS_HOME="$HOME/Sites/tools/rds/"
export JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Home/"
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
export PATH=/usr/local/mysql/bin:$PATH
export PATH=/System/Library/Frameworks/JavaScriptCore.framework/Versions/Current/Resources:$PATH
export DYLD_LIBRARY_PATH=/usr/local/mysql/lib/
@gabrielpires
gabrielpires / madeonTrackList.txt
Created September 1, 2012 18:56
Madeon - Tracks Collection
Made by Gabriel Pires - gabrielpires.com.br
Madeon ALL TRACK UNTIL - 2012-09-01
LINKS TO PLAY ONLINE AND DOWNLOAD
- Singles
Madeon - Gold - http://www.hulkshare.com/2m8nwjznill4
Madeon - For You - http://soundowl.com/track/1yxv/madeon-for-you-radio-edit
Madeon - Shuriken - http://soundowl.com/track/3vk/madeon-shuriken
Madeon - Icarus - http://soundowl.com/track/2uzw/madeon-icarus-radio-edit
Madeon - Finale - http://soundowl.com/track/3khu/madeon-finale-bbc-radio-rip
@gabrielpires
gabrielpires / extract.sh
Created July 27, 2011 19:20 — forked from fernandotakai/extract.sh
a simple extract function
function extract() {
unset REMOVE_ARCHIVE
if test "$1" = "-r"; then
REMOVE=1
shift
fi
if [[ -f $1 ]]; then
case $1 in
*.tar.bz2) tar xvjf $1;;
@gabrielpires
gabrielpires / konsole.php
Created June 27, 2011 19:56
A class to debug PHP to the JavaScript console without the need to install any dependencies
<?php
Class Konsole{
function debug($message){
if($message){
echo '<script type="text/javascript">
if(console.log){
console.log('.$this->_debug($message).')
}
</script>';
}
@gabrielpires
gabrielpires / vim_tip_count_word.txt
Created June 14, 2011 21:07
VIM Count the number of occurences of a word in a file
:%s/<word>//gn
@gabrielpires
gabrielpires / SQLSERVER_RESET_AUTOINCREMENT.sql
Created May 24, 2011 20:02
RESET AUTO INCREMENT SQLSERVER COLUMN
--CODE TO RESET AN AUTOINCREMENT NUMBER IN SQLSERVER TABLE
DBCC CHECKIDENT (<Table>, RESEED, 0)