Skip to content

Instantly share code, notes, and snippets.

View jason-s13r's full-sized avatar

Jason Schwarzenberger jason-s13r

View GitHub Profile
var crypto = require('crypto');
var request = require('request');
module.exports = function BitNZ(username, apiKey, apiSecret) {
var self = this;
var hostname = 'https://bitnz.com';
var api = '/api/0';
var noop = function() {};
var sign = function(obj){
@jason-s13r
jason-s13r / example-1.txt
Last active June 3, 2020 04:56
An early prototype of Theucon primes-based text scrambling. Related to lolcryption.
"Ter aen larii uo.aer oaohhsb ehwkarc h ehJheeaenn t nrfi u ptomma etangdoyrds. pWv semse "
"T-er- -a---e-n--- -l---a-----r-i-----i--- -u---o-----.-----a-e-----r--- -o-----a---o-----"
"Ther- has-be-n -- -le-ha---w-rki---a-i--- -ur-co-----. ---ha-e ---er--- -o-h---a--Jo-h---"
"There has-been a- ele-han--w-rkin- a-i--t -ur co---n-. ---ha-e r-fer--- -o-hi--a- Jo-hu--"
"There has been a- elephant-workin- ami--t -ur com-an-. -- ha-e refer--- to-hi--a- Jo-hua-"
"There has been an elephant-working amid-t our com-any. -- ha-e referr-d to-hi--as Jo-hua."
"There has been an elephant working amid-t our company. W- have referr-d to hi--as Jo-hua."
"There has been an elephant working amidst our company. W- have referred to him-as Joshua."
"There has been an elephant working amidst our company. We have referred to him-as Joshua."
@jason-s13r
jason-s13r / gist:9359839
Last active August 29, 2015 13:57
WIP: LOLcryption in BrainFuck. Cannot handle characters with a code less than 'a'. Will infinite loop in that case. If it isn't an [a-z] then it should just echo the character. Try it out at http://brainfuck.master5o1.com
,[
---------- ---------- ---------- ---------- ----------
---------- ---------- ---------- ---------- ------- a
[- b
[- c
[- d
[- e
[- f
[- g
[- h
@jason-s13r
jason-s13r / brainfuck.js
Last active August 29, 2015 13:56
unfinshed brainfuck interpreter in js. Still need to do [ and ].
console.group('helloWorld');
var helloWorldScript = 'this is hello world: ++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.';
var helloWorld = new BrainFuck(helloWorldScript);
console.log('script:', helloWorldScript);
console.log('validate:', helloWorld.validate());
console.log('execute:', helloWorld.execute());
console.groupEnd('helloWorld');
function BrainFuck(str, cells) {
javascript:window.setInterval(function(){$("#clickers, #sellers, #upgrades, #banks").find('[id$="_cst"]').each(function(){var b=$(this),a=b.text().replace(/[\$,]/g,""),c=a.replace(/[0-9\.]/g,""),a=1*a.replace(/[A-Z]/,""),c={Q:1E15,T:1E12,B:1E9,M:1E6}[c]||1,a=a*c,d=$("#seller_rps"),c=$("#sell_amt"),d=d.text().replace(/,/g,""),c=c.text().replace(/,/g,""),a=(a-c)/d,b="#"+b.attr("id").replace("_cst","_btn"),b=$(b);0<a?(a="Purchase in "+a.toFixed(0)+" seconds",b.html(a)):b.html("Purchase")})},1E3);
@jason-s13r
jason-s13r / thing about Question.js
Last active December 18, 2015 10:39
Why do I even do these things.
// Consider this a class for the Question object.
function Question(question) {
var self = this;
// Private variables:
var correct = null;
var answers = [];
// Public Methods:
@jason-s13r
jason-s13r / array things.js
Last active December 18, 2015 03:39
I've been nursing this in a JS Fiddle for a short time now. Just been playing with the LINQ methods and how they would be in JS. I find OrderBy and GroupBy are interesting.
var run = function (arr) {
'use strict';
var onlyStrings = l('x => typeof x === "string"');
var onlyNums = l('x => typeof x === "number"');
var selector = l('x => typeof x');
var grouper = l('x => typeof x');
var selectE = l('x => x');
var evenIndex = l('(x, index) => index % 2 === 0');
console.clear();
# vim: noai:ts=4:sw=4:expandtab:syntax=python
import re
from xbotpp.modules import Module
class lolcrypt(Module):
"""\
Provide lolcryption.
"""
(function(_){
_.mixin({
wordCaps: function(s){
return s.toLowerCase()
.replace(/^[a-z]/, function(a){ return a.toUpperCase(); })
.replace(/ [a-z]/g, function(a){ return a.toUpperCase(); });
},
camelCase: function(s){
return _.wordCaps(s).replace(/ /g, '');
},
map = (list, func = ((x, i, l) -> x)) ->
result = (func(elem, index, list) for elem, index in list)
return result
each = (list, func) ->
map(list, func)
return
filter = (list, func = ((x, i, l) -> x)) ->
result = []