Skip to content

Instantly share code, notes, and snippets.

View evgeni's full-sized avatar
😺
Ceci n'est pas un maintainer

Evgeni Golov evgeni

😺
Ceci n'est pas un maintainer
View GitHub Profile
@evgeni
evgeni / fluffig.c
Created August 23, 2011 11:54
stupid code makes stupid users go moar stupid
#define YOMAMA "#include <burger.h>"
#define swallow(thing) thing
#define YOPAPA(s) int main() { s }
#include <stdio.h>
#define BURGERS "McDonalds"
#define BIG(bigger) "not a "#bigger" burger"
#include <stdlib.h>
#define EATS(burger) swallow(burger)
#define print(string) string
#define VERY(loud) printf("%s", loud);
Git Logo by Jason Long is licensed under the Creative Commons Attribution 3.0 Unported License (http://git-scm.com/downloads/logos)
Debian Open Use Logo is licenssed under the MIT License (http://www.debian.org/logos/)
Tux is copyright Larry Ewing, Simon Budig, Anja Gerwinski (http://www.home.unix-ag.org/simon/penguin/)
Camera icon from the Tango Icon Library is in the Public Domain (http://tango.freedesktop.org/Tango_Icon_Library)
@evgeni
evgeni / gist:3051570
Created July 5, 2012 05:39
evgeni rcbw
05/07:
679981 - asus-oled-dkms - FTBFS: tries to build module immediately - patch sent, merged and uploaded by maintainer
680345 - hyperestraier - FTBFS: Not a CODE reference at /usr/lib/perl/5.14/DynaLoader.pm line 207 - commented
679761 - olsrd - FTBFS[kfreebsd]: fatal error: linux/types.h: No such file or directory - NMU prepared, maintainer uploaded shortly after
679704 - live-tools - fails to upgrade from wheezy: ln: failed to create symbolic link `/usr/bin/uptime': File exists - patch sent, uploaded by maintainer shortly afterwards
679734 - ntop - Maintainer address bounces - poked maintainer via IRC, he fixed his mailsetup, bug closed
678762 - node-xmpp - FTBFS: Error: Cannot find module 'node-expat' - bug in node-node-expat, grave bug opened (680405), then merged the two (stupid me)
06/07
672048 - qwbfsmanager - FTBFS: src/gui/pColorButton.h:35:25: fatal error: FreshExport.h: No such file or directory - NMU uploaded to DELAYED/2
#include <stdio.h>
#include <stdlib.h>
void foo() {
#define FOO 42
printf("foo() says: %i\n", FOO);
}
void main() {
printf("This is a stupid test!\n");
#!/bin/bash
# TODO:
# * Test i386 on amd64 too?
ISO_squeeze_amd64=/home/evgeni/Downloads/debian-6.0.5-amd64-CD-1.iso
ISO_wheezy_amd64=/home/evgeni/Downloads/debian-testing-amd64-CD-1.iso
oneTimeSetUp() {
TEST_ARCH=$(dpkg --print-architecture)
@evgeni
evgeni / foo.cpp
Created September 14, 2012 13:26
/**
* fuck around with stream precisions
* call like this:
* for i in `seq 20`; do echo "precision=$i"; ./foo $i; done
* watch the streamint being properly parsed to 5, or sometimes not
*/
#include <limits>
#include <sstream>
#include <iostream>
@evgeni
evgeni / get-talks.sh
Created December 31, 2012 10:33
if you want to fetch only a few talks from #29C3 this might be handy
#!/bin/sh
#MIRROR="http://mirror.fem-net.de"
MIRROR="http://ftp.uni-kl.de"
EVENT="CCC/29C3"
QUALITY="mp4-h264-HQ"
TALKS="5146 5319 5275 5198 5219 5088 5285 5385 5210 5374 5244 5239 5306 5044 5327"
BASEURL="${MIRROR}/${EVENT}/${QUALITY}"
import M2Crypto
import base64
PASS = "secure"
IV = M2Crypto.Rand.rand_bytes(16)
SALT = M2Crypto.Rand.rand_bytes(8)
TEXT = M2Crypto.util.pkcs7_pad("FOO", 16)
c = M2Crypto.EVP.Cipher(alg='aes_128_cbc', key=PASS, iv=IV, op=M2Crypto.encrypt, key_as_bytes=1, salt=SALT)
v = c.update(TEXT)
#!/bin/sh
# -n STRING
# the length of STRING is nonzero
foo=""
echo "expect: no output (syntax error)"
if [ -n "${foo}"]
then
Facter.add(:disks) do
confine :kernel => :linux
setcode do
disks = []
Dir.glob("/sys/block/*/device").each do |d|
d = d.split('/')[3]
if File.open('/sys/block/%s/removable' % d).readline.strip == '0'
disks.push(d)
end
end