Skip to content

Instantly share code, notes, and snippets.

View e7o-de's full-sized avatar

Sven Herzky e7o-de

View GitHub Profile
#!/usr/bin/env python2
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org)
# The author disclaims copyright to this source code.
import sys
import struct
import socket
import time
import select
#Newbie programmer
def factorial(x):
if x == 0:
return 1
else:
return x * factorial(x - 1)
print factorial(6)
#First year programmer, studied Pascal
@e7o-de
e7o-de / gist:3361124
Created August 15, 2012 15:47
Android 4.1 SDK: Windows driver for Coby Kyros MID-1125
File: extras\google\usb_driver\android_winusb.inf
Add:
;Coby MID-1125
%SingleBootLoaderInterface% = USB_Install, USB\VID_18D1&PID_DEED
%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_DEED
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_DEED
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_DEED&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_DEED&MI_01
@e7o-de
e7o-de / A.php
Created August 2, 2012 11:36
PHP Multiple Inheritance
<?php
class A {
function x() { echo 'Ich bin Klasse A'; }
}
@e7o-de
e7o-de / gist:3216364
Created July 31, 2012 11:32
webmin change password
/usr/share/webmin/changepass.pl /etc/webmin root root
@e7o-de
e7o-de / 1_Result.php
Created July 23, 2012 12:55 — forked from cystbear/1_Result.php
Custom annotations in Symfony2 (http://habrahabr.ru/blogs/symfony/133270/)
<?php
class DefaultController extends Controller
{
/**
* Dashboard page.
* @Permissions(perm="dashboard_view")
* @Route("/", name="ITEDashboardBundle_index")
* @Template()
* @return array
@e7o-de
e7o-de / gist:3116898
Created July 15, 2012 13:21
Gnome configuration
# Enable compositing
gconftool-2 -s '/apps/metacity/general/compositing_manager' --type bool true
@e7o-de
e7o-de / gist:3116889
Created July 15, 2012 13:19
notify-server
#!/usr/bin/php5
<?php
set_time_limit(0);
pcntl_signal(SIGTERM, 'sig_handler');
$sock = socket_create(AF_INET, SOCK_STREAM, 0);
socket_bind($sock, 'localhost', 2828) or die('Could not bind to address');
socket_listen($sock);
@e7o-de
e7o-de / gist:3116845
Created July 15, 2012 13:12
Colored terminal output
function colorOutput($text) {
$text = str_pad($text, 80, ' ', STR_PAD_RIGHT);
echo "\x1b[7m$text\x1b[0m";
}