Skip to content

Instantly share code, notes, and snippets.

View mechawrench's full-sized avatar

Mechawrench mechawrench

View GitHub Profile
/**
* @filename Idle.js
* @desc Idle Script
*/
function Idle() {
while (true) {
delay(5000);
me.weaponswitch();
}
#Windows CMD Prompt (As Administrator)
#http://superuser.com/questions/379375/how-can-i-set-the-compatibility-mode-for-an-executable-from-the-command-line
#Command to Run
for %x in ("*.exe") do reg.exe Add "HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "%~fx" /d "WINXPSP2" -f
#POWERSHELL
get-childitem *.json | foreach { rename-item $_ $_.Name.Replace("~$", "") }
@mechawrench
mechawrench / proxy_setup_links.md
Last active November 29, 2017 06:51
Home proxy setup
@mechawrench
mechawrench / Windows dupe file
Last active November 29, 2017 06:46
Batch copy + rename, windows (D2)
@echo off
for /L %%i IN (1,1,100) do call :docopy %%i
goto end
:docopy
set FN=%1
set FN=%FN:~-3%
copy game.exe game_%FN%.exe
@mechawrench
mechawrench / docker_commands.md
Last active November 29, 2017 06:50
Docker Container Cleanup

List all containers (only IDs) docker ps -aq

Stop all running containers docker stop $(docker ps -aq)

Remove all containers docker rm $(docker ps -aq)

Remove all images

Keybase proof

I hereby claim:

  • I am mechawrench on github.
  • I am schneiderj (https://keybase.io/schneiderj) on keybase.
  • I have a public key ASAj6Q_T-w-IWrOgHqSqsplljqYQWgp2EniSOJLOFrsHqgo

To claim this, I am signing this object:

php -r "require 'vendor/autoload.php'; echo str_random(32).PHP_EOL;"

@mechawrench
mechawrench / discord_pm_delete.js
Last active December 3, 2017 04:27
Discord delete own PM's
var before = LASTMESSAGEID;
clearMessages = function(){
const authToken = "TOKEN";
const channel = window.location.href.split('/').pop();
const baseURL = `https://discordapp.com/api/channels/${channel}/messages`;
const headers = {"Authorization": authToken };
let clock = 0;
let interval = 500;
@mechawrench
mechawrench / readme.adoc
Created December 6, 2017 01:48 — forked from chevdor/readme.adoc
Sia install on Digital Ocean Ubuntu