Skip to content

Instantly share code, notes, and snippets.

😤
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 / HideFollowsYou.js
Last active Mar 24, 2020
GreaseMonkey script to remove Follows You profile cards from Following page
View HideFollowsYou.js
// ==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 / AppDataSync.bat
Created Sep 17, 2016
Syncs mirrored AppData directory on data drive D:\Users\%USERNAME%\AppData\Roaming with %APPDATA%
View AppDataSync.bat
@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 / ApacheLogSorter.php
Last active Aug 10, 2016
Sorts Apache HTTP logs for multiple servers behind a load balancer
View ApacheLogSorter.php
<?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 / Warcraft III Stats.csv
Last active Apr 12, 2020
CSV of all Warcraft III units that I use for data feed testing
View Warcraft III Stats.csv
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 / VirtualFolder.bat
Created Sep 5, 2015
Symlinks every file in a hierarchy to one folder. Useful for Windows 7 Wallpapers.
View VirtualFolder.bat
@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 Sep 5, 2015
Batch script for backing up TeamSpeak
View BackupTeamSpeak.bat
@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 Sep 5, 2015
Batch script for backing up Mozilla products
View BackupMozilla.bat
@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 Sep 5, 2015
No idea what this was for. Needed it in 2011 for something...
View ArrayTest.sh
#!/bin/sh
print_array() {
eval ARRAY=\${$1[*]}
echo ${ARRAY[*]}
for ELEMENT in ${ARRAY[@]}; do
echo $ELEMENT
done
}
QUEUE=( one two three )
@NobleUplift
NobleUplift / RecursiveSystemHide.bat
Last active Sep 24, 2015
Recursively system hide the same file in a hierarchy. Useful for Folder.jpg and AlbumArt.jpg.
View RecursiveSystemHide.bat
@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 / RecursiveRemoval.bat
Created Sep 5, 2015
Recursively remove directories of the same name from a hierarchy. Useful for PaxHeaders.
View RecursiveRemoval.bat
@ECHO OFF
SET DIRECTORY=%1
REM PaxHeaders.12345
SET REMOVE=%2
FOR /R %DIRECTORY% %%F IN (.) DO (
IF EXIST %%F\NUL (
RMDIR /S /Q %%F\%REMOVE%
)
You can’t perform that action at this time.