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 | |
# Usage: | |
# > twitter_monitor [search terms] | |
# | |
# By spllr | |
require "rubygems" | |
require "twitter" | |
require "growl" |
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
puts "Remove duplicate snippets from vim conf" | |
Dir.chdir(File.expand_path("~/.vim/bundle/snipmate.vim")) | |
puts "Moved to #{Dir.pwd}" | |
Dir["**/*.snippets"].each do |snippet| | |
snippet_lang = File.basename(snippet, '.snippets') | |
File.open snippet, "r" do |snippet_file| | |
snippet_file.read.scan(/^snippet (.+)/) do |snippet_key| |
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
# macport | |
if [ -d /opt/local/etc/macports ]; then | |
PATH=/opt/local/etc/macports:"${PATH}" | |
fi | |
if [ -d /opt/local/bin/ ]; then | |
PATH=/opt/local/bin/:"${PATH}" | |
fi | |
if [ -d ~/bin/ ]; then |
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
# | |
# MacRuby distributed objects poc. | |
# | |
# Inspired by the Distributed Object chapter in "Advanced Mac Os X Programming" by Dalrymple and Hillegass | |
# | |
# Klaas Speller | |
# http://www.github.com/spllr | |
# | |
# Use at own risk (that's what the lisence is for). | |
# Its still buggy and I would love some input on good usage of the NSRunLoop with MacRuby |
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
require "rmagick" | |
require "fileutils" | |
[ | |
{ :path => 'medium', :max_width => 125, :max_height => 450}, | |
{ :path => 'normal', :max_width => 200, :max_height => 200}, | |
{ :path => 'micro', :max_width => 65, :max_height => 65} | |
].each do |opts| | |
max_height = opts[:max_height] | |
max_width = opts[:max_width] |
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 Bacon::Context | |
def runloop(duration=0.6) | |
Thread.new { | |
runloop = NSRunLoop.currentRunLoop | |
yield | |
runloop.runUntilDate(NSDate.dateWithTimeIntervalSinceNow(duration)) | |
}.join | |
end | |
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
module Bacon | |
def self.context_did_finish(context) | |
handle_specification_end | |
Counter[:context_depth] -= 1 | |
if (@current_context_index + 1) < @contexts.size | |
@current_context_index += 1 | |
run | |
else | |
# DONE | |
handle_summary |
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 <SenTestingKit/SenTestingKit.h> | |
#import <CoreData/CoreData.h> | |
@interface MyCoreDataTests : SenTestCase | |
{ | |
NSManagedObjectModel *managedObjectModel; | |
NSPersistentStoreCoordinator *persistentStoreCoordinator; | |
NSManagedObjectContext *managedObjectContext; | |
} | |
@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
#import <SenTestingKit/SenTestingKit.h> | |
#import <CoreData/CoreData.h> | |
@interface MyCoreDataTests : SenTestCase | |
{ | |
NSManagedObjectModel *managedObjectModel; | |
NSPersistentStoreCoordinator *persistentStoreCoordinator; | |
NSManagedObjectContext *managedObjectContext; | |
} | |
- (void)setupCoreDataEnvironment; |
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
# | |
# Calculate your number according to http://www.astrology.com/what-numerology/2-d-d-66854 | |
# | |
# | |
# HOW ARE NUMEROLOGY CALCULATIONS DONE | |
# In numerology, all numbers are reduced to the single digits 1 through 9 except the special master numbers 11 and 22. 1, 2, 3, 4, 5, 6, 7, 8, 9, 11 and 22 represent the major vibration rates associated with people’s characteristics. | |
# The numbers are reduced by simple addition. The number 15, for instance, is reduced by adding 1 + 5 to get 6. Similarly, the number 1974 can be reduced by adding 1 + 9 + 7 + 4 to get 21. The 21 can be further reduced by adding 2 + 1 to get 3. | |
# Letters in individuals’ names are converted to numbers and then added together. These numbers, in turn, are also reduced. The letter A, for instance, is 1; the letter B is 2; the letter C is 3, and so forth. The following table shows the numbers assigned to all 26 letters in the English alphabet. | |
# | |
# 1 2 3 4 5 6 7 8 9 |
OlderNewer