This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# aliases | |
alias enscript="enscript -M A4 --header=\'\$n\'" | |
alias flacseek='metaflac --add-seekpoint=5s *.flac' | |
alias fuse="fuse -g hq3x" | |
alias kali='docker pull martinmspedersen/kali ; docker container run --rm --hostname kali --name kali-$$ -v "/data/ctf":/data -w /data -it martinmspedersen/kali:latest' | |
alias kubectl="sudo kubectl" | |
alias MYIP="torify wget http://ipinfo.io/ip -qO -" | |
alias nnmap="nmap -sC -sV -oN scan.txt" | |
alias pdf2png='pdftoppm -png -r 300' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo '[+] Stop running mssql' | |
docker container rm -f mssql &>/dev/null | |
echo '[+] Remove Docker image' | |
docker image rm mcr.microsoft.com/mssql/server:2019-latest &>/dev/null | |
echo "[+] Start time $(date +%R:%S)" | |
START=$(date +%s) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for f in *jpg | |
do | |
convert "$f" -resize '640x480' -background black -gravity center -extent 640x480 "$f" | |
done | |
convert -delay 300 -loop 0 *jpg output.gif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function generate_passwd { | |
HOW_MANY=${1:-1} | |
LENGTH=${2:-24} | |
for((i=0;i<$HOW_MANY;i++)) | |
do | |
cat /dev/urandom| base64 | tr -d '1lLoO0+/g7\n' | head -c${LENGTH}; echo | |
done | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function img2flac() { | |
img="$1" | |
shift | |
for fname in $* | |
do | |
metaflac --import-picture-from="$img" "$fname" | |
done | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f1 <- sample(0:255,3) | |
while (sum(f1*c(0.2126,0.7152,0.0722)) < 0.85*255) { # brightness | |
f1 <- sample(0:255,3) | |
} | |
f2 <- sample(0:255,3) | |
while (sum(f2*c(0.2126,0.7152,0.0722)) > 0.15*255) { # brightness | |
f2 <- sample(0:255,3) | |
} | |
if (runif(1) > 0.5) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env Rscript | |
args <- commandArgs(trailingOnly = TRUE) | |
if (length(args) < 2) { | |
cat("Usage: setdiff <file1> <file2> [files]\n", file = stderr()) | |
} | |
ignorecase <- FALSE | |
if (args[[1]] == "-i") { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(stringr) | |
tournaments <- NULL | |
players <- NULL | |
DEBUG <- FALSE | |
get_tournaments <- function(filename) { | |
f <- file(filename, "rb", raw = TRUE) | |
tournament_input <<- as.integer(readBin(f, "raw", file.size(filename))) | |
close(f) |
NewerOlder