Skip to content

Instantly share code, notes, and snippets.

View nickvanw's full-sized avatar

Nick Van Wiggeren nickvanw

View GitHub Profile
@nickvanw
nickvanw / main.go
Last active August 29, 2015 14:21
Web Example
package main
import (
"database/sql"
"net/http"
"github.com/gorilla/mux"
)
func main() {
@nickvanw
nickvanw / key.go
Created October 21, 2015 20:49
Generate SSH Keys
package whatever
import (
"crypto/rand"
"crypto/rsa"
"crypto/x509"
"encoding/base64"
"encoding/pem"
"fmt"
# rados lspools
rbd
test-pool-1446740062-eeddb785027bf960
test-pool-1446740062-d0a10528b0307445
blah
# rados mkpool lol
successfully created pool lol
# rados --pool rbd create blah
2015-11-05 16:16:33.254545 7f9ef15da700 0 -- 127.0.0.1:0/1001947 >> 127.0.0.1:6800/197 pipe(0x34dc2b0 sd=4 :0 s=1 pgs=0 cs=0 l=1 c=0x34d1cd0).fault
package main
import (
"encoding/json"
"fmt"
"net"
"net/http"
"sync"
)
package main
import (
"encoding/json"
"fmt"
"net"
"net/http"
)
type IPResponse struct {
@nickvanw
nickvanw / snmp.yml
Created March 24, 2018 22:41
SNMP Exporter for EdgeRouter
default:
auth:
community: thisisasecret
walk:
- 1.3.6.1.2.1.1.3
- 1.3.6.1.2.1.2
- 1.3.6.1.2.1.31.1.1
metrics:
- name: sysUpTime
oid: 1.3.6.1.2.1.1.3