Skip to content

Instantly share code, notes, and snippets.

View Kevnz's full-sized avatar
💭
Writing the code

Kevin Isom Kevnz

💭
Writing the code
View GitHub Profile
@Kevnz
Kevnz / generate-ssh-key.sh
Created March 16, 2020 01:44 — forked from grenade/01-generate-ed25519-ssh-key.sh
Correct file permissions for ssh keys and config.
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/id_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/github_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/mozilla_rsa
import React, { useEffect } from 'react'
import { useAsync } from '@brightleaf/react-hooks'
export default () => {
const { loading, error, data, execute } = useAsync(asyncFunction)
useEffect(() => {
execute()
}, [])
if (loading) {
return <div>Executing Async Function</div>
@Kevnz
Kevnz / gh-pages-fix.sh
Created February 20, 2019 22:19
Fix gh-pages publish problem
rm -rf node_modules/gh-pages/.cache
@Kevnz
Kevnz / git-ignore.sh
Created February 4, 2019 21:44
Ignore changes then don't ignore changes
git update-index --assume-unchanged FILE_NAME
git update-index --no-assume-unchanged FILE_NAME
@Kevnz
Kevnz / docker-compose.yml
Created October 24, 2018 23:16
All The Dockers
version: '3'
services:
pgdb:
image: postgres:9.6.6-alpine
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: user_password
ports:
- "5432:5432"
@Kevnz
Kevnz / yo-code.sh
Created September 3, 2018 20:26
Using npx with yeoman to generate a vs code extension
npx -p yo -p generator-code -c 'yo code'
with table_stats as (
select psut.relname,
psut.n_live_tup,
1.0 * psut.idx_scan / greatest(1, psut.seq_scan + psut.idx_scan) as index_use_ratio
from pg_stat_user_tables psut
order by psut.n_live_tup desc
),
table_io as (
select psiut.relname,
sum(psiut.heap_blks_read) as table_page_read,

Array<T>

Legend:

  • ✏️ method changes this.
  • 🔒 method does not change this.

Array<T>.prototype.*:

  • concat(...items: Array): T[] 🔒 ES3
@Kevnz
Kevnz / gitall.sh
Created December 6, 2017 22:44
Pull latest for each repo in a parent folder
find . -maxdepth 1 -type d -exec sh -c '(cd {} && git pull)' ';'
https://developers.facebook.com/docs/messenger-platform/guides/quick-start
https://github.com/facebookarchive/messenger-platform-samples/tree/master/node
https://docs.microsoft.com/en-us/bot-framework/nodejs/bot-builder-nodejs-quickstart
https://scotch.io/tutorials/building-a-slack-bot-with-node-js-and-chuck-norris-super-powers
https://akjsmeetup.slack.com
https://coursetro.com/posts/code/45/Microsoft-Bot-Framework-Tutorial:-Hello-World-Bot!
Packages
twit