Skip to content

Instantly share code, notes, and snippets.

View themasch's full-sized avatar

Mark Schmale themasch

View GitHub Profile
HOST: mark_laptop Loss% Snt Last Avg Best Wrst StDev
1.|-- DD-WRT 89.2% 1000 2.2 2.8 2.0 16.5 2.4
2.|-- 10.139.64.1 0.0% 1000 14.1 12.6 7.3 101.2 6.1
3.|-- 1211F-MX960-02-ae12-1090. 0.0% 1000 15.0 15.8 7.4 98.2 10.9
4.|-- 7111A-MX960-02-ae9.fra.un 43.7% 1000 18.2 20.4 13.4 66.9 7.1
5.|-- 7111A-MX960-01-ae0.fra.un 53.1% 1000 15.5 20.6 13.3 79.6 9.3
6.|-- 84-116-131-149.aorta.net 58.9% 1000 15.6 20.8 13.3 78.7 8.8
7.|-- 84.116.132.193 0.0% 1000 19.8 20.2 13.8 73.2 6.2
8.|-- 84.116.132.178 43.1% 1000 18.3 20.9 13.8 97.0 8.3
9.|-- 4.68.62.237 0.7% 1000 20.7 22.5 14.2 105.8 11.7
@themasch
themasch / mkindex.sh
Last active December 17, 2015 13:10 — forked from tobybaier/mkindex.sh
Tweaked tobybaiers version of his mkindex.sh file a little bit. There might me room for more improvments but i'm by far not a sh wizard. (Add <ul>
#!/bin/sh
for i in $1/*.mp3;
do
file=$(basename $i)
echo "<li><audio preload='none' controls='controls'><source src='$file' type='audio/mp3'/></audio> <a href='$file'>download $file</a></li>" >> "$1/index.html";
done;
echo "<li><a href='$1'>$1</a></li>" >> index.html
@themasch
themasch / concept.md
Last active December 17, 2015 09:09
Konzept: PodHost (was ein scheiß Name)

Blabla gibts schon. Hat sich erledigt. Ich bin blöd

Die Idee:

PodHost soll ein SaaS (oder WSaaS) Projekt werden das sich dem Hosten von Podcasts widmet. Der User (Podcaster) kann sich seinen einen Blog gestalten und dort ohne viel technischen Sachverstand mit minimalem Aufwand Podcasts veröffentlichen. Hosting, speicherung der Daten, veröffentlichen der Feeds etc. übernimmt PodHost.

Features:

  • Backend zum Verwalten des Blogs, anlegen von Artikeln, einsehen von Statistiken etc.
@themasch
themasch / streamthingy.js
Created May 3, 2013 16:59
Just a quick scribble..
var stream = new StreamThingy()
stream.transform = myCrazyFormater
io.sockets.on('connection', function(socket) {
stream.add(socket)
})
stream.pipe(process.stdout)
@themasch
themasch / recursemd5.sh
Created April 24, 2013 17:17
recurse md5
#!/bin/sh
walk_dir() {
if [[ -e MD5SUM ]]
then
md5sum -c MD5SUM
else
for FILE in `ls .`;
do
if [[ -d $FILE ]]
fn fibbo(max: int, cb: fn(int) -> bool) {
let mut a = 1;
let mut b = 0;
let mut c;
loop {
c = a;
a = a+b;
b = c;
<?php
$array_a = [ 'a' => 'red', '42', true];
$array_b = [ 'blue', 42, 'true'];
var_dump(array_intersect($array_a, $array_b)); // [ '42' ]
var_dump(array_filter($array_a, function($v) use ($array_b) {
return(in_array($v, $array_b));
})); // [ '42', true ]
@themasch
themasch / dateinterval.php
Last active December 15, 2015 07:59
stringify PHP DateInterval
<?php
function stringifyDateInterval(\DateInterval $inv)
{
$dat = 'P' . (($inv->y !== 0) ? $inv->y . 'Y' : '')
. (($inv->m !== 0) ? $inv->m . 'M' : '')
. (($inv->d !== 0) ? $inv->d . 'D' : '');
$tme = 'T' . (($inv->h !== 0) ? $inv->h . 'H' : '')
. (($inv->i !== 0) ? $inv->i . 'M' : '')
@themasch
themasch / Preferences.sublime-settings
Last active December 11, 2015 00:08
my sublime config
{
"auto_complete_commit_on_tab": true,
"caret_style": "smooth",
"color_scheme": "Packages/Theme - Phoenix/Color Scheme/Tomorrow-Night.tmTheme",
"detect_slow_plugins": false,
"draw_minimap_border": true,
"ensure_newline_at_eof_on_save": true,
"font_face": "Source Code Pro",
"font_size": 11,
"ignored_packages":
@themasch
themasch / bla.html
Created December 5, 2012 14:30
security questions made easy (with bootstrap)
<a href="/delete/stuff" class="btn btn-delete" data-sure-text="sure?"> delete </a>