Skip to content

Instantly share code, notes, and snippets.

View tilleryd's full-sized avatar
😑

David Tillery tilleryd

😑
View GitHub Profile
@tilleryd
tilleryd / retire.js
Created September 7, 2017 00:24
Retire obsolete files/directories to another directory.
/**
* retire.js - Retire obsolete files/directories to another directory.
*/
const path = require('path');
const fs = require('fs');
const fse = require('fs-extra');
const chalk = require('chalk');
const appDirectory = fs.realpathSync(process.cwd());
@tilleryd
tilleryd / gist:1b0f2e1497cb243dd93de0343855e0b5
Created August 5, 2017 17:40
git pre-commit hook for setting CircleCI badge for current branch
#!/usr/bin/python
"""
Referencing current branch in github readme.md[1]
This pre-commit hook[2] updates the README.md file's
CircleCI badge with the current branch. Gist at[4].
[1] http://stackoverflow.com/questions/18673694/referencing-current-branch-in-github-readme-md
[2] http://www.git-scm.com/book/en/v2/Customizing-Git-Git-Hooks
[3] https://circleci.com/docs/1.0/status-badges/