Skip to content

Instantly share code, notes, and snippets.

Kevin Schuchard schuchard

Block or report user

Report or block schuchard

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View carbon-now-config
{
"material": {
"t": "material",
"bg": "rgba(187,187,187,0)",
"wt": "none",
"wc": false,
"fm": "Fira Code",
"fs": "14px",
"ln": false,
"ds": true,
@schuchard
schuchard / recursiveFilterProp.js
Last active Feb 1, 2019
Recursively filter out objects that are infinitely nested and return an immutable object
View recursiveFilterProp.js
// https://stackblitz.com/edit/recursive-filter-prop?file=index.ts
// perf: https://jsbench.me/8cjrlaine7/1
function flatFilter(nestedProp, compareKey, compareId, arr) {
return arr.filter(o => {
const keep = o[compareKey] != compareId;
if (keep && o[nestedProp]) {
o[nestedProp] = flatFilter(nestedProp, compareKey, compareId, o[nestedProp]);
}
return keep;
View keybase.md

Keybase proof

I hereby claim:

  • I am schuchard on github.
  • I am schuchard (https://keybase.io/schuchard) on keybase.
  • I have a public key ASAKyAxL9oXXlEM6WsDgONlrKVxo0SgOe7vYokJE5wIFwQo

To claim this, I am signing this object:

View regex-snippets.md

Angular

styleUrls

match all @component styleUrls definitions

^(\s+styleUrls:)\s?\[[\s\S]*?\],?/gm

@schuchard
schuchard / typescript-snippets.json
Created Aug 2, 2018
snippets for Typescript development & testing
View typescript-snippets.json
{
"Import module": {
"prefix": "im",
"body": "import { $2 } from '$1';",
"description": "Import module from location"
},
"Print to console": {
"prefix": "con",
"body": "console.log('${label} -> ', ${label});",
"description": "Log output to console"
@schuchard
schuchard / bash-cli.sh
Created Aug 1, 2018
CLI for bash scripts
View bash-cli.sh
#!/usr/bin/env bash
# run `sh run.sh` for options
# run `sh run.sh hello`
volt() {
printf "\xE2\x9A\xA1";
}
run_hello() {
@schuchard
schuchard / yarn-npm.md
Last active Jun 29, 2018
yarn vs npm commands
View yarn-npm.md

yarn vs npm

# install
yarn === npm install

# add package to dependency
yarn add PKG === npm install PKG

# add package to devDependency
@schuchard
schuchard / _springboot.dockerfile
Created May 21, 2018
docker-java-springboot-maven - attempt at running maven and java springboot in docker container.
View _springboot.dockerfile
# pull base image.
FROM java:8
# update packages and install maven
RUN \
export DEBIAN_FRONTEND=noninteractive && \
sed -i 's/# \(.*multiverse$\)/\1/g' /etc/apt/sources.list && \
apt-get update && \
apt-get -y upgrade && \
apt-get install -y vim wget curl maven
View css-only-checkbox.md
You can’t perform that action at this time.