Skip to content

Instantly share code, notes, and snippets.

Avatar
😀

Max von Buelow magcks

😀
View GitHub Profile
View sa-learn-pipe.sh
#!/bin/bash
# visudo:
# vmail ALL= (root) NOPASSWD: /usr/bin/sa-learn
time=5
spoolsalearn="/var/spool/salearn"
lvl="info"
type="spam"
@magcks
magcks / emoji.js
Last active Oct 6, 2016
checks colored emoji support
View emoji.js
window.emoji = (function() {
var canvas = document.createElement("canvas");
canvas.width = 15;
canvas.height = 15;
var ctx = canvas.getContext("2d");
ctx.font = "10px";
ctx.fillStyle = "black";
ctx.fillText("\uD83E\uDD51", 0, 10);
var data = ctx.getImageData(0, 0, canvas.width, canvas.height).data;
var emoji = false;
View clock.js
"use strict";
/**
* Canvas Clock (GPLv2)
*
* @author Max (http://m9x.de)
* @version 1.0
*
* Original version and design by http://www.board3.de/
* JavaScript clone by Max (m9x.de)
@magcks
magcks / bridge_backup.sh
Last active Aug 29, 2015
A script that handles backups of your local bridge settings.
View bridge_backup.sh
#!/bin/sh
FILE="$2"
if ( [ "$1" = "backup" ] && [ "$FILE" != "" ] ); then
# backup
brctl show | awk 'NR > 1 && $4 != "" { print $1 " " $4; last=$1; } NR > 1 && $2 == "" { print last " " $1; }' > "$FILE"
echo "Done"
View .uniwget.sh
#!/bin/sh
URL="$1"
LOCAL_PORT=1337
TU_ID=topsecret
RBG_CLIENT=1
PROT=$(cut -d: -f1 <<< $URL)
DOM=$(cut -d/ -f3 <<< $URL)
View verify.sh
#!/bin/sh
FILENAME=""
SAFETY=false
NOTENDSTATE=false
TRAIL=false
VERIFY=false
View turingdecbin
//////////////////////
// turing: dec to bin
//////////////////////
// Copyright (c) 2013 Max von Buelow
// Copyright (c) 2013 kd3x
// License: CC BY-NC-SA 3.0
// Simulator: http://db.ing.puc.cl/turingmachine/
// Initial state: init
View betterturing
// set delimiter
init,0
init,0,<
init,1
init,1,<
init,2
init,2,<
@magcks
magcks / ts.sh
Last active Dec 15, 2015
TeamSpeak debian start script
View ts.sh
#!/bin/sh
# Start ts
# conf
DIR="/home/ts" # the root directory of the ts server
SCRIPT="./ts-start-script.sh" # the ts start script
USER="ts"
cd $DIR && su - $USER -c "$SCRIPT $1"
View minecraft.sh
#!/bin/sh
# Minecraft
# conf
DIR="/home/minecraft" # the root directory of the minecraft server
SCRIPT="./starter.sh" # the script which executes the jar
NAME="minecraft" # screen name
screen=$(which screen)