start new:
tmux
start new with session name:
tmux new -s myname
| # | |
| # Open 10k concurrent WebSocket connections with the client and server running | |
| # in the same process and perform 10k WebSocket message roundtrips | |
| # | |
| # Tested on OS X 10.9.2 (MacBook Air) with Perl 5.18.2 and EV 4.17 (kqueue) | |
| # | |
| # 560.9MB memory usage, 0% CPU usage once roundtrips are finished after 36s | |
| # (with all 20k sockets still open) | |
| # | |
| # Get the latest version of Mojolicious from http://github.com/kraih/mojo |
| use Mojolicious::Lite; | |
| use Mango; | |
| use Mango::BSON ':bson'; | |
| my $uri = 'mongodb://<user>:<pass>@<server>/<database>'; | |
| helper mango => sub { state $mango = Mango->new($uri) }; | |
| # Store and retrieve information non-blocking | |
| get '/' => sub { | |
| my $self = shift; |
| // compile with: gcc epoll-example-pipe.c | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <sys/epoll.h> | |
| #define MAXEVENTS 64 | |
| int | |
| main (int argc, char *argv[]) |
Original transcript: http://allisonrandal.com/2012/04/15/open-source-enlightenment/
這幾年來,我慢慢覺得,我們參與開源社群,就像是在一條道路上並肩而行:這不僅讓我們成為更好的程式設計者,也讓我們通過與人合作,而成為更好的人。
您可以將它想成一條修行之道,讓身而為人的我們能夠不斷成長。接下來,我想談談我對開源世界的個人觀點,希望能與您分享。
首先,人是一切開源專案的核心。程式碼是很重要,但最核心的永遠是人。