Skip to content

Instantly share code, notes, and snippets.

@varjmes
varjmes / james_salsa.txt
Created July 10, 2017 20:04
James' Salsa
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
csswizardry / README.md
Last active June 16, 2024 13:44
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>
#!/bin/sh
# 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/libcurl.so{,.backup}
sudo mv /opt/vagrant/embedded/lib/libcurl.so.4{,.backup}
sudo mv /opt/vagrant/embedded/lib/libcurl.so.4.4.0{,.backup}
sudo mv /opt/vagrant/embedded/lib/pkgconfig/libcurl.pc{,.backup}
@rohieb
rohieb / twitter-timeline-declutter.user.js
Last active April 25, 2022 12:38
Twitter Timeline Declutter user script
// ==UserScript==
// @name Twitter Timeline Declutter
// @namespace http://twitter.com/
// @version 2
// @description Remove "Who to Follow", "While you were away", "You might like" etc. from your timeline stream
// @author rohieb
// @homepage https://gist.github.com/rohieb/5df57de7625e0a2182f364b3c2b88599
// @updateURL https://gist.githubusercontent.com/rohieb/5df57de7625e0a2182f364b3c2b88599/raw
// @match *://twitter.com/*
// @grant GM_addStyle
@julianlam
julianlam / provisioning-unprivileged-lxc-containers-via-login-or-script.md
Last active September 7, 2023 12:45
Provisioning and usage of unprivileged LXC containers via indirect login or script #blog

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
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

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