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
/** | |
* Provides a `v-responsive-class` Vue directive to toggle css classes based on the containing element's width. | |
* Think @media queries, but based on the parent element. Useful for web components. | |
* | |
* The breakpoints match the ones in Bootstrap: | |
* * xs: < 576 - Extra small devices (portrait phones, less than 576px) | |
* * s: >= 576 - Small devices (landscape phones, 576px and up) | |
* * m: >= 768 - Medium devices (tablets, 768px and up) | |
* * l: >= 992 - Large devices (desktops, 992px and up) | |
* * xl: >= 1200 - Large desktops, 1200px and up |
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
# Two possibilities to parse a Postgres DB URL from heroku into environment variables | |
# that Spring Boot understands. | |
# You would need that, if you do not build on heroku but push docker images | |
# from another source | |
# Does not need bash. Works on alpine linux / busybox. Tested with openjdk:8-jdk-alpine base image. | |
export DATABASE_URL=postgres://user:password@host:port/database | |
# Naive way, would break with [@:/] in username or password. | |
DB_TYPE=$(echo $DATABASE_URL | awk -F'[:@/]' '{print $1}')"ql" |
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 { useFishFn, usePond, useRegistryFish } from '@actyx-contrib/react-pond' | |
import * as React from 'react' | |
import { MachineFish } from '../fish' | |
import { MaterialRequestFish } from '../fish/materialRequestFish' | |
export const App = (): JSX.Element => { | |
const registry = useFishFn(MaterialRequestFish.registry, 1) | |
const allActiveMaterialReqs = useRegistryFish(MaterialRequestFish.registry(), Object.keys, MaterialRequestFish.of) | |
const pond = usePond() |
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
name: sklearn mkl default | |
channels: | |
- defaults | |
dependencies: | |
- _py-xgboost-mutex=2.0=cpu_0 | |
- appnope=0.1.0=py37_0 | |
- attrs=19.3.0=py_0 | |
- backcall=0.2.0=py_0 | |
- blas=1.0=mkl | |
- bleach=3.1.5=py_0 |
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
// This is neither elegant nor robust, | |
// but it _does_ mute everyone sending | |
// promoted tweets to my timeline. | |
// It works by installing a debounced | |
// scroll listener which checks for promoted tweets | |
// and mutes their sender by clicking the resp. | |
// tweet context menu action. | |
var xPathEvaluator = $x |
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
echo .DS_Store >> ~/.gitignore_global | |
git config --global core.excludesfile ~/.gitignore_global |
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
labels: | |
- name: "T:Question ❓" | |
description: "Type: Question - Needs discussion w/ team and/or stakeholders" | |
color: E8F5E9 | |
- name: "T:Bug 🐛" | |
description: "Type: Bug - Something does not work as expected" | |
color: E8F5E9 | |
- name: "T:Feature ✨" | |
description: "Type: Feature - Provides a new feature" |
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
# git safe origin | |
# - | |
# save local work to a separate branch and revert to the current branches origin | |
# I have this in my ~/.zshrc | |
gso() | |
{ | |
branch=$(git rev-parse --abbrev-ref HEAD); qualifier=$(date -u +"%Y-%m-%dT%H%M%S") \ | |
&& git add . \ | |
&& git commit -m "Saving local work from $branch to local/stash/$branch-$qualifier" \ | |
&& git branch local/stash/$branch-$qualifier \ |