Here is a description of `Finger Binary in Wikipedia`_.
Finger binary is a system for counting and displaying binary numbers on the
| #!/usr/bin/env python | |
| from twisted.internet import reactor | |
| from twisted.internet import protocol | |
| import msgpack | |
| class UserHandler: | |
| def hello0(self): | |
| print "hello!" | |
| return 0 |
Here is a description of `Finger Binary in Wikipedia`_.
Finger binary is a system for counting and displaying binary numbers on the
| #!/usr/bin/env python | |
| # | |
| # Converts any integer into a base [BASE] number. I have chosen 62 | |
| # as it is meant to represent the integers using all the alphanumeric | |
| # characters, [no special characters] = {0..9}, {A..Z}, {a..z} | |
| # | |
| # I plan on using this to shorten the representation of possibly long ids, | |
| # a la url shortenters | |
| # |
| # Analyze text: "the <b>quick</b> bröwn <img src="fox"/> "jumped"" | |
| curl -XPUT 'http://127.0.0.1:9200/foo/' -d ' | |
| { | |
| "index" : { | |
| "analysis" : { | |
| "analyzer" : { | |
| "test_1" : { | |
| "char_filter" : [ | |
| "html_strip" |
| [unix_http_server] | |
| file=/tmp/supervisor.sock ; path to your socket file | |
| [supervisord] | |
| logfile=/var/log/supervisord/supervisord.log ; supervisord log file | |
| logfile_maxbytes=50MB ; maximum size of logfile before rotation | |
| logfile_backups=10 ; number of backed up logfiles | |
| loglevel=error ; info, debug, warn, trace | |
| pidfile=/var/run/supervisord.pid ; pidfile location | |
| nodaemon=false ; run supervisord as a daemon |
| #!/usr/bin/env python | |
| __author__ = 'Frank Smit <[email protected]>' | |
| __version__ = '0.1.0' | |
| import functools | |
| import psycopg2 | |
| from tornado.ioloop import IOLoop, PeriodicCallback |
| var express = require('express'); | |
| var redis = require('redis'); | |
| const serverType = process.argv[2]; | |
| const serverHost = process.argv[3]; | |
| const serverPort = parseInt(process.argv[4]); | |
| const redisPort = 6379; | |
| const redisHost = '127.0.0.1'; |
Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.
cp ~/.gnupg/pubring.gpg /path/to/backups/
cp ~/.gnupg/secring.gpg /path/to/backups/
cp ~/.gnupg/trustdb.gpg /path/to/backups/
| #!/usr/bin/env python | |
| # Author: Samat Jain <http://samat.org/> | |
| # License: MIT (same as Bottle) | |
| import bottle | |
| from bottle import request, response, route | |
| from bottle import install, uninstall |
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)That's it!