I hereby claim:
- I am rwenz3l on github.
- I am rwenz3l (https://keybase.io/rwenz3l) on keybase.
- I have a public key ASA3-J6KLz8z8LFqC32iUxLegBr5QC8UIoFGlM94zUBEAwo
To claim this, I am signing this object:
# Variante 1: Pure Python | |
from random import randint | |
def wuerfeln(wuerfel=1, versuche=1): | |
ergebnis = {} | |
for a in range(wuerfel,(wuerfel*6)+1): | |
ergebnis[a] = 0 | |
for i in range(0, versuche): | |
summe = 0 | |
for j in range(0, wuerfel): |
#! /bin/sh | |
# | |
# Credit to: www.byan-roper.org | |
# | |
# | |
# actually uses some bash extensions; see comment on line 36 | |
# | |
# change the UID of a login on Mac OS X 10.11 El Capitan | |
# | |
# run this script using sudo *from another user account*!!! |
@echo off | |
set /p DUMMY=Press ENTER to Toggle Internet Gateways.. | |
CD %~dp0 | |
IF EXIST "%~dp0fast.ini" ( | |
ECHO Switch: Slow | |
route DELETE 0.0.0.0 MASK 0.0.0.0 192.168.10.6 | |
route ADD 0.0.0.0 MASK 0.0.0.0 192.168.10.5 | |
DEL Fast.ini |
curl -F "logfile=@safe01.log" -F "sub=archive" localhost:9000/recv.php |
crc32 <(flac --decode --stdout --force-raw-format --endian=little --sign=signed /path/to/file.flac) |
# crc32 <(flac --decode --stdout --force-raw-format --endian=little --sign=signed /path/to/file.flac) | |
function veriflac() { | |
NC='\033[0m' | |
Red='\033[0;31m' | |
Green='\033[0;32m' | |
if [ $# -eq 0 ] | |
then | |
echo -e "${Red}Usage:" | |
echo -e " veriflac /path/to/folder${NC}"; |
sudo chown root:admin /Applications; sudo chmod 0775 /Applications | |
sudo chown root:wheel /Library; sudo chmod 0755 /Library | |
sudo chown root:admin /Library/Application\ Support; sudo chmod 0755 /Library/Application\ Support | |
sudo chown root:admin /Users; sudo chmod 0755 /Users | |
sudo chown root:wheel /usr; sudo chmod 0755 /usr | |
sudo chown root:wheel /usr; sudo chmod 0755 /usr/bin |
# Snippets for fun and learning more about git (automation) | |
function abandon-git { | |
rescue_branch="Rescue-Branch-$(date +"%Y-%m-%d-%H-%M-%S")" | |
git checkout -b "${rescue_branch}" | |
git add --ignore-removal . | |
git commit -a -m 'This is a Rescue Commit - saves progress and pushes to new banch' | |
git push --set-upstream origin Rescue-Branch-2017-09-20-15-54-40 | |
} | |
function restore-git { |
I hereby claim:
To claim this, I am signing this object:
#!/bin/sh | |
file2jsql(){ | |
# $1=file, $2=table_name | |
keyval=$(cat "${1}" | perl -n -e '/`db:"(.*)"\ / && printf(qq{"%s", %s,\n},$1,$1);') | |
keyval=${keyval%?} | |
echo "SELECT JSON_OBJECT(" | |
echo "$keyval" | |
echo ") FROM ${2};" | |
} |