Skip to content

Instantly share code, notes, and snippets.


Eli Mellen eli-oat

View GitHub Profile
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}" == "" ]
echo "[${BRANCH}${STAT}] "
echo ""
eli-oat / archives.mustache
Created Mar 10, 2019
blot archives page w/posts broken out by month
View archives.mustache
<!DOCTYPE html>
{{> head}}
<h4><a href="/"{{title}}</a></h4>
<h1 class="rainbow">Archives</h1>
<div style="padding: 0 1em;">
eli-oat / generate.c
Created Mar 4, 2019 — forked from munificent/generate.c
A random dungeon generator that fits on a business card
View generate.c
#include <time.h> // Robert Nystrom
#include <stdio.h> // @munificentbob
#include <stdlib.h> // for Ginny
#define r return // 2008-2019
#define l(a, b, c, d) for (i y=a;y\
<b; y++) for (int x = c; x < d; x++)
typedef int i;const i H=40;const i W
=80;i m[40][80];i g(i x){r rand()%x;
}void cave(i s){i w=g(10)+5;i h=g(6)
+3;i t=g(W-w-2)+1;i u=g(H-h-2)+1;l(u
eli-oat / tag.mustache
Last active Mar 1, 2019 tag.rss mustache template
View tag.mustache
<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="" xmlns:content="" xmlns:atom="" version="2.0">
<title><![CDATA[ {{{title}}} | Entries tagged "{{{tag}}}"]]></title>
<atom:link href="{{{blogURL}}}/tag.rss?name={{{tag}}}" rel="self" type="application/rss+xml"/>
<description><![CDATA[ Feed for all entries tagged "{{{tag}}}" ]]></description>
eli-oat / webmention.js
Created Jan 22, 2019 — forked from am1t/webmention.js
Javascript snippet to fetch Webmentions
View webmention.js
var post_url = window.location.href;
$.getJSON("", {
target: post_url
}, function(data){
var social_media_likes = "";
var social_media_repost = "";
var social_media_post = "";
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:


start new with session name:

tmux new -s myname
eli-oat /
Created Sep 9, 2018
A quick and dirty way to start a simple React project
# A quick and dirty way to start a simple React project
# NOTE! This script assumes you are using Yarn
# Author: Eli (
# License: unlicense (
read -p 'What is the name of your new project? ' PROJECTNAME
You can’t perform that action at this time.