Skip to content

Instantly share code, notes, and snippets.

View mkropat's full-sized avatar
📚
Learning

Michael Kropat mkropat

📚
Learning
View GitHub Profile
@mkropat
mkropat / hexdump.js
Last active November 28, 2019 08:27 — forked from igorgatis/hexdump.js
Simple hexdump in Javascript
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 / provision-base-box.ps1
Last active July 6, 2019 04:55 — forked from tvjames/Vagrantfile
Prepare Server 2012 for building a Vagrant base box
# 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
@mkropat
mkropat / statuses.md
Created December 6, 2015 16:15 — forked from vkostyukov/statuses.md
HTTP status codes used by world-famous APIs
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
# 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