Skip to content

Instantly share code, notes, and snippets.

Eli Mellen eli-oat

Block or report user

Report or block eli-oat

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@eli-oat
eli-oat / archives.mustache
Created Mar 10, 2019
blot archives page w/posts broken out by month
View archives.mustache
<!DOCTYPE html>
<html>
{{> head}}
<body>
<header>
<h4><a href="/">« {{title}}</a></h4>
</header>
<main>
<h1 class="rainbow">Archives</h1>
<div style="padding: 0 1em;">
@eli-oat
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
eli-oat / tag.mustache
Last active Mar 1, 2019
blot.im tag.rss mustache template
View tag.mustache
{{#tagged}}
<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
<channel>
<title><![CDATA[ {{{title}}} | Entries tagged "{{{tag}}}"]]></title>
<link>{{{blogURL}}}</link>
<atom:link href="{{{blogURL}}}/tag.rss?name={{{tag}}}" rel="self" type="application/rss+xml"/>
<description><![CDATA[ Feed for all entries tagged "{{{tag}}}" ]]></description>
{{#entries}}
<item>
@eli-oat
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;
$(document).ready(function(){
$("ul#mentions-list").empty();
$.getJSON("https://webmention.io/api/mentions?per-page=50&page=0&jsonp=?", {
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:

tmux

start new with session name:

tmux new -s myname
@eli-oat
eli-oat / accio-react-app.sh
Created Sep 9, 2018
A quick and dirty way to start a simple React project
View accio-react-app.sh
#!/bin/bash
# ACCIO REACT APP!
# A quick and dirty way to start a simple React project
# NOTE! This script assumes you are using Yarn
# Author: Eli (https://eli.li)
# License: unlicense (https://unlicense.org/)
read -p 'What is the name of your new project? ' PROJECTNAME
@eli-oat
eli-oat / emacs.md
Created Jul 5, 2018 — forked from huytd/customize.material-dark-theme.md
My minimal Emacs config
View emacs.md

Screenshot:

Custom keybinding:

  General:
    SPC /     : ripgrep
    SPC TAB   : previous buffer
    SPC SPC   : Open M-x
@eli-oat
eli-oat / center.css
Last active Jun 5, 2018
Because I can never remember how to vertically center a div...
View center.css
.outer {
display: table;
position: absolute;
height: 100%;
width: 100%;
}
.middle {
display: table-cell;
vertical-align: middle;
View ping-addresses.sh
awk '{print $1}' < $1 | while read ip; do
if ping -c1 $ip >/dev/null 2>&1; then
echo $ip IS UP
else
echo $ip IS DOWN
fi
done
View en-GB.json
{
"options": {
"allowStealFocus": false,
"bookmarkThumbHeight": 150,
"bookmarkThumbWidth": 90,
"dropEnabled": true,
"footerPanelEnabled": true,
"headerPanelEnabled": true,
"leftPanelEnabled": true,
"limitLocales": false,
You can’t perform that action at this time.