Skip to content

Instantly share code, notes, and snippets.

View putnik's full-sized avatar
🇺🇦
Нет войне!

Sergei Leshchina putnik

🇺🇦
Нет войне!
View GitHub Profile
@putnik
putnik / data-3.csv
Last active February 14, 2018 23:40 — forked from d3noob/data-3.csv
v4 curve interpolation comparison
date close
1907-01-01 51815
2011-01-01 310956
2017-01-01 269022
@putnik
putnik / pre-commit.sh
Last active March 11, 2019 09:09 — forked from peinwag/pre-commit.sh
Precommit hook for git that checks new modified lines against a given codingstandard with phpcs
#!/bin/bash
files=$(git diff-index --name-only --diff-filter=ACMR HEAD --)
for file in $files; do
phpcsout=$(phpcs -s $file --standard=phpcs.xml)
if [ "$phpcsout" != "" ]; then
affectedLines=$(git blame -p -s $file | grep 00000000 | cut -d " " -f2)