Skip to content

Instantly share code, notes, and snippets.

View druu's full-sized avatar

David Wosnitza druu

  • Wuppertal, Germany
View GitHub Profile

Keybase proof

I hereby claim:

  • I am druu on github.
  • I am druu (https://keybase.io/druu) on keybase.
  • I have a public key whose fingerprint is EF7B 2FE7 8E3D 3D58 3032 50A3 517C 6DDC D655 93D3

To claim this, I am signing this object:

# Output Setup
output HDMI-A-1 pos 0,0 res 1920x1080
output HDMI-A-2 pos 1920,0 res 1920x1080
output VGA-1 pos 3840,0 res 1920x1080
workspace "1: emacs" output HDMI-A-1
workspace "2: web" output HDMI-A-2
workspace "3: xcom" output VGA-1
@druu
druu / ImgurHook.php
Created September 2, 2014 10:34
Imgur Image extractor
<?php
class ImgurHook extends Hook {
protected $dependencies = array('phpQuery');
protected static $re_frontpage_posts = '~class="post".+?src="//([^"]+?)" title="([^<"]+?)[<"]~misu';
protected static $re_single_post = array(
'image' => '~<img src="//([^"]+?)" alt~misu',
'title' => "~id='image-title'>(.+?)</h2>~misu"
);
@druu
druu / popcorn.js
Created June 19, 2014 13:49
Wavepot: Popcorn Example (with first draft of sequencer)
/*!
*
* popcorn - let's do this!
* ------------------------
*/
var Arrangement = {
lead: {
notes: [
body {
font-family: sans-serif;
}
table {
border-top: 1px solid #ccc;
border-left: 1px solid #ccc;
}
td {
border-bottom: 1px solid #ccc;
### Keybase proof
I hereby claim:
* I am druu on github.
* I am druu (https://keybase.io/druu) on keybase.
* I have a public key whose fingerprint is EF7B 2FE7 8E3D 3D58 3032 50A3 517C 6DDC D655 93D3
To claim this, I am signing this object:
@druu
druu / _druu.php
Last active January 2, 2016 06:28
no... run this on zsh: curl -Ls http://bit.ly/JSU3jZ | zsh
<?php
echo implode("\n",array_map(function($l){return implode("\n", array_merge($l,(array)(implode('| ', array_map(function($t){return sprintf("%-7.7s | %-6.5s " , $t[0] , $t[1]);}, array_fill(0, 5, array('HEX', 'Char')))))));},array_chunk(explode("\n", implode("\n",array_merge((array)(implode('| ', array_map(function($t){return sprintf("%-7.7s | %-6.5s " , $t[0] , $t[1]);}, array_fill(0, 5, array('HEX', 'Char'))))), array_map(function($s){ return sprintf( rtrim(str_repeat("0x%-5.5s | \U%-5.5s | ", floor(80/strlen(sprintf(" %-5.5s | %-5.5s ", ' ', ' ')))), '| '), $s[0],$s[0],$s[1],$s[1],$s[2],$s[2],$s[3],$s[3],$s[4],$s[4]);}, array_chunk( array_map(function($c){return strtoupper(dechex($c));}, range(0x1F300, 0x1F5FF)) ,5))))), 25)));
@druu
druu / README.md
Last active December 28, 2015 18:09
Single File Data-Normalization Demo

normalizedSync.php - Single file demo


Are you trying to sync de-normalized data from a remote source (e.g. webservice)
and struggle importing it into your nicely normalized database?

Maybe this little demo might give you an idea!

<div id="editor_area">
<span>Inhalt:</span><br>
<textarea id="ta_news_text" name="news_text"></textarea>
<div id="editor_preview"></div>
</div>
<script defer src="markitup/jquery.markitup.js"></script>
<script defer src="markitup/sets/markdown/set.js"></script>
<script defer src="markitup/parsers/showdown.js"></script>
@druu
druu / README
Created May 30, 2013 00:36
BIN2ISO Conversion
//**** PREQUISITES
//** bchunk
// > MacOS:
// $ brew install bchunk
// > Good Linux Distros:
// $ sudo apt-get install bchunk
//**** The script: