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 lorawan | |
import ( | |
"bytes" | |
"testing" | |
) | |
func BenchmarkDecode(b *testing.B) { | |
data := []byte{0x40, 0x04, 0x03, 0x02, 0x01, 0x80, 0x01, 0x00, 0x01, 0xa6, 0x94, 0x64, 0x26, 0x15, 0xd6, 0xc3, 0xb5, 0x82} | |
b.ResetTimer() |
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
//assumes you have the following environment variables setup for AWS session creation | |
// AWS_SDK_LOAD_CONFIG=1 | |
// AWS_ACCESS_KEY_ID=XXXXXXXXXX | |
// AWS_SECRET_ACCESS_KEY=XXXXXXXX | |
// AWS_DEFAULT_REGION=us-east-1 | |
package main | |
import ( | |
"fmt" |
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
var privateKey *rsa.PrivateKey | |
var err error | |
if autogenerate { | |
if privateKey, err = rsa.GenerateKey(rand.Reader, 4096); err != nil { | |
log.Fatal("No jwt secret provided for token generation and auto-generation failed") | |
} | |
} else if privateKey, err = jwt.ParseRSAPrivateKeyFromPEM(privateKeyBytes); err != nil { | |
log.Fatal("Could not parse data from jwt secret") | |
} | |
publicKey := &privateKey.PublicKey |
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
language: python | |
python: | |
- 3.4 | |
build_image: shippableimages/ubuntu1404_python | |
install: | |
- pip install -r requirements.txt | |
before_script: |