Skip to content

Instantly share code, notes, and snippets.

View kylebrandt's full-sized avatar
🦥
🛠️

Kyle Brandt kylebrandt

🦥
🛠️
View GitHub Profile
@kylebrandt
kylebrandt / index.html
Created May 25, 2014 03:19
Graphing a Linear Regression Forecast with d3.js and simple_statistics.js
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>D3 Learning</title>
<script src="simple_statistics.js"></script>
<script src="d3.v3.min.js" charset="utf-8"></script>
<style>
.line {
fill: none;
package main
import (
"fmt"
"time"
)
type Meeting struct {
Who []Person
When time.Time
@kylebrandt
kylebrandt / gist:92671689da33c3075326
Last active August 29, 2015 14:07
Convert Windows 100NS Epoch (Timestamp_Sys100NS) To a Unix Epoch
func TSys100NStoEpoch(nsec uint64) int64 {
//nsec is really 100*NS
//Got this constant from https://golang.org/src/pkg/syscall/ztypes_windows.go, not sure where it comes from, but seems to work
nsec -= 116444736000000000
seconds := nsec / 1e7
return int64(seconds)
}
package main
import (
"bytes"
"encoding/json"
"flag"
"io"
"log"
"net"
"os"
@kylebrandt
kylebrandt / another.py
Last active August 29, 2015 14:22
No promises...
#!/usr/bin/python
#Parse Nginix Logs and insert results into either MySQL or SQLite
#Then run various reports on the data
#Kyle Brandt 2010
import re, optparse
import cProfile
from datetime import datetime
from time import time
from sqlalchemy import create_engine
@kylebrandt
kylebrandt / keybase.md
Created February 5, 2016 20:26
kyebase.md

Keybase proof

I hereby claim:

  • I am kylebrandt on github.
  • I am kylebrandt (https://keybase.io/kylebrandt) on keybase.
  • I have a public key whose fingerprint is 8A84 EBFD 20C4 C59D 8DE9 FEEA 6554 F744 4F64 75E4

To claim this, I am signing this object:

@kylebrandt
kylebrandt / opentsdb.conf
Created February 29, 2016 00:36
OpenTSDB Configuration
tsd.core.auto_create_metrics=true
tsd.core.meta.enable_realtime_ts=false
tsd.core.meta.enable_realtime_uid=false
tsd.core.meta.enable_tsuid_incrementing=false
tsd.core.meta.enable_tracking=false
tsd.core.plugin_path=
tsd.core.tree.enable_processing=false
tsd.http.cachedir=/tmp/tsd
tsd.http.request.cors_domains=*
tsd.http.request.enable_chunked=true
@kylebrandt
kylebrandt / gist:04c0658828e616b5d8c5
Created February 29, 2016 01:07
Cloudera Not Default HBase Settings
zookeeper.session.timeout: 600000
HBase Service Advanced Configuration Snippet (Safety Valve) for hbase-site.xml:
<property>
<name>hbase.snapshot.enabled</name>
<value>true</value>
</property>
Java Configuration Options for HBase RegionServer:
-XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:-ResizePLAB -XX:ParallelGCThreads=17 -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintAdaptiveSizePolicy
@kylebrandt
kylebrandt / gist:89a98f30680b799a6317
Created February 29, 2016 01:13
Cloudera Non-Default HDFS Settings
io.compression.codecs:
org.apache.hadoop.io.compress.DefaultCodec
com.hadoop.compression.lzo.LzoCodec
com.hadoop.compression.lzo.LzopCodec
org.apache.hadoop.io.compress.GzipCodec
org.apache.hadoop.io.compress.BZip2Codec
org.apache.hadoop.io.compress.DeflateCodec
org.apache.hadoop.io.compress.SnappyCodec
org.apache.hadoop.io.compress.Lz4Codec
@kylebrandt
kylebrandt / gist:85218ae078e57a8d3088
Created February 29, 2016 01:15
Cloudera zookeeper Non-Defaults
tickTime: 30000
maxSessionTimeout: 600000