Skip to content

Instantly share code, notes, and snippets.

Ajnasz /
Last active May 19, 2018
Download stuff from humble-bundle in batch
View commit-msg
# An example hook script to check the commit log message.
# Called by "git commit" with one argument, the name of the file
# that has the commit message. The hook should exit with non-zero
# status after issuing an appropriate message if it wants to stop the
# commit. The hook is allowed to edit the commit message file.
# To enable this hook, rename this file to "commit-msg".
Ajnasz / background.js
Last active Oct 1, 2017
youtube embed blocker webextension
View background.js
console.log('Loading: ' + requestDetails.url);
return { cancel: true };
{urls: ['*://*']},
set -e
while [ -f $PID_FILE ];do
exit 0;
Ajnasz / fluxbox_init
Created Aug 16, 2017
How to add rootmenu to fluxbox toolbar
View fluxbox_init
session.screen0.toolbar.button.rootmenu.label: rootmenu
session.screen0.toolbar.button.rootmenu.commands: RootMenu button.rootmenu, workspacename, iconbar, systemtray, clock
Ajnasz /
Last active Apr 27, 2020
suckless terminal config
set -e
git co -- .
patch < st-scrollback-20170329-149c0d3.diff
View gist:f63be5047b84d5104dd6d8e16f81deb9
module.exports = function (robot) {
robot.hear(/test topic/, function (msg) {
msg.topic('test topic');
View .tmux.conf
# Set the prefix to ^A.
unbind C-b
set -g prefix C-a
bind a send-prefix
bind-key C-a last-window
bind-key Tab select-pane -D
bind-key k select-pane -U
bind-key j select-pane -D
bind-key h select-pane -L
Ajnasz /
Created Feb 9, 2015
Remount nfs storage
# Remount nfs storage
ls /storage > /dev/null
if [ "$?" -ne "0" ]; then
echo "Error listing /storage" 1>&2
umount /storage
mount /storage
Ajnasz / hup-comment-expand.js
Last active Aug 29, 2015
expands comments on click
View hup-comment-expand.js
var comments = document.querySelector('#comments');
function findParentComment(elem) {
while (elem && elem.parentNode) {
if (elem.classList.contains('comment')) {
return elem;
elem = elem.parentNode;