Skip to content

Instantly share code, notes, and snippets.

View apaleslimghost's full-sized avatar
๐Ÿ’š
a pale slim ghost

Kara Brightwell apaleslimghost

๐Ÿ’š
a pale slim ghost
View GitHub Profile
{
"data": {
"items": [
{
"symbolInput": "GBPEUR",
"basic": {
"symbol": "GBPEUR",
"name": "UK Pound Sterling/Euro FX Cross Rate",
"exchange": "SOURCE IS A THOMSON REUTERS CONTRIBUTOR",
"exhangeCode": "RCT",

x-engine (please don't use it)

what x-engine does

all JSX components need to be able to import from a framework to get access to e.g. React.createElement:

import React from 'react'
export default () => <h1>It works</h1>
// export default () => React.createElement('h1', {}, 'It works')
@apaleslimghost
apaleslimghost / upload-to-s3.sh
Last active October 3, 2019 11:58 — forked from i-like-robots/upload-to-s3.sh
Upload client-side assets to S3 via AWS CLI
#!/bin/bash
DESTINATION_BUCKET="hashed-assets-eu"
DESTINATION_FOLDER="page-kit"
upload_file() {
local FILE="$1"
local ENCODING
local TYPE
operation fixable state what to do
add-to-project card already exists use the existing card in the state
clone clone already exists fetch and reset to origin/master (it's already kind of)
create-project n/a
file n/a
filter-repo-name n/a
get-project n/a
// inlined from https://github.com/chalk/ansi-regex/blob/master/index.js
const regex = /[\u001B\u009B][[\]()#;?]*(?:(?:(?:[a-zA-Z\d]*(?:;[-a-zA-Z\d\/#&.:=?%@~_]*)*)?\u0007)|(?:(?:\d{1,4}(?:;\d{0,4})*)?[\dA-PR-TZcf-ntqry=><~]))/g
module.exports = string => typeof string === 'string' ? string.replace(regex, '') : string
[
[ "steel", "normal" ],
[ "ice", "poison" ],
[ "rock", "normal" ],
[ "ground", "fighting" ],
[ "fairy", "poison" ],
[ "dragon", "bug" ],
[ "bug", "normal" ],
[ "fairy", "dark" ],
[ "ice", "bug" ],
[
[ "ghost", "steel" ],
[ "dark", "bug" ],
[ "flying", "water" ],
[ "normal", "steel" ],
[ "fire", "ice" ],
[ "fire", "bug" ],
[ "poison", "ice" ],
[ "bug", "ice" ],
[ "dragon", "normal" ],
#!/usr/bin/env node
const banner = `
โ”โ”โ”โ”โ”โ”โ”โ”ฑโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”ƒ โœ โ”ƒ โ•ญโ”€โ•ฎ โ•ญโ”€โ•ฎ โ•ญโ”€ ยท โ”‚
โ”ƒโŽ› โŽž โ”ƒ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚
โ”ƒโŽฉ_โ–‘โ–‘โŽญ โ”ƒ โ•ต โ•ต โ•ฐโ”€โ•ฏ โ•ต โ•ต โ”‚
โ”—โ”โ”โ”โ”โ”โ”โ”นโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
`
@apaleslimghost
apaleslimghost / create-lint.js
Last active April 13, 2020 14:09
name: @quarterto/create-lint
#!/usr/bin/env node
const loadPackageJson = require('@financial-times/package-json')
const { execSync } = require('child_process')
const packageJson = loadPackageJson({ filepath: './package.json' })
const coffee = process.argv[2] === 'coffee'
packageJson.requireDependency({ pkg: 'husky', version: '^2.3.0', field: 'devDependencies' })