Skip to content

Instantly share code, notes, and snippets.

View NobleUplift's full-sized avatar
😤
Just finished Hierarchies last night! Onto my next Python bot!

NobleUplift

😤
Just finished Hierarchies last night! Onto my next Python bot!
View GitHub Profile
@NobleUplift
NobleUplift / AppDataSync.bat
Created September 17, 2016 20:55
Syncs mirrored AppData directory on data drive D:\Users\%USERNAME%\AppData\Roaming with %APPDATA%
@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION
FOR %%T IN (D:\Users\%USERNAME%\AppData\Local D:\Users\%USERNAME%\AppData\Roaming D:\Users\%USERNAME%\AppData\Roaming\Microsoft\UProof) DO (
SET source=%%T
SET destination=!source:D:\=C:\!
FOR /F "delims=" %%F IN ('DIR /B "%%T"') DO (
IF EXIST !source!\%%F\NUL (
IF NOT EXIST "!destination!\%%F" (
MKLINK /J "!destination!\%%F" "!source!\%%F"
@NobleUplift
NobleUplift / Warcraft III Stats.csv
Last active July 14, 2020 19:51
CSV of all Warcraft III units that I use for data feed testing
Unit Gold Lumber Supply Hit Points Maximum Hit Points Armor Type Armor Maximum Armor Day Sight Night Sight Speed Build Time Attack Type Weapon Type Ground Attack Maximum Ground Attack Second Ground Attack Maximum Second Ground Attack Air Attack Maximum Air Attack Cooldown Range Maximum Range Race Animation Portrait
Peasant 75 0 1 220 220 Medium 0 0 80 60 190 15 Normal Normal 5.5 5.5 None None None None 2 Melee Melee Human http://classic.battle.net/war3/images/human/units/animations/peasant.gif http://classic.battle.net/war3/images/human/units/portraits/peasant.gif
Militia None None 1 220 220 Heavy 4 0 140 80 270 N/A Normal Normal 12.5 17 None None None None 1.2 Melee Melee Human http://classic.battle.net/war3/images/human/units/animations/militia.gif http://classic.battle.net/war3/images/human/units/portraits/militia.gif
Footman 135 0 2 420 420 Heavy 2 8 140 80 270 20 Normal Normal 12.5 17 None None None None 1.35 Melee Melee Human http://classic.battle.net/war3/images/human/units/animations/footman.gif http:
@NobleUplift
NobleUplift / HideFollowsYou.js
Last active March 24, 2020 16:39
GreaseMonkey script to remove Follows You profile cards from Following page
// ==UserScript==
// @name Hide Follows You
// @namespace twitter.com
// @description Hide mutuals to unfollow unfollowers.
// @match https://twitter.com/*/following
// @version 2
// @require http://code.jquery.com/jquery-latest.js
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js
// ==/UserScript==
@NobleUplift
NobleUplift / ApacheLogSorter.php
Last active August 10, 2016 22:24
Sorts Apache HTTP logs for multiple servers behind a load balancer
<?php
// Created on 2016 April 6th @ 05:03 PM
if (count($argv) > 1) {
$filename = $argv[1];
} else {
error_log('No filename provided.');
exit();
}
$file = fopen($filename, 'r');
@NobleUplift
NobleUplift / 7zTest.bat
Last active December 28, 2015 23:03
7-Zip File Association Test Script
@echo off
REM Created on 2013 November 30th at 03:05 AM.
mkdir Test
echo. > Test/Test.001
echo. > Test/Test.7z
echo. > Test/Test.arj
echo. > Test/Test.bz2
echo. > Test/Test.bzip2
echo. > Test/Test.cab
@NobleUplift
NobleUplift / RecursiveSystemHide.bat
Last active September 24, 2015 19:09
Recursively system hide the same file in a hierarchy. Useful for Folder.jpg and AlbumArt.jpg.
@ECHO OFF
SET DIRECTORY=%1
SET HIDE=%2
FOR /R %DIRECTORY% %%F IN (.) DO (
IF EXIST %%F\%HIDE% (
ATTRIB +S +H "%%F\%HIDE%"
)
)
@NobleUplift
NobleUplift / VirtualFolder.bat
Created September 5, 2015 19:38
Symlinks every file in a hierarchy to one folder. Useful for Windows 7 Wallpapers.
@ECHO OFF
IF [%1]==[] (
ECHO Missing root source directory! Cannot continue.
EXIT /B
)
IF [%2]==[] (
ECHO Missing destination virtual directory! Cannot continue.
EXIT /B
@NobleUplift
NobleUplift / BackupTeamSpeak.bat
Last active September 5, 2015 19:35
Batch script for backing up TeamSpeak
@ECHO OFF
REM Created on 2014 April 4th at 07:38 PM.
SET WD=%CD%
IF [%1]==[] (
SET EXE=ts3client_win64.exe
) ELSE (
SET EXE=%1
)
@NobleUplift
NobleUplift / BackupMozilla.bat
Created September 5, 2015 19:31
Batch script for backing up Mozilla products
@ECHO OFF
REM Created on 2012 January 13th at 06:32 PM.
REM Installation Instructions
REM 1. Create your Backups/Mozilla directory and move BackupMozilla.bat into Backups.
REM 2. Open Task Scheduler (Control Panel\All Control Panel Items\Administrative Tools).
REM 3. In the root of Task Scheduler Library, click Create Task.
REM 4. Name the task Backup followed by the Mozilla project you are backing up.
REM 5. Go to Triggers and create a new trigger.
REM 6. Set the repetition and time to how frequently you want your Mozilla product backed up.
@NobleUplift
NobleUplift / ArrayTest.sh
Created September 5, 2015 19:14
No idea what this was for. Needed it in 2011 for something...
#!/bin/sh
print_array() {
eval ARRAY=\${$1[*]}
echo ${ARRAY[*]}
for ELEMENT in ${ARRAY[@]}; do
echo $ELEMENT
done
}
QUEUE=( one two three )