Skip to content

Instantly share code, notes, and snippets.

🐦
bird

Amber Brown hawkowl

🐦
bird
Block or report user

Report or block hawkowl

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am hawkowl on github.
  • I am hawkowl (https://keybase.io/hawkowl) on keybase.
  • I have a public key ASB7kALTIBq2kBRUsMl1kXyRc3IGwDWkqBAsr9HtVCciNAo

To claim this, I am signing this object:

@hawkowl
hawkowl / glitchulate.py
Created Aug 26, 2016
Make your favourite images into glitched monstrosities! (Requires pillow from PyPI, Py2/3/pypy compatible)
View glitchulate.py
from __future__ import print_function
import sys
import random
from collections import deque
from PIL import Image
# THIS IS THE MAGIC VALUE THAT MAKES EVERYTHING GLITCHED
View gist:62b38702073f6f9de7933d392712a605
red ~/test [127]> python3 -m virtualenv --clear test
Not deleting test/bin
Using base prefix '/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5'
New python executable in test/bin/python3.5
Also creating executable in test/bin/python
Installing setuptools, pip, wheel...done.
red ~/test> python -m virtualenv --clear test
Not deleting /Users/red/test/test/bin
Using real prefix '/System/Library/Frameworks/Python.framework/Versions/2.7'
New python executable in /Users/red/test/test/bin/python
View gist:d1c7e13997fa6553efc4
import platform
p = platform.linux_distribution()
if p[0] == "debian" and float(p[1]) > 7:
print "New Debian"
else:
print "Old Debian"
View gist:37cb658649801309e00b
from twisted.python.compat import networkFormat, networkString, nativeString
import timeit
# Mixed types
def mixed_format():
networkFormat("{0}:{1}:{2}", (b"foo", u"bar", "baz"))
def bytes_format():
networkFormat("{0}:{1}:{2}", (b"foo", b"bar", b"baz"))
View gist:c5c37c2b0318edcccb6c
from twisted.python.compat import networkFormat, networkString, nativeString
import timeit
# Mixed types
def mixed_format():
networkFormat("{0}:{1}:{2}", (b"foo", u"bar", "baz"))
def bytes_format():
networkFormat("{0}:{1}:{2}", (b"foo", b"bar", b"baz"))
View gist:5a9c4e74638b05b3a1d9
(require 'multiple-cursors)
(global-set-key (kbd "C-S-c C-S-c") 'mc/edit-lines)
(global-set-key (kbd "C->") 'mc/mark-next-like-this)
(global-set-key (kbd "C-<") 'mc/mark-previous-like-this)
(global-set-key (kbd "C-c C-<") 'mc/mark-all-like-this)
View gist:c0b39b94443584cfc94f
$ curl -X POST localhost:8020/v1/domains -d "domain=atleastfornow.net" \
-d "soa=hawkowl@atleastfornow.net"
-u user:password
{"status": "success", "data": {"soa": "hawkowl@atleastfornow.net", "default": "active", "domain": "atleastfornow.net", "axfr": [], "id": 3}}
$ curl -X POST localhost:8020/v1/domains/3/A -d "host="
-d "target=192.168.1.1"
-u user:password
{"status": "success", "data": {"host": "", "ttl": 86000, "id": 4, "target": "192.168.1.1"}}
$ curl -X POST localhost:8020/v1/domains/3/A -d "host=www"
-d "target=192.168.1.1"
View pypiproxy.py
from klein import Klein
from twisted.python.filepath import FilePath
import logging
import time
import treq
class pypiProxyService(object):
pypiURL = "https://pypi.python.org/simple/"
View gist:9769031
[tox]
envlist = pypy-tw121-nopyopenssl, pypy-tw121-pyopenssl13, pypy-tw121-pyopenssl14, pypy-tw121-pyopenssltrunk, pypy-tw122-nopyopenssl, pypy-tw122-pyopenssl13, pypy-tw122-pyopenssl14, pypy-tw122-pyopenssltrunk, pypy-tw123-nopyopenssl, pypy-tw123-pyopenssl13, pypy-tw123-pyopenssl14, pypy-tw123-pyopenssltrunk, pypy-tw130-nopyopenssl, pypy-tw130-pyopenssl13, pypy-tw130-pyopenssl14, pypy-tw130-pyopenssltrunk, pypy-tw131-nopyopenssl, pypy-tw131-pyopenssl13, pypy-tw131-pyopenssl14, pypy-tw131-pyopenssltrunk, pypy-tw132-nopyopenssl, pypy-tw132-pyopenssl13, pypy-tw132-pyopenssl14, pypy-tw132-pyopenssltrunk, pypy-twtrunk-nopyopenssl, pypy-twtrunk-pyopenssl13, pypy-twtrunk-pyopenssl14, pypy-twtrunk-pyopenssltrunk, py27-tw121-nopyopenssl, py27-tw121-pyopenssl13, py27-tw121-pyopenssl14, py27-tw121-pyopenssltrunk, py27-tw122-nopyopenssl, py27-tw122-pyopenssl13, py27-tw122-pyopenssl14, py27-tw122-pyopenssltrunk, py27-tw123-nopyopenssl, py27-tw123-pyopenssl13, py27-tw123-pyopenssl14, py27-tw123-pyopenssltrunk, py27-tw13
You can’t perform that action at this time.