This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# remove exited containers: | |
docker ps --filter status=dead --filter status=exited -aq | xargs -r docker rm -v | |
# remove unused images: | |
docker images --no-trunc | grep '<none>' | awk '{ print $3 }' | xargs -r docker rmi | |
# remove unused volumes: | |
find '/var/lib/docker/volumes/' -mindepth 1 -maxdepth 1 -type d | grep -vFf <( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from Xlib.display import Display | |
from Xlib import X | |
class KeyBinder(object): | |
def __init__(self): | |
self.cancel = False | |
self.xdisp = Display() | |
self.xroot = self.xdisp.screen().root | |
self.key_code = 71 # F5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A very lightweight version of Meteor's Minimongo collections, | |
* a local store for records sent from the Meteor backend. | |
*/ | |
var LocalCollection = function() { | |
this._initialize(); | |
}; | |
_.extend(LocalCollection.prototype, Backbone.Events, { | |
_name: null, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var httpProxy = require('http-proxy'); | |
var url = require('url'); | |
httpProxy.createServer(function(req, res, proxy) { | |
var isHtml = false, | |
write = res.write, | |
writeHead = res.writeHead, | |
params = url.parse(req.url, true).query, | |
dest = params.dest || 'localhost', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
</head> | |
<body> | |
<script type="application/javascript;version=1.7"> | |
var worker = new Worker('worker.js'); | |
var g; |