Skip to content

Instantly share code, notes, and snippets.

View pkieltyka's full-sized avatar
🇨🇦
hi

Peter Kieltyka pkieltyka

🇨🇦
hi
View GitHub Profile
#require 'rubygems'
require 'amqp/lib/mq'
EM.run do
def log(*args)
p args
end
# AMQP.logging = true
iseq = VM::InstructionSequence.compile(IO.read(ARGV[0]))
iseq.to_a.last.each do |inst|
p inst
end
kern.sysv.shmmax=33554432
kern.sysv.shmmin=1
kern.sysv.shmmni=256
kern.sysv.shmseg=64
kern.sysv.shmall=8192
### 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
...
CFIndex count = MDQueryGetResultCount(query);
for (i=0; i < count; i++) {
MDItemRef item = MDQueryGetResultAtIndex(query, i);
}
...
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 -
#import <Cocoa/Cocoa.h>
@interface HQueryView : NSView {
}
-(void) drawRoundedRect:(NSRect)rect cornerRadius:(CGFloat)radius;
@end
#import <Cocoa/Cocoa.h>
#define H_QUERY_VIEW_RADIUS 15
@interface HQueryView : NSView {
NSBezierPath *topPath;
NSBezierPath *bottomPath;
NSGradient *topGradient;
NSGradient *bottomGradient;
}
//
// HWindowController.m
// Haste
//
// Created by Peter Kieltyka on 28/03/09.
// Copyright 2009 NuLayer Inc. All rights reserved.
//
#import "HWindowController.h"
#import "HQueryController.h"
-(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]];
}