git config --global diff.external ~/[PATH]/opendiff-git.sh
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 | |
require 'vendor/autoload.php'; | |
$template = [ | |
'keys[]' => new mef\Validation\TypedArray( | |
new mef\Validation\SanitizationChain( | |
[ | |
new mef\Validation\DefaultValue('false'), | |
new mef\Validation\Boolean() |
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 | |
# to create migrations files based on time | |
# parameter should be the name of the migration | |
# usage: | |
# ./create_migration.sh add_fields_to_table | |
touch `date -u +%Y%m%d%H%M%S_`$1.sql% |
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
[user] | |
name = Marcelo Andrade | |
email = [email protected] | |
[core] | |
editor = mate -w | |
[alias] | |
com = commit | |
co = checkout | |
st = status | |
br = branch |
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
// For trace where an object is being released | |
- (void)release { | |
NSLog(@"%@",[NSThread callStackSymbols]); // Print the stack trace | |
[super release]; //Set breakpoint here | |
} |
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
# First need to install cookie exporter on firefox | |
# Enter to the developer site | |
# Try to download the file | |
# Copy the url from the downloads | |
# Export the cookies.txt file | |
# Then run this command | |
wget --limit-rate=50k --server-response --continue --no-check-certificate --load-cookies=cookies.txt http://adcdownload.apple.com/Developer_Tools/xcode_4.1_for_snow_leopard_21110/xcode_4.1_for_snow_leopard.dmg |
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/local/bin/php | |
<?php | |
$email = file_get_contents('php://stdin'); | |
$email = preg_replace('/\b[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}\b/', '<email_you_want_to_redirect>', $email); | |
//var_dump($email); | |
//exit; | |
$fd = popen("/usr/sbin/sendmail -t","w") or die("Couldn't Open Sendmail"); |
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
{ | |
"event_id": 1, | |
"survey": { | |
"title": "Survey 1", | |
"description": "Description 1", | |
"questions": [{ | |
"question_id": 1, | |
"title": "Question 1", | |
"description": "Desc Question 1", | |
"question_type": "simple", |
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/env ruby | |
# Author: Marcelo Andrade | |
# this hook check the validity of a commit message in the format we | |
# can input to xtimes to create a valid event tagged with the tasks | |
# we are working on | |
# INSTALLATION | |
# Copy this file in each repo in the hooks directory and give execution permission: |
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 | |
INPUT_FILE=$1 | |
SUB_FILE=$2 | |
OUTPUT_FILE=$3 | |
mencoder $INPUT_FILE -sub $SUB_FILE -o $OUTPUT_FILE -ofps 25 -vf scale=1280:720 -of lavf \ | |
-lavfopts format=mpg -oac lavc -lavcopts acodec=mp2:abitrate=224 -ovc lavc \ | |
-lavcopts vcodec=mpeg1video:vrc_buf_size=1835:keyint=15:vrc_maxrate=1152:vbitrate=1152:vmax_b_frames=0:aspect=16/9 \ | |
-of mpeg |