Want to create a Gist from your editor, the command line, or the Services menu? Here's how.
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 <libkern/OSAtomic.h> | |
#import <dispatch/dispatch.h> | |
#import <objc/runtime.h> | |
@implementation MySingleton | |
+ (void) load | |
{ | |
// check for weak-linked libdispatch symbols | |
if ( dispatch_queue_create != 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
#import <dispatch/dispatch.h> | |
#import <objc/runtime.h> | |
@implementation MySingleton | |
static MySingleton * __singleton = nil; | |
+ (MySingleton *) sharedInstance_accessor | |
{ | |
return ( __singleton ); |
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
/* | |
Command-line application for embedding JPEG cover art in MP3, MP4 and OGG audio files. | |
Based on taglib-1.7 (debian libtag1-dev) | |
and libb64 (http://libb64.sourceforge.net/) needed for OGG Vorbis embedded cover art | |
g++ -I/usr/local/include/taglib -L/usr/local/lib -ltag -lb64 setcover.cpp -o setcover | |
g++ -I/opt/homebrew/include/taglib -L/opt/homebrew/include/b64 -ltag -lb64 setcover.cpp -o setcover | |
*/ |
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 ([[NSWorkspace sharedWorkspace] absolutePathForAppBundleWithIdentifier:@"com.beyondcow.Miao"]) { | |
//if find Miao on this Mac then post text via Miao system service port | |
NSString *text = @"Hello world!"; | |
[[NSPasteboard generalPasteboard] clearContents]; | |
[[NSPasteboard generalPasteboard] setString:text forType:NSStringPboardType]; | |
NSPerformService(@"Miao Post Weibo", [NSPasteboard generalPasteboard]); | |
} |
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
#!/bin/sh | |
# | |
# chkconfig: - 89 11 | |
# description: serf daemon | |
# processname: serf | |
# config: /etc/serf.conf | |
# Default-Start: | |
# Default-Stop: 0 1 2 3 4 5 6 | |
# Description: serf agent daemon |
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
final Query query = getQueryManager(context).createQuery(queryString, Query.SQL); final NodeIterator iter = query.execute().getNodes(); if (iter.hasNext()) { user.populate(iter.nextNode()); } else { LOG.error("User {} does not exist, returning object without state.", username); } |
- How can we declaritively define behaviours in a standard fashion?
- Behaviours as Gherkin .feature files
- Complex Storytelling made easy
- Defining matching results within the behaviour description
Requirement: A MAP
that enumerates the State Space - Definition of Done
OlderNewer