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
var Hapi = require('hapi'); | |
// Declare internals | |
var internals = {}; | |
internals.main = function () { | |
var http = new Hapi.Server(812); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Pama Static Files</title> | |
</head> | |
<body> | |
<h1> | |
Pamakids静态文件服务 | |
</h1> | |
</body> |
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
wget http://redis.googlecode.com/files/redis-2.6.13.tar.gz | |
tar xzf redis-2.6.13.tar.gz | |
cd redis-2.6.13 | |
make | |
mkdir -p /usr/local/bin | |
cp -pf redis-server /usr/local/bin | |
cp -pf redis-benchmark /usr/local/bin | |
cp -pf redis-cli /usr/local/bin | |
cp -pf redis-check-dump /usr/local/bin |
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 com.greensock.TimelineLite; | |
import com.greensock.TweenLite; | |
import com.greensock.easing.*; | |
card.z = 300; | |
card.getChildAt(0).visible = false; | |
card.getChildAt(0).rotationY = 180; | |
card.addEventListener(MouseEvent.MOUSE_DOWN,cardDown); | |
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
package | |
{ | |
import flash.display.DisplayObject; | |
import flash.display.GradientType; | |
import flash.display.Shape; | |
import flash.display.Sprite; | |
import flash.events.Event; | |
import flash.events.MouseEvent; | |
import flash.geom.Matrix; | |
import flash.geom.Point; |
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
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { | |
UITouch *touch = [[event allTouches] anyObject]; | |
CGPoint loc = [touch locationInView:self]; | |
self.pickedColor = [self colorOfPoint:loc]; | |
[[NSNotificationCenter defaultCenter] postNotificationName:@"ColorPicked" object:self userInfo:nil]; | |
} |
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
UIViewController * myViewController; | |
id delegate = [[UIApplication sharedApplication] delegate]; | |
UIWindow * win = [delegate window]; | |
myViewController = [[MyView alloc] init]; | |
// CGRect rect = CGRectMake(x,y,w,h); | |
// init the view position some how myViewController.viewFrame = rect; | |
[win addSubview:myViewController.view]; |
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
function freeze_db() { | |
rc = db.runCommand({fsync: 1, lock: 1}); | |
if (rc.ok == 1){ | |
return 1; | |
} else { | |
return 0; | |
} | |
} | |
freeze_db(); |
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 | |
MONGODB_SHELL='mongo' | |
DUMP_UTILITY='mongodump' | |
#SET the bd name which one you want to backup | |
DB_NAME='' | |
#SET server path where you want to save the file | |
CLOUD_PATH='' | |
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
db.$cmd.sys.unlock.findOne(); |
OlderNewer