I hereby claim:
- I am micwehrle on github.
- I am micwehrle (https://keybase.io/micwehrle) on keybase.
- I have a public key ASCyXYnY99NfgJ8NBPHm7t87FMxS4p9qJfxrmRTBqseZSQo
To claim this, I am signing this object:
const CrossOriginLocalStorage = function(currentWindow, iframe, allowedOrigins, onMessage) { | |
this.allowedOrigins = allowedOrigins; | |
let childWindow; | |
// some browser (don't remember which one) throw exception when you try to access | |
// contentWindow for the first time, it works when you do that second time | |
try { | |
childWindow = iframe.contentWindow; | |
} catch(e) { | |
childWindow = iframe.contentWindow; |
I hereby claim:
To claim this, I am signing this object:
import { ClientConfig } from '../Core/types'; | |
import Http from '../utils/Http'; | |
import Url from '../utils/Url'; | |
import { ResourceResult, AutofiServices } from './types'; | |
import Resource from './AbstractResource'; | |
export interface MetricOpts extends ClientConfig { | |
autofiService: string; | |
metadata: any; | |
processInterval: number; |
Use a git hook to match a Jira issue ID from the current branch, and prepend it to every commit message
Assuming the current branch contains a Jira issue ID, you can use a git hook script to prepend it to every commit message.
Create an empty commit-msg git hook file, and make it executable. From your project's root directory:
install -b -m 755 /dev/null .git/hooks/commit-msg
Save the following script to the newly-created .git/hooks/commit-msg file:
#!/bin/bash | |
for file in $(git diff --cached --name-only | grep -E '\.(js|jsx)$') | |
do | |
git show ":$file" | node_modules/.bin/eslint --stdin --stdin-filename "$file" # we only want to lint the staged changes, not any un-staged changes | |
if [ $? -ne 0 ]; then | |
echo "ESLint failed on staged file '$file'. Please check your code and try again. You can run ESLint manually via npm run eslint." | |
exit 1 # exit with failure status | |
fi | |
done |
.wrapper { | |
height: 100vh; | |
width: 100vw; | |
background-color: green; | |
} |
#!/bin/bash | |
IMAGE=$1 | |
docker ps -a | awk '{ print $1,$2 }' | grep $IMAGE | awk '{print $1 }' | xargs -I {} docker rm {} |
export CLICOLOR=1 | |
export LSCOLORS=ExFxCxDxBxegedabagacad | |
# Git autocomplete stuff. Nifty. | |
source ~/.git-completion.bash | |
# Aliases | |
alias pull='git fetch -v; git merge origin/`echo $(__git_ps1 "%s")`' | |
alias push='git push origin HEAD' | |
alias gits='git status' |
#!bash | |
# | |
# bash/zsh completion support for core Git. | |
# | |
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org> | |
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/). | |
# Distributed under the GNU General Public License, version 2.0. | |
# | |
# The contained completion routines provide support for completing: | |
# |
[^.]* | |
!.gitignore |