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
# | |
# Will find the rdoc paths of your local gems and generate a html index frameset which will let you select | |
# the desired gem's rdoc from a dropdown navigation... | |
# | |
# Specify your local gems installation's doc directory and the desired html output path, open the generated index.html | |
# in the output path in your favorite browser and add a boomark. | |
# You might want to add the script into your path for easy access or put it in a cron job. | |
# | |
# Tested on Ubuntu 8.10, but really should work anywhere with proper gem install path set | |
# Working on Mac Os with custom Ruby install in /usr/local |
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 'hotcocoa' | |
include HotCocoa | |
framework 'webkit' | |
ALL_TAGS_REPORT = File.join( | |
NSBundle.mainBundle.resourcePath.fileSystemRepresentation, | |
'resources/all_tags_report.html') | |
application do |app| | |
window(:frame => [100, 100, 500, 300], :title => "Reports") do |win| |
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
$:.unshift File.join('.','radius/lib') | |
require 'radius' | |
context = Radius::Context.new do |c| | |
c.define_tag 'hello' do | |
'Hello world' | |
end | |
end | |
parser = Radius::Parser.new(context, :tag_prefix => 'r') | |
parsed = parser.parse("A small example: <r:hello />!") |
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
task :embed => [:deploy] do | |
`rm -rf ./#{AppConfig.name}.app/Contents/Frameworks/MacRuby.framework/Versions/0.3` | |
`find ./#{AppConfig.name}.app/Contents -name "1.9.0" -type d | xargs rm -rf` | |
`rm -rf ./#{AppConfig.name}.app/Contents/Frameworks/MacRuby.framework/Versions/Current/usr/include/ruby-1.9.0` | |
`rm -rf ./#{AppConfig.name}.app/Contents/Frameworks/MacRuby.framework/Versions/Current/usr/lib/libmacruby.1.9.0.dylib` | |
`find ./#{AppConfig.name}.app/Contents -name "*.bundle" -exec install_name_tool -change /Library/Frameworks/MacRuby.framework/Versions/0.4/usr/lib/libmacruby.dylib @executable_path/../Frameworks/MacRuby.framework/Versions/Current/usr/lib/libmacruby.dylib {} \\;` | |
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
otool -L Embedded.app/Contents/Frameworks/MacRuby.framework/Versions/0.4/usr/lib/ruby/1.9.1/universal-darwin9.5/stringio.bundle | |
Embedded.app/Contents/Frameworks/MacRuby.framework/Versions/0.4/usr/lib/ruby/1.9.1/universal-darwin9.5/stringio.bundle: | |
@executable_path/../Frameworks/MacRuby.framework/Versions/Current/usr/lib/libmacruby.dylib (compatibility version 0.4.0, current version 0.4.0) | |
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0) | |
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.3) |
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
# CoreDataUtilityTutorial | |
# | |
# Copyright 2009, Reborg | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
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
## | |
# Ideas for this CSV export comes from: | |
# - http://dominikgrabiec.com/111-simple-dataset-exportimport-for-rails/ | |
# | |
namespace :teamly do | |
namespace :export do | |
desc 'CSV Export of the relevant user data' | |
task :users => :environment do | |
excludes = ['crypted_password','password_salt','persistence_token','single_access_token','perishable_token','ancestry','time_zone','hide_announcement_time','reminder_hour','reminder_min'] |
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 AppServer | |
attr_accessor :port, :admin_password | |
end | |
class Configuration | |
attr_accessor :tail_logs, :max_connections, :admin_password | |
def app_server | |
@a ||= AppServer.new | |
block_given? ? yield(@a) : @a | |
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
(ns scratch.core | |
(:use midje.sweet | |
[clojure.set :only [union intersection]] | |
)) | |
(unfinished booking-transaction bookings) | |
(defn empty-history [] | |
[ [] ]) |
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 "SenTestCase+MethodSwizzling.m" | |
@interface ExampleTest : SenTestCase {} | |
+ (BOOL)trueMethod; | |
+ (BOOL)falseMethod; | |
@end | |
@implementation ExampleTest | |
+ (BOOL)trueMethod { return YES; } |
OlderNewer