Skip to content

Instantly share code, notes, and snippets.

View dunkelstern's full-sized avatar
🐢

Johannes Schriewer dunkelstern

🐢
View GitHub Profile
@dunkelstern
dunkelstern / 3dprinter.txt
Last active August 29, 2015 14:07
3D-Printer part list
5x NEMA 17 a 12: 60 http://www.ebay.de/itm/NEMA-17-stepper-schritt-motor-3D-drucker-printer-reprap-42BYGHW609-CNC/141432916911
Arduino Mega 2560 Nachbau: 12 http://www.dx.com/p/improved-funduino-mega-2560-r3-module-compatible-w-official-arduino-mega-2560-r3-blue-black-256335#.VDr18vl_t8E
4x Stepper Driver DRV8825 a 9 Euro: 36 http://www.dx.com/p/stepstick-drv8825-stepper-motor-driver-carrier-reprap-4-layer-pcb-purple-300270
MK2B Heated Bed: 12 http://www.dx.com/p/robatale-12-24v-dual-power-mk2b-heated-bed-board-for-reprap-3d-printer-red-294026#.VDr2Qfl_t8E
RAMPS Shield Nachbau: 12 http://www.dx.com/p/ramps-1-4-printer-control-reprap-module-for-3d-printer-deep-blue-319585#.VDr2Wvl_t8E
Edelstahl Gewindespindel M6 1 Meter: 5 http://www.amazon.de/GAH-Alberts-484200-Gewindestange-Edelstahl-Gewinde/dp/B008H1AN1U/
12x LM8UU: 12 http://www.amazon.de/12Stk-Linearlager-Kugellager-Rollenlagerungen-Kug
@dunkelstern
dunkelstern / UILabel+AutoLayoutFix.m
Created June 3, 2015 13:09
Fix UILabel not auto-resizing it's height when using autolayout in landscape mode with a multi line label
@import UIKit;
#import "JRSwizzle.h" // <- from cocoapods: https://cocoapods.org/pods/JRSwizzle
// Stackoverflow question: http://stackoverflow.com/questions/17491376/ios-autolayout-multi-line-uilabel
// Answer see: http://stackoverflow.com/a/23696158/518532
@interface UILabel (AutoLayoutFix)
- (void)DST_setBounds:(CGRect)bounds;
@end
@dunkelstern
dunkelstern / Project.sublime-project
Created March 21, 2016 02:08
Sublime project file for anarchytools based swift build
{
"folders":
[
{
"path": ".",
"folder_exclude_patterns": [ ".atllbuild", "bin", "user" ],
"file_exclude_patterns": [ ".gitignore" ]
},
],
"build_systems": [
@dunkelstern
dunkelstern / conemu_bash.xml
Created August 6, 2016 22:05
Conemu config for bash
<?xml version="1.0" encoding="utf-8"?>
<key name="Software">
<key name="ConEmu">
<key name=".Vanilla" modified="2016-08-06 22:39:37" build="160724">
<value name="StartType" type="hex" data="02"/>
<value name="CmdLine" type="string" data=""/>
<value name="StartTasksFile" type="string" data=""/>
<value name="StartTasksName" type="string" data="{Bash::bash}"/>
<value name="StartFarFolders" type="hex" data="00"/>
<value name="StartFarEditors" type="hex" data="00"/>
@dunkelstern
dunkelstern / vpn.conf
Created August 7, 2016 19:10
sysctl config for ip packet forwarding
# ipv4
net.ipv4.ip_forward=1
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.all.accept_source_route = 0
net.ipv4.conf.default.rp_filter = 0
net.ipv4.conf.default.accept_source_route = 0
net.ipv4.conf.default.send_redirects = 0
net.ipv4.icmp_ignore_bogus_error_responses = 1
@dunkelstern
dunkelstern / logcat.py
Created September 7, 2016 16:57
ScribeJS commandline logfile dumper and filtering tool (python 3)
#!/usr/bin/env python
import json
import argparse
import itertools
import time
from dateutil.parser import parse
import datetime
@dunkelstern
dunkelstern / create_vpn_user.sh
Created August 7, 2016 19:35
Create certificates for a new machine for an IKEv2 vpn
#!/bin/bash
if [ "$1" = "" ] ; then
echo "Usage: $0 <machine_name>"
exit 1
fi
machinename=$1
# configure these to the visible public values of the server
@dunkelstern
dunkelstern / xed.sh
Created March 30, 2012 10:46
xed "reimplementation" to fix broken Xcode 4 xed
#!/bin/bash
if [ "$1" = "-l" ] || [ "$1" = "--line" ] ; then
line=$2
file=$3
else
line=1
file=$1
fi
@dunkelstern
dunkelstern / giphycat.py
Created March 8, 2016 17:15
Use the inline image functionality of iTerm2 3.0 to display an animated gif from giphy search
#!/usr/bin/python
from __future__ import print_function
import urllib
import json
import sys
import base64
search = urllib.quote(sys.argv[1])
json_data = urllib.urlopen("http://api.giphy.com/v1/gifs/search?q={searchterm}&api_key=dc6zaTOxFJmzC&limit=1".format(searchterm=search)).read()
@dunkelstern
dunkelstern / style.xsl
Created September 21, 2016 12:58
nginx rtmp status style sheet
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" omit-xml-declaration="yes" indent="yes"/>
<xsl:strip-space elements="*"/>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>