go build -o goencrypt main.go
This file contains hidden or 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 main | |
import ( | |
"github.com/jinzhu/gorm" | |
_ "database/sql" | |
_ "github.com/GoogleCloudPlatform/cloudsql-proxy/proxy/dialers/mysql" | |
) | |
// You can read more in this post: http://forecastcloudy.net/2016/06/28/using-google-cloud-sql-from-go-with-gorm-in-google-container-engine-and-google-compute-engine/ | |
func main() { |
This file contains hidden or 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 repository | |
import ( | |
"bytes" | |
"crypto/rand" | |
"crypto/rsa" | |
"fmt" | |
"github.com/stretchr/testify/assert" | |
"golang.org/x/crypto/openpgp/clearsign" | |
"golang.org/x/crypto/openpgp/packet" |
-
Kinesis Freestyle (Terrible key switches. Mushy and un-lovable)
-
Kinesis Freestyle Edge (Traditional layout with too many keys, mech switches, proably too big to be tented easily/properly)
-
Matias Ergo Pro (Looks pretty great. Have not tried.)
-
ErgoDox Kit (Currently, my everyday keyboard. Can buy pre-assembled on eBay.)
-
ErgoDox EZ (Prolly the best option for most people.)
This file contains hidden or 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
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: ethminer | |
# Required-Start: $remote_fs $syslog $network $named | |
# Required-Stop: $remote_fs $syslog $network $named | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: ethminer start-stop-daemon init script | |
# Description: This allows you to start/stop ethminer as if it | |
# were a daemon |
This file contains hidden or 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
#!/bin/bash | |
PATH=$PATH:/usr/bin:/usr/sbin:/var/log/miners:/home/ubuntu/scripts | |
SECS=$(date +%s) | |
ETHMINERLOGFILE=/var/log/miners/ethminer.log | |
ETHMINERRESTART=/var/log/miners/ethminer-restarts.log | |
idletime=$(expr $SECS - $(date +%s -r $ETHMINERLOGFILE)) | |
echo -n "$(date) - Status check running.. " &>> $ETHMINERRESTART | |
if [ "$idletime" -gt 300 ] |
This file contains hidden or 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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
"""Cross-platform controller for NiceHash Excavator for Nvidia.""" | |
# Example usage: | |
# $ excavator -p 3456 & | |
# $ python3 excavator-driver.py | |
# History: |
We Gophers, love table-driven-tests, it makes our unittesting structured, and makes it easy to add different test cases with ease.
Let’s create our table driven test, for convenience, I chose to use t.Log
as the test function.
Notice that we don't have any assertion in this test, it is not needed to for the demonstration.
func TestTLog(t *testing.T) {
t.Parallel()