06 11 / 2013

Copy many files over ssh

$ cd /path/to/dest/dir 
$ ssh -C username@hostname "cd /path/to/source/dir; tar cf - ." | tar xf - 

20 6 / 2013

14 5 / 2013

Tornado with unix sockets

import tornado.ioloop
import tornado.web
from tornado.options import options, define
 
class MainHandler(tornado.web.RequestHandler):
    def get(self):
        self.write("Hello, world")
 
application = tornado.web.Application([
    (r"/", MainHandler),
])
 
define('listen_address', group='webserver', default='127.0.0.1', help='Listen address')
define('listen_port', group='webserver', default=8888, help='Listen port')
define('unix_socket', group='webserver', default=None, help='Path to unix socket to bind')
 
if __name__ == "__main__":
    if options.unix_socket:
        server = HTTPServer(application)
        socket = bind_unix_socket(options.unix_socket)
        server.add_socket(socket)
    else:
        application.listen(options.listen_port, address=options.listen_address)
    tornado.ioloop.IOLoop.instance().start()

25 4 / 2013

Teamwork&project management online tools

I’m looking for a great collaboration platform, thats the list I have to analyze(probably not full):

  • Podio [messy, to check]
  • Teambox [all in one, even a chat]
  • Paymo [to check]
  • Acunote [checked, not impressed]
  • Basecamp [never tried]
  • TeamworkPM [to check]
  • Trello [to check]
  • GoPlan [is dead :(]
  • YouTrack [more an issues tracker, but good one]
  • Comindwork [messy]
  • Teamlab [not much..] 
  • Asana
  • CodebaseHQ
  • PivotalTracker
  • Trac
  • Unfuddle
  • FogBugz
  • AgileZen
  • Yodiz
  • Assembla
  • Teamer
  • RedMine
  • Github Issues
  • Freedcamp
  • Collabtive
  • TargetProcess
  • JobsWorth
  • Gemini
  • TinyPM
  • SpringLoops
  • Toodledo
  • Issueburner
  • thn.gs
  • projectkaiser
  • VersionOne
  • Huboard
  • Qtrack
  • 5pmweb

Wow! That was a long list. I have to formalize my requirements, in order to choose everything:

  1. ease of use, clean interface
  2. estimates, timetracking
  3. issue tracker
  4. github integration
  5. invoicing
  6. discussions
  7. … what else?

14 4 / 2013

Python one-line servers

Serve content from current directory: 

$ python -m SimpleHTTPServer

STMP Server stub, will print every message it receives

$ python -m smtpd -n -c DebuggingServer localhost:2025

08 4 / 2013

Digest #2

Collaboration

  • ascii.io – Record and share your terminal sessions
  • codassium.com – WebRTC based video chat + code editor for awesome interviews

Books

25 3 / 2013

22 3 / 2013

implicitly-notes:

Initial release

Tired of editing and greping your host file by hand? Me too. Enter hostclub: a tool for managing and inspecting hosts with minimal effort.

Install

Using conscript, enter the following in your nearest terminal prompt.

cs softprops/hostclub 

Usage

The easist way to get started…

Permalink 2 notes

13 10 / 2012

(Source: rhyleigh)

Permalink 23 notes

12 10 / 2012

Make tornado keep blank values in request arguments

Tornado filters querystring and body arguments by omitting arguments that have empty values, which is pretty nice from first look and almost cant be noticed, until you dont need to get list of all arguments(even empty) that request has.

So I’ve stumbled into this, when I was implementing OAuth 1.0 signature base string calculation we need to get all request parameters:

parameters = dict() 
for k in request.arguments.iterkeys():
    parameters[k] = self.get_argument(k, strip=False)

Some times it worked fine, and sometimes it didnt, causing errors in basestring check, and it was caused by lack of empty parameters in request querystring or body, which were omitted by tornado.

Looking into tornado source code, and github repo I’ve found pull request addressed to this problem, but that patch covers only querystring parametrs and leaves request body without changes, so I’ve came up with my own hack.