Skip to content

Instantly share code, notes, and snippets.

View simonvc's full-sized avatar
💭
Hiring Go Engineers

Simon Vans-Colina simonvc

💭
Hiring Go Engineers
View GitHub Profile
import requests
from pyfiglet import Figlet
# {"0x44ea84a85616f8e9cd719fc843de31d852ad7240":{"usd":0.628788}}
import requests
r = requests.get(
url="https://api.coingecko.com/api/v3/simple/token_price/ethereum?contract_addresses=0x44ea84a85616f8e9cd719fc843de31d852ad7240&vs_currencies=USD"
)
@simonvc
simonvc / Dockerfile
Created April 3, 2017 22:00
Dockerfile for magnetico
FROM ubuntu:16.10
RUN apt-get update
RUN apt-get -y install python3.5 python3-pip
RUN apt-get -y install supervisor
RUN pip3 install --upgrade pip
RUN pip3 install magneticod magneticow
RUN mkdir -p /var/log/supervisor
RUN echo [supervisord] > /etc/supervisor/conf.d/supervisord.conf
RUN echo nodaemon=true >> /etc/supervisor/conf.d/supervisord.conf
@simonvc
simonvc / drone.md
Created March 24, 2017 09:17
Drone buying guide Spring 2017

Ok, Here's my March 2017 drone buying guide...

First decide what you want to do with a drone. The decide how much time you're prepared to put into building one, and finally decide how much money you want to spend.

Drones can do a lot of different things these days, but the most popular (in order of popularity) are.

1/ Aerial Photography 70%

2/ FPV Racing 20%

cd ~/Library/Containers/com.docker.docker/Data/database/
git reset --hard
cat com.docker.driver.amd64-linux/slirp/max-connections
echo 1500 > com.docker.driver.amd64-linux/slirp/max-connections
git add com.docker.driver.amd64-linux/slirp/max-connections
git commit -s -m 'Update the maximum number of connections'
0xF0bb9686Aa3bb1694695dfd36764b8e1d02F7E36 There once was a man named simon.
@simonvc
simonvc / gist:bbeb6e9c8a47d040ac6b
Created August 30, 2015 20:07
blackout cleanflight 1.9.0
# dump
# version
# Cleanflight/SPRACINGF3 1.9.0 May 31 2015 / 13:17:30 (98f7549)
# dump master
# mixer
mixer QUADX
@simonvc
simonvc / gist:67c0c406d6ff4c146854
Last active August 29, 2015 14:26
thug180 cleanflight settings
# version
# Cleanflight/NAZE 1.10.0 Jul 31 2015 / 15:12:38 (96061b8)
# dump master
# mixer
mixer QUADX
mmix reset
smix reset
@simonvc
simonvc / fix.sh
Created May 27, 2015 13:41
Script to fix files with the query string attached.
ls *\?* | while read fn; do nfn=$(echo $fn | tr '\?' ' ' | awk '{print $1}'); cp "$fn" $nfn;done
@simonvc
simonvc / keybase.md
Created September 17, 2014 14:56
keybase

Keybase proof

I hereby claim:

  • I am simonvc on github.
  • I am simonvc (https://keybase.io/simonvc) on keybase.
  • I have a public key whose fingerprint is F251 3223 EBB4 6E00 F160 84A4 AEA8 9F35 D783 11AD

To claim this, I am signing this object:

@simonvc
simonvc / docker.md
Last active August 29, 2015 13:58
Docker networking proposal

Seriously, the current state of connecting docker hosts together is poor. Most solutions seem to rely on stuffing ENVIRONMENT variables into docker hosts. I think we can do better..

I want to create a config file that looks like this:

# Host is a reserved name, MyWebContainer will look for a docker container called MyWebContainer
HOST:(*)80 --> MyWebContainer:8080
 
# any tcp connections on (*) any source port, with the dst port as 3306 will be routed to the mydatabase continer port 3306
MyWebContainer(*)3306 --> MyDataBase:3306