Skip to content

Instantly share code, notes, and snippets.

View wbhob's full-sized avatar
🤓
nerd face

Wilson Hobbs wbhob

🤓
nerd face
View GitHub Profile
@wbhob
wbhob / south-dakota.txt
Created February 14, 2019 20:17
How many total instances of the letter "l", "o", "r", "e", or "m" are there?
TG9yZW0gaXBzdW0gcHVydXMgYXB0ZW50IHZpdGFlIHNjZWxlcmlzcXVlIGVzdCBmcmluZ2lsbGEsIGFjIGR1aXMgdnVscHV0YXRlIHF1aXNxdWUgaGFjIGZlcm1lbnR1bSBsaXRvcmEsIHZlaGljdWxhIGV0aWFtIG1hc3NhIHBsYWNlcmF0IGF1Z3VlIHB1cnVzLgoKUHJvaW4gZXUgb3JjaSBmYXVjaWJ1cyBudWxsYW0gbm9zdHJhIHBoYXNlbGx1cyBsaWJlcm8gY3VyYWUgY29uc2VjdGV0dXIgaGFjIHN1c2NpcGl0IG1hZ25hLCBuaXNpIGRhcGlidXMgZWdlc3RhcyBhdWN0b3IgbGl0b3JhIHZ1bHB1dGF0ZSBub3N0cmEgcHJpbWlzIGNvbmRpbWVudHVtIHZpdGFlIHBsYWNlcmF0LgoKRG9sb3IgZG9uZWMgbmlzbCBoaW1lbmFlb3MgcHJhZXNlbnQgZWxlaWZlbmQgcGxhY2VyYXQgbGliZXJvIGRvbG9yLCBwb3J0dGl0b3IgZXJhdCBlZ2VzdGFzIGJsYW5kaXQgZmVsaXMgbmVjIHBvdGVudGkgYXQgdHVycGlzLCBoYWJpdGFzc2UgZW5pbSB0ZWxsdXMgaGltZW5hZW9zIGNvbW1vZG8gZXJvcyBwaGFyZXRyYSBtYXR0aXMgY29udWJpYSBhbWV0IGN1cmFlIGRhcGlidXMgZWxpdCBhbGlxdWFtIGZhbWVzIHZlaGljdWxhLCBsb3JlbSB0b3JxdWVudCBzYWdpdHRpcyBlcm9zIHZlc3RpYnVsdW0gb3JjaSBlZ2VzdGFzIGVnZXQgbGVjdHVzLCBtYWduYSBjdXJzdXMgdG9ydG9yIHZlbCBtYXVyaXMgaW50ZWdlciBuaXNpIHBvcnRhIHZpdmFtdXMgZW5pbSB2ZWxpdCBhZGlwaXNjaW5nIHBlbGxlbnRlc3F1ZSwgdGluY2lkdW50IGNvbmRpbWVudHVtIGZlbGlzIHVsdHJp
@wbhob
wbhob / sad.ts
Last active December 2, 2018 17:03
Making a while loop out of a for loop
let i = 0;
const total = 12;
for (; i < total;) {
doWhatever();
i++;
}
@wbhob
wbhob / xml-parse.ts
Created August 30, 2018 17:48
Parses XML into JSON
// INPUT XML
const xml =
`<Person>
<FirstName>John</FirstName>
<LastName>Smith</LastName>
<Contact>
<Address>
<Street>1000 East St</Street>
<City>Atlanta</City>
<Zip>30330</Zip>
@wbhob
wbhob / make-binary.js
Created August 27, 2018 14:34
Make any base-10 integer binary
function makeBinary() {
var str = '';
// get input from form field
var input = +document.getElementById('number').value;
// try subtracting every place in a 32-bit integer
for (var i = 32; i > -1; i--) {
var raised = Math.pow(2,i);
if (input - raised > -1) {
str += '1';
input -= raised;
@wbhob
wbhob / ionic-error-log.log
Created October 6, 2017 22:01
An error I am getting from Ionic Pro
Running with gitlab-ci-multi-runner 9.1.0 (0118d89)
on Prod Snapshot Builds 1 (c9648220)
Using Shell executor...
Running on ip-10-2-92-21...
Cloning repository...
Cloning into '/home/gitlab-runner/builds/c9648220/0/project-1'...
Checking out 57f3a947 as master...
Skipping Git submodules setup
$ fetch-updates
Checking for build process updates...