Skip to content

Instantly share code, notes, and snippets.

View moregeek's full-sized avatar

Stefan Morgenthaler moregeek

View GitHub Profile
require 'cgi'
require 'digest/md5'
require 'net/https'
require 'uri'
module Jekyll
class GistTag < Liquid::Tag
def initialize(tag_name, text, token)
super
@text = text
@moregeek
moregeek / collection_of_personal_dev_rules.md
Created June 5, 2014 10:46
Personal List of Rules for Development (in progress)

Web Development

  • No inline JavaScript within HTML
@moregeek
moregeek / CloneTest.coffee
Last active August 29, 2015 14:06
CoffeeScript Class Example for "private" variables
class CloneTest
constructor: (options = {}) ->
@default_options = {
foo: false, bar: false, baz: false
}
$.extend(@default_options, options)
getValues: ->
@moregeek
moregeek / currency.csv
Created October 13, 2011 13:26
Currency CSV List (unfinished)
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
EUR;Euro;
USD;US Dollar
GBP;Pound Sterling;
@moregeek
moregeek / test
Created April 20, 2012 12:24
test
echo "test"
#!/usr/bin/env bash
#
# GPLv3 / Stefan Morgenthaler, 2015;
#
# What?
#
# traverses a given directory down till no subdirectories are present. The pdf
# files within the 'last' directory are merged together and stored in the
# parents folder. The merged document uses the name of the directory, the pdfs
# where located in.
@moregeek
moregeek / cd
Last active December 18, 2015 08:42
extends "cd" to accept (multiple) "dots" as indicator to traverse the directory tree up
#
# Copyright (C) 2015 Stefan Morgenthaler
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@moregeek
moregeek / README
Last active December 29, 2015 02:18
## INSTALL
curl -o ~/bin/knockp https://gist.github.com/moregeek/7599055/raw/knockp
chmod +x ~/bin/knockp
## USAGE
### With ssh config (~/.ssh/config)
host example.org
ProxyCommand sh -c "~/bin/knockp -s example.org 2000 3000 4000; nc %h %p"
@moregeek
moregeek / edis_pi_online_stats.sh
Last active December 31, 2015 16:29
Check Edis RPi Colocation Range for online/offline RPi's (if FW blocks ICMP => offline)
#!/usr/bin/env bash
# q&d; WTFPL;
count_off=0;
count_onl=0;
for n in {1..254}; do
ip="151.236.12.${n}";
ping -c1 -t1 ${ip} > /dev/null 2>&1
\ProvidesFile{absender.lco}
\KOMAoptions{%
% fromemail=true, % Email wird im Briefkopf angezeigt
% fromphone=true, % Telefonnumer wird im Briefkopf angezeigt
% fromfax=true, % Faxnummer wird im Briefkopf angezeit
% fromurl=true, % URL wird im Briefkopf angezeigt
% fromlogo=true, % Logo wird im Briefkopf angezeigt
% subject=titled, % Druckt "Betrifft: " vor dem Betreff
locfield=wide, % Breite Absenderergänzung (location)