Skip to content

Instantly share code, notes, and snippets.

View clarenceb's full-sized avatar

Clarence Bakirtzidis clarenceb

View GitHub Profile
@clarenceb
clarenceb / gist:4594bad9da2cc8b4ced0e5a2ecbe0918
Last active March 18, 2018 11:30
570-hcdev-dump-json refactor test
package main
import (
"fmt"
"io/ioutil"
"os"
"path/filepath"
"testing"
"time"
{
"dht_changes": [
{
"index": 1,
"message": {
"fingerprint": "QmQd25y1KU7wj978m3NpP5bDorX7YTjBwvoFMXevisFGef",
"content": "PUT_REQUEST @ 2018-02-12 09:37:22.3644 +1100 AEDT From:<peer.ID cXesBJ> Body:{QmcXesBJFTpgutGnnsqmK1kNVM88Hkn7rQraHousYWJedK 0 <nil>}"
},
"data": {
"type": "%%key",
@clarenceb
clarenceb / dht.json
Last active February 20, 2018 10:16
Proposed DHT dump as JSON
{
"dht_changes": [
{
"index": 1,
"message": {
"fingerprint": "QmdSrGJt5jto2PzEUoFHm9xzs5ChT2FJjoXcZ1vTWV9Z3k",
"content": "PUT_REQUEST @ 2018-02-12 09:37:22.3644 +1100 AEDT From:<peer.ID cXesBJ> Body:{QmcXesBJFTpgutGnnsqmK1kNVM88Hkn7rQraHousYWJedK 0 <nil>}"
},
"data": {
"type": "%%key",
{
"%dna": {
"header": {
"type": "%dna",
"hash": "QmbUdrQoiTzKTzZiJ8BzPeeGye7BPiVUruyQZiBqXNDruk",
"time": "2018-02-08 14:54:25.976547 +1100 AEDT",
"nextHeader": "1",
"next": "%dna: 1",
"entry": "QmSMg4wV1iuvw5V6MwWTD6ppYBeJqBSWyy4M6vm5deqCQ5"
},
General
=======
If you are running a VPN, turn it off before installing DockerToolbox (and probably also whilst using it). VPNs can interfere with the network interfaces used docker-machine and VirtualBox.
MacOS
=====
If you have existing, older versions of VirtualBox or DockerToolbox please uninstall them.
#!/bin/bash
set -e
function welcome {
cat <<-EOF
____ _ _____ _ _ _
| _ \ ___ ___| | _____ _ __ |_ _| _| |_ ___ _ __(_) __ _| |
| | | |/ _ \ / __| |/ / _ \ '__| | || | | | __/ _ \| '__| |/ _\` | |
| |_| | (_) | (__| < __/ | | || |_| | || (_) | | | | (_| | |

Keybase proof

I hereby claim:

  • I am clarenceb on github.
  • I am clarenceb (https://keybase.io/clarenceb) on keybase.
  • I have a public key whose fingerprint is 7E3F 832E 1B11 A6BD 3C21 C908 DF53 15F8 2809 B8D6

To claim this, I am signing this object:

@clarenceb
clarenceb / gist:7818020
Created December 6, 2013 03:17
Sample Tmux config
#############################
# tmux settings (.tmux.conf)
#############################
#
set -g prefix C-a # Remap PREFIX to be CTRL + a
unbind C-b # Unbind default PREFIX mapping
set -s escape-time 1 # Reduce (or remove with 0) tmux send delay to improve responsiveness when working with vim and other tools.
set -g base-index 1 # Start Window numbering at 1 (instead of 0)
setw -g pane-base-index 1 # Start Pane numbering at 1 (instead of 0)
@clarenceb
clarenceb / elb-userdata.sh
Created August 15, 2012 05:59
AWS Training - 2nd instance launch with user data script
#!/bin/bash
exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1
dpkg --configure -a
wget http://bit.ly/aws-ec2id -O aws-ec2id
nohup bash aws-ec2id &
@clarenceb
clarenceb / pygame_errors.txt
Created July 13, 2012 12:58
Syntax error when trying to install pygame on python3 for Mac OS X 10.6.x
I followed the steps here: http://florian-berger.de/en/articles/installing-pygame-for-python-3-on-os-x
Last step fails for me, see below:
$ /usr/local/share/python3/pip install hg+http://bitbucket.org/pygame/pygame
warning: bitbucket.org certificate with fingerprint 24:9c:45:8b:9c:aa:ba:55:4e:01:6d:58:ff:e4:28:7d:2a:14:ae:3b not verified (check hostfingerprints or web.cacerts config setting)
warning: bitbucket.org certificate with fingerprint 24:9c:45:8b:9c:aa:ba:55:4e:01:6d:58:ff:e4:28:7d:2a:14:ae:3b not verified (check hostfingerprints or web.cacerts config setting)
warning: bitbucket.org certificate with fingerprint 24:9c:45:8b:9c:aa:ba:55:4e:01:6d:58:ff:e4:28:7d:2a:14:ae:3b not verified (check hostfingerprints or web.cacerts config setting)
warning: bitbucket.org certificate with fingerprint 24:9c:45:8b:9c:aa:ba:55:4e:01:6d:58:ff:e4:28:7d:2a:14:ae:3b not verified (check hostfingerprints or web.cacerts config setting)