Skip to content

Instantly share code, notes, and snippets.

Eth wrangling.

justin j. moses justinjmoses

Eth wrangling.
Block or report user

Report or block justinjmoses

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 3box.js
justinjmoses / populate-historic.js
Last active May 10, 2020
A JSON file of historic versions of Synthetix
View populate-historic.js
'use strict';
const fs = require('fs');
const path = require('path');
const util = require('util');
const execFile = util.promisify(require('child_process').execFile);
const commander = require('commander');
const program = new commander.Command();
justinjmoses /
Created May 9, 2020
Git: get historical versions of a filepath: adapted from
# we'll write all git versions of the file to this folder:
# take relative path to the file to inspect
# ---------------- don't edit below this line --------------
justinjmoses /
Last active Apr 18, 2020
Buidler v Truffle on Synthetix
# adapted from
function git-delete-squashed() {
git checkout -q $BASE_BRANCH &&
git for-each-ref refs/heads/ "--format=%(refname:short)" |
while read branch;
do mergeBase=$(git merge-base $BASE_BRANCH $branch) && [[ $(git cherry $BASE_BRANCH $(git commit-tree $(git rev-parse $branch\^{tree}) -p $mergeBase -m _)) == "-"* ]] &&
git branch -D $branch;
View snippets.js
// Place your snippets for JavaScript React here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
"Print to console": {
"prefix": "log",
"body": [
View snxdata.js
window.snxData=function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return,t)},n.p="",n(n.s=2)}([function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catc
justinjmoses / sub.js
Last active Dec 1, 2019
Synthetix subgraph websocket
View sub.js
'use strict';
const WebSocket = require('ws');
const client = new WebSocket('wss://', [
client.on('open', () => {
View async-foreach.js
// Useful if you want to run a bunch of promises in serial (which admittedly isn't very often frankly)
exports.asyncForEach = async (array, callback) => {
for (let index = 0; index < array.length; index++) {
await callback(array[index], index, array);
justinjmoses / index.html
Created Oct 20, 2019
Synthetix top holders lock status
View index.html
<header><img src="" /></header>
<p class="helper-text">Note: these results aren't strictly ordered to increase performance.</p>
<button name="begin">Begin</button>
<button name="stop">Stop</button>
<li id="tokenHolders"><strong>Token Holders:</strong><var>?</var></li>
You can’t perform that action at this time.