Skip to content

Instantly share code, notes, and snippets.


Seb Vetter roadsideseb

  • Roadside Software & Adventures
  • Squamish, BC
View GitHub Profile
roadsideseb /
Last active May 13, 2021
A slightly modified version of the 'schedule' Python package that works with asyncio 😎
import emoji
import schedule
import asyncio
import inspect
from datetime import datetime
class Job(schedule.Job):
roadsideseb /
Last active Jun 15, 2019 — forked from tyleramos/
XVFB Run Bash script
# $Id: xvfb-run 2027 2004-11-16 14:54:16Z branden $
# This script starts an instance of Xvfb, the "fake" X server, runs a command
# with that server available, and kills the X server when done. The return
# value of the command becomes the return value of this script, except in cases
# where this script encounters an error.
# If anyone is using this to build a Debian package, make sure the package
roadsideseb /
Created Apr 9, 2013
MultiFormView for handling multiple forms in a Django CBV with a little more ease...
The following mixins and views are borrowed and adapted from the following
from functools import partial
from django.views.generic.base import TemplateResponseMixin
from django.views.generic.edit import ProcessFormView, FormMixin
roadsideseb /
Last active Apr 4, 2018
Job sites for Django and Python developers
roadsideseb /
Created Jan 30, 2014
Packing slips for Oscar using PISA in the dashboard
from xhtml2pdf import pisa
from xhtml2pdf.pdf import pisaPDF
class OrderListView(ListView, BulkEditMixin):
actions = (
roadsideseb /
Created Mar 16, 2015
Start a container on elastic beanstalk with the full configuration provided in the deployment script(s).
#!/usr/bin/env bash
set -e
. /opt/elasticbeanstalk/hooks/
# switch to current app directory
# can override settings in Dockerfile
echo "Reading settings from"
roadsideseb / base.html
Created Feb 2, 2014
Oscar packing slip / invoice templates using pisa.
View base.html
{% load staticfiles %}
<!DOCTYPE html>
<style type="text/css">
@page {
size: a4 portrait;
margin: 1cm;
roadsideseb /
Last active Jul 17, 2017
A few handy Docker commands
# Delete all stopped containers
docker rm $(docker ps -a -q)
# Remove unused, dangling images
docker rmi $(docker images -q -f dangling=true)
# Remove all but X images with a specific name (old image cleanup),
# in this case, we leave the 2 newest images.
$(docker images | grep my-docker-image | tail -n+3 | awk '{ print $1":"$2; }')
View pipoa
set -ex
apk add --no-cache \
--virtual .build-deps \
gcc \
g++ \
make \
roadsideseb / 01 🐍 load testing with
Last active Jan 12, 2017
Load testing Python web apps with Gatling
View 01 🐍 load testing with


These results are generated by a gatling simulation that ramps 100 user over 10 second and then keeps the users constant at that rate for 60 seconds before ramping again by 100 users. The entire scenario runs from 0 to 1000 users.