cp elasticsearch-analysis-ik-1.2.6.jar ./plugins/analysis-ik/ # 复制jar
cp . ./config/ik/ # 复制字库
nano ./config/elasticsearch.yml
# ORACLE restrore dmp file | |
## create tablespace | |
<pre> | |
create temporary tablespace STUDIO_temp tempfile '<DBPATH>/STUDIO_temp.dbf' size 500M; | |
create tablespace STUDIO datafile '<DBPATH>/STUDIO.dbf' size 500M; | |
create temporary tablespace FRAMEWORK_temp tempfile '<DBPATH>/FRAMEWORK_temp.dbf' size 500M; |
from: http://niftybits.wordpress.com/2012/01/09/a-syntax-highlighter-extension-for-deck-js/
So for the past few hours, have been playing with Deck.js . I like the idea of a web based presentation format rather than a blob like powerpoint. At the same time, I’m a bit circumspect too – given the state of the tools. At least for my use, there’s really no burning need that powerpoint can’t solve (though I get the shivers everytime I have to do a presentation). All the web based/HTML5 seem raw at the moment on some much needed features (slide notes, slide prints, scaling issues etc).
Anyway, after a few minutes on Google and StackOverflow, decided to give Deck.js a spin. Deck.js is really nice and you should take a tour if you haven’t done so. So finally, after giving the online presentation and the introduction a try, downloaded the latest to give it a more thorough spin. As usual, one of the first things was embedding code snippets and I thought it would be nice to
// Additional code in node-http-proxy.js | |
var crypto = require('crypto'); | |
var redis = require('redis'); | |
var client = redis.createClient(config.opt.redis_port, 'cloudno.de'); | |
client.auth(config.opt.redis_auth, function(result) { | |
util.log("Redis authenticated."); | |
}) |
/* | |
* FormData for XMLHttpRequest 2 - Polyfill for Web Worker | |
* (c) 2014 Rob Wu <[email protected]> | |
* License: MIT | |
* - append(name, value[, filename]) | |
* - XMLHttpRequest.prototype.send(object FormData) | |
* | |
* Specification: http://www.w3.org/TR/XMLHttpRequest/#formdata | |
* http://www.w3.org/TR/XMLHttpRequest/#the-send-method | |
* The .append() implementation also accepts Uint8Array and ArrayBuffer objects |
import os | |
import random | |
from scrapy.conf import settings | |
class RandomUserAgentMiddleware(object): | |
def process_request(self, request, spider): | |
ua = random.choice(settings.get('USER_AGENT_LIST')) | |
if ua: | |
request.headers.setdefault('User-Agent', ua) | |
class ProxyMiddleware(object): |
#import <UIKit/UIKit.h> | |
#import <ImageIO/ImageIO.h> | |
#import <MobileCoreServices/MobileCoreServices.h> | |
static UIImage *frameImage(CGSize size, CGFloat radians) { | |
UIGraphicsBeginImageContextWithOptions(size, YES, 1); { | |
[[UIColor whiteColor] setFill]; | |
UIRectFill(CGRectInfinite); | |
CGContextRef gc = UIGraphicsGetCurrentContext(); | |
CGContextTranslateCTM(gc, size.width / 2, size.height / 2); |
#import <UIKit/UIKit.h> | |
#import <ImageIO/ImageIO.h> | |
#import <MobileCoreServices/MobileCoreServices.h> | |
- (void)exportAnimatedGif | |
{ | |
UIImage *shacho = [UIImage imageNamed:@"shacho.png"]; | |
UIImage *bucho = [UIImage imageNamed:@"bucho.jpeg"]; | |
NSString *path = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject] stringByAppendingPathComponent:@"animated.gif"]; |
# | |
# UPDATE for 10.10.4: please consider this patch obsolete, as apple provides a tool called "trimforce" to enable trim support for 3rd party SSDs | |
# just run "sudo trimforce enable" to activate the trim support from now on! | |
# | |
# Original version by Grant Parnell is offline (http://digitaldj.net/2011/07/21/trim-enabler-for-lion/) | |
# Update July 2014: no longer offline, see https://digitaldj.net/blog/2011/11/17/trim-enabler-for-os-x-lion-mountain-lion-mavericks/ | |
# | |
# Looks for "Apple" string in HD kext, changes it to a wildcard match for anything | |
# | |
# Alternative to http://www.groths.org/trim-enabler-3-0-released/ |