Skip to content

Instantly share code, notes, and snippets.

View simon-engledew's full-sized avatar
🙈

Simon Engledew simon-engledew

🙈
View GitHub Profile
@simon-engledew
simon-engledew / requirements.py
Last active January 18, 2018 10:23
Requirements solver
# -*- coding: utf-8 -*-
"""
Generates a requirements.txt from any packages
in the current working directory.
"""
import os
import glob
import contextlib
import functools
@simon-engledew
simon-engledew / xmlbuilder.py
Created September 11, 2017 09:04
XMLBuilder
"""
functional library for generating xml documents
"""
import xml.dom.minidom as xml
class Document(object):
"""
XML Document Builder
@simon-engledew
simon-engledew / relax.py
Last active September 8, 2025 08:21
Python Parser for Relaxed JSON
import re
import json
from parsec import (
sepBy,
regex,
string,
generate,
many
)
@simon-engledew
simon-engledew / client.py
Created August 10, 2016 21:31
asyncio XMLRPC server example
import xmlrpc.client
proxy = xmlrpc.client.ServerProxy('http://localhost:7000/xmlrpc')
print(proxy.hello('there'))
@simon-engledew
simon-engledew / tsung-centos-install.txt
Created December 17, 2015 15:05 — forked from aviafelix/tsung-centos-install.txt
installing tsung in centos
yum -y install erlang perl perl-RRD-Simple.noarch perl-Log-Log4perl-RRDs.noarch gnuplot perl-Template-Toolkit
wget http://tsung.erlang-projects.org/dist/tsung-1.6.0.tar.gz
tar zxfv tsung-1.6.0.tar.gz
cd tsung-1.6.0
./configure && make && sudo make install
@simon-engledew
simon-engledew / gradients.less
Created October 30, 2015 16:05
Using spin to choose nice colours for gradients
// background-image: radial-gradient(circle at 50% 50%, spin(rgba(255,221,0,1), 0) 29%, spin(rgba(255,221,0,1), -16%) 120%);
background-image: radial-gradient(circle at 50% 50%, spin(rgba(0,116,217,1), -16%) 29%, spin(rgba(0,116,217,1), 0) 120%);
font-family: -apple-system, ".SFNSText-Regular", "San Francisco", "Roboto", "Segoe UI", "Helvetica Neue", "Lucida Grande", sans-serif;
@simon-engledew
simon-engledew / Gemfile
Created August 25, 2015 14:53
Building a stand-alone Jekyll for windows
source 'https://rubygems.org'
gem 'jekyll'
gem 'wdm', '>= 0.1.0'
gem 'hitimes', :platforms => :ruby # not sure if this works, had to install the pure ruby version manually (see build.sh)
@simon-engledew
simon-engledew / worldmap.html
Last active August 29, 2015 14:22
World map with -webkit-clip-path
<!DOCTYPE html>
<html>
<head>
<style>
* {
padding: 0;
margin: 0;
}
html, body {
height: 100%;
@simon-engledew
simon-engledew / index.html
Created June 2, 2015 13:36
HTML5 Hexagons
<!DOCTYPE html>
<html>
<head>
<style>
* {
padding: 0;
margin: 0;
}
html, body {
height: 100%;