Skip to content

Instantly share code, notes, and snippets.

View jhuckaby's full-sized avatar

Joseph Huckaby jhuckaby

View GitHub Profile
@alirobe
alirobe / reclaimWindows10.ps1
Last active April 26, 2024 17:59
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
###
@juliangruber
juliangruber / README.md
Last active March 24, 2021 02:00
lightweight node-websocketd

node-websocketd

A lightweight node port of websocketd, originally written in go.

Usage

node-websocketd --port=8080 ./count.sh
@kevingessner
kevingessner / parent.htm
Created May 17, 2013 13:09
Detect browser zoom in javascript 'zoom' event is triggered on window on every browser zoom change. No polling!
<html>
<head>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
</head>
<body>
<iframe id="frame" style="width: 250px; border: solid 1px red;" ></iframe>
<script type="text/javascript">
var elFrame = $('#frame')[0];
$(elFrame.contentWindow).resize(function() {
$(window).trigger('zoom');
@tdack
tdack / overviewer_config.py
Created September 12, 2012 12:09
Minecraft Overviewer dynamic config file
# Minecraft Overviewer dynamic config file for multiple Minecraft worlds
# managed by MSM (https://github.com/marcuswhybrow/minecraft-server-manager)
import os
# Define where to put the output here.
outputdir = "/storage/www/vhosts/minecraft.example.com"
# Add Javascript to map when rendering
from observer import JSObserver
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active May 2, 2024 03:13
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
@jhuckaby
jhuckaby / subl.pl
Created July 8, 2012 03:37
A better subl for launching Sublime Text 2 via the command-line (forces file to open in new window)
#!/usr/bin/perl
# A replacement for Sublime Text 2's built-in "subl" command-line utility,
# which forces files into new windows regardless of prefs.
# by Joseph Huckaby, 2012
use strict;
use Cwd qw/abs_path/;
use FileHandle;
@jhuckaby
jhuckaby / parseQueryString.js
Last active September 26, 2015 16:28
Parse query string into key/value pairs and return as object
function parseQueryString(url) {
// parse query string into key/value pairs and return as object
var query = {};
url = (url || location.search).replace(/^.*\?/, '').replace(/([^\=]+)\=([^\&]*)\&?/g, function(match, key, value) {
query[key] = decodeURIComponent(value);
return '';
} );
return query;
}
@jonleighton
jonleighton / base64ArrayBuffer.js
Last active April 19, 2024 21:54
Encode an ArrayBuffer as a base64 string
// Converts an ArrayBuffer directly to base64, without any intermediate 'convert to string then
// use window.btoa' step. According to my tests, this appears to be a faster approach:
// http://jsperf.com/encoding-xhr-image-data/5
/*
MIT LICENSE
Copyright 2011 Jon Leighton
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: