Skip to content

Instantly share code, notes, and snippets.

View hammerdr's full-sized avatar

Derek Hammer hammerdr

View GitHub Profile
document.body.innerHTML = "";
CPApp = nil;
_CPAppBootstrapperActions = nil;
CPApplicationMain(nil,nil);
Feature: MyButton shows up
In order to satisfy Bob
As a awesome dude
I want to show him MyButton
Scenario: MyButton shows on load
Then MyButton should display
hammermbp:Pokemon hammerdr$ sudo tusk install --force barista
The following packages are already installed:
* barista
The following packages will be installed:
* barista
Downloading: http://github.com/hammerdr/barista/zipball/master
Unzipping: /usr/local/narwhal/zips/barista.zip
+ /usr/local/narwhal/packages/barista/Framework/Barista/Reporting/Resources/WooFunctionIcons.license
+ /usr/local/narwhal/packages/barista/Framework/Barista/Reporting/Resources/add_32.png
+ /usr/local/narwhal/packages/barista/Framework/Barista/Reporting/Resources/info_button_32.png
@import <AppKit/CPImage.j>
@import <AppKit/CPImageView.j>
@import "Photo.j"
@implementation PhotoListElement : CPView
{
CPImage _tagButtonImage;
CPImage _previewButtonImage;
var oldGraphicsContext = CPGraphicsContext;
try {
CPGraphicsContext = moq();
[CPGraphicsContext selector:@selector(currentContext) returns:moq()];
// your test here
} finally {
CPGraphicsContext = oldGraphicsContext;
/*
* AppController.j
* test
*
* Created by You on February 25, 2010.
* Copyright 2010, Your Company All rights reserved.
*/
@import <Foundation/CPObject.j>
git clone git://github.com/280north/OJTest.git
sudo rm -r /usr/local/narwhal/packages/ojunit
sudo unlink /usr/local/narwhal/bin/ojtest
sudo cp -r OJTest /usr/local/narwhal/packages
sudo mv /usr/local/narwhal/packages/OJTest /usr/local/narwhal/packages/ojtest
cd /usr/local/narwhal/bin
sudo ln -s /usr/local/narwhal/packages/ojtest/bin/ojtest ojtest
/*
* AppController.j
* ScrollViewBug
*
* Created by You on February 8, 2010.
* Copyright 2010, Your Company All rights reserved.
*/
@import <Foundation/CPObject.j>
if (system.engine === "rhino")
{
exports.window = window = require("browser/window");
window.__parent__ = null;
window.__proto__ = global;
}
else
{
window.setTimeout = require("browser/timeout").setTimeout;
window.setInterval = require("browser/timeout").setInterval;
#!/usr/bin/env objj
print(window.location);