Skip to content

Instantly share code, notes, and snippets.

View metakeule's full-sized avatar
💭
I may be slow to respond.

metakeule metakeule

💭
I may be slow to respond.
  • Asunción / Paraguay
View GitHub Profile
@cryptix
cryptix / pgpTestTool.go
Created December 28, 2014 16:20
PGP file encryption in golang
package main
import (
"archive/zip"
"fmt"
"log"
"os"
"time"
"github.com/cryptix/go/logging"
// Use Case:
//
// Say you have a bunch of decoupled components which access the same set of databases.
// Since database/sql does connection pooling it makes sense for the components to share instances of *sql.DB
// This package lets you do that with minimal code changes.
package dbmanager
import (
"database/sql"
"time"
@rjeczalik
rjeczalik / gh-gopath
Last active August 29, 2015 14:08
Imports all Go projects from your GitHub account into a GOPATH workspace
#!/bin/bash
# Rafal Jeczalik <rjeczalik@gmail.com>
# https://gist.github.com/rjeczalik/db886c79049d83f318e2
type curl 1>/dev/null || exit
type jq 1>/dev/null || exit
die_usage() {
if [ ! -z "${*}" ]; then
@zankich
zankich / steps.md
Last active July 24, 2018 18:02
Gobot firmata instructions for Windows
  1. Install gort
  1. Install arduino dependencies and flash firmata
  • Make sure you are running your terminal as an Administrator
  • $ ./gort arduino install
  • reload your env variables, or close your cmd prompt and open a new one
  • $ ./gort scan serial
  • Take note of the COM port listed, this should be your arduino
@stuart-warren
stuart-warren / simple-gpg-enc.go
Last active May 20, 2024 09:57
golang gpg/openpgp encryption/decryption example
package main
import (
"bytes"
"code.google.com/p/go.crypto/openpgp"
"encoding/base64"
"io/ioutil"
"log"
"os"
)
@kachayev
kachayev / concurrency-in-go.md
Last active May 31, 2024 09:34
Channels Are Not Enough or Why Pipelining Is Not That Easy
@jashkenas
jashkenas / semantic-pedantic.md
Last active November 29, 2023 14:49
Why Semantic Versioning Isn't

Spurred by recent events (https://news.ycombinator.com/item?id=8244700), this is a quick set of jotted-down thoughts about the state of "Semantic" Versioning, and why we should be fighting the good fight against it.

For a long time in the history of software, version numbers indicated the relative progress and change in a given piece of software. A major release (1.x.x) was major, a minor release (x.1.x) was minor, and a patch release was just a small patch. You could evaluate a given piece of software by name + version, and get a feeling for how far away version 2.0.1 was from version 2.8.0.

But Semantic Versioning (henceforth, SemVer), as specified at http://semver.org/, changes this to prioritize a mechanistic understanding of a codebase over a human one. Any "breaking" change to the software must be accompanied with a new major version number. It's alright for robots, but bad for us.

SemVer tries to compress a huge amount of information — the nature of the change, the percentage of users that wil

@cryptix
cryptix / client.go
Created July 30, 2014 11:45
sharing filedescriptors through unix sockets
package main
import (
"math/rand"
"net"
"github.com/cryptix/goremutake"
"github.com/ftrvxmtrx/fd"
)
@momer
momer / grpc_with_reconnect.go
Last active February 7, 2024 00:44
A pattern I created to maintain connections to an RPC server in Go. Since net/rpc does not provide any methods for automatically reconnecting to an RPC server, I needed a work-around. Additionally, rpc.Client does not export any state variables (rpc.Client.shutdown and rpc.Client.closing) nor does it export the Client's Mutex. So, we wrap the rp…
package main
import (
"myapp/webserver/app/common"
"github.com/golang/glog"
"github.com/gorilla/mux"
"encoding/json"
"strconv"
"flag"
"fmt"
@staltz
staltz / introrx.md
Last active May 30, 2024 18:43
The introduction to Reactive Programming you've been missing