Requirements:
If you're on OSX you're probably best off using Homebrew to install this stuff:
$ brew install node mongodb
Usage:
- (void)viewWillAppear:(BOOL)animated | |
{ | |
[super viewWillAppear:animated]; | |
[[NSNotificationCenter defaultCenter] addObserver:self | |
selector:@selector(keyboardWillChange:) | |
name:UIKeyboardWillChangeFrameNotification | |
object:nil]; | |
} | |
- (void)viewWillDisappear:(BOOL)animated |
#! /path/to/node | |
var haibu = require('/path/to/haibu'); | |
var client = new haibu.drone.Client(); | |
process.stdin.resume(); | |
process.stdin.on('data', function(data){ | |
var package = JSON.parse(data.toString()); |
BOOL PSPDFIsUIKitFlatMode(void) { | |
static BOOL isUIKitFlatMode = NO; | |
static dispatch_once_t onceToken; | |
dispatch_once(&onceToken, ^{ | |
if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_7_0) { | |
PSPDFAssertIfNotMainThread(); | |
// If your app is running in legacy mode, tintColor will be nil - else it must be set to some color. | |
if (UIApplication.sharedApplication.keyWindow) { | |
isUIKitFlatMode = [UIApplication.sharedApplication.keyWindow performSelector:@selector(tintColor)] != nil; |
# Ubuntu upstart file at /etc/init/mongodb.conf | |
pre-start script | |
mkdir -p /var/lib/mongodb/ | |
mkdir -p /var/log/mongodb/ | |
end script | |
start on runlevel [2345] | |
stop on runlevel [06] |
MongoDB upstart scripts for Ubuntu. | |
Run following commands after installing upstart scripts: | |
ln -s /lib/init/upstart-job /etc/init.d/mongoconf | |
ln -s /lib/init/upstart-job /etc/init.d/mongodb | |
ln -s /lib/init/upstart-job /etc/init.d/mongos | |
To start services use: |
##----description "MongoDB Monitoring Service (MMS) Agent" | |
##Put that in /etc/init/mms-agent.conf, and you should be able to do normal things like: | |
##service mms-agent start | |
##service mms-agent stop | |
##service mms-agent status | |
##maybe you'll need | |
##ln -s /lib/init/upstart-job /etc/init.d/mms-agent | |
####--------------------------- |
#!/bin/sh | |
#ID='A16FF353-8441-459E-A50C-B071F53F51B7' # Xcode 6.2 | |
#ID='992275C1-432A-4CF7-B659-D84ED6D42D3F' # Xcode 6.3 | |
#ID='E969541F-E6F9-4D25-8158-72DC3545A6C6' # Xcode 6.3.2 | |
ID=`/usr/libexec/PlistBuddy -c 'Print DVTPlugInCompatibilityUUID' "$(xcode-select -p)/../Info.plist"` | |
PLIST_BUDDY=/usr/libexec/PlistBuddy |
CGFloat BNRTimeBlock (void (^block)(void)); |
curl -s -XPOST localhost:9200/_bulk?pretty=true --data-binary ' | |
{ "index" : { "_index" : "parent_child", "_type" : "store", "_id" : "store1" } } | |
{ "name" : "auchan", "owner" : "chris" } | |
{ "index" : { "_index" : "parent_child", "_type" : "department", "_id" : "department1", "parent" : "store1" } } | |
{ "name" : "toys", "numberOfProducts" : 150 } | |
{ "index" : { "_index" : "parent_child", "_type" : "product", "_id" : "product1", "parent" : "department1", "routing" : "store1" } } | |
{ "name" : "gun", "trademark" : "tiger", "price" : 9, "store_id" : "store1" } | |
' |