Skip to content

Instantly share code, notes, and snippets.

@stepnem
stepnem / perlipc-sighandler.sh
Created April 11, 2024 10:51
perlipc.pod signal handler exec example
#!/bin/sh
check() {
printf '\nTesting %s\n' "$*"
"$@" &
sleep 1
kill -HUP $!
sleep 1
kill -HUP $!
sleep 1
kill $!
@stepnem
stepnem / dmesg
Created October 29, 2017 00:20
Arch Linux on Panasonic Toughbook CF-AX2
[ 0.000000] microcode: microcode updated early to revision 0x1c, date = 2015-02-26
[ 0.000000] random: get_random_bytes called from start_kernel+0x42/0x4b7 with crng_init=0
[ 0.000000] Linux version 4.13.8-1-ARCH (builduser@tobias) (gcc version 7.2.0 (GCC)) #1 SMP PREEMPT Wed Oct 18 11:49:44 CEST 2017
[ 0.000000] Command line: BOOT_IMAGE=/vmlinuz-linux root=UUID=c1509a25-de05-4470-bcbe-09a30bdee2f1 rw resume=/dev/sda2 resume_offset=253952..
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
[ 0.000000] x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256
[ 0.000000] x86/fpu: Enabled xstate features 0x7, context size is 832 bytes, using 'standard' format.
[ 0.000000] e820: BIOS-provided physical RAM map:
@stepnem
stepnem / barfu
Created August 12, 2012 10:13
Jump to a command, mapping or option source definition from Pentadactyl
[.pentadactylrc:]
com! jumptodef,jd -literal=1 -nargs=1 -complete help
\ -js buffer.viewSource(plugins.misc.sourceLocation(args[0]))
[plugins/misc.js:]
function sourceLocation(str) {
if (isArray(str))
str = str[0];
function mapping(s) {
let [, mc, key] = /(?:(.)_)?(.*)/.exec(s);
@stepnem
stepnem / context-search.js
Created January 12, 2012 20:33
Search keyword bookmarks trough the mouse context menu
// Almost all of this is courtesy Kris Maglione, I just made some adjustments
XML.prettyPrinting = false;
XML.ignoreWhitespace = true;
let objects = Class({
get eventTarget() this,
fooEvents: {
popupshowing: function onPopupShowing(event) {
mow.contextEvents.popupshowing.call(mow, event);
}
@stepnem
stepnem / delicious.js
Created November 12, 2011 01:44
Delicious plugin for Pentadactyl
// Originally based on
// http://code.google.com/p/vimperator-labs/issues/detail?id=241
XML.ignoreWhitespace = false;
XML.prettyPrinting = false;
var INFO =
<plugin name='delicious' version='2.2'
summary='Interface to Delicious bookmarks'
href='https://gist.github.com/1359881'
xmlns={NS}>
@stepnem
stepnem / caret-hint.js
Created September 18, 2011 19:13
Pentadactyl plugin for moving caret position and/or selecting text by hinting
/* NEW BSD LICENSE {{{
Copyright (c) 2009-2011, anekos.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,