Skip to content

Instantly share code, notes, and snippets.

View eli-oat's full-sized avatar

Eli Mellen eli-oat

View GitHub Profile
@eli-oat
eli-oat / README.md
Created October 31, 2019 02:40
SCRIPT-8
@eli-oat
eli-oat / README.md
Created October 31, 2019 02:36
SCRIPT-8
@eli-oat
eli-oat / archives.mustache
Created March 10, 2019 18:50
blot archives page w/posts broken out by month
<!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 March 4, 2019 02:39 — forked from munificent/generate.c
A random dungeon generator that fits on a business card
#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 March 1, 2019 22:10
blot.im tag.rss mustache template
{{#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 January 22, 2019 21:26 — forked from am1t/webmention.js
Javascript snippet to fetch Webmentions
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 = "";
@eli-oat
eli-oat / tmux-cheatsheet.markdown
Created November 9, 2018 03:11 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@eli-oat
eli-oat / accio-react-app.sh
Created September 9, 2018 02:08
A quick and dirty way to start a simple React project
#!/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 July 5, 2018 03:27 — forked from huytd/customize.material-dark-theme.md
My minimal Emacs config

Screenshot:

Custom keybinding:

  General:
    SPC /     : ripgrep
    SPC TAB   : previous buffer
 SPC SPC : Open M-x
@eli-oat
eli-oat / center.css
Last active June 5, 2018 19:53
Because I can never remember how to vertically center a div...
.outer {
display: table;
position: absolute;
height: 100%;
width: 100%;
}
.middle {
display: table-cell;
vertical-align: middle;