Skip to content

Instantly share code, notes, and snippets.

View calmh's full-sized avatar
:bowtie:
I may be slow to respond.

Jakob Borg calmh

:bowtie:
I may be slow to respond.
View GitHub Profile
package main
import (
"encoding/json"
"net"
"sync"
"time"
)
func main() {
#!/usr/bin/env python
import argparse
from unifi.controller import Controller
parser = argparse.ArgumentParser()
parser.add_argument('-c', '--controller', default='unifi', help='the controller address (default "unifi")')
parser.add_argument('-u', '--username', default='admin', help='the controller usernane (default("admin")')
parser.add_argument('-p', '--password', default='', help='the controller password')
@calmh
calmh / flate_test.go
Created July 3, 2014 12:25
flate write+close testcases
package flate_test
import (
"compress/flate"
"io/ioutil"
"testing"
"time"
)
func TestWriteAfterClose(t *testing.T) {
@calmh
calmh / crypto_test.go
Last active August 29, 2015 14:03
AES256_GCM vs AES128_GCM
package crypto_test
import (
"crypto/aes"
"crypto/cipher"
"crypto/rand"
"io"
"testing"
)
package main
import (
"fmt"
"os"
"syscall"
"time"
)
var (
package leveldb_test
import (
"crypto/rand"
"fmt"
"log"
"os"
"sync"
"testing"
"time"
package files_test
import (
"crypto/rand"
"log"
"os"
"sync"
"testing"
"time"
package main
import (
"crypto/rand"
"io"
"log"
"net"
"os"
"os/exec"
)
// Copyright (C) 2014 Jakob Borg and other contributors. All rights reserved.
// Use of this source code is governed by an MIT-style license that can be
// found in the LICENSE file.
package db
import (
"database/sql"
"fmt"
"path/filepath"

Keybase proof

I hereby claim:

  • I am calmh on github.
  • I am calmh (https://keybase.io/calmh) on keybase.
  • I have a public key whose fingerprint is 3A16 17A5 7BAC 0594 102C D6C4 22F3 37D1 8108 0D26

To claim this, I am signing this object: