Skip to content

Instantly share code, notes, and snippets.

View RichAyotte's full-sized avatar
🌮
tezos tacos

Richard Ayotte RichAyotte

🌮
tezos tacos
View GitHub Profile
#!/bin/bash
#
# 20210119 - Use the new --endpoint flag
# - Added verbose logging
#
# 20200608 - Updated to TzKt API
#
# 20191029 - Added /v3/network back in.
# Thanks to Baking-Bad and their Mystique API
@RichAyotte
RichAyotte / parse-har.js
Last active April 2, 2020 16:49
Parse HAR
/*
* @Author: Richard Ayotte
*/
const fs = require('fs')
const url = require('url')
const [, , harFile] = process.argv
const getJsonRpcUrls = entry =>
RegExp('https://api.infura.io/v1/jsonrpc').test(entry.request.url)
const harData = fs.readFileSync(harFile)

Keybase proof

I hereby claim:

  • I am richayotte on github.
  • I am anarcode (https://keybase.io/anarcode) on keybase.
  • I have a public key ASDZNb1MAaI6FcJehRnkJPLKSzSu1fA6TKPqpnLjPfDV8wo

To claim this, I am signing this object:

@RichAyotte
RichAyotte / baking-bad.js
Last active April 25, 2019 12:10
Baking Bad Challenge
const {default: Sotez, crypto} = require('sotez')
const sotez = new Sotez('http://127.0.0.1:8732')
const words = [
'eight'
, 'life'
, 'cycle'
, 'hub'
, 'response'
, 'suffer'
, 'useless'
@RichAyotte
RichAyotte / techelson.js
Created February 25, 2019 01:47
Techelson compiled to ecma 8
!function(ae){"use strict";var eV=104,iS="SET_DELEGATE",jg="success",q$=254,jC="CHECK_SIGNATURE",oz=" is too large for shifting.",pu="from file `",qj="Invalid_argument",gI="Map.bal",ao=16777215,qi="unable to spawn contract `%s`",gG=65599,iR="` and `",jB="operation",gM=512,fI="LE",q_="while running operation %a@.",cG=128,jX="PAIR",cb="0",b6=248,pr=-43,jW="test ",qg="CREATE_CONTRACT",pq="encountered ",ow="Sys_blocked_io",pp="fd ",qf="IF_NONE",q5=781960526,q6=2440588,po="cannot cast value `%a` to type `%a`",dh=1023,qd="@[<v>%a@,%a@,test %a@]",fK=365,pn="while evaluating `",jz="SELF",gX=">",je="%dmin",ou=-97,jc="while applying operation %a",qb="APPLY_OPERATIONS",jb="signature",pm="MUST_FAIL",iO=110,pl="cannot cast value `",p$="PrintStack",qa="illegal `SET_SOURCE` instruction found in contract transfer",q4="{ # Expansion of `",fH="GT",pj="@[@[<hv 2>{",gF="(Right ",ph="internal inconsistent state",gW="e",oq=" : flags Open_rdonly and Open_wronly are not compatible",e1="False",pg="([^/]*)",dg="-",cI=" and ",q2="canno
@RichAyotte
RichAyotte / update-tezos-systemd.sh
Last active November 26, 2018 13:20
Update Tezos systemd
#!/bin/bash
# @Author: Richard Ayotte
# @Date: 2018-11-26 08:10:54
# @Last Modified by: rich
# @Last Modified time: 2018-11-26 08:11:35
SYSTEMDPATH=/etc/systemd/system
OLDVERSION=002-PsYLVpVv
NEWVERSION=003-PsddFKi3
APPS=("baker" "endorser" "accuser")
@RichAyotte
RichAyotte / crypto.js
Created April 28, 2018 19:39
Crypto helper module
/**
* @overview Crypto helper
* @author Richard Ayotte
* @copyright Copyright © 2018 Richard Ayotte
* @date 2018-04-27 17:52:01
* @license GNU GPL-3.0
* @flow
*/
'use strict'
@RichAyotte
RichAyotte / install-vuescan.sh
Last active January 26, 2022 09:27
Install VueScan on Debian
#!/bin/bash
#title :install-vuescan.sh
#description :This script will install VueScan onto a Debian system
#author :Richard Ayotte
#usage :install-vuescan.sh vuescan.tgz
#requirements :alien, the Industrial GTK theme and sudo access
#==============================================================================
if [ "$#" -ne 1 ]; then
echo "You must specify the VueScan tgz file."
@RichAyotte
RichAyotte / advise-find-dataloader.js
Created November 18, 2017 03:13
Sequelize Dataloader Advices
/**
* @overview Sequelize find - dataloader advice
* @author Richard Ayotte
* @copyright Copyright © 2017 Richard Ayotte
* @date 2017-11-03
* @license GNU GPL-3.0
* @flow
*/
'use strict'
@RichAyotte
RichAyotte / self-cert.sh
Created May 9, 2017 22:31
Self signed cert on Linux for Chrome 58+
#!/bin/sh
openssl req \
-newkey rsa:2048 \
-x509 \
-nodes \
-keyout server.pem \
-new \
-out server.pem \
-subj /CN=localhost \