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 / Own_status_board.psp
Last active December 30, 2015 17:29
python server page hack to make a train display board. See it working here. http://imgur.com/tW9Bugl
<html>
<head>
<title>Python Server Pages (PSP)</title>
<meta http-equiv="refresh" content="60; url=http://192.168.1.2:8000/">
<body>
<%
import json
import time
import requests
from BeautifulSoup import BeautifulSoup
@simonvc
simonvc / gist:7230732
Created October 30, 2013 10:57
python dictionary has a list or get an empty (but iterable) list
>>> for x in a.get('a list'):
... print x
...
1
2
3
4
5
6
>>> for x in a.get('b list'):
@simonvc
simonvc / gist:7104974
Created October 22, 2013 17:51
an ssh pub key
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDo4mZedXR7FQH6SbsnP887D/FdU0hdnBr2jVl6+AbL5T3DKxDhjUX7OKQWbjJpw/rbaoCF8a5870fm3Lp6AFFC1XlakGtuWsabWdHl1qGyJHiXbCPt18HZBRx1a23KNtgmT5pEovntOMU/2/sMFw2oEJdsPjaNEy/TPTdAehhotWaQgY+KlNJoIQC4+kcpBP4dbIzzq96wWat2rGw6ijhqkWIeaFUeVbCqZsEJ6WQ/a7ylqOTwFFDdCriwCYgmcX3QRl8PiJs7pZjlGpa7Qe5TB39gAEJ88cLs+FUt5WtOlkXPTBq9d9wGMGxohIr4hMjup2d+pUcWKJUHzokoM/7V simonvc@aphid
@simonvc
simonvc / gist:7007444
Created October 16, 2013 13:08
hobbyking
Thanks for shopping at our store
Your order details are:
1x #9171000184/31544 Turnigy 9XR Transmitter Mode 2 (No Module) = 50.22
1x #9171000070/24656 OrangeRX DSMX/DSM2 2.4Ghz Transmitter Module (JR/Turnigy compatible) = 29.95
1x #9387000027-0/42844 HobbyKing Pocket Quad V1.1 Ultra-Micro DSM2 MultiWii Quadcopter (PNF) = 49.84
1x #9387000020-0/42098 0716 Replacement Brushed Set HobbyKing Pocket Quad V1.1 Quadcopter (4pc) = 5.56
3x #9387000021-0/42099 45mm Replacement Prop Set HobbyKing Pocket Quad V1.1 Quadcopter (8pc) = 5.16
Paypal Express
@simonvc
simonvc / amazonformat.py
Created July 30, 2013 13:58
Here's how to process amazon csv format.
#!/usr/bin/env python
from datetime import datetime, date
from csv import reader
from sys import argv
dateformat='%Y/%m/%d %H:%M:%S'
if __name__=='__main__':
filename = argv[1]