Skip to content

Instantly share code, notes, and snippets.

View SharkyRawr's full-sized avatar
🦄
Rawr

Sophie SharkyRawr

🦄
Rawr
View GitHub Profile
@SharkyRawr
SharkyRawr / sort.py
Created May 28, 2018 13:11
steam screenshot sorting script
"""
made by Sharky - https://sharky.pw/
"""
import os, re, shutil
from requests import get
r = get('http://api.steampowered.com/ISteamApps/GetAppList/v2')
apps = r.json()['applist']['apps']
#! /bin/bash -e
cat /var/lib/misc/dnsmasq.leases | awk '{split($0,a," "); if (a[4] != "*") { print a[3],"\t",a[4]}}'
apt install -y pbzip2 pigz pixz
for f in gzip gunzip gzcat; do
ln -sv "`which pigz`" "/usr/local/bin/$f"
done
for f in bzip2 bunzip bzcat; do
ln -sv "`which pbzip2`" "/usr/local/bin/$f"
done
for f in xz xzcat; do
@SharkyRawr
SharkyRawr / smartdump.sh
Created November 27, 2017 13:53
dump SMART data of all drives into their corresponding textfiles
#! /bin/bash
DRIVES=`ls -l /dev/disk/by-id/ata* | grep -v part | cut -d ' ' -f 10`
for d in $DRIVES; do
NAME=`echo $d | cut -d '/' -f 5`
echo $NAME
smartctl --xall $d > $NAME.txt
done
@SharkyRawr
SharkyRawr / lxc-lvm-duplicity_backup.sh
Last active October 30, 2017 15:03
LXC LVM volume backup script using duplicity
#! /bin/bash -e
#
## LVM backup script by Hendrik 'Sharky' Schumann
#
GROUP="vg0"
VOLUMES="lxc-xana lxc-githost"
BACKDIR="/mnt/autoback"
#! /bin/bash -e
apt update && apt install pigz pixz pbzip2
cd /usr/local/bin
for f in gzip gunzip gzcat; do
ln -sv "`which pigz`" "$f"
done
@SharkyRawr
SharkyRawr / CMakeLists.txt
Created July 16, 2017 03:01
dumb-0.9.3 CMakeLists.txt cmake support file
cmake_minimum_required (VERSION 2.8.11)
project (dumb)
LIST(APPEND SourceFiles
src/core/atexit.c
src/core/duhlen.c
src/core/duhtag.c
src/core/dumbfile.c
src/core/loadduh.c
src/core/makeduh.c
@SharkyRawr
SharkyRawr / CMakeLists.txt
Last active July 16, 2017 03:00
uFMOD CMake support file (CMakeLists.txt)
cmake_minimum_required (VERSION 3.0)
project (ufmod)
add_custom_command(OUTPUT ufmod.o
COMMAND cd ${CMAKE_CURRENT_SOURCE_DIR} && nasm -O4 -t -fwin32 -df48000 -dSTRONG -dUNICODE -dNORMAL -dOBJ -I ${CMAKE_CURRENT_SOURCE_DIR}/ufmod -dWINMM -o ${CMAKE_CURRENT_BINARY_DIR}/ufmod.o nasm.asm
)
add_library(ufmod STATIC ufmod.o)
SET_SOURCE_FILES_PROPERTIES(
ufmod.o
PROPERTIES
#! /usr/bin/env python3
"""
Print IP's of LXC containers in a hostfile compatible way.
by Hendrik 'Sharky' Schumann - https://schumann.pw/
"""
import os, sys
LXC_PATH = r'/var/lib/lxc/'
"""
Python script to export all quassel (sqlite) database buffers to a human-readable username_network_buffer.txt
"""
import sqlite3
from datetime import datetime
db = sqlite3.connect("quassel-storage.sqlite")