Skip to content

Instantly share code, notes, and snippets.

View stackdumper's full-sized avatar

Elijah A. stackdumper

View GitHub Profile
export default {
compileEnhancements: false,
extensions: ['ts'],
require: ['ts-node/register', 'tsconfig-paths/register'],
sources: ['src/**/*'],
}
@stackdumper
stackdumper / tsconfig.json
Last active February 9, 2019 15:44
Typescript config
{
"compilerOptions": {
"target": "esnext",
"module": "none",
"lib": ["dom", "esnext"],
"jsx": "preserve",
/* Module Resolution Options */
"moduleResolution": "node",
"baseUrl": "./",
@stackdumper
stackdumper / .prettierrc
Last active April 10, 2019 19:32
Prettier typescript config
{
"semi": false,
"tabWidth": 2,
"printWidth": 90,
"singleQuote": true,
"trailingComma": "all",
"bracketSpacing": true,
"jsxBracketSameLine": false,
"arrowParens": "always",
"parser": "typescript",
@stackdumper
stackdumper / unwrap.ts
Created August 31, 2018 11:00
Unwrap promise
export type Resolved<T> = T extends Promise<infer U> ? U :
T extends (...args: any[]) => Promise<infer U> ? U :
T
@stackdumper
stackdumper / android_instructions.md
Created August 23, 2018 15:04 — forked from patrickhammond/android_instructions.md
Easily setup an Android development environment on a Mac

Here is a high level overview for what you need to do to get most of an Android environment setup and maintained.

Prerequisites (for Homebrew at a minimum, lots of other tools need these too):

  • XCode is installed (via the App Store)
  • XCode command line tools are installed (xcode-select --install will prompt up a dialog)
  • Java

Install Homebrew:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

import * as React from 'react'
import { Redirect } from 'react-router-dom'
import queryString from 'qs'
export const withRedirect = <P extends Object>(
reaction: (any) => boolean,
redirect: string | ((props: P) => string),
) => (WrappedComponent) => {
const WithRedirectWrapper = (props: P) => {
@stackdumper
stackdumper / vscode-custom-styles.css
Last active December 21, 2019 22:41
vscode custom styles
.editor-actions, .title-actions {
display: none !important;
}
const hex = process.argv[2];
const getInt = char =>
({
A: '10',
B: '11',
C: '12',
D: '13',
E: '14',
F: '15'
@stackdumper
stackdumper / dec2hex.js
Last active May 21, 2018 07:29
dec2hex
let dec = process.argv[2];
let result = '';
const getChar = char =>
({
'10': 'A',
'11': 'B',
'12': 'C',
'13': 'D',
'14': 'E',
{
"workbench.startupEditor": "newUntitledFile",
"atomKeymap.promptV3Features": true,
"editor.multiCursorModifier": "ctrlCmd",
"editor.formatOnPaste": true,
"workbench.colorTheme": "City Lights",
"editor.fontSize": 18,
"editor.folding": false,
"editor.hideCursorInOverviewRuler": true,
"editor.lineHeight": 26,