- AOP - Aspect-oriented programming in PHP - http://aop-php.github.com/
- PreProcessor - macro-style processing - http://pecl.php.net/package/PreProcessor
- Meta - AST building from PHP Source - https://github.com/flavius/phpmeta/
- Runkit - Black magic for PHP - https://github.com/zenovich/runkit
- scalarobjects - Register methods on PHP scalars - https://github.com/nikic/scalar_objects
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
Pipeline pipeline = jedis.pipelined(); | |
long start = System.currentTimeMillis(); | |
for (int i = 0; i < 100000; i++) { | |
pipeline.set("" + i, "" + i); | |
} | |
List<Object> results = pipeline.execute(); | |
long end = System.currentTimeMillis(); | |
System.out.println("Pipelined SET: " + ((end - start)/1000.0) + " seconds"); |
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 | |
# | |
# redis Startup script for Redis Server | |
# | |
# chkconfig: - 90 10 | |
# description: Redis is an open source, advanced key-value store. | |
# | |
# processname: redis-server | |
# config: /etc/redis.conf | |
# pidfile: /var/run/redis.pid |
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 | |
# Quick start-stop-daemon example, derived from Debian /etc/init.d/ssh | |
set -e | |
# Must be a valid filename | |
NAME=foo | |
PIDFILE=/var/run/$NAME.pid | |
#This is the command to be run, give the full pathname | |
DAEMON=/usr/local/bin/bar |
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
#! /usr/bin/env python2.7 | |
#encoding:utf-8 | |
#@description:一个python守护进程的例子 | |
#@tags:python,daemon | |
import sys | |
import os | |
import time | |
import atexit | |
from signal import SIGTERM |
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 -ex | |
V=2.0.3 | |
curl -OL http://www.libsdl.org/release/SDL2-${V}.tar.gz | |
tar -zxvf SDL2-${V}.tar.gz | |
cd SDL2-${V} | |
sudo apt-get install build-essential mercurial make cmake autoconf automake \ | |
libtool libasound2-dev libpulse-dev libaudio-dev libx11-dev libxext-dev \ | |
libxrandr-dev libxcursor-dev libxi-dev libxinerama-dev libxxf86vm-dev \ | |
libxss-dev libgl1-mesa-dev libesd0-dev libdbus-1-dev libudev-dev \ |
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
// javac test3.java | |
// java test3 | |
import java.security.Key; | |
import javax.crypto.Cipher; | |
import javax.crypto.SecretKeyFactory; | |
import javax.crypto.spec.DESedeKeySpec; | |
import javax.crypto.spec.IvParameterSpec; | |
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
/* | |
This example uses Scala. Please see the MLlib documentation for a Java example. | |
Try running this code in the Spark shell. It may produce different topics each time (since LDA includes some randomization), but it should give topics similar to those listed above. | |
This example is paired with a blog post on LDA in Spark: http://databricks.com/blog | |
Spark: http://spark.apache.org/ | |
*/ | |
import scala.collection.mutable |
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 org.apache.hadoop.hbase.util.Bytes | |
import org.apache.hadoop.hbase.{HColumnDescriptor, HTableDescriptor, TableName, HBaseConfiguration} | |
import org.apache.hadoop.hbase.client._ | |
import org.apache.spark.SparkContext | |
import scala.collection.JavaConversions._ | |
/** | |
* HBase 1.0.0 新版API, CRUD 的基本操作代码示例 | |
**/ | |
object HBaseNewAPI { |
OlderNewer