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
# see http://blog.jayfields.com/2007/08/ruby-calling-methods-of-specific.html | |
module Kernel | |
def as(ancestor, &blk) | |
@__as ||= {} | |
unless r = @__as[ancestor] | |
r = (@__as[ancestor] = As.new(self, ancestor)) | |
end | |
r.instance_eval(&blk) if block_given? | |
r |
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
if ENV.include?('RAILS_ENV') && !Object.const_defined?('RAILS_DEFAULT_LOGGER'); require 'logger'; RAILS_DEFAULT_LOGGER = Logger.new(STDOUT); 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
class TemporaryBasicAuth | |
def initialize(app) | |
@app = Rack::Auth::Basic.new(app) do |username,password| | |
(username == 'someguy') and (password == 'mypassword') | |
end | |
@app.realm = "Your realm here" | |
end | |
def call(env) | |
return @app.call(env) | |
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
while [[ 1 ]]; do | |
curl -s http://developer.apple.com/iphone | grep -i "comebacksoon" > /dev/null | |
if [[ $? == 0 ]]; then | |
echo 'down' | |
else | |
say 'THE DEVELOPER SITE IS UP' | |
echo 'up' | |
break | |
fi | |
sleep 120 |
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
# thanks to @chockenberry for concept | |
while [[ 1 ]]; do | |
curl -s http://developer.apple.com/wwdc/ | grep "<title>" | grep "2009" > /dev/null | |
if [[ $? == 0 ]]; then | |
say 'Apple has not yet announced w.w.d.c. 2010' | |
echo 'not announced' | |
else | |
say 'w.w.d.c. 2010 has just been announced!' | |
echo 'announced!' | |
break |
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
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod | |
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim | |
veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea | |
commodo consequat. Duis aute irure dolor in reprehenderit in voluptate | |
velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint | |
occaecat cupidatat non proident, sunt in culpa qui officia deserunt | |
mollit anim id est laborum. |
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
=== BUILD NATIVE TARGET aoTitleblock OF PROJECT aoTitleblock WITH THE DEFAULT CONFIGURATION (Release) === | |
Check dependencies | |
2011-01-11 11:39:10.218 xcodebuild[82304:3907] ASSERTION FAILURE in /SourceCache/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-214/Xcode3Sources/XcodeIDE/Frameworks/DevToolsBase/pbxcore/TargetSnapshots/BuildPhaseTypes/XCRezBuildPhaseDGSnapshot.m:70 | |
Details: refArray should be an instance inheriting from XCBuildFileRefArrayDGSnapshot, but it is nil | |
Object: <XCRezBuildPhaseDGSnapshot: 0x20034c4e0> | |
Method: -computeDependenciesForFilePath:ofType:forBuildFileReference:usingBuildRule:inTargetBuildContext: | |
Thread: <NSThread: 0x2005353a0>{name = (null), num = 3} | |
Backtrace: | |
0 0x0000000100c3e3ae -[PBXTargetBuildContext(DependencyGraphEvents) handleFailureInMethod:object:fileName:lineNumber:messageFormat:arguments:] (in DevToolsCore) | |
1 0x000000010002f409 _DVTAssertionFailureHandler (in DVTFoundation) |
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
#ifndef AO_UTILITIES | |
#define AO_UTILITIES | |
#define DEBUGLOG(s,...) NSLog((@"%s:%d " s), __func__, __LINE__, ## __VA_ARGS__) | |
#include <MiniCadCallBacks.h> | |
#include <VWFCLibrary.h> | |
enum TagType { | |
kEverywhereTagType, |
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
#include "Menu.h" | |
#include "Parametric.h" | |
#include "Tool.h" | |
#define REGISTER(x) REGISTER_Extension<x::Definition>(GROUPID_Extension##x, action, pInfo, ioData, cbp, reply) | |
extern "C" long GS_EXTERNAL_ENTRY plugin_main(long action, | |
void *pInfo, | |
long &ioData, | |
CallBackPtr cbp) |
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
#ifdef _DEBUG | |
#include <GSBug.h> | |
#define _DEBUG_MEMORY | |
#define _DO_TIMING | |
#else | |
#include <GSRELEASE.h> | |
#endif | |
// order matters here; don't re-sort | |
#include <MCCoordTypes.h> |
OlderNewer