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 'rubygems' | |
require 'amqp/lib/mq' | |
EM.run do | |
def log(*args) | |
p args | |
end | |
# AMQP.logging = true |
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
iseq = VM::InstructionSequence.compile(IO.read(ARGV[0])) | |
iseq.to_a.last.each do |inst| | |
p inst | |
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
kern.sysv.shmmax=33554432 | |
kern.sysv.shmmin=1 | |
kern.sysv.shmmni=256 | |
kern.sysv.shmseg=64 | |
kern.sysv.shmall=8192 |
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
### Recurring Billing implementation was originally written by Chris Cera | |
### http://blog.vuzit.com/2008/08/01/paypal-website-payments-pro-us-with-recurring-billing-and-activemerchant/ | |
# put the below in an init.rb file into a Rails plugin | |
#require 'paypal_recurring_billing' | |
#ActiveMerchant::Billing::PaypalGateway.send :include, AmExt::PaypalRecurringBilling | |
# | |
module AmExt | |
module PaypalRecurringBilling |
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
... | |
CFIndex count = MDQueryGetResultCount(query); | |
for (i=0; i < count; i++) { | |
MDItemRef item = MDQueryGetResultAtIndex(query, i); | |
} | |
... |
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
rake RUBYARCHDIR=/opt/local/lib/ruby1.9/gems/1.9.1/gems/eventmachine-eventmachine-0.12.5/lib RUBYLIBDIR=/opt/local/lib/ruby1.9/gems/1.9.1/gems/eventmachine-eventmachine-0.12.5/lib | |
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake/gempackagetask.rb:13:Warning: Gem::manage_gems is deprecated and will be removed on or after March 2009. | |
cd ext | |
(in /opt/local/lib/ruby1.9/gems/1.9.1/gems/eventmachine-eventmachine-0.12.5) | |
checking for rb_trap_immediate in ruby.h,rubysig.h... yes | |
checking for rb_thread_blocking_region()... no | |
checking for sys/event.h... yes | |
checking for sys/queue.h... yes | |
creating Makefile | |
cd - |
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 <Cocoa/Cocoa.h> | |
@interface HQueryView : NSView { | |
} | |
-(void) drawRoundedRect:(NSRect)rect cornerRadius:(CGFloat)radius; | |
@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 <Cocoa/Cocoa.h> | |
#define H_QUERY_VIEW_RADIUS 15 | |
@interface HQueryView : NSView { | |
NSBezierPath *topPath; | |
NSBezierPath *bottomPath; | |
NSGradient *topGradient; | |
NSGradient *bottomGradient; | |
} |
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
// | |
// HWindowController.m | |
// Haste | |
// | |
// Created by Peter Kieltyka on 28/03/09. | |
// Copyright 2009 NuLayer Inc. All rights reserved. | |
// | |
#import "HWindowController.h" | |
#import "HQueryController.h" |
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
-(void) controlTextDidChange:(NSNotification *)aNotification | |
{ | |
if ([[queryField stringValue] length] == 0) { | |
[self.resultController hide]; | |
[query clearQuery]; | |
[progress stopAnimation:nil]; | |
}else { | |
[progress startAnimation:nil]; | |
[query executeQuery:[queryField stringValue]]; | |
} |
OlderNewer