Skip to content

Instantly share code, notes, and snippets.

View othree's full-sized avatar
:accessibility:
On the way to refactoring

othree othree

:accessibility:
On the way to refactoring
View GitHub Profile
#!/bin/bash
# Stops accidental commits to master and develop. https://gist.github.com/stefansundin/9059706
# Install:
# cd path/to/git/repo
# curl -fL -o https://gist.githubusercontent.com/othree/a5ad2dd81a5957a06867/raw/3abf8b2fbc9ce614af83e2522f23c163c78c97c6/Not%2520commit%2520to%2520master
# chmod +x .git/hooks/pre-commit
BRANCH=`git rev-parse --abbrev-ref HEAD`
if [[ "$BRANCH" == "master" ]]; then
#!/bin/bash
for branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master `; do
git branch --track ${branch#remotes/origin/} $branch
done
Host *
UseKeychain yes
@othree
othree / dwbp.md
Created February 20, 2017 09:31
Data on the Web Best Practices
  • Metadata
    • Provide metadata
    • Provide descriptive metadata
    • Provide structural metadata
  • Data Licenses
    • Provide data license information
  • Data Provenance
    • Provide data provenance information
  • Data Quality
  • Provide data quality information
const all = Promise.all.bind(Promise);
const fetchJSON = async file => (await fetch(file)).json();
const grabData = async files => await all(files.map(fetchJSON));
(async () => {
let [data1, data2] = await grabData(['/data1.json', '/data2.json']);
})();
const all = Promise.all.bind(Promise);
const grabData = async files => await all(
(
await all(
files.map(f => fetch(f))
)
).map(v => v.json())
);
:autocmd InsertEnter * let save_cwd = getcwd() | execute 'lcd %:p:h'
:autocmd InsertLeave * execute 'lcd' fnameescape(save_cwd)
hg clone https://bitbucket.org/ZyX_I/vim
cd vim
hg update 24-bit-xterm
cd src && make autoconf && cd ..
./configure \
--enable-gui=no \
--without-x \
--enable-multibyte \
--with-tlib=ncurses \