Skip to content

Instantly share code, notes, and snippets.

Avatar

shibafu shibafu528

View GitHub Profile
@shibafu528
shibafu528 / mikutter-update-plugins-to-gtk3.sh
Last active Dec 22, 2021
mikutter 5.0でアップデートが必要なプラグインの一部を自動更新するスクリプト
View mikutter-update-plugins-to-gtk3.sh
#!/bin/sh
if [ -z "$MIKUTTER_CONFROOT" ]; then
MIKUTTER_CONFROOT="$HOME/.mikutter"
fi
echo "MIKUTTER_CONFROOT: $MIKUTTER_CONFROOT"
if [ ! -d "$MIKUTTER_CONFROOT" ]; then
echo "MIKUTTER_CONFROOT does not exist."
exit 1
@shibafu528
shibafu528 / twitter-bootstrap-gtk3.sh
Last active Nov 6, 2021
install mikutter twitter plugins for topic/887-gtk3
View twitter-bootstrap-gtk3.sh
#!/bin/bash
# original: https://github.com/mikutter/twitter_bootstrap/blob/7704d9a8da4b6cc1fa4d8baad8a8eba1d455b704/twitter-bootstrap.sh
# GTK3_FORKS data source: https://twitter.com/tsutsuii/status/1455931218730500103
# usage:
# checkout to ~/.mikutter/plugin
# $ ./twitter-bootstrap-gtk3.sh
#
# checkout to another confroot
# $ ./twitter-bootstrap-gtk3.sh <confroot-path>
View SKK-JISYO.pjsekai.utf8
;;; -*- coding: utf-8 -*-
;; okuri-ari entries.
;; okuri-nasi entries.
あおやぎとうや /青柳冬弥/
あきやまみずき /暁山瑞希/
あさひなまふゆ /朝比奈まふゆ/
あずさわこはね /小豆沢こはね/
おおとりえむ /鳳えむ/
かみしろるい /神代類/
きりたにはるか /桐谷遥/
View delayer_high_water_marker.rb
Plugin.create :delayer_high_water_marker
Delayer.default.instance_eval do
alias run_once_dhwm run_once
def run_once(...)
s1 = size_norec
res = run_once_dhwm(...)
s2 = size_norec
warn "delayer tasks #{s1} -> #{s2}"
@shibafu528
shibafu528 / ps-in.bat
Last active Jul 18, 2020
Powershellをbatに埋めこむテクニック。引用元が消えてたのでバックアップ。
View ps-in.bat
@powershell -NoProfile -ExecutionPolicy Unrestricted "$s=[scriptblock]::create((gc \"%~f0\"|?{$_.readcount -gt 1})-join\"`n\");&$s" %*&goto:eof
Write-Host "Hello, World!!"
View copy_as_grpcurl.js
console.log(JSON.stringify(request));
console.log(JSON.stringify(imports));
console.log(JSON.stringify(server));
const args = [];
// -d
args.push('-d');
args.push(`'${request.body.replace(/\n/g, '')}'`);
@shibafu528
shibafu528 / sayaka-on-arch.patch
Created Jan 3, 2020
Arch Linuxでsayakaを動かすためにいじった場所
View sayaka-on-arch.patch
diff --git a/vala/System.OS.native.c b/vala/System.OS.native.c
index 1d8f950..03256db 100644
--- a/vala/System.OS.native.c
+++ b/vala/System.OS.native.c
@@ -28,7 +28,9 @@
#include <sys/ioctl.h>
#include <sys/param.h>
#include <sys/sysctl.h>
+#if defined(BSD)
#include <sys/ttycom.h>
View kadoma.rb
Plugin.create :kadoma do
on_update do |w, ms|
ms.each do |m|
if m.description.include?("門真") || (m.description.include?("@") && m.description.include?("いやじゃ"))
compose(w, body: "@toshi_a@social.mikutter.hachune.net まちカドまぞくを見ろ")
end
end
end
end
@shibafu528
shibafu528 / mikutter-faq.el
Created Nov 20, 2019
mikutter FAQからQを取り出す練習
View mikutter-faq.el
(let ((url-request-method "GET") response)
(with-current-buffer (url-retrieve-synchronously "https://mikutter.hachune.net/faq.json")
(goto-char (point-min))
(re-search-forward "\n\n")
(set-buffer-multibyte t)
(setq response (json-read)))
(with-temp-buffer
(mapcar (lambda (faq)
(insert (cdr (assoc 'question faq)) "\n"))
response)
@shibafu528
shibafu528 / open_favstar_of_tweet.rb
Created Mar 31, 2019 — forked from penguin2716/open_favstar_of_tweet.rb
選択されたTweetのFavstarを見るmikutterプラグイン
View open_favstar_of_tweet.rb
# -*- coding: utf-8 -*-
# favstarを開く
Plugin.create :open_favstar_of_tweet do
command(:open_favstar_of_tweet,
name: 'このTweetのFavstarを見る',
condition: Plugin::Command[:HasMessage],
visible: true,
role: :timeline) do |opt|