Skip to content

Instantly share code, notes, and snippets.

Avatar
🔨
🦥

Kyle Brandt kylebrandt

🔨
🦥
View GitHub Profile
@kylebrandt
kylebrandt / index.html
Created May 25, 2014
Graphing a Linear Regression Forecast with d3.js and simple_statistics.js
View index.html
<!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;
View gist:89dc754c658340e87d97
package main
import (
"fmt"
"time"
)
type Meeting struct {
Who []Person
When time.Time
@kylebrandt
kylebrandt / gist:92671689da33c3075326
Last active Aug 29, 2015
Convert Windows 100NS Epoch (Timestamp_Sys100NS) To a Unix Epoch
View gist:92671689da33c3075326
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)
}
View gist:b2906d990d0e762ad87e
package main
import (
"bytes"
"encoding/json"
"flag"
"io"
"log"
"net"
"os"
@kylebrandt
kylebrandt / another.py
Last active Aug 29, 2015
No promises...
View another.py
#!/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
View keybase.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 Feb 29, 2016
OpenTSDB Configuration
View opentsdb.conf
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 Feb 29, 2016
Cloudera Not Default HBase Settings
View gist:04c0658828e616b5d8c5
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 Feb 29, 2016
Cloudera Non-Default HDFS Settings
View gist:89a98f30680b799a6317
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 Feb 29, 2016
Cloudera zookeeper Non-Defaults
View gist:85218ae078e57a8d3088
tickTime: 30000
maxSessionTimeout: 600000
You can’t perform that action at this time.