Skip to content

Instantly share code, notes, and snippets.

@anekos
anekos / evernote-webclipper-methods.js
Created May 6, 2012 04:45
evernote web clipper のメソッド一覧
evernote_doAction( document.popupNode, 'CLIP_ACTION_FULL_PAGE' );
evernote_doAction( document.popupNode, 'CLIP_ACTION_IMAGE' );
evernote_doAction( document.popupNode, 'CLIP_ACTION_SELECTION' );
evernote_doAction( document.popupNode, 'CLIP_ACTION_URL' );
evernote_doAction( document.popupNode, 'NEW_NOTE_ACTION' );
#!/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 / html-builder.rb
Created April 21, 2010 06:02
Ruby DSL - HTML生成
#!/usr/bin/ruby
#[=c= ruby -rubygems % ]
class HTMLBuilder
def initialize (tag_name = 'html', indent = 0, &block)
@indent = indent
@tag_name = tag_name
@attrs = {}
@contents = []
self.instance_eval(&block)
@anekos
anekos / without timzone.sql
Last active April 9, 2023 10:17
telegraf → TimescaleDB を Grafana に表示する
SELECT
host,
MAX(usage_user),
time_bucket('10min', time) AS bucket
FROM
telegraf.cpu
WHERE
(
to_timestamp($__unixEpochFrom()) -
(NOW() - NOW() AT TIME ZONE 'UTC')
for n in $(seq 1 8)
do
curl "https://www.google.com/logos/fnbx/animal_paws/audio/cat_sound_${n}.mp3" > "/tmp/xmosh/cat_sound_${n}.mp3"
done
for n in $(seq 1 9)
do
curl "https://www.google.com/logos/fnbx/animal_paws/cat_paw_${n}.png" > "/tmp/xmosh/cat_paw_${n}.png"
done
@anekos
anekos / switch-sddm-and-gdm.sh
Created December 21, 2022 13:24
SDDM と GDM を切り替えるスクリプト
#!/bin/bash
set -euC
# set -o pipefail
# exec 5>> /tmp/xmosh/shell-script-debug.out
# BASH_XTRACEFD="5"
# PS4='$LINENO: '
# set -x
@anekos
anekos / app.js
Created January 11, 2018 08:23
Elgato Stream Deck の自分アプリ
// http://www.iconshock.com/flat-icons/general-icons/audio-volume-none-icon
// https://www.svgrepo.com/svg/47144/air-conditioner
// https://www.flaticon.com/packs/characters-and-numbers
// https://github.com/Lange/node-elgato-stream-deck
// https://github.com/joshmarinacci/node-pureimage
const FS = require('fs');
const HTTP = require('http');
const PImage = require('pureimage');
const Path = require('path');
@anekos
anekos / GCP.txt
Last active May 9, 2022 13:37
ゴミ文字を OCR してみた
2022-04-08
早くかくしな。 おおさめ下さい。
ごめんね。Sebastian, だっことそ。
&い)石けん。毎日良い臭い。におい。
石好き。
リんご。Quartz ボこん。石好を
Franc
Franc
九五六-Chang
風呂入れ。ファシ。
@anekos
anekos / tobu.js
Created April 4, 2021 11:41
getpocket でオリジナルのページに勝手に飛ぶ
// ==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 October 22, 2020 09:05
センシティブな人物をインセンシティブにします
@-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);
}
}