Skip to content

Instantly share code, notes, and snippets.

View abra-chan's full-sized avatar

Abra Channel abra-chan

View GitHub Profile
@abra-chan
abra-chan / reverse_lines.rb
Created January 10, 2026 14:09
Reverses a text file with unicode support. Flips ascii art (naively).
#!/usr/bin/env ruby
# Usage: ruby reverse_lines.rb input.txt output.txt
# This script reads each line from the input file,
# reverses the order of the characters,
# and writes the result to the output file.
# It supports ASCII and Unicode charaters (utf-8).
# The primary use-case is for manipulating ascii art, to flip the other direction.
# A more robust version would replace commonly used characters with its complement
# (E.g. the braille character ⠦ becomes ⠴ ).
@abra-chan
abra-chan / vod_backup.ps1
Created January 5, 2026 15:41
VOD Backup Script for Windows (PowerShell)
# Define paths
$SourceDir = "C:\Users\example\Desktop\stream\edited"
$DestDir = "Z:\External Storage\Seagate\content"
$EmailTo = "example@gmail.com"
$SmtpServer = "smtp.gmail.com" # Replace with your SMTP server
$EmailFrom = "example-noreply@gmail.com" # Replace with your from email
$Credentials = New-Object System.Management.Automation.PSCredential("username", (ConvertTo-SecureString "password" -AsPlainText -Force)) # Replace with SMTP credentials if needed
# Check if the NAS volume is mounted (assuming mounted as Z:\)
if (-not (Test-Path "Z:\")) {
@abra-chan
abra-chan / autorun.bat
Created August 26, 2015 18:35
Make Windows XP command prompt mimic a *NIX shell
@echo off
REM INSTALL: Add the full path string of this file via regedit to:
REM \HKCU\Software\Microsoft\Command Processor\AutoRun
REM Set up aliases to mimic BASH/*NIX environment
doskey ls=dir /X /Q /TW /OG /P $*
doskey ll=dir $*
doskey cat=type $*
doskey ..=cd..
doskey grep=find "$1" $2
doskey mv=ren $*
@abra-chan
abra-chan / Nuking-hard-drives-the-UNIX-way.sh
Created August 1, 2013 07:01
This shell script will fill your hard drive with random bits, and then zeros. It will do this seven times. It works on UNIX, Linux, and Mac. Make sure to change /dev/sda1 to your desired drive. For the extra paranoid, run truecrypt afterwards and burn the password. Cheers!
#!/bin/bash
echo "Beginning wipe"
for i in {1..7}
do
echo "Starting pass $i..."
dd if=/dev/urandom of=/sda1 bs=1M
dd if=/dev/zero of=/sda1 bs=1M
echo "Pass $i complete."
done
echo "Wipe complete."
@abra-chan
abra-chan / picard-facepalm-ascii.txt
Created May 22, 2012 17:47
Captain Picard Facepalm ASCII
............................................________
....................................,.-'"...................``~.,
.............................,.-"..................................."-.,
.........................,/...............................................":,
.....................,?......................................................,
.................../...........................................................,}
................./......................................................,:`^`..}
.............../...................................................,:"........./
..............?.....__.........................................:`.........../
............./__.(....."~-,_..............................,:`........../