Skip to content

Instantly share code, notes, and snippets.

View stonemirror's full-sized avatar

David Schlesinger stonemirror

View GitHub Profile
@stonemirror
stonemirror / wsgi.py
Created March 18, 2016 01:15 — forked from LeZuse/wsgi.py
WSGI script with virtualenv activation with Flask
import os
import sys
# Install venv by `virtualenv --distribute venv`
# Then install depedencies: `source venv/bin/active`
# `pip install -r requirements.txt`
activate_this = '/var/www/apache/csshat.com/csshat.com/venv/bin/activate_this.py'
execfile(activate_this, dict(__file__=activate_this))
path = os.path.join(os.path.dirname(__file__), os.pardir)
@stonemirror
stonemirror / tsws
Last active September 7, 2015 02:04 — forked from dfletcher/tsws
Totally simple web server using Bash and netcat (nc)
#!/bin/bash
# --------------------------------
# Totally Simple Web Server (TSWS)
# --------------------------------
#
# (c) 2015 Dave Fletcher
# All Rights Reserved
#
# This is free and unencumbered software released into the public domain.
@stonemirror
stonemirror / discogs-oauth.php
Last active August 30, 2015 13:46 — forked from morecchia/discogs-oauth.php
Example OAuth access to the Discogs API
<?php
// This example uses a fork of the OAuthSimple library for PHP
// found here: https://github.com/tonefolder/oauthsimple/tree/master/php
//
// For more information about the OAuth process for applications
// accessing Discogs API, read:
// http://www.discogs.com/developers
require 'oauth.php';
$oauthObject = new OAuthSimple();
$scope = 'http://api.discogs.com';