Skip to content

Instantly share code, notes, and snippets.

Avatar
🛠️
Tinkering

Michael Kropat mkropat

🛠️
Tinkering
View GitHub Profile
@mkropat
mkropat / hexdump.js
Last active Nov 28, 2019 — forked from igorgatis/hexdump.js
Simple hexdump in Javascript
View hexdump.js
function d(str) {
console.log(hexdump(decode(str)));
}
function decode(base64) {
base64 = base64 || '';
return atob(base64.replace(/_/g, '/').replace(/-/g, '+'));
}
function hexdump(buffer, blockSize) {
@mkropat
mkropat / statuses.md
Created Dec 6, 2015 — forked from vkostyukov/statuses.md
HTTP status codes used by world-famous APIs
View statuses.md
API Status Codes
[Twitter][tw] 200, 304, 400, 401, 403, 404, 406, 410, 420, 422, 429, 500, 502, 503, 504
[Stripe][stripe] 200, 400, 401, 402, 404, 429, 500, 502, 503, 504
[Github][gh] 200, 400, 422, 301, 302, 304, 307, 401, 403
[Pagerduty][pd] 200, 201, 204, 400, 401, 403, 404, 408, 500
[NewRelic Plugins][nr] 200, 400, 403, 404, 405, 413, 500, 502, 503, 503
[Etsy][etsy] 200, 201, 400, 403, 404, 500, 503
[Dropbox][db] 200, 400, 401, 403, 404, 405, 429, 503, 507
View provision-win81-box.ps1
# provision-win81-box.ps1 - Prepare Windows 8.1 box for general use
# To run:
#
# powershell -ExecutionPolicy Bypass -Command "& .\provision-win81-box.ps1"
function main {
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -force
Disable-UAC
@mkropat
mkropat / provision-base-box.ps1
Last active Jul 6, 2019 — forked from tvjames/Vagrantfile
Prepare Server 2012 for building a Vagrant base box
View provision-base-box.ps1
# provision-base-box.ps1 - Prepare Server 2012 for building a Vagrant base box
# Instructions:
#
# 1. Create a new Windows VM in VirtualBox
# 2. Install Server 2012 R2 onto the VM
# 3. Download and run this script from within the VM
# 4. Install Windows Updates within the VM
# 5. From the host machine, run: `vagrant package --base <name of VM in VirtualBox> --output <name>.box`
# 6. Then run: `vagrant box add <name> /path/to/<name>.box