Skip to content

Instantly share code, notes, and snippets.

Eli Mellen eli-oat

View GitHub Profile
@eli-oat
eli-oat / clean.el
Created May 15, 2020 — forked from rougier/clean.el
A very minimal but elegant emacs configuration file
View clean.el
(require 'org)
(setq-default indent-tabs-mode nil)
(setq org-display-inline-images t)
(setq org-redisplay-inline-images t)
(setq org-startup-with-inline-images "inlineimages")
(setq default-frame-alist
(append (list '(width . 72) '(height . 40))))
View 2020-05-01_website.css
:root{
--prime-color:#464646;
--prime-bg:#fffceb;
--dark-bg:#2d2d2d;
--link-pink:#f012be;
--link-yellow:#ffb700;
--pink:rgba(255, 105, 180, 0.5);
--blue:rgba(48, 79, 254, 0.5);
--silver:#c1c1c1
}
@eli-oat
eli-oat / pomodoro.lua
Last active Apr 19, 2020
A teeny tiny pomodoro timer
View pomodoro.lua
-- title: pomo
-- author: eli_oat
-- about: a very tiny pomodoro timer
defaults = {
pomoTime = 1500, -- length of a pomodoro in seconds
restTime = 600, -- length of a short rest in seconds
longRestTime = 900, -- length of a long rest in secconds
pomoCount = 0, -- tracks the number of elapsed pomodoros
@eli-oat
eli-oat / watch.sh
Created Apr 10, 2020
macOS bash function to trigger an alert when a process completes
View watch.sh
watch(){
cmd=$@ # Somehow interpolate $@ directly doesn't work.
$@ && tput bel && osascript -e "display notification \"Completed: $cmd\" with title \"╚(•⌂•)╝ Watch Alert\""
}
@eli-oat
eli-oat / MakeActiveChartOverlapRange.bas
Created Apr 9, 2020 — forked from mjdescy/MakeActiveChartOverlapRange.bas
Make active Excel chart overlap a range completely
View MakeActiveChartOverlapRange.bas
Option Explicit
Public Sub SetActiveChartToCompletelyCoverARange()
Call ResizeAndRepositionChart( _
Chart:=ActiveChart, _
Range:=AskUserToInputARange())
End Sub
Private Sub ResizeAndRepositionChart(ByRef Chart As Excel.Chart, ByRef Range As Excel.Range)
If Chart Is Nothing Then
View imagemagick-dither.sh
mogrify -path DESTINATIONFOLDER -filter Triangle -define filter:support=2 -thumbnail 1200 -unsharp 0.25x0.08+8.3+0.045 -dither FloydSteinberg -type Grayscale -colors 2 -posterize 136 -quality 82 -define jpeg:fancy-upsampling=off -define png:compression-filter=5 -define png:compression-level=9 -define png:compression-strategy=1 -define png:exclude-chunk=all -interlace none -colorspace sRGB SOURCEFOLDER/*
@eli-oat
eli-oat / dice.js
Created Feb 20, 2020
Roll the dice | simple code that can parse standard dice notation (e.g. '2d20+3') and return a more or less random result within that range
View dice.js
"use strict";
const dice = {
validate: (diceNotation) => {
const match = /^(\d+)?d(\d+)([+-]\d+)?$/.exec(diceNotation);
if (!match) {
throw "Invalid dice notation: " + diceNotation;
} else {
return match;
@eli-oat
eli-oat / ldb.js
Created Feb 7, 2020
An itsy-bitsy database for the browser. useful for web apps and other toy projects.
View ldb.js
/* =============================
================================
/$$ /$$ /$$
| $$ | $$| $$
| $$ /$$$$$$$| $$$$$$$
| $$ /$$__ $$| $$__ $$
| $$| $$ | $$| $$ \ $$
| $$| $$ | $$| $$ | $$
| $$| $$$$$$$| $$$$$$$/
@eli-oat
eli-oat / bashprompt
Created Oct 31, 2019
The bash prompt I like to use
View bashprompt
# get current branch in git repo
function parse_git_branch() {
BRANCH=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'`
if [ ! "${BRANCH}" == "" ]
then
STAT=`parse_git_dirty`
echo "[${BRANCH}${STAT}] "
else
echo ""
fi
You can’t perform that action at this time.