Skip to content

Instantly share code, notes, and snippets.

@jeremyredhead
jeremyredhead / wifi-toggle.ps1
Last active May 21, 2020 17:20
WiFi Toggling Script for AT&T BGW210 routers
$wifiUrl = 'http://192.168.1.254/cgi-bin/wmacauth.ha'
$deviceCode = ';)' # in plaint sight... ah well
function hex_md5($str) {
$md5 = New-Object -TypeName System.Security.Cryptography.MD5CryptoServiceProvider
$utf8 = New-Object -TypeName System.Text.UTF8Encoding
$hash = [System.BitConverter]::ToString($md5.ComputeHash($utf8.GetBytes($str)))
return $hash.Replace('-', '').ToLower()
}
@jeremyredhead
jeremyredhead / markdown-wip.rb
Last active March 25, 2020 03:24
WIP Ruby Code for Eventual Use in a Markdown Parser
=begin title
EXCESSIVELY ANNOTATED WORK IN PROGRESS RUBY CODE FOR EVENTUAL USE IN A HOMEMADE MARKDOWN PARSER
=end # title
# half-baked WIP for a markdown generator i am fixin' to write
# (for personal use, this thing will make orignal markdown.pl look clean :P)
class Element
# attr_* methods are library helpers,
# they create setters & getters which correspond to a @ClassVar of the same name
@jeremyredhead
jeremyredhead / README.md
Last active January 21, 2019 06:07
SCRIPT-8
@jeremyredhead
jeremyredhead / euph-osd.xml
Created October 30, 2018 19:03
Euphoria OpenSearch Room Shortcut
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"
xmlns:moz="http://www.mozilla.org/2006/browser/search/">
<ShortName>Euphoria</ShortName>
<Description>Visit Euphoria Rooms</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width="32" height="32" type="image/png">https://euphoria.io/static/favicon.png</Image>
<Url type="text/html" method="get" template="https://euphoria.io/room/{searchTerms}/" />
<moz:SearchForm>https://euphoria.io/room/list/</moz:SearchForm>
</OpenSearchDescription>
@jeremyredhead
jeremyredhead / lazy.js
Created October 3, 2017 18:13
Lazy? the JS "Library"
/* Lazy?, the JS "Library" is (c) Jeremy Wilhelm, licensed MIT */
window.doc = document
window.head = document.head
window.body = document.body
window.$ = document.querySelector.bind(document)
window.$$ = document.querySelectorAll.bind(document)
Element.prototype.byId = Element.prototype.getElementById
Element.prototype.byClass = Element.prototype.getElementsByClassName