Skip to content

Instantly share code, notes, and snippets.

View theonewolf's full-sized avatar

Wolfgang Richter theonewolf

View GitHub Profile
@theonewolf
theonewolf / examples.txt
Created August 12, 2012 02:38
JSify a String using syntax tokens (,[,],),+,!
./compiler.py
hello world
Converting: "hello world"
Unsupported char: "h"!
test sire
Converting: "test sire"
(!!{}+[])[!!+[]+![]]+(![]+[])[+!![]+!![]+!![]+!![]]+(![]+[])[+!![]+!![]+!![]]+(!!{}+[])[!!+[]+![]]+([]+{})[+!![]+!![]+!![]+!![]+!![]+!![]+!![]]+(![]+[])[+!![]+!![]+!![]]+(({})[[]]+[])[+!![]+!![]+!![]+!![]+!![]]+(!!{}+[])[+!![]]+(![]+[])[+!![]+!![]+!![]+!![]]
test sireness
Converting: "test sireness"
@theonewolf
theonewolf / after_using_precompiled.png
Created August 10, 2012 00:03
Boosting libhiredis Throughput with Precompiled Queries
after_using_precompiled.png
@theonewolf
theonewolf / Makefile
Created August 8, 2012 20:28
Redis Error Case?
default: error
error:
@gcc error.c \
-lhiredis \
-I/usr/include/hiredis \
-O0 \
-o error
clean:
@theonewolf
theonewolf / redis_monitor.log
Created August 8, 2012 18:36
binary key printout
1344450568.946190 "SET" "\x00\x00\x00\x00" "\x00(\xd2\xf6\xdb"
1344450568.946314 "SET" "\x01\x00\x00\x00" "\xa4i$\xa2\xf7"
1344450568.946404 "SET" "\x02\x00\x00\x00" "\xa4\xf3\xe6\x0cW"
1344450568.946491 "SET" "\x03\x00\x00\x00" "\xa5\xc7\xa2\x95Z"
1344450568.946577 "SET" "\x04\x00\x00\x00" "\x1e\xb0\x85\xebv"
1344450568.946661 "SET" "\x05\x00\x00\x00" ".\x96\x80\xd5\xa3"
1344450568.946747 "SET" "\x06\x00\x00\x00" "z\x1e/\xa8\xf4"
1344450568.946830 "SET" "\\x00\x00\x00" "\x86\xbe\xf2\xf5\xbb"
1344450568.946915 "SET" "\\x00\x00\x00" "\xf8\xbdz\xfc\x1b"
1344450568.946997 "SET" "\\x00\x00\x00" "6\xcf\xb3+\x9d"
@theonewolf
theonewolf / vernam_decrypt.py
Created August 2, 2012 17:04
Vernam XOR Stream Cipher with the Mauborgne Constraint
def vernam_decrypt(ciphertext, key):
return bytearray(
[ ciphertext[i] ^ key[i]
for i in xrange(len(ciphertext))
])
@theonewolf
theonewolf / greenlets.py
Created July 26, 2012 03:09
Greenlets Demo
#!/usr/bin/env python
#
# Output like:
#
#./greenlets.py
#(1) Running ticker
#(2) Running tracker
#(3) Greenlets in flight!
#2012-07-25T23:05:42.317036 Trigger hit!
#2012-07-25T23:05:43.819264 Trigger hit!
@theonewolf
theonewolf / log.txt
Created June 29, 2012 19:22
Conversation with Hackerrank.com Site Owners/Developers
→hello
→are you there?
interviewstreet: yes
→i see that you have created a website for hackers
→but you send passwords in the clear?
interviewstreet: what passwords?
interviewstreet: the activation mail doesn't contain any password
@theonewolf
theonewolf / gist:3005925
Created June 27, 2012 18:37
collectd configure deploy w/ puppet
info: Caching catalog for crommelin.comets
info: Applying configuration version '1340821875'
notice: /Stage[main]//Node[comets]/Exec[apt-update]/returns: executed successfully
notice: /Stage[main]//Node[comets]/File[/etc/collectd/collectd.conf]/content:
--- /etc/collectd/collectd.conf 2012-06-27 14:06:37.590181879 -0400
+++ /tmp/puppet-file20120627-25182-nlz67c-0 2012-06-27 14:35:48.126352559 -0400
@@ -109,7 +109,7 @@
#LoadPlugin write_http
<Plugin network>
@theonewolf
theonewolf / vagrant.log
Created June 24, 2012 16:52
vagrant setupp
[default] Importing base box 'base'...
[default] The guest additions on this VM do not match the install version of
VirtualBox! This may cause things such as forwarded ports, shared
folders, and more to not work properly. If any of those things fail on
this machine, please update the guest additions and repackage the
box.
Guest Additions Version: 4.1.16
VirtualBox Version: 4.1.12
[default] Matching MAC address for NAT networking...
@theonewolf
theonewolf / GroupedProviders.xml
Created May 14, 2012 14:25
hexdump wolf_ntfs vs linux_ntfs
<?xml version="1.0" encoding="UTF-8" ?>
<Root>
<GroupedProviders>
<GroupedProvider name="AspNetSqlProvider">
<MembershipProvider name="AspNetSqlMembershipProvider" />
<RoleProvider name="AspNetSqlRoleProvider" />
</GroupedProvider>
</GroupedProviders>
</Root>