Skip to content

Instantly share code, notes, and snippets.

View stonemirror's full-sized avatar

David Schlesinger stonemirror

View GitHub Profile
@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';
@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 / gist:9d4e04fd262eee9f6ca3
Created January 1, 2016 17:36
Attempt to download TED video with youtube-dl 2016.01.01
$ youtube-dl http://www.ted.com/talks/barry_schwartz_on_the_paradox_of_choice
[ted] barry_schwartz_on_the_paradox_of_choice: Downloading webpage
[ted] barry_schwartz_on_the_paradox_of_choice: Extracting information
[ted] barry_schwartz_on_the_paradox_of_choice: Downloading m3u8 information
Traceback (most recent call last):
File "/Users/mcfate/anaconda/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/Users/mcfate/anaconda/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/local/bin/youtube-dl/__main__.py", line 19, in <module>
@stonemirror
stonemirror / gist:22606bc200c020002c66
Created February 1, 2016 15:38
OneName Blockchain ID Verification
Verifying that +mcfate is my blockchain ID. https://onename.com/mcfate
@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 / keybase.md
Created September 9, 2016 03:17
keybase.md

Keybase proof

I hereby claim:

  • I am stonemirror on github.
  • I am mcfate (https://keybase.io/mcfate) on keybase.
  • I have a public key ASAi02tr7UsyK62hPN5T-hvdn-CL7uumT4s-x3RQbdKWigo

To claim this, I am signing this object:

@stonemirror
stonemirror / gist:ba24e9cdf851ddc63bce1d8a470afb2c
Created September 17, 2016 16:13
Output from "brew update --debug"
++ [[ -z '' ]]
++ [[ -n '' ]]
++ [[ -n '' ]]
++ [[ -z '' ]]
++ HOMEBREW_AUTO_UPDATE_SECS=60
++ [[ -e /usr/local/Cellar ]]
++ [[ ! -w /usr/local/Cellar ]]
++ [[ ! -w /usr/local ]]
++ git --version
++ export GIT_TERMINAL_PROMPT=0
postconf -nf output:
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
biff = no
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
compatibility_level = 2
content_filter = amavis:127.0.0.1:10024
daemon_directory = /usr/libexec/postfix
srw-rw-rw- 1 postfix postfix 0 Jan 1 11:36 anvil=
srw-rw-rw- 1 postfix postfix 0 Jan 1 11:36 bounce=
srw-rw-rw- 1 postfix postfix 0 Jan 1 11:36 defer=
srw-rw-rw- 1 postfix postfix 0 Jan 1 11:36 discard=
srw-rw-rw- 1 postfix postfix 0 Jan 1 11:36 error=
srw-rw-rw- 1 postfix postfix 0 Jan 1 11:36 lmtp=
srw-rw-rw- 1 postfix postfix 0 Jan 1 11:36 local=
srw-rw-rw- 1 postfix postfix 0 Jan 1 11:36 proxymap=
srw-rw-rw- 1 postfix postfix 0 Jan 1 11:36 proxywrite=
srw-rw-rw- 1 postfix postfix 0 Jan 1 11:36 relay=
drwx------ 2 postfix root 4.0K Jan 1 11:41 active/
drwx------ 2 postfix root 4.0K Dec 31 08:59 bounce/
drwx------ 2 postfix root 4.0K Dec 31 08:59 corrupt/
drwx------ 10 postfix root 4.0K Jan 1 04:21 defer/
drwx------ 10 postfix root 4.0K Jan 1 04:21 deferred/
drwx------ 2 postfix root 4.0K Jan 1 11:07 flush/
drwx------ 2 postfix root 4.0K Dec 31 08:59 hold/
drwx------ 2 postfix root 4.0K Jan 1 09:50 incoming/
-rw-r--r-- 1 root root 0 Dec 31 16:03 .keep_mail-mta_postfix-0
drwx-wx--- 2 postfix postdrop 4.0K Dec 31 08:59 maildrop/