Skip to content

Instantly share code, notes, and snippets.

View joboscribe's full-sized avatar
🐉

jonathan s boschiero joboscribe

🐉
View GitHub Profile
@wader
wader / disable_sendfile_linux.go
Last active September 13, 2018 04:47
go http VirtualBox vboxfs sendfile bug workaround
// VirtualBox vboxsf sendfile bug workaround
// use seccomp to make sendfile return ENOTSUP which makes go http fallback to io.Copy
//
// if running in docker make sure to give SYS_ADMIN capabilities to container:
// docker create --cap-add=SYS_ADMIN
// docker-compose:
// cap_add:
// - SYS_ADMIN
//
// Licensed as public domain
package poison
import (
"database/sql"
"reflect"
"github.com/gorilla/schema"
)
// Convertors for sql.Null* types so that they can be
@nicolasembleton
nicolasembleton / restart_bluetooth.sh
Last active October 18, 2025 20:22
Restart Bluetooth Daemon on Mac OS X without restarting
#!/bin/bash
sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
@sergiotapia
sergiotapia / md5-example.go
Last active August 19, 2025 09:37
Golang - How to hash a string using MD5.
import (
"crypto/md5"
"encoding/hex"
)
func GetMD5Hash(text string) string {
hasher := md5.New()
hasher.Write([]byte(text))
return hex.EncodeToString(hasher.Sum(nil))
}