Skip to content

Instantly share code, notes, and snippets.

View mid-kid's full-sized avatar

mid-kid mid-kid

View GitHub Profile
@namuol
namuol / INSTALL.md
Last active July 24, 2023 11:53
rage-quit support for bash

rage-quit support for bash

HOW TO INSTALL

Put flip somewhere in your $PATH and chmod a+x it.

Copy fuck into ~/.bashrc.

@jkp
jkp / websocketserver.py
Created July 18, 2012 13:28
A simple WebSockets server with no dependencies
import struct
import SocketServer
from base64 import b64encode
from hashlib import sha1
from mimetools import Message
from StringIO import StringIO
class WebSocketsHandler(SocketServer.StreamRequestHandler):
magic = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11'
@olemb
olemb / gist:1171411
Created August 25, 2011 18:36
types.py
Today's lesson: Never call your module types.py if you plan to run
Python from when standing in the same directory. It took me some
time to figure out what was going on:
$ touch types.py # empty file
$ python
Traceback (most recent call last):
File "/usr/lib/python2.7/site.py", line 68, in <module>
import os
File "/usr/lib/python2.7/os.py", line 398, in <module>