Skip to content

Instantly share code, notes, and snippets.

View zerok's full-sized avatar

Horst Gutmann zerok

View GitHub Profile
class Test(object):
def __init__(self):
self.test1 = "lala"
def __call__(self):
print self.__dict__
if __name__ == '__main__':
Test()()
### Keybase proof
I hereby claim:
* I am zerok on github.
* I am zerok (https://keybase.io/zerok) on keybase.
* I have a public key whose fingerprint is B181 18C7 AD0F 7924 2180 06C9 8B1D A551 24F6 522E
To claim this, I am signing this object:
@zerok
zerok / keybase.md
Created January 11, 2015 21:28
keybase.md

Keybase proof

I hereby claim:

  • I am zerok on github.
  • I am zerok (https://keybase.io/zerok) on keybase.
  • I have a public key whose fingerprint is 650C CB27 17EE 91B2 0052 E661 4F61 D46A B923 47C7

To claim this, I am signing this object:

diff --git a/tests/test_sftp.py b/tests/test_sftp.py
index 6a514ac..9b7146d 100644
--- a/tests/test_sftp.py
+++ b/tests/test_sftp.py
@@ -75,6 +75,13 @@ def test_sftpserver_write_offset_unsupported(content, sftpclient):
f.write("test")
+def test_sftpserver_put_file(content, sftpclient, tmpdir):
+ tmpfile = tmpdir.join('test.txt')
diff --git a/tests/test_sftp.py b/tests/test_sftp.py
index 6a514ac..ddb87cf 100644
--- a/tests/test_sftp.py
+++ b/tests/test_sftp.py
@@ -1,7 +1,6 @@
from copy import deepcopy
from paramiko import Transport
from paramiko.channel import Channel
-from paramiko.sftp_attr import SFTPAttributes
from paramiko.sftp_client import SFTPClient
#!/usr/bin/env python
"""
This small script takes the URL to one of your Pownce Export XML-files
and downloads it including (as far as I can tell) all your files into a
folder, which you can specify with the -o option::
$ python pownce-files.py <url_to_export>
Requirements: Python >= 2.5, < 3.0
"""
use strict;
use File::Temp qw/tempdir/;
use File::Path qw/rmtree/;
my $baseurl = "http://build.chromium.org/buildbot/snapshots/chromium-rel-mac/";
my $download_format = "$baseurl%s/chrome-mac.zip";
my $default_installation_dir = "/Applications";
my @search_dirs = ('/Applications', '~/Applications');
sub get_version {
from __future__ import with_statement
import shutil, plistlib, urllib2, re, tempfile
from os.path import join, exists, expanduser
from subprocess import call
SEARCH_FOLDERS = ('/Applications', '~/Applications')
BASE_URL = "http://build.chromium.org/buildbot/snapshots/chromium-rel-mac/"
DOWNLOAD_FORMAT = BASE_URL + "%s/chrome-mac.zip"
DEFAULT_INSTALLATION_PATH = '/Applications'
@zerok
zerok / dotless.rb
Created July 3, 2010 18:50
dotless homebrew formula
require 'formula'
class Dotless < Formula
homepage "http://www.dotlesscss.com/"
url "http://www.dotlesscss.com:8081/repository/download/bt3/.lastPinned/dotless-v1.1.0.2-16-ge76501f.zip?guest=1"
md5 "6bd2ccf37e670c6734a076f6c6c34f2d"
version "1.1.0.2"
def install
mono_path = `/usr/bin/which mono`.strip
@zerok
zerok / couch_backup.py
Created October 23, 2010 12:23
A simple backup script for couchdbs
"""
Copyright (c) 2010, Horst Gutmann <zerok@zerokspot.com>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.