Skip to content

Instantly share code, notes, and snippets.

@thalamus
thalamus / ArchLinuxARM-M1
Last active February 23, 2025 12:24
How to boot Arch Linux ARM in QEMU (patched for M1)
/*
* This document is provided to the public domain under the
* terms of the Creative Commons CC0 public domain license
*/
How to boot Arch Linux ARM in QEMU (patched for M1)
Prerequisites:
QEMU - patched for M1 processors - patches: https://github.com/utmapp/qemu
@flying-sausages
flying-sausages / bringOutYourDead.sh
Created May 24, 2020 04:54
BringOutYourDead.sh - Scanner for unreferenced torrent payloads Helpful Information
#!/bin/bash
# Requires Aria2, apt-get install aria2
# https://www.reddit.com/r/seedboxes/comments/dp38al/bringoutyourdeadsh_scanner_for_unreferenced/
# BringOutYourDead.sh
if [ $# -ne 2 ]
then
echo Usage: $0 Path_of_Active_Torrents Path_of_Downloads
exit -1
fi
<#
.SYNOPSIS
Probes a set or range of VLANs for an IP Address
.DESCRIPTION
Probes a set or range of VLANs to see if the port you're connected to allows traffic for that particular VLAN.
.PARAMETER Vlans
Specify a range of VLANs in Powershell range format (n..m), or a comma-delimited list.
@rlaphoenix
rlaphoenix / dvd-bible-by-phoenix.md
Last active January 28, 2025 18:11
The DVD-Video Bible, Written by @rlaphoenix
@beci
beci / aur_speed_up.md
Last active March 7, 2025 03:37
Speed up compiling of AUR packages in arch linux

Edit /etc/makepkg.conf

replace in CFLAGS and CXXFLAGS to use the native one

-march=x86-64 -mtune=generic to -march=native

speed up build by set multiple threads

MAKEFLAGS="-j$(nproc)"

@chazlarson
chazlarson / sa-batch-uploader.sh
Last active December 27, 2019 22:34
Upload a lot of stuff to a google drive [presumably a teamdrive], cycling through a set of service accounts at 500GB each. Assumptions here are: you have 100 service accounts. Their JSON credential files are named `sa-1.json` through `sa-100.json` and are stored in `/opt/sa-json`. The files you want to upload are in `/files/to/upload`
#!/bin/bash
COUNTER=1
SOURCE="/files/to/upload"
DESTINATION="remote:path"
JSON_LOC="/opt/sa-json"
while [ $COUNTER -lt 100 ]; do
echo Using service account sa-$COUNTER
/usr/bin/rclone copy -v --delete-excluded \
--fast-list --checkers=32 --transfers=16 --max-transfer 500G \
--stats 5s --drive-service-account-file=$JSON_LOC/sa-$COUNTER.json \
@mc2squared
mc2squared / sa-gen.sh
Last active May 30, 2022 21:07 — forked from DashLt/create_service.sh
Generate 100 service accounts and export their keys
#!/bin/bash
# requires gcloud command line tools; go to https://cloud.google.com/sdk/docs/quickstarts to get them
# max 100 service accounts per project
# run gcloud init --console-only first and select a project
#
# Want to use these for rclone? Service Account Loadbalancing is implemented in this build:
# https://git.fionera.de/fionera/rclone/releases
KEYS_DIR=~/keys
for name in service{1..100}; do
echo $name
@hkamran80
hkamran80 / SmartTV2.txt
Last active April 19, 2025 21:53
Pi-hole Blocklist for Smart TVs
# THIS FILE IS NO LONGER BEING MAINTAINED. FOR A MAINTAINED VERSION, PLEASE USE THE VERSION IN THE NEW REPOSITORY.
# Repository: https://github.com/hkamran80/blocklists
# New link for this file: https://raw.githubusercontent.com/hkamran80/blocklists/main/smart-tv
# ------
# This is a blocklist to block Smart TVs sending data home.
# Please help to collect domains!
# It could be that the TV does not receive any more updates or other services no longer work. Please report such an incident.
@gpmnsp
gpmnsp / # Screensheetmaker.md
Last active March 21, 2023 21:11
Screensheet maker for Linux bash and Windows CMD.EXE

screensheetmaker

  • Consists of two scripts: make-screens.sh for Linux bash and make-screens.cmd for Windows CMD.EXE.
  • Uses ffmpeg, and montage and convert from Imagemagick package, additionally bc under Linux.
  • Works pretty fast. The approach is to divide the file into N intervals, one for each picture and pick the first keyframe after the midpoint of each interval. This is done quickly with a single run of ffmpeg, given the duration of each interval.
  • Known limitations: Length of the video. The shortest video I've run with success was 30 seconds, though the number of screens was limited (by the number of keyframes in the video).

make-screens.sh

Shell script to make screenshot pages from movies with ffmpeg.