Skip to content

Instantly share code, notes, and snippets.

View mechawrench's full-sized avatar

Mechawrench mechawrench

View GitHub Profile
@mechawrench
mechawrench / install_laravel.sh
Created December 9, 2017 05:33 — forked from UedaTakeyuki/install_laravel.sh
Install laravel 5.1 on Raspberry Pi.
# reference: http://stackoverflow.com/questions/31230133/how-to-make-a-raspberry-pi-2-laravel-5-1-server
apt-get install mysql-server mysql-client apache2 php5 php5-cli libapache2-mod-php5 php5-mysql php5-curl php5-gd php-pear php5-imagick php5-mcrypt php5-memcache php5-mhash php5-sqlite php5-xmlrpc php5-xsl php5-json php5-dev libpcre3-dev
sudo curl -sS https://getcomposer.org/installer | sudo php5
# create project
#composer.phar create-project laravel/laravel --prefer-dist projectName
#sudo chown -R www-data:www-data /var/www/
#sudo chmod -R 775 projectName
@mechawrench
mechawrench / readme.adoc
Created December 6, 2017 01:48 — forked from chevdor/readme.adoc
Sia install on Digital Ocean Ubuntu
@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;

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

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:

@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

@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 / proxy_setup_links.md
Last active November 29, 2017 06:51
Home proxy setup
#POWERSHELL
get-childitem *.json | foreach { rename-item $_ $_.Name.Replace("~$", "") }
#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