Skip to content

Instantly share code, notes, and snippets.

View jason-s13r's full-sized avatar

Jason Schwarzenberger jason-s13r

View GitHub Profile
@jason-s13r
jason-s13r / qif2json.ts
Last active July 16, 2019 23:16
This is qif2json.ts is a minor refactor to bring Typescript support to the qif2json package available on NPM. It is the basic QIF parsing without any other requirements from Node (fs) or NPM (iconv, jschardet). This means that it is possible to do the QIF parsing in the browser.
/* Adapted by Jason Schwarzenberger
* for Typescript from
* qif2json
* https://github.com/spmason/qif2json
*
* Copyright (c) 2012 Steve Mason
* Licensed under the MIT license.
*/
function parseDate(str: string, format: string) {
@jason-s13r
jason-s13r / fizzbuzz.js
Last active June 25, 2020 05:28
Displays FizzBuzz without containing the string "Fizz" or "Buzz". Reads the source and extracts the characters from the destructured function parameters. https://jsfiddle.net/master5o1/8ekog4j9/
const GO=( F,i,z,{[z[0 ]]:B},u, zz)=>B((F% u?'':GO[z [u/ u]] ()[z[zz- zz/zz]](u-
u,u **u +zz -zz )[z [u] ](z [zz ],'' )[
z[/* **/ zz- u/u] ](u -u, zz- u/u ))+ (F%
zz?'':GO[z [u/ u]] ()[ z[zz-zz/ zz] ](u -u,u **u
+zz -zz )[z [u] ](z [zz ],'' )[z [zz -u/
u]] (zz -u/ u)) ||F )|| F< zz** u-u **u
+zz -u?GO(F+1,i ,z,i[z[u- zz/zz]],u ,zz):null ;//)[z[z z-u/u]])[ z[zz-u/u]
GO(1,this,['log', 'toString', 'console', 'replace', 'substring', /[^a-z]/gi],console,3,5);
@jason-s13r
jason-s13r / html-quine.html
Last active June 3, 2020 00:35
html (+js) quine using data:text/html, for the url bar of a browser.
data:text/html,<html><body><div></div><script>document.getElementsByTagName('div')[0].innerText = 'data:text/html,' + document.getElementsByTagName('html')[0].innerHTML</script></body></html>

Keybase proof

I hereby claim:

  • I am master5o1 on github.
  • I am master5o1 (https://keybase.io/master5o1) on keybase.
  • I have a public key whose fingerprint is 943F 643F 3D22 A79E AB07 85D2 4773 2B7C A17C F5FD

To claim this, I am signing this object:

@jason-s13r
jason-s13r / angular-websocket-rpc.js
Last active March 23, 2016 22:17
angular websockets json-rpc2 service that uses [angular-websockets](https://github.com/AngularClass/angular-websocket). JSFiddle example: https://jsfiddle.net/master5o1/bxvauLcw/
angular.module('ngWebsocketRpc', ['ngWebSocket', 'guid'])
.factory('$rpc', ['$websocket', '$q', 'guid', function($websocket, $q, guid) {
var seconds = 1000;
var history = {};
var methods = {};
var $ws;
var handlers = {
onOpen: angular.noop,
onClose: angular.noop,
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1
mQINBFbZPwEBEACsF8oNkQ/LSe4bS7bqjeTzfV+c3F+QFMDq5c/Z40YLlg4dILEz
CxnfAGj5+F8Gxele/WKicf8YRhsMTXbarFuL5PKibiQPFAE2Jo06TbIRHqc1GW1C
xDplF0sww7Kl/D1ly++xp7MQV4bJZz1U+mUxylPLNpM9Xd6WuSv0xN8dN4cALVnB
vu/G/6+qrsJ/rLsPqdPSPttET5g5p7dRaXpKY8RlRFh+RBsZ0f4+7x9pCkvJrgEZ
NcTzjn/r/r7Vk0GGrp8PxNrOTTXelljkMxK60KZvTSL5+ksdX0d1GJ8Nxm9Ah5LY
XmMjv09XD/5YFG6RkE9itPIwfk7+aJ4T6hAgrJBAUa4kytkTgJwAUkarn77hfHad
rFK7hlxRBmR5ntYNmr0QkoQ1buHSJ2szr72uXSfoobP3Onig0Z0G04fkTU0tFBVy
"""
lolcryption.py
Translates text into LOLcrypted ciphertext. <http://lolcryption.master5o1.com/>
Created By:
- Jason Schwarzenberger <https://github.com/master5o1>
License:
MIT
"""
from cloudbot import hook
<a href="http://www.radionz.co.nz/podcasts/atthemovies.rss">http://www.radionz.co.nz/podcasts/atthemovies.rss</a>
<br /> <a href="http://www.radionz.co.nz/podcasts/aucklandstories.rss">http://www.radionz.co.nz/podcasts/aucklandstories.rss</a>
<br /> <a href="http://www.radionz.co.nz/podcasts/bestoftheweek.rss">http://www.radionz.co.nz/podcasts/bestoftheweek.rss</a>
<br /> <a href="http://www.radionz.co.nz/podcasts/businessnews.rss">http://www.radionz.co.nz/podcasts/businessnews.rss</a>
<br /> <a href="http://www.radionz.co.nz/podcasts/checkpoint.rss">http://www.radionz.co.nz/podcasts/checkpoint.rss</a>
<br /> <a href="http://www.radionz.co.nz/podcasts/downthelist.rss">http://www.radionz.co.nz/podcasts/downthelist.rss</a>
<br /> <a href="http://www.radionz.co.nz/podcasts/focusonpolitics.rss">http://www.radionz.co.nz/podcasts/focusonpolitics.rss</a>
<br /> <a href="http://www.radionz.co.nz/podcasts/greatencounters.rss">http://www.radionz.co.nz/podcasts/greatencounters.rss</a>
<br /> <a href="http://www.radionz.
@jason-s13r
jason-s13r / MockAjax.js
Last active August 29, 2015 14:24
silly little thing.
function MockAjax() {
var self = this;
var responses = {
'http://api.example.com/cart/add.json?a=5&b=3': {
"data": 8
}
};
function request(url, success, failure) {
window.setTimeout(function () {
function hangman(word) {
var reference = word.replace(/[a-zA-Z]/g,'-');
function reveal(letter) {
reference = reference.split('').map(function(v, i){
return word[i] === letter ? letter : v;
}).join('');
return reference;
};
return {
reveal: reveal