SPC q q
- quitSPC w /
- split window verticallySPC w -
- split window horizontallySPC 1
- switch to window 1SPC 2
- switch to window 2SPC w d
- delete current windowSPC TAB
- switch to previous bufferSPC b b
- switch buffers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ApplicationRef, ComponentRef, createComponent, Type } from "@angular/core"; | |
import { createApplication } from "@angular/platform-browser"; | |
import React, { useEffect, useRef, useState } from "react"; | |
type AnyComponentRef = ComponentRef<unknown>; | |
export type ReactifyProps = { | |
component: Type<unknown>; | |
inputs?: Record<string, unknown>; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function mergeUint8Arrays(...arr: Uint8Array[]) { | |
const size = arr.reduce((acc, v) => acc + v.byteLength, 0); | |
let merged = new Uint8Array(size); | |
let offset = 0; | |
for (const u of arr) { | |
merged.set(u, offset); | |
offset += u.byteLength; | |
} | |
return merged; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useEffect } from 'react' | |
import hotkeys from 'hotkeys-js' | |
export const useHotkeys = (key: string, cb: () => any, inputs?: any[]) => { | |
useEffect(() => { | |
hotkeys(key, cb) | |
return () => hotkeys.unbind(key) | |
}, inputs) | |
} |
Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns my.promises | |
"Demo to show different approaches to handling promise chains in ClojureScript | |
In particular, this file investigates how to pass data between Promise | |
callbacks in a chain. | |
See Axel Rauschmayer's post | |
http://2ality.com/2017/08/promise-callback-data-flow.html for a problem | |
statement. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const createLogger = (backgroundColor, color) => { | |
const logger = (message, ...args) => { | |
if (logger.enabled === false) { | |
return; | |
} | |
console.groupCollapsed( | |
`%c${message}`, | |
`background-color: ${backgroundColor}; color: ${color}; padding: 2px 4px;`, | |
...args |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "aws_api_gateway_rest_api" "myApi" { | |
name = "myApi-${var.env}" | |
description = "My awesome API (${var.env} environment)" | |
} | |
resource "aws_api_gateway_deployment" "myApi" { | |
depends_on = [ | |
"aws_api_gateway_integration.myApi_myEndpoint_post", | |
"aws_api_gateway_integration_response.myApi_myEndpoint_post", | |
"aws_api_gateway_integration_response.myApi_myEndpoint_post_400", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Template for slack chat msg | |
def slackBaseMsg = "*${env.JOB_NAME}* <${env.BUILD_URL}|#${env.BUILD_NUMBER}>" | |
// Base Predix/tmca repo | |
def projectName = 'ge-pae' | |
def tmcaBranch = 'develop' | |
// List of apps | |
def apps = ['predix-fm-integration'] | |
// AWS uri |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require('path') | |
const connect = require('connect') | |
const superstatic = require('superstatic') | |
const puppeteer = require('puppeteer') | |
const poi = require('poi') | |
const poiConfig = require('../../poi.config') | |
const rootDir = path.join(__dirname, '../..') | |
const poiApp = poi({ |
NewerOlder