Skip to content

Instantly share code, notes, and snippets.

View clemensg's full-sized avatar

Clemens Gruber clemensg

  • Austria
  • 10:46 (UTC +01:00)
View GitHub Profile
@clemensg
clemensg / curl_ftp_3.log
Created July 17, 2013 16:13
curl -o testfile --disable-eprt -P - --user usr:pw ftp://192.168.0.133/testfile
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
FTP 0x7f8a110058f0 (line 3271) state change from STOP to WAIT220
FTP 0x7f8a110058f0 (line 848) state change from WAIT220 to USER
FTP 0x7f8a110058f0 (line 2646) state change from USER to PASS
FTP 0x7f8a110058f0 (line 860) state change from PASS to PWD
0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0
Entry path is '/dd'
FTP 0x7f8a110058f0 (line 2963) state change from PWD to STOP
@clemensg
clemensg / curl_ftp_debugbuild_2.log
Last active December 19, 2015 18:48
curl -o testfile --disable-eprt -P - --user user:pw ftp://192.168.0.127/file.txt
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
FTP 0x7fd90a8058f0 (line 3267) state change from STOP to WAIT220
FTP 0x7fd90a8058f0 (line 846) state change from WAIT220 to USER
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
FTP 0x7fd90a8058f0 (line 2642) state change from USER to PASS
FTP 0x7fd90a8058f0 (line 858) state change from PASS to PWD
0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0
Entry path is '/dd'
@clemensg
clemensg / curl_ftp_debugbuild.log
Last active December 19, 2015 18:48
curl -o testfile --disable-eprt -P - --user user:pw ftp://192.168.0.127/file.txt
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
FTP 0x7ffd1300dcf0 (line 3261) state change from STOP to WAIT220
FTP 0x7ffd1300dcf0 (line 846) state change from WAIT220 to USER
FTP 0x7ffd1300dcf0 (line 2636) state change from USER to PASS
FTP 0x7ffd1300dcf0 (line 858) state change from PASS to PWD
0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0
Entry path is '/dd'
FTP 0x7ffd1300dcf0 (line 2953) state change from PWD to STOP
@clemensg
clemensg / nvidia-linux-3.10.patch
Last active April 9, 2017 20:44
NVIDIA driver patch for Linux kernels 3.10 (Tested with 325.08), Usage: sudo sh NVIDIA-Linux-x86_64-325.08.run -x; cd NVIDIA-Linux-x86_64-325.08 && patch -p1 < nvidia-linux-3.10.patch
--- NVIDIA-Linux-x86_64-325.08.orig/kernel/nv-i2c.c 2013-04-26 00:22:30.000000000 -0400
+++ NVIDIA-Linux-x86_64-325.08/kernel/nv-i2c.c 2013-05-13 05:20:55.571981365 -0400
@@ -311,8 +311,6 @@
BOOL NV_API_CALL nv_i2c_del_adapter(nv_state_t *nv, void *data)
{
struct i2c_adapter *pI2cAdapter = (struct i2c_adapter *)data;
- int osstatus = 0;
- BOOL wasReleased = FALSE;
#if defined(KERNEL_2_4)
diff -daurp subversion-1.8.0/subversion/libsvn_subr/path.c subversion-1.8.0-newpatch/subversion/libsvn_subr/path.c
--- subversion-1.8.0/subversion/libsvn_subr/path.c 2013-05-14 00:40:07.000000000 +0200
+++ subversion-1.8.0-newpatch/subversion/libsvn_subr/path.c 2013-07-02 23:39:04.000000000 +0200
@@ -40,6 +40,10 @@
#include "dirent_uri.h"
+#ifdef DARWIN
+#include <CoreFoundation/CoreFoundation.h>
+#endif
@clemensg
clemensg / utf8_fix.diff
Last active December 18, 2015 18:18
Should fix a unicode bug in subversion (1.8.0) on Mac OSX. Caveat emptor!
--- subversion/libsvn_subr/path.c~ 2013-06-20 17:58:25.000000000 +0200
+++ subversion/libsvn_subr/path.c 2013-06-20 18:23:06.000000000 +0200
@@ -40,6 +40,9 @@
#include "dirent_uri.h"
+#if defined(DARWIN)
+#include <CoreFoundation/CoreFoundation.h>
+#endif /* DARWIN */
@clemensg
clemensg / homebrew_mavericks_fix.patch
Last active December 18, 2015 13:18
Fixes most of homebrew's problems on OSX 10.9 Mavericks (If /usr/include does not exist, treat it like a system with Xcode only)
From 3a37b93f95081f697f9d0941360af7fcee701099 Mon Sep 17 00:00:00 2001
From: Clemens Gruber <[email protected]>
Date: Sat, 15 Jun 2013 18:38:32 +0200
Subject: [PATCH] Fix Homebrew on OSX 10.9 Mavericks
---
Library/Homebrew/os/mac/xcode.rb | 2 +-
Library/Homebrew/superenv/macsystem.rb | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
@clemensg
clemensg / curl_libuv_example.c
Last active November 21, 2024 09:50
An example on how to use libuv with libcurl's multi interface Should be equally fast on Unixes (uses epoll/kqueue/etc like libev/libevent) but MUCH faster on Windows due to libuv's usage of IO completion ports. Could come in handy if you have to manage several hundreds or thousands of connections!
#include <stdio.h>
#include <stdlib.h>
#include <uv.h>
#include <curl/curl.h>
uv_loop_t *loop;
CURLM *curl_handle;
uv_timer_t timeout;
typedef struct curl_context_s {
@clemensg
clemensg / curl_multi_test.c
Last active July 22, 2025 07:48
libcurl multi interface example
/* curl_multi_test.c
Clemens Gruber, 2013
<clemens.gruber@pqgruber.com>
Code description:
Requests 4 Web pages via the CURL multi interface
and checks if the HTTP status code is 200.
Update: Fixed! The check for !numfds was the problem.
@clemensg
clemensg / keccak.rb
Created October 4, 2012 13:51
Minor changes to Christian Neukirchens Keccak implementation in pure Ruby
# To the extent possible under law, Christian Neukirchen has waived
# all copyright and related or neighboring rights to the source code
# in this file.
# http://creativecommons.org/publicdomain/zero/1.0/
#
# Minor changes by Clemens Gruber, 04.Oct. 2012:
# * Added time measurement to tests
# * Optimized rotl64 a little bit (roughly 30 percent faster),
# because rotl64 is the function which is called most often.
#