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
Fonte: http://gohorseprocess.wordpress.com | |
1- Pensou, não é XGH. | |
XGH não pensa, faz a primeira coisa que vem à mente. Não existe | |
segunda opção, a única opção é a mais rápida. | |
2- Existem 3 formas de se resolver um problema, a correta, a errada e | |
a XGH, que é igual à errada, só que mais rápida. |
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
{ | |
"AWSRegionArch2AMI": { | |
"ap-northeast-1": { | |
"amd64XhvmXebs": "ami-9e5cff9e", | |
"amd64XhvmXebsXio1": "ami-a05cffa0", | |
"amd64XhvmXebsXssd": "ami-a25cffa2", | |
"amd64XhvmXephemeral": "ami-de5efdde", | |
"amd64Xebs": "ami-925cff92", | |
"amd64XebsXio1": "ami-985cff98", | |
"amd64XebsXssd": "ami-9c5cff9c", |
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
/** | |
* Parse query string. | |
* ?a=b&c=d&e=f&e=g to {a: 'b', c: 'd', e: ['f', 'g']} | |
* @param {String} (optional) queryString | |
* @return {Object} query params | |
*/ | |
getQueryParams: function(queryString) { | |
var query = (queryString || window.location.search).replace(/^[?]/, ''), | |
result = {}; | |
if (!query) return result; |
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
> console | |
[info] Starting scala interpreter... | |
[info] | |
Welcome to Scala version 2.10.4 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_55). | |
Type in expressions to have them evaluated. | |
Type :help for more information. | |
scala> import java.net.{ InetAddress, Inet6Address } | |
import java.net.{InetAddress, Inet6Address} |
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
#!/bin/bash | |
set -o errexit -o nounset -o pipefail | |
function -h { | |
cat <<USAGE | |
USAGE: memusg COMMAND [ARGS] | |
Measure memory usage of processes. | |
This script is inspired by a script of the same name written by Jaeho Shin | |
<netj@sparcs.org>. |
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
import Control.Applicative | |
import Control.Concurrent.Chan (Chan, newChan) | |
import qualified Data.Map as M | |
import Control.Concurrent.STM (atomically, TVar, readTVar, writeTVar) | |
import Control.Monad.Trans | |
type Id = Integer | |
getOrCreateChannel :: (MonadIO m) => Id -> TVar (M.Map Id (Chan a)) -> m (Chan a) | |
getOrCreateChannel cid t = liftIO $ do |
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
#!/bin/bash | |
set -o errexit -o pipefail -o nounset | |
cat_bundle () { | |
local file="$1" | |
echo "" | |
echo "" | |
echo "; ----------------------------------------------------------------------" | |
echo "; $(basename $file)" | |
echo "; ----------------------------------------------------------------------" |