Skip to content

Instantly share code, notes, and snippets.

View timcheadle's full-sized avatar

Tim Cheadle timcheadle

View GitHub Profile
@timcheadle
timcheadle / gist:e14b17d652f79b35d547
Created May 22, 2015 17:15
Liquid Template Tricks
# Get the full month name of next month (now + 28 days)
{{ 'now' | date: "%s" | plus: 2419200 | date: "%B" }}
@timcheadle
timcheadle / README.md
Last active January 31, 2017 03:29
Run Mailcatcher with rbenv automatically in the background on OS X

Mailcatcher makes it super easy to preview emails locally for development. These instructions let you run it all the time in the background on OS X.

Note: This assumes you are using rbenv

First, install mailcatcher. Do this in your home directory because it often has gem conflicts otherwise.

cd ~ && gem install mailcatcher
@timcheadle
timcheadle / readme.md
Last active August 1, 2019 14:05
csvhead – easily preview CSV column names, order, and sample data
@timcheadle
timcheadle / ethiopian-to-gregorian-in-excel.md
Last active May 22, 2025 13:40
Excel formula to convert Ethiopian calendar dates to Gregorian dates

Convert Ethiopian dates to Gregorian dates in Excel

Formula

This formula operates on an Ethiopian date in cell A2. It assumes that cell uses a mm/dd/yyyy format, where the months are 1-13.

= IF(ISBLANK(A2), "", DATE(RIGHT(TEXT(A2, "mm/dd/yyyy"), 4) + 8, 1, 1) + ((LEFT(TEXT(A2, "mm/dd/yyyy"), 2) * 30) - 120 + MID(TEXT(A2, "mm/dd/yyyy"), 4, 2) - IF(MOD(RIGHT(TEXT(A2, "mm/dd/yyyy"), 4) + 1, 4) <> 1, 23, 22)))