Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Decentralizing...

Eric Muyser ericmuyser

💭
Decentralizing...
View GitHub Profile
View crypto-brain.ts
const observables: any = {}
const subjects: any = {}
observables.log = Observable.create(subject => {
subjects.log = subject
})
function log(...msgs) {
console.log(...msgs)
@ericmuyser
ericmuyser / canada-lotto-max.js
Created Sep 30, 2019
Number pick generate for Canada Lotto Max
View canada-lotto-max.js
const pastWinners = [
[2, 3, 4, 8, 9, 20, 30],
[10, 15, 16, 17, 19, 27, 38],
[18, 31, 38, 45, 46, 47, 48],
[8, 9, 12, 20, 22, 27, 30],
[25, 28, 31, 36, 42, 44, 49],
[3, 9, 15, 16, 19, 45, 48],
[1, 3, 5, 10, 16, 27, 43],
[3, 12, 21, 34, 37, 38, 41],
[2, 4, 18, 19, 20, 39, 44],
We couldn’t find that file to show.
@ericmuyser
ericmuyser / token-economics.md
Created Nov 20, 2017
Blockchain Token Economics
View token-economics.md
  • Token entitles you to earnings based on other participant actions (eg. COSS)
  • Token is burned/bought back at a future date (decreasing supply increases value)
  • Token is required for exclusive abilities/features (participating in hosted ICOs eg. BNB)
  • Token is required as a membership fee, consumed monthly/yearly (eg. Salt)
  • Token is required to be held, but not consumed.
  • Token is required to make operations inside the ecosystem (eg. Ethereum)
  • Token is held purely on speculation of ecosystem demand (eg. B2BX)
  • Token is required for voting purposes (eg. District0x)
  • Token is used to incentivize contributors/miners (eg. 0x, ChainLink)
  • Token must be purchased by app developers to allow users to interact freely.
@ericmuyser
ericmuyser / zshrc.sh
Created Jun 14, 2016
Persistent iTerm Tab Titles
View zshrc.sh
# $1 = type; 0 - both, 1 - tab, 2 - title
# rest = text
setTerminalText () {
# echo works in bash & zsh
local mode=$1 ; shift
echo -ne "\033]$mode;$@\007"
}
set_tab_name () { setTerminalText 1 $@; }
stt_title_name () { setTerminalText 2 $@; }
@ericmuyser
ericmuyser / template.html
Last active Apr 26, 2016
Dust.js component usage
View template.html
<!-- Expose keys of the `accordion` object to the scope -->
{#accordion}
<div class="accordion-wrapper">
<!-- Output a component called `accordion` and pass it `items` + `class` -->
{@c-accordion items=items class="padding-top-small"}
<!-- Override the `footer` block -->
{:footer}
<!-- Iterate the `links` array and expose keys of each object -->
{#links}
<!-- Output a component called `link` and pass it a `class` -->
@ericmuyser
ericmuyser / api.js
Created Feb 22, 2016
Barebones Node.js API
View api.js
module.exports = function(app) {
function sendResponse(res, callback, code, message, data) {
var data = {code: code, message: message, data: data};
var content;
if (callback) {
content = callback + '(' + JSON.stringify(data) + ')';
res.writeHead(200, {
'Content-Length': lengthInUtf8Bytes(content),
View reflow.js
function reflowLayout() {
// Add this arbitrary margin-bottom to force a reflow
$('html').css('zoom', 1.001);
// We need the timeout for this zoom hack to work on all devices
setTimeout(function() {
$('html').css('zoom', 1);
}, 100);
}
@ericmuyser
ericmuyser / networth.html
Created May 22, 2013
Dashboard for net worth + current TODO list. Keeps you motivated? Currently over invested in ASICMINER, lol.
View networth.html
<html>
<body>
<div style="text-align: center">
<br />
<br />
<img id="am_value" src="" style="width: 700px; " />
<br />
<textarea id="todo" rows="20" cols="120"></textarea>
</div>
<script>
View speedtrain.sh
#!/bin/bash
#:Title : Speedtrain on Rails
#:Date :
#:Author : Obi Akubue, Eric Muyser
#:Version : 1.0
#:Description: This script installs Ruby on Rails on Ubuntu 12.04 with the option to install Apache and Phusion Passenger. (It creates a test rails app)
#Usage Option 1: To Install Rails (Ruby + Rubygems) + Sqlite. Simply run the script by typing ./speedtrain
#Usage Option 2: To Install Rails (Ruby + Rubygems) + Sqlite + MySQL + Apache + Passenger. Run script by typing ./speedtrain -p