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
@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

@kachayev
kachayev / concurrency-in-go.md
Last active May 31, 2024 09:34
Channels Are Not Enough or Why Pipelining Is Not That Easy
@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"
)
@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
@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
// 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"
@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"
@lee8oi
lee8oi / goshell.go
Last active December 18, 2023 18:17
Running system commands interactively in Go using os/exec
package main
import (
"os"
"os/exec"
)
func Command(args ...string) {
cmd := exec.Command(args[0], args[1:]...)
cmd.Stdin, cmd.Stdout, cmd.Stderr = os.Stdin, os.Stdout, os.Stderr
@mark-kubacki
mark-kubacki / create-all.sh
Last active September 21, 2023 07:50
a dummy Certificate Authority for development and testing
#!/bin/bash
#
# Copyright (c) 2015 W. Mark Kubacki <wmark@hurrikane.de>
# Licensed under the terms of the RPL 1.5 for all usages
# http://www.opensource.org/licenses/rpl1.5
#
set -e -o pipefail
CAsubj="/C=DE/ST=Niedersachsen/L=Hannover/O=Dummy CA/CN=Sign-It-All"
@lee8oi
lee8oi / startProcess.go
Last active January 4, 2024 01:19
Using os.StartProcess() in Go for platform-independent system command execution.
package main
import (
"os"
"os/exec"
)
func Start(args ...string) (p *os.Process, err error) {
if args[0], err = exec.LookPath(args[0]); err == nil {
var procAttr os.ProcAttr