Skip to content

Instantly share code, notes, and snippets.

View erhathaway's full-sized avatar
💭
🧇

Ethan Hathaway erhathaway

💭
🧇
  • Terminus
View GitHub Profile
@erhathaway
erhathaway / git_message_gpt.sh
Last active July 9, 2023 02:23
Git Message GPT
#!/bin/bash
set -euo pipefail
trap "echo 'Error: Script execution failed!'" ERR
# Load OpenAI key from .env
if [ -f .env ]; then
export $(egrep -v '^#' .env | xargs)
else
@erhathaway
erhathaway / googleSheetCrypto.js
Last active December 30, 2017 02:28
Google Sheets Crypto Functions
/**
* UPDATES:
* To fetch latest info, go to: Coins > Refresh info
*
* FUNCIONS:
* getCoinPrice(<Ticker>, $Z$1000)
* getCoinRank(<Ticker)
* getCoinMarketCap(<Ticker>)
* getCoinPriceChange(<Ticker>, time) time = '1h' | '1d' | '1w'
* getCoinVolume(<Ticker>, time) time = '1d'
@erhathaway
erhathaway / sym_link_dropbox
Created November 27, 2017 23:03
Sym link dropbox to user space folders
@erhathaway
erhathaway / react-computed-style.js
Created May 25, 2017 03:28
React computed style
// From: Ken Wheeler
// @ https://twitter.com/ken_wheeler/status/867357396217323522
const StyledBlockQuote = styled.blockquote`${props => props.style}`;
export default class BlockQuote extends Componet {
render() {
const { style, ..rest } = this.props;
const computed = {
...this.context.styles.components.blockquote,
@erhathaway
erhathaway / Locales.yml
Last active March 21, 2016 20:12 — forked from s-andringa/Locales.yml
Amsrb talk 18 sept - exceptions_app in Rails 3.2
# config/locales/en.yml
## see http://guides.rubyonrails.org/i18n.html for me details
## this alows us to translate exception details to a localized language (english in this case)
## this is relevant in the ExceptionController#details method
en:
exception:
show:
not_found:
title: "Not Found"