Skip to content

Instantly share code, notes, and snippets.

View olliechick's full-sized avatar

Ollie Chick olliechick

View GitHub Profile
@dsample
dsample / progress.html
Created February 7, 2016 21:43
A simple countdown timer with progress bar. We used it to show the progress of our pregnancy.
<div class="progress" style="border: 1px solid #999">
<div id="progress-bar" style="border-right: ; background-color: #96f; height: 10px; width: 0%"></div>
</div>
<div id="countdown"></div>
<script type="text/javascript">
function getDaysRemaining(endtime){
var t = Date.parse(endtime) - Date.parse(new Date());
var days = Math.floor( t/(1000*60*60*24) );
return days;
@mroderick
mroderick / find-old-branches.sh
Last active December 2, 2024 11:13
A small script to find stale branches
#!/bin/bash
# This is a very naive script, it doesn't do grouping and returns all branches
# I only really care about branches that have not seen commits in two months
#
# I am hoping to find some time to write a tool that can output these reports for me
# In the meantime, I am using this
echo "Merged branches"
for branch in `git branch -r --merged | grep -v HEAD`;do echo -e `git log --no-merges -n 1 --format="%ci, %cr, %an, %ae, " $branch | head -n 1` \\t$branch; done | sort -r