Skip to content

Instantly share code, notes, and snippets.

@anekos
anekos / insensitive-mattn.css
Created Oct 22, 2020
センシティブな人物をインセンシティブにします
View insensitive-mattn.css
@-moz-document domain("chrome.google.com") {
img[src="https://lh3.googleusercontent.com/cf8qK3xF5SiuKQGaVC_J39ztLtZkjZ-YLl-Lja85-gadBMZUJ_JTOy_rMkQi6yrFJpNCordAHg=w128-h128-e365-rj-sc0x00ffffff"] {
filter: blur(2px);
}
}
View gist:4647275d8b828b258c8b30e4f9d61581
Array.from(document.querySelectorAll('.gameListRowItemName')).map((it) => it.textContent).join("\n")
@anekos
anekos / tally-counter
Created May 6, 2020
Tally counter (Press ESC to exit)
View tally-counter
#!/bin/bash
set -euC
# set -o pipefail
declare -A counts
function result () {
stty "$stty"
for i in "${!counts[@]}"
@anekos
anekos / support-internet-explorer.js
Created Mar 5, 2020
Internet Explorer に対応する JavaScript
View support-internet-explorer.js
if (~window.navigator.userAgent.indexOf('Trident')) {
location.href = 'https://getfirefox.com';
}
View kakukaku
#!/bin/bash
set -euC
# set -o pipefail
# exec 5>> /tmp/xmosh/shell-script-debug.out
# BASH_XTRACEFD="5"
# PS4='$LINENO: '
# set -x
View hayai
#!/bin/bash
GLOB='**/*.md *.txt'
set -o noglob
p-args $GLOB
echo ''
set +o noglob
@anekos
anekos / not_works.sh
Created Oct 1, 2019
シェルスクリプトでクロージャ(勿論動かない)
View not_works.sh
function upload () {
local src="$1"
# ...
mv "$temp" "$src"
clean_src () {
rm "$src"
}
trap clean_src EXIT
@anekos
anekos / dont-say.vim
Created May 30, 2019
Vim で良くない単語を自動で修正するスクリプト
View dont-say.vim
iabbr dog cat
View sum.c
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
if (0 < argc) {
printf("%d\n", main(-argc, argv));
return 0;
}
if (-argc - 1) {