- 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
| package main | |
| import ( | |
| "unicode" | |
| ) | |
| // ToSnake convert the given string to snake case following the Golang format: | |
| // acronyms are converted to lower-case and preceded by an underscore. | |
| func ToSnake(in string) string { | |
| runes := []rune(in) |
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._ |