- OS: Ubuntu 14.04 X64
- CPU: Intel(R) Core(TM) i5-2430M CPU @ 2.40GHz
- RAM: 8GB
- go: go version go1.3 linux/amd64
- nodejs: v0.10.30
This file contains hidden or 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
launchctl unload /Library/LaunchAgents/org.macosforge.xquartz.startx.plist | |
sudo launchctl unload /Library/LaunchDaemons/org.macosforge.xquartz.privileged_startx.plist | |
sudo rm -rf /opt/X11* /Library/Launch*/org.macosforge.xquartz.* /Applications/Utilities/XQuartz.app /etc/*paths.d/*XQuartz | |
sudo pkgutil --forget org.macosforge.xquartz.pkg | |
# Log out and log in |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
This script will let you make backups of live VMs running on KVM, using libvirt.
The backup job will suspend the VM for the time it takes to copy the RAM to disk.
Credits: Luca Lazzeroni
I've made some minor adjustments.
This file contains hidden or 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 | |
set -o xtrace | |
# A script to bootstrap cabal-install. | |
# It works by downloading and installing the Cabal, zlib and | |
# HTTP packages. It then installs cabal-install itself. | |
# It expects to be run inside the cabal-install directory. | |
# install settings, you can override these by setting environment vars |
This file contains hidden or 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
<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); | |
/* | |
Manage multiple hostnames (domains, sub-domains) within a single instance of CodeIgniter. | |
Example: | |
If you had the following domain/sub-domain style for your site: | |
your-domain.com |
This file contains hidden or 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
/** | |
* © 2012 Typesafe Inc. | |
* | |
* Extracted from http://doc.akka.io/docs/akka/2.1.0-RC2/scala/io.html | |
*/ | |
import akka.actor._ | |
import akka.util.{ ByteString, ByteStringBuilder } | |
import java.net.InetSocketAddress |
This file contains hidden or 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 | |
echo "assumes java 7 is instlaled openjdk versio" | |
#pre dependencies | |
sudo apt-get install git-core pkg-config libtool automake make g++ connect-proxy unzip python | |
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 | |
#install zeromq | |
git clone git clone git://github.com/zeromq/libzmq.git |
This file contains hidden or 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
package code.view | |
import _root_.scala.xml.{ NodeSeq, Node, Elem, PCData, Text } | |
import _root_.net.liftweb.common._ | |
import _root_.net.liftweb.util._ | |
import _root_.net.liftweb.http._ | |
import _root_.net.liftweb.http.js._ | |
import JsCmds._ | |
import JE._ | |
import S._ |
This file contains hidden or 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
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 |