Skip to content

Instantly share code, notes, and snippets.

@wis
wis / TopLevelDotNamer.js
Last active November 11, 2020 15:17
parcel 2 @parcel/namer-default (DefaultNamer.js) fork
// @flow strict-local
import type {Bundle, FilePath} from '@parcel/types';
import {Namer} from '@parcel/plugin';
import ThrowableDiagnostic from '@parcel/diagnostic';
import assert from 'assert';
import path from 'path';
import nullthrows from 'nullthrows';
@wis
wis / rofi --help
Created November 11, 2020 08:23
rofi --help
rofi usage:
rofi [-options ...]
Command line only options:
-no-config Do not load configuration, use default values.
-v,-version Print the version number and exit.
-dmenu Start in dmenu mode.
-display [string] X server to contact.
${DISPLAY}
-h,-help This help message.
@wis
wis / private_fork.md
Created May 2, 2020 08:20 — forked from 0xjac/private_fork.md
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

@wis
wis / txt2qrs.sh
Created May 6, 2019 14:41 — forked from pachanka/txt2qrs.sh
A shell script that uses qrencode to generate printable QR codes to backup sensitive data on paper (like bitcoin or PGP keys).
#!/bin/sh
# I called it ~/bin/txt2qrs.sh but you can call it whatever you like.
usage="USAGE:\n
\t$0 path/to/file.txt [OPTIONS]\n
OPTIONS:\n
\t--help displays this message\n
\t--size default 10\n
\t--dpi default 300\n
@wis
wis / rofi -help.txt
Last active March 21, 2019 12:11
rofi -help
rofi usage:
rofi [-options ...]
Command line only options:
-no-config Do not load configuration, use default values.
-v,-version Print the version number and exit.
-dmenu Start in dmenu mode.
-display [string] X server to contact.
${DISPLAY}
-h,-help This help message.
@wis
wis / scrape-emoji-stats.js
Created March 5, 2019 03:08
scrape emojistats.org
var data = [...document.querySelectorAll('#emojilist-wrapper > ul > li')].
map(e => [...e.attributes].find(a => a.name.startsWith('data-count'))).
map(a => ({"hex": a.name.replace('data-count',""),
"dayssincereleased": a.ownerElement.attributes['data-dayssincereleased'].nodeValue,
"currentcount": a.ownerElement.attributes['data-currentcount'].nodeValue,
"dailycount": a.ownerElement.attributes['data-dailycount'].nodeValue
}));
@wis
wis / github-show-stats-on-graph.css
Created January 24, 2019 17:40
github show repository language stats percentages on graph user style sheet: show repository language stats percentages on graph without having to click the graph to toggle showing.
.repository-lang-stats-graph .language-color {
line-height: inherit;
overflow: hidden;
text-indent: -9999px;
word-break: break-all;
}
.repository-lang-stats-graph .language-color:before {
content: attr(aria-label);
text-indent: 0;
float: left;
@wis
wis / .Xmodmap
Created November 27, 2018 16:21
current keyboard layout
! xmodmap for the Colemak Mod-DH layout (US, ISO keyboard, Wide layout).
! http://colemakmods.github.io/mod-dh/
! Public domain.
keycode 49 = grave asciitilde dead_tilde asciitilde
keycode 10 = bracketleft braceleft guillemotleft U2039
keycode 11 = bracketright braceright guillemotright U203a
keycode 12 = 1 exclam exclamdown onesuperior
keycode 13 = 2 at masculine twosuperior
keycode 14 = 3 numbersign ordfeminine threesuperior
@wis
wis / keybase.md
Created May 10, 2018 15:56
boop beep, I told you so

Keybase proof

I hereby claim:

  • I am wis on github.
  • I am wis (https://keybase.io/wis) on keybase.
  • I have a public key ASA0383y_wStnkijtAhLfI84Bdi_n9pXBZ4-Y3KP0AeJkAo

To claim this, I am signing this object:

@wis
wis / .xmodmap
Created December 22, 2017 10:45
colemak dh wide (+~2 of my own mods)
! xmodmap for the Colemak Mod-DH layout (US, ISO keyboard, Wide layout).
! http//colemakmods.github.io/mod-dh/
! Public domain.
keycode 49 = grave asciitilde dead_tilde asciitilde
keycode 10 = 1 exclam exclamdown onesuperior
keycode 11 = 2 at masculine twosuperior
keycode 12 = 3 numbersign ordfeminine threesuperior
keycode 13 = 4 dollar cent sterling
keycode 14 = 5 percent EuroSign yen