Skip to content

Instantly share code, notes, and snippets.

Avatar
🕴️
Ricing my polybar...

Rein F LevitatingBusinessMan

🕴️
Ricing my polybar...
View GitHub Profile
View tripreporter.rb
#!/usr/bin/env ruby
FILENAME = ARGV[0]
abort "No filename given" if !FILENAME
clog = ""
STARTTIME = Time.now
File.write FILENAME, `date`, mode: 'a'
View unison@.service
[Unit]
Description=Sync directory %i with unison
[Service]
ExecStart=unison -sshargs '-i /home/rein/.ssh/xlab18' -auto -batch /home/rein/%i ssh://x-lab18.local.boem/unison/%i
Restart=no
View potion.hs
import Data.Char (ord)
import Data.Bits (xor)
-- Complete the incantation...
flag = "HTB{4_m0n4d_15_ju57_4_m0n01d_1n_7h3_c47360ry_0f_3nd0func70r5!!}"
extractFlag :: String -> String
extractFlag (s:rest)
| s == 'H' || s == 'T' || s == 'B'
= extractFlag rest
View juicer.sh
#!/bin/bash
set -e
lastport=`cat ~/.lastport || echo 4000`
newport=$(($lastport+1))
docker run -d -e "CTF_KEY=juicelympicsgobrrrrr" -e "NODE_ENV=ctf" -p $newport:3000 bkimminich/juice-shop
View osc-alsa.rb
#!/usr/bin/ruby
puts <<-"EOF"
____ _____ _____ __ _ _____
/ __ \\ / ____|/ ____| \\ \\ /\\ | | / ____| /\\
| | | | (___ | | _____\\ \\ / \\ | | | (___ / \\
| | | |\\___ \\| | |______> > / /\\ \\ | | \\___ \\ / /\\ \\
| |__| |____) | |____ / / / ____ \\| |____ ____) / ____ \\
\\____/|_____/ \\_____| /_/ /_/ \\_\\______|_____/_/ \\_\\
View cthulhu
_._._. ._._._
_,_)/''/'/ \'\''\(_,_
)'`' ` '/ \' ''`'(
_(` '( _________ )' `)_
_(' \ `/ / ' \, \` / ')_
( \ '( \ ' ' ' '\ , )' / )
( \ \ ') /',-- ' --` ) (` / / )
\ \ \ `\ / '@@" "@@` \ /' / / /
( \ \ ') / ' `,' '," \ (' / / )
\ \ \ \ `\ \ ' ' ' ' | /' / / /
@LevitatingBusinessMan
LevitatingBusinessMan / aur.sh
Last active Oct 6, 2022
AUR/makepkg automation script
View aur.sh
#!/bin/bash
set -e
DSTDIR="/tmp"
if [[ -z $1 ]]; then
echo No package specified >&2
exit 1
fi
View synonym.rb
#!/usr/bin/ruby
require 'net/http'
body = Net::HTTP.get(URI("https://www.thesaurus.com/e/synonym-of-the-day/"))
r = /<a.*href="https:\/\/www\.thesaurus\.com\/browse\/.+".*>(\S+)<\/a>\s*is another word for\s*<a.*href="https:\/\/www\.thesaurus\.com\/browse\/.+".*>\s*(\S+)\s*<\/a>\s*<\/h2>/
firstword, secondword = r.match(body).captures
system("{
@LevitatingBusinessMan
LevitatingBusinessMan / morse.rb
Last active Sep 20, 2022
Morse code on your numkey
View morse.rb
#!/usr/bin/ruby
require './morse_dict.rb'
require 'readline'
LED = '/sys/class/leds/input3::numlock/brightness'
OLD = File.read LED
File.write LED, 0
View .bash_profile
tmux at -t irssi || tmux new -s irssi irssi