Skip to content

Instantly share code, notes, and snippets.

@bryfry
bryfry / failing launch
Created October 1, 2016 03:40
failing launch (10 is not at least 4)
TASK [launch-instance : nginx - os - launch instance] **************************
task path: /home/ubuntu/git/services-ansible/roles/launch-instance/tasks/main.yml:32
Using module file /usr/local/lib/python2.7/dist-packages/ansible/modules/core/cloud/openstack/os_server.py
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: ubuntu
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1475290735.9-140508241290004 `" && echo ansible-tmp-1475290735.9-140508241290004="` echo $HOME/.ansible/tmp/ansible-tmp-1475290735.9-140508241290004 `" ) && sleep 0'
<127.0.0.1> PUT /tmp/tmp6xrd2V TO /home/ubuntu/.ansible/tmp/ansible-tmp-1475290735.9-140508241290004/os_server.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /home/ubuntu/.ansible/tmp/ansible-tmp-1475290735.9-140508241290004/ /home/ubuntu/.ansible/tmp/ansible-tmp-1475290735.9-140508241290004/os_server.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/usr/bin/python /home/ubuntu/.ansible/tmp/ansible-tmp-1475290735.9-140508241290004/os_server.py;
@bryfry
bryfry / main.go
Created March 20, 2017 21:48 — forked from zupzup/main.go
Go TCP Proxy / Port Forwarding Example (https://zupzup.org/go-port-forwarding/)
package main
import (
"flag"
"fmt"
"io"
"log"
"net"
"os"
"os/signal"
@bryfry
bryfry / zig-go-c.md
Created January 13, 2022 20:51
Zig Golang C
import math
# x_n+1 : x_n * a + c % m
# x_0 : seed
examples = [
{"a": 2, "c": 3, "m": 5 "seed": 1},
{"a": 9656501935081, "c" : 73755019183457, "m" : 82852957687500, "seed" : 4719414047169},
{"a": 179088735505681, "c" : 36802983139387, "m" : 182797296932250, "seed" : 53695366949483},
{"a": 9682768815721, "c" : 4894180310753, "m" : 42130424626290, "seed" : 30179788743147},
]
@bryfry
bryfry / gzip.go
Last active August 28, 2023 09:23
Idiomatic golang net/http gzip transparent compression (works with Alice)
package main
import (
"compress/gzip"
"io"
"net/http"
"strings"
)
// Gzip Compression