Skip to content

Instantly share code, notes, and snippets.

@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 () {
@kyranjamie
kyranjamie / countries.enum.ts
Last active April 28, 2024 09:30
TypeScript enum Country Codes ISO 3166
export enum Country {
Afghanistan = 'AF',
AlandIslands = 'AX',
Albania = 'AL',
Algeria = 'DZ',
AmericanSamoa = 'AS',
Andorra = 'AD',
Angola = 'AO',
Anguilla = 'AI',
Antarctica = 'AQ',

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:

@kyranjamie
kyranjamie / keycodes.ts
Created August 3, 2016 10:07
TypeScript Browser Key Codes Enum
enum keyCodes {
BACKSPACE: 8,
TAB: 9,
ENTER: 13,
SHIFT: 16,
CTRL: 17,
ALT: 18,
PAUSE: 19,
CAPS_LOCK: 20,
ESCAPE: 27,
# Git
alias g="git"
alias commits="git shortlog -sn"
alias gl="git log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --"
alias gs="git status"
alias ga="git add"
alias gc="git commit -m"
alias gp="git push"
alias gpl="git pull"
alias gd="git diff"