Skip to content

Instantly share code, notes, and snippets.

View shmup's full-sized avatar
🐌

Jared Miller shmup

🐌
View GitHub Profile
@pheix
pheix / Raku-Advent-2020.md
Last active February 28, 2023 20:22
Raku web templating engines: boost up the parsing performance 

Raku web templating engines: boost up the parsing performance

Modern Raku web templating engines

A templating engine basically provides tools for effective metadata interpolation inside static files (templates). At web application runtime, the engine parses and replaces variables with actual content values. Finally client gets a HTML page generated from the template, where all metadata (variables, statements, expressions) has been proceed.

Raku ecosystem has a few modern templating engines: Template::Mojo (last commit on 12 Jun 2017), Template::Mustache (last commit on 25 Jul 2020 — it's alive!), Template6 (last commit on 20 Nov 2020 - active maintenance), Template::Classic (last commit on 11 Apr 2020), [Template

@shmup
shmup / semantic-layout.html
Created October 29, 2020 00:09 — forked from thomd/semantic-layout.html
Standard HTML5 Semantic Layout
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Title</title>
<link href="stylesheets/main.css" rel="stylesheet" />
</head>
<body>
<header>
<hgroup>
@shmup
shmup / j2html.py
Created September 23, 2020 22:42
renders and prints a jinja2 template with optional json to STDOUT
#!/usr/bin/env python3
# http://ix.io/2ykn/py
# renders and prints a jinja2 template with optional json to STDOUT
# requires: python3, jinja2
# usage
# $ ./j2html /path/to/template
# $ ./j2html /path/to/template --json_data /path/to/json
@shmup
shmup / nonymous-ix.vim
Last active September 8, 2021 01:30
nonymous-ix.vim uses .netrc for auth, and fucks with ix.io
" nonymous-ix.vim uses .netrc for auth, and fucks with ix.io
" insert :IX [optional visual selection] - copies url to system clipboard
" replace :RX <URL> [optional visual selection]
" delete :DX <URL>
if has('win64') || has('win32') || has('win16')
let s:env = 'WINDOWS'
else
let s:env = toupper(substitute(system('uname'), '\n', '', ''))
endif
@cedws
cedws / defer.sh
Last active July 5, 2024 13:31
Go-like defer 'keyword' for shell
#!/bin/sh
DEFER=
defer() {
DEFER="$*; ${DEFER}"
trap "{ $DEFER }" EXIT
}
@necojackarc
necojackarc / Set up Vim with clipboard on Ubuntu on WSL2.md
Last active December 28, 2023 02:45
Set up Vim on Ubuntu on Windows Subsystem for Linux 2 (WSL2) to share clipboard

This explains how to set up Vim on Ubuntu 18.04 on Windows Subsystem for Linux 2 (WSL2) in order to share the clipboard between Windows and Ubuntu.

Environments

  • Windows 10 Home
  • Ubuntu 18.04 on Windows Subsystem for Linux 2 (WSL2)

Steps

  1. Build Vim with the clipboard option enabled
  2. Set up VcXsrv Windows X Server
@yuderekyu
yuderekyu / spacemacs-cheshe.md
Last active September 19, 2024 07:19 — forked from robphoenix/spacemacs-cheshe.md
Spacemacs Cheat Sheet

Useful Spacemacs commands

  • SPC q q - quit
  • SPC w / - split window vertically
  • SPC w - - split window horizontally
  • SPC 1 - switch to window 1
  • SPC 2 - switch to window 2
  • SPC w c - delete current window
  • SPC TAB - switch to previous buffer
  • SPC b b - switch buffers
@pjobson
pjobson / plex_media_permissions_4_noobies.md
Last active March 26, 2025 00:04
Plex Media Permissions for Linux Noobies

Plex Media Permissions for Linux Noobies

There is no problem with being a noobie and I do not use the term to sligtht or disparage anyone.

This is a way to setup your permissions for running Plex in Linux. Different folks may use different methods.

The permissions concepts provided here apply to OSX, but the users and groups are controlled and modified differently, so much of this will not work properly. I think the command is dscl, but that could be out of date.

There are many ways to setup your permissions scheme in Linux, this methodology describes a way to do it, not everyone will like it, but it works for me, so whatever.

@shmup
shmup / vimclj.md
Last active May 3, 2018 00:38
vim prefs for clojure

Vim preferences for Clojure

I want to learn Clojure and I don't want to think about a new editor, or a bunch of new mappings

These are my minimum requirements that make me happy

TL;DR

1) install vim 2) install vim-fireplace and vim-cljfmt 3) add some shit to your ~/.lein/profile.clj