Skip to content

Instantly share code, notes, and snippets.


Kat Hoessel katsel

View GitHub Profile
View james_salsa.txt
Tin of peeled plum tomatoes (incl. the juice!)
Fist of fresh coriander (cilantro for my US buds)
Half a brown onion
Half a garlic bulb
Half to 2/3 of a Jalapeño
2 Tablespoons of Olive Oil (don't get fancy with it)
Two shakes of black pepper (any shit will do)
Pinch of salt (any shit will do)
Chop the shit out of everything choppable
csswizardry /
Last active Dec 31, 2020
Vim without NERD tree or CtrlP

Vim without NERD tree or CtrlP

I used to use NERD tree for quite a while, then switched to CtrlP for something a little more lightweight. My setup now includes zero file browser or tree view, and instead uses native Vim fuzzy search and auto-directory switching.

Fuzzy Search

There is a super sweet feature in Vim whereby you can fuzzy find your files using **/*, e.g.:

:vs **/*<partial file name><Tab>
# in case it's already installled
vagrant plugin uninstall vagrant-libvirt
# vagrant's copy of curl prevents the proper installation of ruby-libvirt
sudo mv /opt/vagrant/embedded/lib/{,.backup}
sudo mv /opt/vagrant/embedded/lib/{,.backup}
sudo mv /opt/vagrant/embedded/lib/{,.backup}
sudo mv /opt/vagrant/embedded/lib/pkgconfig/libcurl.pc{,.backup}
rohieb / twitter-timeline-declutter.user.js
Last active Jan 28, 2018
Twitter Timeline Declutter user script
View twitter-timeline-declutter.user.js
// ==UserScript==
// @name Twitter Timeline Declutter
// @namespace
// @version 2
// @description Remove "Who to Follow", "While you were away", "You might like" etc. from your timeline stream
// @author rohieb
// @homepage
// @updateURL
// @match *://*
// @grant GM_addStyle
julianlam / gist:4e2bd91d8dedee21ca6f
Last active Mar 5, 2019
Provisioning and usage of unprivileged LXC containers via indirect login or script
View gist:4e2bd91d8dedee21ca6f

Provisioning and usage of unprivileged LXC containers via indirect login or script

As I've discovered, managing LXC containers is fairly straightforward, but when building out a system for provisioning out user maintained instances of NodeBB, it was imperative that unprivileged LXC containers were used, so that in the event of shell breakout from NodeBB followed by privilege escalation of the saas user, the root user in the LXC container would only be an unprivileged user on the host machine.

During the course of development, I ran into numerous blockers when it came to managing LXC containers in unexpected circumstances. Namely:

  • Using LXC in a subshell is not directly supported. This usually happens under one of the following two circumstances:
    • After switching users via su or executing lxc-* commands as another user via sudo
    • Executing lxc-* commands via a program, application, or script. In my case, a Node.js application.
octocat / .gitignore
Created Feb 27, 2014
Some common .gitignore configurations
View .gitignore
# Compiled source #
# Packages #

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

# remap prefix to Control + a