Skip to content

Instantly share code, notes, and snippets.

random-robbie /
Created April 26, 2018 14:16
Install Go Lang 1.10.1 on Raspberry Pi 3
sudo tar -C /usr/local -xvf go1.10.1.linux-armv6l.tar.gz
cat >> ~/.bashrc << 'EOF'
export GOPATH=$HOME/go
export PATH=/usr/local/go/bin:$PATH:$GOPATH/bin
source ~/.bashrc
miguelmota / ssm_parameter.go
Last active September 26, 2023 10:36
AWS SSM Go SDK parameter store example
View ssm_parameter.go
package main
import (
doncicuto / main.go
Created January 24, 2018 07:31
DynamoDB Tutorial Part 3 (Increment Atomic Counter)
View main.go
package main
import (
nikhita /
Last active November 25, 2023 07:25
How to update the Go version

How to update the Go version

System: Debian/Ubuntu/Fedora. Might work for others as well.

1. Uninstall the exisiting version

As mentioned here, to update a go version you will first need to uninstall the original version.

To uninstall, delete the /usr/local/go directory by:

nepsilon /
Last active November 21, 2017 00:27
Proper way to do backup (and restore!) with PostgreSQL 🐘 — First published in issue #51

Proper way to do backup (and restore!) with PostgreSQL 🐘

Postgres provides us several options to do backup just like we want. I’ve tried several strategies in the past, and here is the one I stick to now, for both its simplicity and efficiency.

Backup your database with:

# This is using Postgres custom format
pg_dump -Fc dbname &gt; filename
josephsieh / CGImage Rotation.png
Last active May 6, 2023 09:40
Rotate CGImage 90 degree clock wise
patshaughnessy / gist:70519495343412504686
Last active November 4, 2023 07:11
How to Debug Postgres using LLDB on a Mac
View gist:70519495343412504686
This note explains how to build Postgres from source and setup to debug it using LLDB on a Mac. I used this technique to research this article:
1. Shut down existing postgres if necessary - you don’t want to mess up your existing DB or work :)
$ ps aux | grep postgres
pat 456 0.0 0.0 2503812 828 ?? Ss Sun10AM 0:11.59 postgres: stats collector process
pat 455 0.0 0.0 2649692 2536 ?? Ss Sun10AM 0:05.00 postgres: autovacuum launcher process
pat 454 0.0 0.0 2640476 304 ?? Ss Sun10AM 0:00.74 postgres: wal writer process
pat 453 0.0 0.0 2640476 336 ?? Ss Sun10AM 0:00.76 postgres: writer process
feklee /
Last active April 24, 2019 16:38
Notes and experiments concerning HTML5 streaming, with an emphasis on live streaming


Collection of solutions for streaming via DASH, Dynamic Adaptive Streaming over HTTP, as of November 2014.

Recommended client: Chrome 38

Tool used for encoding live streams: FFmpeg

cgiacomi / passport.js
Last active February 20, 2018 05:05
BearerStrategy using a JWT token
View passport.js
* Bearer strategy for token authentication when accessing API endpoints
passport.use(new BearerStrategy(
function(token, done){
try {
//we attempt to decode the token the user sends with his requests
var decoded = jwt.decode(token, tokenSecret);
//TODO: must check the token expiry and ensure the token is still valid
tehpeh /
Last active August 6, 2023 14:16
Dynamic DNS for Mac OS X with CloudFlare and ddclient

Update June 2019

The patch described below may no longer be necessary. CloudFlare instructions here. Perl module JSON::Any may still be required, however, see comments.


Dyn's free dynamic DNS service will be ending on Wednesday, May 7th, 2014.

CloudFlare, however, has a little known feature that will allow you to update your DNS records via API or a command line script called ddclient. This will