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
--with-http_ssl_module --with-http_realip_module --with-http_stub_status_module --with-http_gzip_static_module --with-file-aio |
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
$ git clone git://github.com/huacnlee/personlab.git | |
$ cd personlab | |
$ heroku create --stack bamboo-ree-1.8.7 youappname | |
$ git push heroku master | |
$ heroku rake db:create | |
$ heroku rake db:migrate | |
$ heroku rake db:seed |
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
procedure TForm1.UDPUDPRead(Sender: TObject; AData: TStream; | |
ABinding: TIdSocketHandle); | |
var | |
iType: Integer; | |
pBuf: Pointer; | |
str: String; | |
buf: array[0..8191] of char; | |
begin | |
pBuf := AllocMem(AData.Size); | |
try |
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
procedure TForm2.Button1Click(Sender: TObject); | |
var | |
iType: Integer; | |
buf: array[0..8191] of char; | |
UDP: TidUDPClient; | |
begin | |
UDP := TIdUDPClient.Create(nil); | |
try | |
UDP.Host := '127.0.0.1'; | |
UDP.Port := 1108; |
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
安转 Ruby 和 Rubygems | |
$ sudo apt-get install ruby1.8 ruby1.8-dev rubygems | |
安装 heroku 的程序 | |
$ sudo gem install heroku | |
安装 Git | |
$ sudo apt-get install git-core | |
下载 PersonLab 源代码 |
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
//声明 | |
GetLocalTime( | |
var lpSystemTime: TSystemTime {TSystemTime 结构} | |
); {无返回值} | |
//设置本地时间 | |
SetLocalTime( | |
const lpSystemTime: TSystemTime {TSystemTime 结构} | |
): BOOL; |
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
$ time /usr/libexec/path_helper | |
PATH="/Users/matt/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin"; export PATH MANPATH="/opt/local/man:/usr/share/man:/usr/local/share/man:/usr/X11/man"; export MANPATH |
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
$ sudo apt-get install mencoder | |
$ mencoder origin.mp4 -o new.mp4 -vf dsize=480:360:2,scale=-8:-8,harddup \ | |
-oac faac -faacopts mpeg=4:object=2:raw:br=128 \ | |
-of lavf -lavfopts format=mp4 -ovc x264 -sws 9 \ | |
-x264encopts nocabac:level_idc=30:bframes=0:bitrate=512:threads=auto:turbo=1:global_header:threads=auto:subq=5:frameref=6:partitions=all:trellis=1:chroma_me:me=umh | |
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
require 'thread' | |
class ThreadPool | |
class Worker | |
def initialize | |
@mutex = Mutex.new | |
@thread = Thread.new do | |
while true | |
sleep 0.001 | |
block = get_block |
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
pid file = /var/run/rsyncd.pid | |
port = 873 | |
address = 172.28.150.23 | |
uid = jason | |
gid = jason | |
use chroot = yes | |
read only = yes | |
hosts allow = 172.28.150.26 | |
hosts deny = * | |
max connections = 20 |