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
| export PATH=$PATH:~/go/bin | |
| export GOROOT=$HOME/go | |
| export GOPATH=$HOME/gopath |
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 ( | |
| "fmt" | |
| "log" | |
| "strconv" | |
| "github.com/tpjg/goriakpbc" | |
| ) | |
| func main() { |
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
| alternatives --install /usr/bin/java java /usr/java/jdk1.7.0_51/bin/java 2 | |
| update-alternatives --config java |
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
| class Riemann::Bench | |
| attr_accessor :client, :hosts, :services, :states | |
| def initialize | |
| @hosts = [nil] + (0...100).map { |i| "host#{i}" } | |
| @services = %w(test1 test2 test3 foo bar baz xyzzy attack cat treat) | |
| @states = {} | |
| @client = Riemann::Client.new(:host => (ARGV.first || 'localhost')) | |
| end | |
| def evolve(state) |
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
| (ns clj-hashing | |
| (:import | |
| [com.google.common.hash Hashing HashFunction HashCode ] | |
| [java.nio.charset Charset ])) | |
| (def ^:private ^HashFunction murmur-fun (Hashing/murmur3_128)) | |
| (def ^:private ^HashFunction sha1-fun (Hashing/sha1)) | |
| (def ^:private ^HashFunction md5-fun (Hashing/md5)) | |
| (def ^:private ^sun.nio.cs.UTF_8 utf8-chr-set (Charset/forName "UTF-8")) |
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
| StrictModes yes | |
| Protocol 2 | |
| AddressFamily inet | |
| ListenAddress 0.0.0.0 | |
| LoginGraceTime 60 | |
| PermitRootLogin yes | |
| IgnoreRhosts yes | |
| PubKeyAuthentication yes | |
| AuthorizedKeysFile .ssh/authorized_keys |
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
| (defn epoch | |
| "Returns (System/currentTimeMillis)/1000" | |
| [] | |
| (int (/ (System/currentTimeMillis) 1000))) | |
| (defn epoch-min | |
| "Returns the epoch-min, to any epoch input | |
| epoch min is the the last minute's epoch value | |
| 1390086540 1390086600 1390086660" | |
| [epoch] |
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
| [vagrant@vagrant-centos64 ~]$ export PATH=$PATH:/opt/rr/py27/bin | |
| [vagrant@vagrant-centos64 ~]$ grep conf ~/.bash_history ^C | |
| [vagrant@vagrant-centos64 ~]$ virtualenv sergey | |
| New python executable in sergey/bin/python2.7 | |
| Also creating executable in sergey/bin/python | |
| Installing setuptools, pip...done. | |
| [vagrant@vagrant-centos64 ~]$ ls -larth sergey/ | |
| total 20K | |
| drwxrwxr-x 3 vagrant vagrant 4.0K Feb 11 22:51 lib | |
| drwxrwxr-x 2 vagrant vagrant 4.0K Feb 11 22:51 include |
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
| hadoop distcp s3n://<key>:<secret>@mybucket/dir hdfs://target/ |
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
| CREATE EXTERNAL TABLE uservisits( | |
| sourceIP STRING, | |
| destURL STRING, | |
| visitDate TIMESTAMP, | |
| adRevenue FLOAT, | |
| userAgent STRING, | |
| countryCode STRING, | |
| languageCode STRING, | |
| searchWord STRING, | |
| duration INT |
OlderNewer