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 | |
# Script created by | |
# Romeo-Adrian Cioaba [email protected] | |
# Super minor updates by jason.melton[at]gmail[dot]com | |
# Updates by Alejandro Cuervo 3[at]cuervo[dot]net | |
# Released under GPL | |
echo "Closing Firefox" | |
sudo killall -9 firefox |
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
(function($) { | |
$.extend({ | |
mocker: { | |
sleeper: function() {}, | |
ajax: function() {}, | |
ajaxRequestData: {}, | |
} | |
}); | |
$.mocker.sleeper = function(milisecs, func) { |
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
namespace :db do | |
desc "Migrate all enviroments" | |
namespace :migrate do | |
task :all do | |
#current_rails_env = Rails.env | |
db_config = YAML::load(File.read(File.join(Rails.root, "/config/database.yml"))) | |
db_config.keys.each do |e| | |
#Rails.env = e | |
#Rake::Task['db:migrate'].invoke | |
puts "migrating: #{e}" |
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
NSMutableArray *users = [NSMutableArray arrayWithArray:usersList]; | |
NSSortDescriptor *sort = [NSSortDescriptor sortDescriptorWithKey:@"name" ascending:YES]; | |
[users sortUsingDescriptors:[NSArray arrayWithObject:sort]]; |
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
#import <Foundation/Foundation.h> | |
#import "NSObject+TestExtension.h" | |
@interface Doubler : NSObject { | |
} | |
+(id)named:(NSString *)name; | |
-(BOOL)shouldHaveReceived:(NSString *)message with:(id)parameter; | |
-(BOOL)shouldHaveReceived:(NSString *)message; |
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
#import <Foundation/Foundation.h> | |
@interface NSDictionary(Persistence) | |
-(void)writeToFileInDocumentsDir:(NSString *)path atomically:(BOOL)atomically; | |
@end |
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
class Cliente | |
include ActiveModel::Validations | |
include ActiveModel::Serialization | |
def initialize(params) | |
#pega o hash e seta os atributos normalmente. | |
end | |
# todos meus atributos e métodos normalmente aqui |
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
function current_branch_name { | |
echo $(git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/\1/") | |
} | |
function rebasing_like_a_boss { | |
current_branch=$(current_branch_name) | |
if [ $1 ] ; then to_branch=$1 ; else to_branch="master" ; fi; | |
git co $to_branch && git pull --rebase && git rebase $current_branch && git pull --rebase && git push && git co $current_branch && git rebase $to_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
rvm use 1.9.2@rr75 --default && gem install cucumber --no-rdoc --no-ri |
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
def Repeat(&block) | |
_RepeatUntil = Class.new { | |
def repeat(&block) | |
block.call | |
@action = block | |
self | |
end | |
def until(&block) | |
until result = block.call |