Skip to content

Instantly share code, notes, and snippets.

@tobiase
tobiase / dj-stripe.sync-command.py
Created October 17, 2019 13:15 — forked from blackboxoperations/dj-stripe.sync-command.py
Sync Command for pending dj-stripe release
import datetime
import json
import multiprocessing
import stripe
import sys
import threading
import time
from pprint import pprint
@tobiase
tobiase / child-app-gitlab.rb
Created July 26, 2019 01:04 — forked from Soulou/child-app-gitlab.rb
Deploy a child app on Scalingo from a Gitlab private repository
#!/usr/bin/env ruby
require 'json'
require 'restclient'
auth_token = ENV["AUTH_TOKEN"]
api_url = ENV["SCALINGO_API_URL"] || "https://api.scalingo.com/v1"
auth_url = ENV["SCALINGO_AUTH_URL"] || "https://auth.scalingo.com/v1"
app = ENV["APP"]
@tobiase
tobiase / .tmux.conf
Created February 23, 2019 01:35 — forked from paulodeleo/.tmux.conf
Tmux configuration to enable mouse scroll and mouse panel select, taken from: http://brainscraps.wikia.com/wiki/Extreme_Multitasking_with_tmux_and_PuTTY
# Make mouse useful in copy mode
setw -g mode-mouse on
# Allow mouse to select which pane to use
set -g mouse-select-pane on
# Allow mouse dragging to resize panes
set -g mouse-resize-pane on
# Allow mouse to select windows
@tobiase
tobiase / responsive_image.py
Created April 25, 2018 23:30 — forked from davecranwell/responsive_image.py
Responsive image tag for Wagtail CMS
from django import template
from django.template import Context
from django.template.base import parse_bits
from wagtail.wagtailimages.templatetags.wagtailimages_tags import ImageNode
from wagtail.wagtailimages.models import Filter, SourceImageIOError, InvalidFilterSpecError
from britishswimming.utils.models import SocialMediaSettings
register = template.Library()
@tobiase
tobiase / README.md
Created March 27, 2018 10:43 — forked from magnetikonline/README.md
Setting Nginx FastCGI response buffer sizes.
@tobiase
tobiase / pyenv_ssl_archlinux.sh
Created March 1, 2018 10:47 — forked from tianchaijz/pyenv_ssl_archlinux.sh
Script to solve python compilation with ssl on Arch Linux
#!/bin/bash
# http://stackoverflow.com/questions/23548188/how-do-i-compile-python-3-4-with-custom-openssl
openssl_version="openssl-1.0.2g"
openssl_package="${openssl_version}.tar.gz"
openssl_home="/opt/$openssl_version"
curl https://www.openssl.org/source/$openssl_package | tar xz && cd $openssl_version && ./config shared --prefix=$openssl_home && make -j8 && sudo make install
export CFLAGS="-I$openssl_home/include"
@tobiase
tobiase / fabfile.py
Created January 23, 2018 18:37 — forked from saevarom/fabfile.py
Fabfile template for Overcast Software
from __future__ import with_statement
from fabric.api import *
from fabric.operations import get
from fabric.contrib.files import exists
from contextlib import contextmanager
import os
env.roledefs = {
'web': ['server1.example.com', 'server2.example.com'],
@tobiase
tobiase / README.md
Created November 3, 2015 01:10 — forked from chadrien/README.md
Debug PHP in Docker with PHPStorm and Xdebug

Debug your PHP in Docker with Intellij/PHPStorm and Xdebug

  1. For your local dev, create a Dockerfile that is based on your production image and simply install xdebug into it. Exemple:
FROM php:5

RUN yes | pecl install xdebug \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
@tobiase
tobiase / drop_tables.sh
Created October 21, 2015 22:08 — forked from vijinho/drop_tables.sh
drop empty tables
#!/bin/sh
# path settings
MYSQL=`which mysql`
# mysql settings
DB="MYDB"
HOST="127.0.0.1"
USER="root"
PASS="root"
@tobiase
tobiase / German-Zip-Codes.csv
Created October 8, 2015 17:07 — forked from jbspeakr/German-Zip-Codes.csv
list of German zip codes (Postleitzahl), including dialing code, name of the city and federal state.
We can't make this file beautiful and searchable because it's too large.
Ort;Zusatz;Plz;Vorwahl;Bundesland
Aach;b Trier;54298;0651;Rheinland-Pfalz
Aach;, Hegau;78267;07774;Baden-Württemberg
Aachen;;52062;0241;Nordrhein-Westfalen
Aachen;;52064;0241;Nordrhein-Westfalen
Aachen;;52066;0241;Nordrhein-Westfalen
Aachen;;52068;0241;Nordrhein-Westfalen
Aachen;;52070;0241;Nordrhein-Westfalen
Aachen;;52072;0241;Nordrhein-Westfalen
Aachen;;52074;0241;Nordrhein-Westfalen