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
/** | |
* Module import | |
*/ | |
var express = require('express'); | |
/** | |
* Port the server listens on | |
*/ | |
var port = 3000; |
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
define(function() { | |
// class variable | |
var id = 0; | |
// class method | |
function nextId() { | |
return ++id; | |
} |
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
package util | |
import ( | |
"bytes" | |
"compress/gzip" | |
"io" | |
) | |
func Gunzip(src []byte) (dst []byte, err error) { | |
if src == nil { |
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
package main | |
import ( | |
"bufio" | |
"fmt" | |
"log" | |
"os" | |
) | |
func reader(path string, p chan string) { |
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
// Riak key extractor | |
// | |
// extracts bucket names and keys from riak's bitcask hint files | |
// | |
// Authors: The CAS Team 2013 | |
// | |
package main | |
import ( | |
"bytes" |
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
ackage main | |
import ( | |
"database/sql" | |
"flag" | |
"log" | |
"time" | |
"github.com/davecheney/profile" |
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
package main | |
import ( | |
"net/http" | |
"github.com/prometheus/client_golang/prometheus" | |
) | |
var ( | |
cpuTemp = prometheus.NewGauge(prometheus.GaugeOpts{ |
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
Developer Certificate of Origin Version 1.1 | |
Copyright (C) 2004, 2006 The Linux Foundation and its contributors. 660 York Street, Suite 102, San Francisco, CA 94110 USA | |
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. | |
Developer's Certificate of Origin 1.1 | |
By making a contribution to this project, I certify that: |
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 nounset | |
function log() { | |
echo | |
echo "=========================================================================" | |
echo "== $@" | |
echo "==" | |
} |
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
// This is a port of the naive Java version of | |
// https://jackmott.github.io/programming/2016/09/01/performance-in-the-large.html | |
// | |
// Code is not pretty!!! ;) | |
// | |
// Results: | |
// | |
// $ GODEBUG=gctrace=1 go run naive/main.go | |
// gc 1 @0.079s 0%: 0.11+0.30+0.077 ms clock, 0.34+0.008/0.40/0.48+0.23 ms cpu, 4->4->0 MB, 5 MB goal, 8 P | |
// # command-line-arguments |
OlderNewer