This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Define an array of keywords to search for ... somehow | |
$keywords = array('term1', 'term2', 'term3'); | |
// Define input & output | |
$input_file = 'input.mm'; | |
// $output_file = 'output.mm'; | |
// Load the FreeMind XML file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get private stuff from my .env file | |
require('dotenv').config(); | |
const Config = process.env; | |
// Utils | |
const fs = require('fs'); | |
const util = require('util'); | |
const BigNumber = require('bignumber.js'); | |
// Ethereum javascript libraries needed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const moment = require('moment'); | |
const util = require('util'); | |
const pause = util.promisify((a, f) => setTimeout(f, a)); | |
export class Ticker { | |
#timeout = null; | |
interval = 0; // ms | |
duration = 0; // ms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// fn to handle jsonp with timeouts and errors | |
// hat tip to Ricardo Tomasi for the timeout logic | |
$.getJSONP = function(s) { | |
s.dataType = 'jsonp'; | |
$.ajax(s); | |
// figure out what the callback fn is | |
var $script = $(document.getElementsByTagName('head')[0].firstChild); | |
var url = $script.attr('src') || ''; | |
var cb = (url.match(/callback=(\w+)/)||[])[1]; |