This file contains 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
#!/usr/bin/ruby | |
require 'fileutils' | |
FileUtils.rm_r Dir.glob './**/node_modules' | |
FileUtils.rm_r Dir.glob './**/dist' |
This file contains 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
apt install -y debian-keyring debian-archive-keyring apt-transport-https | |
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo tee /etc/apt/trusted.gpg.d/caddy-stable.asc | |
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list | |
apt update | |
apt full-upgrade -y | |
apt install caddy |
This file contains 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
# inspiration | |
# https://dev.to/pfreitag/running-postgresql-in-docker-for-local-dev-2ojk | |
# https://medium.com/faun/managing-mongodb-on-docker-with-docker-compose-26bf8a0bbae3 | |
# https://rharshad.com/dynamodb-local-docker/ | |
# https://docs.fauna.com/fauna/current/integrations/dev.html#requirements | |
# instructions | |
# 1. start 'em up | |
# docker-compose up -d |
This file contains 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
console.log("%cPLS WORK!!!!","color: red; font-family:sans-serif; font-size: 20px"); | |
console.log("%cYAY it worked!","color: cyan; font-family:sans-serif; font-size: 24px"); |
This file contains 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
export enum EnumType { | |
choice = 'choice', | |
checkbox = 'checkbox', | |
boolean = 'boolean', | |
blank = 'blank', | |
match = 'match', | |
order = 'order' | |
} | |
export const getEnumTypeValues = (): { key: string; text: string }[] => |
This file contains 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
Show hidden characters
{ | |
"compilerOptions": { | |
"target": "es2018", | |
"module": "commonjs", | |
"lib": ["ESNext", "ES2019", "es2018", "es2017", "es7", "es6", "dom"], | |
"declaration": true, | |
"outDir": "./dist", | |
"strict": false, | |
"esModuleInterop": true, | |
"resolveJsonModule": true, |
This file contains 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 React, { Component } from 'react' | |
import firebase from 'firebase'; | |
export default class List extends Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
loaded: false, | |
data: {}, | |
}; |
This file contains 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 waait = i => new Promise(res => setTimeout(() => { return res(i); }, 2000)); | |
const batchedPromiseAll = async (array) => { | |
let requests = array.slice(0); | |
let results = []; | |
let processBatch = async (chunks, results) => { | |
let curr; | |
try { |
This file contains 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
class SomeClass extends Component { | |
onChange({ ...rest }) { | |
this.setState(rest); | |
}; | |
options = { | |
// ... | |
onChangePage: currentPage => this.onChange({ currentPage }), | |
onChangeRowsPerPage: numberOfRows => this.onChange({ numberOfRows }) | |
}; |
This file contains 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
{ | |
"trailingComma": "es5", | |
"tabWidth": 2, | |
"semi": true, | |
"singleQuote": true, | |
"bracketSpacing": true, | |
"jsxBracketSameLine": true, | |
"arrowParens": "avoid", | |
"printWidth": 160 | |
} |
NewerOlder