Skip to content

Instantly share code, notes, and snippets.

View omnidan's full-sized avatar
📚
published "Learn React Hooks"!

Daniel Bugl omnidan

📚
published "Learn React Hooks"!
View GitHub Profile
@omnidan
omnidan / typer.py
Created December 13, 2012 20:59
Simple python module to create a simple typing animation with text in python and to change the color in unix shells.
from sys import stdout
from time import sleep
def type(text, nl=True, delay=0.01, amount=1):
l = list(text)
if amount > 1:
nl = []
i = 0
e = ""
for c in l:
@omnidan
omnidan / capkey.c
Created October 3, 2012 17:56
Capture key events from a keyboard/input device.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
#include <dirent.h>
#include <linux/input.h>
#include <sys/types.h>
#include <sys/stat.h>
@omnidan
omnidan / entropygen.py
Created April 20, 2012 12:26
EntropyGEN: A script that does random disk operations to generate entropy for private key generation.
#!/usr/bin/env python
from os import system
from sys import argv
print("EntropyGEN v0.4")
print("USAGE: %s <BYTES_PER_SECOND>" % argv[0])
try:
try:
if len(argv) > 1: blen = int(argv[1])
else: blen = 100
@omnidan
omnidan / battery.c
Created April 8, 2012 18:27
A simple battery status output script that can be used for "xsetroot -name" configs.
/*
Copyright (c) 2012, Daniel Bugl
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
@omnidan
omnidan / references.php
Created January 30, 2012 14:13
PHP-References (Pointers) used in the TouchNet
<?php
/**
* These classes maintain references (pointers) in PHP. The first class
* can store one reference only, while the ReferenceContainer can store many
* references at once.
*
* This class is used in the TouchNet to send all modules to all modules.
*
* @author Daniel Bugl
@omnidan
omnidan / euler.de.py
Created December 20, 2011 20:34
EULER.DE.PY | German version of EULER.PY - A program that calculates the euler number e.
#!/usr/bin/env python
# Die Euler'sche Zahl e
# e = 2 + 1/2 + 1/3 + 1/4 + 1/5 + ...
import traceback
# Display Variablen
DISCALC = False # Berechnungen anzeigen
LOGTIME = False # Zeit/Datum in den Logs anzeigen
# /Display Variablen
@omnidan
omnidan / honeypot.py
Created December 10, 2011 22:09
HONEYPOT.PY | A simple honeypot written in python.
#!/usr/bin/env python
"""
Copyright (c) 2011, Daniel Bugl
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright