Skip to content

Instantly share code, notes, and snippets.

View ur92's full-sized avatar

Evgeni Dikerman ur92

  • Epsilon Delta Computers
View GitHub Profile
@ur92
ur92 / odd-revert-finder.sh
Last active November 23, 2017 15:42
GIT: find files with odd number of revert commits (used to validate that all merge reverts get reverted back)
#!/bin/bash
FILES="$(git ls-tree -r --name-only HEAD .)"
COUNT=0
IFS="$(printf "\n\b")"
for f in $FILES; do
NUMBER_OF_LINES=$(git log --oneline --grep=revert $f | wc -l)
let IS_ODD=$NUMBER_OF_LINES%2
if [ $IS_ODD -gt 0 ];
then
@ur92
ur92 / csv-to-json.php
Last active October 4, 2021 15:42 — forked from robflaherty/csv-to-json.php
Convert CSV to JSON
<?php
/*
* Converts CSV to JSON
* Example uses Google Spreadsheet CSV feed
* csvToArray function I think I found on php.net
*/
header('Content-type: application/json');
// Set your CSV feed