Skip to content

Instantly share code, notes, and snippets.

Jayson Harshbarger Hypercubed

Block or report user

Report or block Hypercubed

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View .gitignore
-/
node_modules/
package-lock.json
View .gitignore
-/
node_modules/
package-lock.json
View .gitignore
-/
node_modules/
package-lock.json
View airdrop.config.js
module.exports = {
"package_path": "./-/",
"package_root": "/-/"
}
View plugin.service.ts
import { Injectable, Injector, Compiler } from '@angular/core';
import { SettingsService } from './settings.service';
@Injectable({
providedIn: 'root'
})
export class PluginsService {
constructor(
private settings: SettingsService,
View .gitignore
node_modules
package-lock.json
@Hypercubed
Hypercubed / tvl.ts
Created Dec 23, 2017
Three-valued logic (TS)
View tvl.ts
export type bool = boolean | null;
export type cmpValue = -1 | 0 | 1;
export function not(a: bool) {
if (a === true) return false;
if (a === false) return true;
return null;
}
export function and(lhs: bool, rhs: bool): bool {
@Hypercubed
Hypercubed / index.js
Created Oct 4, 2016
requirebin sketch
View index.js
/* Given a list of positions:
('long', 50, 09-01-2015, 09-30-2015)
('short', 100, 09-15-2015, 10-15-2015)
('long', 50, 11-01-2015, 11-15,2015)
A stock like AAPL.
09-01 09-15 50
09-15 09-30 -50
09-30 10-15 -100 */
@Hypercubed
Hypercubed / index.js
Last active Sep 25, 2016
requirebin sketch
View index.js
const mobx = require('mobx');
// Pattern 1, state is updated in autorun (or action)
const state = mobx.observable({
name: 'state1',
isBoolean: false,
isString: false,
input: 1
});
You can’t perform that action at this time.