start new:
tmux
start new with session name:
tmux new -s myname
| echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
| . ~/.bashrc | |
| mkdir ~/local | |
| mkdir ~/node-latest-install | |
| cd ~/node-latest-install | |
| curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
| ./configure --prefix=~/local | |
| make install # ok, fine, this step probably takes more than 30 seconds... | |
| curl https://www.npmjs.org/install.sh | sh |
| // my response to https://groups.google.com/forum/?fromgroups#!searchin/play-framework/cake/play-framework/LQ2y40QNZaE/qvRFw5of-rQJ | |
| import play.api._ | |
| import play.api.mvc._ | |
| // Domain object | |
| case class User(id: String, name: String) | |
| // Trait defining the service component | |
| trait UserServiceComponent { |
| import java.util.Properties | |
| import kafka.server.KafkaServer | |
| import kafka.server.KafkaConfig | |
| import kafka.producer.ProducerConfig | |
| import kafka.producer.Producer | |
| import kafka.message.Message | |
| import kafka.producer.ProducerData | |
| import kafka.consumer.ConsumerConfig | |
| import kafka.consumer.Consumer | |
| import kafka.utils.Utils |
| Latency Comparison Numbers (~2012) | |
| ---------------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
| //usage | |
| withAdvice.call(targetObject); | |
| //mixin augments target object with around, before and after methods | |
| //method is the base method, advice is the augmenting function | |
| withAdvice: function() { | |
| ['before', 'after', 'around'].forEach(function(m) { | |
| this[m] = function(method, advice) { | |
| if (typeof this[method] == 'function') { | |
| return this[method] = fn[m](this[method], advice); |
Locate the section for your github remote in the .git/config file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
| # source : http://code.google.com/p/natvpn/source/browse/trunk/stun_server_list | |
| # A list of available STUN server. | |
| stun.l.google.com:19302 | |
| stun1.l.google.com:19302 | |
| stun2.l.google.com:19302 | |
| stun3.l.google.com:19302 | |
| stun4.l.google.com:19302 | |
| stun01.sipphone.com | |
| stun.ekiga.net |
| ackage com.twitter.ads.batch.experimental.oscar | |
| import com.twitter.scalding._ | |
| import com.twitter.pluck.job._ | |
| import com.twitter.pluck.source._ | |
| import com.twitter.pluck.source.matrix._ | |
| import com.twitter.pluck.mathematics._ | |
| import com.twitter.scalding.mathematics.Monoid | |
| /* |
| package webserver; | |
| import org.webbitserver.WebServers; | |
| public class App { | |
| public static void main(String[] args) { | |
| WebServers.createWebServer(8080).add((req, res, con) -> { | |
| res.content("Hello, world!").end(); | |
| }).start(); | |
| } |