Skip to content

Instantly share code, notes, and snippets.

View mpd-add-random.sh
#!/bin/sh
# Usage: add-random [[NUMBER [FILTER]]
sels="${1:-10}"
filter="${2:-}"
mpc listall | grep "$filter" | shuf | head "-n" "$sels" | while read selected
do
echo "$selected"
@anekos
anekos / GCP.txt
Last active May 9, 2022
ゴミ文字を OCR してみた
View GCP.txt
2022-04-08
早くかくしな。 おおさめ下さい。
ごめんね。Sebastian, だっことそ。
&い)石けん。毎日良い臭い。におい。
石好き。
リんご。Quartz ボこん。石好を
Franc
Franc
九五六-Chang
風呂入れ。ファシ。
@anekos
anekos / tobu.js
Created Apr 4, 2021
getpocket でオリジナルのページに勝手に飛ぶ
View tobu.js
// ==UserScript==
// @name Auto jump to origin - getpocket
// @namespace Violentmonkey Scripts
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://getpocket.com/read/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
// ==/UserScript==
@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 / anekos-longtimeago.zsh
Created Jun 29, 2010
シェルで長い処理が終わったときに声で通知する
View anekos-longtimeago.zsh
function _anekos_longtimeago_preexec {
# マッチするコマンドの時は無視する
[[ $2 == (sc|screen|ssh|vim|git ci)\ * ]] && return
_anekos_longtimeago_time=`date +%s`
}
function _anekos_longtimeago_precmd {
[ ${+_anekos_longtimeago_time} = 1 ] || return
@anekos
anekos / kindle-cloud-reader.js
Last active Mar 8, 2020
Kindle Cloud Reader Key Mapper for Vimperator
View kindle-cloud-reader.js
/* NEW BSD LICENSE {{{
Copyright (c) 2014, 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,
@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';
}