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; |
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' |
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; | |
} |
require.config({ | |
baseUrl: '/backbone-tests/', | |
paths: { | |
'jquery' : '/app/libs/jquery', | |
'underscore' : '/app/libs/underscore', | |
'backbone' : '/app/libs/backbone', | |
'mocha' : 'libs/mocha', | |
'chai' : 'libs/chai', | |
'chai-jquery' : 'libs/chai-jquery', | |
'models' : '/app/models' |
#!/bin/bash | |
IMAGE=$1 | |
docker ps -a | awk '{ print $1,$2 }' | grep $IMAGE | awk '{print $1 }' | xargs -I {} docker rm {} |
<?xml version="1.0"?> | |
<!DOCTYPE cross-domain-policy SYSTEM "/xml/dtds/cross-domain-policy.dtd"> | |
<!-- Policy file for xmlsocket://socks.example.com --> | |
<cross-domain-policy> | |
<!-- This is a master socket policy file --> | |
<!-- No other socket policies on the host will be permitted --> | |
<site-control permitted-cross-domain-policies="master-only"/> |