Skip to content

Instantly share code, notes, and snippets.

View Partyschaum's full-sized avatar

Hauke Stange Partyschaum

View GitHub Profile
class THttpClientOfferingRawRequest : TTransport {
private var url: URL? = null
private val requestBuffer = ByteArrayOutputStream()
private var inputStream: InputStream? = null
private var connectTimeout = 0
private var readTimeout = 0
private var customHeaders: MutableMap<String, String>? = null
private var host: HttpHost? = null
private var client: HttpClient? = null
var listSize = 1
var node = head
while (node.next != null) {
node = node.next!!
listSize++
}
data class Node(
val next: Node?,
val payload: String
)
val evenList = Node(
payload = "node 1",
next = Node(
payload = "node 2",
next = Node(
@Partyschaum
Partyschaum / README.md
Last active November 26, 2020 13:15
Install PHP 7.2.0 with latest pthreads extension
$ phpbrew install php-7.2.0 +default -- --with-thread-safety --enable-maintainer-zts --with-tsrm-pthreads --with-openssl=/usr/local/opt/openssl`
$ phpbrew ext install github:krakjoe/pthreads master
@Partyschaum
Partyschaum / whois.py
Created December 11, 2017 13:43
Ask whois.denic.de for information
import socket
whois_server = 'whois.denic.de'
whois_server_port = 43
domain_query = b"shinythings.de\0"
s = socket.socket()
s.connect((whois_server, whois_server_port))
s.sendall(domain_query)
@Partyschaum
Partyschaum / gist:e3d1ac3835c72d9fb2701449dc32c8b9
Created October 31, 2016 17:51
phpbrew --debug ext install mongodb -- --with-openssl=/usr/local/opt/openssl
PHP Warning: PHP Startup: Unable to load dynamic library '/Users/hauke/.phpbrew/php/php-7.0.12/lib/php/extensions/no-debug-non-zts-20151012/mongodb.so' - dlopen(/Users/hauke/.phpbrew/php/php-7.0.12/lib/php/extensions/no-debug-non-zts-20151012/mongodb.so, 9): image not found in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library '/Users/hauke/.phpbrew/php/php-7.0.12/lib/php/extensions/no-debug-non-zts-20151012/mongodb.so' - dlopen(/Users/hauke/.phpbrew/php/php-7.0.12/lib/php/extensions/no-debug-non-zts-20151012/mongodb.so, 9): image not found in Unknown on line 0
Warning: Some extension won't be able to be built with php7. If the extension
supports php7 in another branch or new major version, you will need to specify
the branch name or version name explicitly.
For example, to install memcached extension for php7, use:
phpbrew ext install github:php-memcached-dev/php-memcached php7 -- --disable-memcached-sasl
@Partyschaum
Partyschaum / gist:83bdb6c18f71b7a029cda71c869b44a6
Created October 31, 2016 15:44
phpbrew --debug ext install mongodb
Warning: Some extension won't be able to be built with php7. If the extension
supports php7 in another branch or new major version, you will need to specify
the branch name or version name explicitly.
For example, to install memcached extension for php7, use:
phpbrew ext install github:php-memcached-dev/php-memcached php7 -- --disable-memcached-sasl
Downloading https://pecl.php.net/rest/r/mongodb/stable.txt via curl extension
[==================================================================] 5.00/5.00B 100%
@Partyschaum
Partyschaum / gist:fbbcaf79d843279d769d781505338555
Created October 31, 2016 15:40
.phpbrew/build/php-7.0.12/build.log
This file has been truncated, but you can view the full file.
configure: creating cache '/Users/hauke/.phpbrew/cache/config.cache'
./configure: line 3160: '/Users/hauke/.phpbrew/cache/config.cache': No such file or directory
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking build system type... x86_64-apple-darwin15.6.0
checking host system type... x86_64-apple-darwin15.6.0
checking target system type... x86_64-apple-darwin15.6.0
checking for cc... cc
checking whether the C compiler works... yes
@Partyschaum
Partyschaum / gist:0bf2048421a4d7592c6bba2465f7fcc1
Created October 31, 2016 15:39
phpbrew --debug install 7.0.12 +default +dbs +openssl=/usr/local/opt/openssl
===> phpbrew will now build 7.0.12
---> Parsing variants from command arguments '+default +dbs +openssl=/usr/local/opt/openssl'
===> Loading and resolving variants...
Checking distribution checksum...
Checksum matched: d7b11b40d84ed1f590e5f086f3711a3c
===> Distribution file was successfully extracted, skipping...
Source Directory: /Users/hauke/.phpbrew/build/php-7.0.12
Found existing Makefile, running make clean to ensure everything will be rebuilt.
You can append --no-clean option after the install command if you don't want to rebuild.
===> Running make clean: /usr/bin/make -C '/Users/hauke/.phpbrew/build/php-7.0.12' --quiet 'clean'
@Partyschaum
Partyschaum / keybase.md
Created September 28, 2015 10:51
My Keybase Proof

Keybase proof

I hereby claim:

  • I am partyschaum on github.
  • I am partyschaum (https://keybase.io/partyschaum) on keybase.
  • I have a public key whose fingerprint is D0F5 C68B C31B A824 D015 14A2 F9CA C344 ED48 F4F4

To claim this, I am signing this object: