Skip to content

Instantly share code, notes, and snippets.

Thu Feb 23 13:52:02 2012 [notice] [19] [46.151.157.21, port=49709] incoming connection
Thu Feb 23 13:52:02 2012 [notice] [19] [46.151.157.21, port=49709] incoming stream online (id zoxgqu56pwl86rl0iuhhyg52a6d857z5vxmmrrsh)
Thu Feb 23 13:52:02 2012 [notice] [19] [46.151.157.21, port=49709] received dialback auth request for route 'bnw.im/xn--rih.co.cc'
Thu Feb 23 13:52:03 2012 [notice] dns lookup for ⌨.co.cc returned 1 result (ttl 33322)
Thu Feb 23 13:52:21 2012 [notice] [20] [174.129.226.140, port=17149] incoming connection
Thu Feb 23 13:52:21 2012 [notice] [20] [174.129.226.140, port=17149] incoming stream online (id odpu4bvm5c43ta64gjcmrcrnad9251ktf9oklj6r)
Thu Feb 23 13:52:22 2012 [notice] [20] [174.129.226.140, port=17149] received dialback auth request for route 'bnw.im/talkr.im'
Thu Feb 23 13:52:22 2012 [notice] dns lookup for talkr.im returned 1 result (ttl 273)
Thu Feb 23 13:52:22 2012 [notice] [21] [174.129.226.140, port=5269] outgoing connection for 'talkr.im'
Thu Feb 23 13:52:22 2012 [notice] [21]
--- out.c.orig 2011-06-01 02:11:37.000000000 +0400
+++ out.c 2012-02-23 17:04:21.000000000 +0400
@@ -1136,15 +1136,15 @@
xhash_free(query->hosts);
query->hosts = NULL;
- if (idna_to_unicode_8z8z(query->name, &domain, 0) != IDNA_SUCCESS)
+ /*if (idna_to_unicode_8z8z(query->name, &domain, 0) != IDNA_SUCCESS)
{
log_write(query->s2s->log, LOG_ERR, "idna dns decode for %s failed", query->name);
#include <netpbm/pam.h>
//int getpx(struct pam *inpam, int currow, int row, int col) {
#define DIST 8
#define min(x,y) ( (x<y) ? (x) : (y) )
#define max(x,y) ( (x>y) ? (x) : (y) )
#include <netpbm/pam.h>
//int getpx(struct pam *inpam, int currow, int row, int col) {
#define DIST 8
#define min(x,y) ( (x<y) ? (x) : (y) )
#define max(x,y) ( (x>y) ? (x) : (y) )
python -c 'for a,b in zip(file("file1"),file("file2")): print a.strip(),b.strip()'
@stiletto
stiletto / gist:3193655
Created July 28, 2012 14:48
Results of hammering varnish (static pages)
ab -c 1 -n 10000 http://bnw.im/static/stat.html
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking bnw.im (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
/*
* shitter.c
*
* % gcc -o shitter shitter.c -D_LARGEFILE64_SOURCE=1
*
*/
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
$ mongo --eval 'db.comments.find().forEach(function (x) { print(x.user); });' --quiet bnw|sort|uniq -c|sort -n --reverse|cat -n
1 9643 matimatik
2 7199 goren
3 4100 l29ah
4 3099 stiletto
5 2499 ivanov
6 2391 o01eg
7 2067 failman
8 2041 plhk
9 1756 vrusha
1350212280.28 - RECV: <presence xmlns='jabber:client' from='soulthreads@jabber.ru/emacs' to='bnw.im' type='probe'/>
1350212280.28 - SEND: <presence to='soulthreads@jabber.ru/emacs' from='bnw.im'>
<status>9600 0010 1110 0000 10 58 00</status>
</presence>
1350212280.34 - RECV: <presence xmlns='jabber:client' from='soulthreads@jabber.ru/emacs' to='bnw.im' type='error'>
<status>9600 0010 1110 0000 10 58 00</status>
<error code='403' type='auth'>
<forbidden xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
</error>
</presence>
2012-10-31 17:39:52+0400 [XmlStream,client] 1351690792.41 - SEND:
<presence to='syncro@jabber.ru/Psi+' from='bnw.im'>
<status>9600 0010 1110 0000 13 39 52</status>
</presence>
2012-10-31 17:39:52+0400 [XmlStream,client] 1351690792.47 - RECV:
<presence from='syncro@jabber.ru/Psi+' to='bnw.im' type='error'>
<status>9600 0010 1110 0000 13 39 52</status>
<error code='403' type='auth'><forbidden xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error>
</presence>