Skip to content

Instantly share code, notes, and snippets.

@benkroeger
benkroeger / prettier-glob.js
Created October 2, 2017 12:34
apply prettier-eslint formatting on files found via glob
'use strict';
// node core modules
const fs = require('fs');
const path = require('path');
// 3rd party modules
const glob = require('glob');
const format = require('prettier-eslint');
@benkroeger
benkroeger / find-repos-with-origin-url.sh
Created June 25, 2018 09:57
Creates a list of all directories that are git repositories and (if available) print their remote `origin` url
#!/usr/bin/env bash
for D in *; do
if [ -d $D ]; then
cd $D
if [ -d .git ] || git rev-parse --git-dir > /dev/null 2>&1; then
echo "${D}: $(git remote get-url --push origin)"
fi
cd ..
fi