Skip to content

Instantly share code, notes, and snippets.

import * as BigNum from 'bn.js';
import * as qs from 'qs';
import axios from 'axios';
import {
makeSTXTokenTransfer,
StacksNetwork,
TransactionVersion,
ChainID,
getPublicKey,
createStacksPrivateKey,
@kyranjamie
kyranjamie / post-conditions.ts
Created April 21, 2020 08:49
generated post conditions
export interface PostConditionFungible {
principal:
| {
typeId: 1;
}
| {
typeId: 2;
/**
* Raw data is stored in instances of the Buffer class.
* A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized.
@kyranjamie
kyranjamie / index.html
Created December 5, 2019 11:12
Popup in browser, new tab when mobile/blocked
<!DOCTYPE html>
<html>
<head>
<title>Popup test</title>
</head>
<body>
<button class="js-button">Open popup</button>
</body>
<script>
const btn = document.querySelector('.js-button');
const getNextIndex = (currentIndex: number, array: any[]) =>
currentIndex === array.length - 1 ? 0 : currentIndex + 1;
const getPreviousIndex = (currentIndex: number, array: any[]) =>
currentIndex === 0 ? array.length - 1 : currentIndex - 1;
function moveLetters (input: string) {
const sentence = input.split(' ');
return sentence
.map((currentWord, index) => {
Verifying my Blockstack ID is secured with the address 1BEbuhJa19bczuX3HVBMgk6qc5yo2687Wx https://explorer.blockstack.org/address/1BEbuhJa19bczuX3HVBMgk6qc5yo2687Wx

Keybase proof

I hereby claim:

  • I am kyranjamie on github.
  • I am kyranjamie (https://keybase.io/kyranjamie) on keybase.
  • I have a public key ASDVyzabdgLv_BWiUUyspJq8WVroMlXMPgdbDatBzdAavwo

To claim this, I am signing this object:

const $RefParser = require('json-schema-ref-parser');
const fs = require('fs-extra');
const chokidar = require('chokidar');
const glob = require('glob');
const _ = require('lodash');
const path = require('path');
const args = require('yargs').argv;
const chalk = require('chalk');
const schemas = 'src/**/*.schema.json';
define(["require", "exports"], function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Account = /** @class */ (function () {
function Account() {
}
Account.prototype.entityType = function () {
return this.companyType;
};
Account.prototype.completeAddress = function () {

Keybase proof

I hereby claim:

  • I am kyranjamie on github.
  • I am kyranjamie (https://keybase.io/kyranjamie) on keybase.
  • I have a public key ASD8jeThJKMR8Qd2EL2d96nJ22sZ0OfVhW03gkXyFeTj3wo

To claim this, I am signing this object:

<item>
<name>Hold num key to symbol</name>
<appendix>Input symbol on hold of number key</appendix>
<identifier>private.num_change</identifier>
<autogen>__HoldingKeyToKey__
KeyCode::KEY_1,
KeyCode::KEY_1,