Skip to content

Instantly share code, notes, and snippets.

View nemosupremo's full-sized avatar

nemosupremo nemosupremo

View GitHub Profile
package main
import (
"crypto/rand"
hyperloglog "github.com/channelmeter/hyperloglog-redigo"
hyperloglogEncoder "github.com/channelmeter/hyperloglog-redigo/encoder"
"github.com/garyburd/redigo/redis"
"io"
"log"
"time"
couch_api_key=`grep -m 1 api_key /path/to/couchpotato/settings.conf | cut -d ' ' -f 3`;
couch_port=`grep -m 1 port /path/to/couchpotato/settings.conf | cut -d ' ' -f 3`;
wget -q --delete-after http://localhost:${couch_port}/api/${couch_api_key}/renamer.scan
package main
import (
"fmt"
"log"
"net/http"
"os"
"strconv"
"github.com/goraft/raft"
package anna
import (
"fmt"
"github.com/channelmeter/gocql"
"github.com/channelmeter/heka/message"
. "github.com/channelmeter/heka/pipeline"
"regexp"
"strings"
"sync"
{
"query": {
"filtered": {
"query": {
"query_string": {
"query": "*",
"default_operator": "AND"
}
},
"filter": {
package main
import (
//"compress/gzip"
"fmt"
//_ "github.com/SlyMarbo/spdy"
"io/ioutil"
"net/http"
"strings"
)
root@cass2:~# dsetool ring
Note: Ownership information does not include topology, please specify a keyspace.
Address DC Rack Workload Status State Load Owns VNodes
10.129.196.6 nephos-1 r1 Unknown Up Normal 455.08 GB 12.24% 256
10.129.196.9 nephos-1 r1 Unknown Up Normal 442.86 GB 11.53% 256
10.129.196.21 nephos-1 r1 Unknown Up Normal 463.47 GB 13.18% 256
10.129.196.23 nephos-1 r1 Unknown Up Normal 429.23 GB 12.71% 256
10.129.196.25 nephos-1 r1 Unknown Up Normal 482.9 GB 13.16% 256
…or create a new repository on the command line
echo "# newrepo" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin git@github.com:nemothekid/newrepo.git
git push -u origin master
…or push an existing repository from the command line
<!DOCTYPE html>
<html ng-app="test">
<head>
<title>Performance Comparison for Knockout, Angular and React</title>
<link href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.1/css/bootstrap.css" rel="stylesheet" />
<style type="text/css">
* { box-sizing:border-box; }
body { padding:30px 0; }
h2 { margin:0; margin-bottom:25px; }
h3 { margin:0; padding:0; margin-bottom:12px; }
package main
import "time"
import "fmt"
import "sync"
func processThink(n int, workChan chan<- int) {
time.Sleep(time.Duration(n) * time.Second)
workChan <- n
}