Skip to content

Instantly share code, notes, and snippets.

View zerok's full-sized avatar

Horst Gutmann zerok

View GitHub Profile
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
@zerok
zerok / Dockerfile
Last active April 21, 2016 07:17
Docker FS issue with mounted volumes
FROM alpine
ADD run.sh /usr/local/bin/
VOLUME ["/opt"]
ENTRYPOINT ["/bin/sh", "/usr/local/bin/run.sh"]
@zerok
zerok / Dockerfile
Created May 9, 2016 19:49
Simple NodeJS+Docker setup
FROM node:4
# Prepare non-root user and folders
RUN useradd --system --user-group --create-home app && \
mkdir /app && chown app:app /app
RUN npm install -g nodemon
# Install dependency outside of the app volume
COPY package.json /opt/
RUN cd /opt && npm install
@zerok
zerok / README.rst
Created June 9, 2016 09:19
Issue installing packages in docker

I'm currently facing the problem that I can no longer install various images in a docker:stretch based image using pip3. that's the output I get every time I try to build an image.

@zerok
zerok / post.md
Created June 13, 2016 16:50
DRAFT: Hello PyTube!

Hello PyTube!

For many years the Python community has had an awesome website called [pyvideo.org][] which tried to aggregate all conference videos on a single site to make it easier to find them. In January [Will Kahn-Greene][wkg], one of the awesome people behind it, announced, that work on the project was [about to end][]. Then in March he continued with a length [status update][] announcing the [pyvideo-data][] repository. That repository contains a data dump of all the collected videos and should act as a starting point for other people to work with.

@zerok
zerok / djangoconeu-extractor.py
Created July 31, 2016 07:15
Extractor for DjangoCon Europe 2016 data into PyTube
import html5lib
import shutil
import pathlib
import json
import collections
import requests
import re
import sys
from icalendar.cal import Calendar
@zerok
zerok / index.md
Created September 21, 2016 07:37
Draft: My first WritingDay
date draft title tags
2016-09-19 12:05:04 +0200
true
My First Writing-day
travel
conference
writethedocs
prague
@zerok
zerok / mtime_test.py
Created November 27, 2016 07:00
A little script for checking when the mtime of a folder changes
from pathlib import Path
from shutil import rmtree
from time import sleep
from contextlib import contextmanager
class Test:
def __init__(self, path):
self.path = path
self.times = self.get_times()
@zerok
zerok / strange.js
Created December 1, 2016 13:40
map on undefined
[1, undefined, 2].map(v => v+1)
# [ 2, NaN, 3 ]
(new Array(5)).map(v => v+1)
# [ , , , , ]