Skip to content

Instantly share code, notes, and snippets.

View geoah's full-sized avatar
🦄
Arghxd

George Antoniadis geoah

🦄
Arghxd
View GitHub Profile
@eliquious
eliquious / README.md
Created January 4, 2016 05:01
Golang OpenPGP examples

Building

go build -o goencrypt main.go

Generating Keys

@erans
erans / main.go
Last active June 5, 2024 14:36
Go Example: Google CloudSQL with CloudSQL Proxy and GORM
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() {
@r10r
r10r / clearsign_test.go
Created July 19, 2016 13:22
Test golang OpenPGP message signing (clearsign).
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"
@adricasti
adricasti / Readme.md
Last active June 24, 2020 18:59
nRF52 Toolchain Setup in Mac OS X

Equipment

  • MacOS Mojave 10.14.4
  • MacBook Pro (Retina, 13-inch, Late 2012)
  • nRF52-DK (PCA10040)

Toolchain Setup

  1. Install GCC
@itod
itod / split_keyboards.md
Last active June 18, 2025 03:13
Every "split" mechanical keyboard currently being sold that I know of
@BryanJBryce
BryanJBryce / Readme.md
Last active January 18, 2024 11:46 — forked from adricasti/Readme.md
nRF52 Toolchain Setup in Mac OS X

Equipment

  • MacOS Sierra 10.12.5
  • MacBook Pro (Retina, 13-inch, Late 2012)
  • nRF52-DK (PCA10040)

Toolchain Setup

  1. Install GCC
@bmatthewshea
bmatthewshea / ethminer start-stop-daemon
Last active May 9, 2021 21:38
start-stop-daemon service for ethminer binary
#!/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
@bmatthewshea
bmatthewshea / ethminer-monitor.sh
Last active January 20, 2018 17:52
BASH/CRONTAB - Restart ethminer service if stalled
#!/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 ]
@YoRyan
YoRyan / excavator-driver.py
Last active April 2, 2022 20:36
Cross-platform controller for NiceHash Excavator for Nvidia (aka, NiceHash 2 for Linux). This is no longer maintained, please see https://github.com/YoRyan/nuxhash
#!/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:
@posener
posener / go-table-driven-tests-parallel.md
Last active April 24, 2025 20:46
Be Careful with Table Driven Tests and t.Parallel()

Be Careful with Table Driven Tests and t.Parallel()

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()