Skip to content

Instantly share code, notes, and snippets.

View magcks's full-sized avatar
😀

Max von Buelow magcks

😀
View GitHub Profile
#!/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 October 6, 2016 20:13
checks colored emoji support
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;
#!/bin/sh
URL="$1"
LOCAL_PORT=1337
TU_ID=topsecret
RBG_CLIENT=1
PROT=$(cut -d: -f1 <<< $URL)
DOM=$(cut -d/ -f3 <<< $URL)
#!/bin/sh
FILENAME=""
SAFETY=false
NOTENDSTATE=false
TRAIL=false
VERIFY=false
//////////////////////
// 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
// set delimiter
init,0
init,0,<
init,1
init,1,<
init,2
init,2,<
@magcks
magcks / ts.sh
Last active December 15, 2015 08:09
TeamSpeak debian start script
#!/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"
#!/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)
var popped = ('state' in window.history),
initialURL = window.location.href;
window.onpopstate = function(event) {
var initialPop = !popped && location.href == initialURL;
popped = true;
if (initialPop) return false;
var state = event.state;
@magcks
magcks / clock.js
Last active August 29, 2015 14:00
"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)