Skip to content

Instantly share code, notes, and snippets.

View ykzts's full-sized avatar
💛
Inaba Haneru Love

Yamagishi Kazutoshi ykzts

💛
Inaba Haneru Love
View GitHub Profile
import { useEffect, useMemo, useRef } from 'react'
function useAbortSignal(): AbortSignal | undefined {
const controller = useRef(
typeof AbortController !== 'undefined' ? new AbortController() : undefined
)
const signal = useMemo(() => controller.current?.signal, [controller.current])
useEffect(
() => () => {
@ykzts
ykzts / capture.md
Last active December 19, 2020 04:09

↓のをブックマークのURLを入れるところにコピペする。

javascript:(function(n%2Ce%2Ca%2Cc)%7Bv%3Dn%5Bn.length-1%5D%3Be.width%3Dv.videoWidth%3Be.height%3Dv.videoHeight%3Bc%3De.getContext('2d')%3Bc.drawImage(v%2C0%2C0)%3Be.toBlob(function(b)%7Ba.href%3DURL.createObjectURL(b)%3Ba.download%3DDate.now()%2B'.png'%3Ba.click()%7D%2C'image%2Fpng')%7D)(document.getElementsByTagName('video')%2Cdocument.createElement('canvas')%2Cdocument.createElement('a'))
@ykzts
ykzts / memo.md
Last active December 13, 2020 15:39
名前 チャンネル登録者数 (2018年10月11日 19:30) チャンネル登録者数 (2020年12月14日 0:30) 備考
キズナアイ 2,259,005 2,870,000 (+610,995)
キズナアイ (Games) 1,115,768 1,530,000 (+414,232)
ミライアカリ 681,164 715,000 (+33,836)
シロ 557,226 699,000 (+141,774)
ねこます 260,532 182,000 (-78,532) 引退
ときのそら 191,163 567,000 (+375,837)
富士葵 148,640 292,000 (+143,360)
YuNi 143,084 359,000 (+215,916)
class MastodonMetricsHandler
def call(env)
host = env['HTTP_HOST']
instance = fetch_instance_meta(host)
stats = instance['stats']
headers = {
'Content-Type' => 'text/plain; charset=UTF-8',
}
body = [
$ find . -name '*.gemspec' | xargs grep required_ruby_version
./vendor/bundle/ruby/2.4.0/gems/tzinfo-1.2.4/tzinfo.gemspec:  s.required_ruby_version = '>= 1.8.7'
./vendor/bundle/ruby/2.4.0/gems/kaminari-actionview-1.1.1/kaminari-actionview.gemspec:  spec.required_ruby_version = '>= 2.0.0'
./vendor/bundle/ruby/2.4.0/gems/paperclip-5.1.0/paperclip.gemspec:  s.required_ruby_version = ">= 2.1.0"
./vendor/bundle/ruby/2.4.0/gems/public_suffix-3.0.1/public_suffix.gemspec:  s.required_ruby_version = ">= 2.1"
./vendor/bundle/ruby/2.4.0/gems/simplecov-html-0.10.2/simplecov-html.gemspec:  gem.required_ruby_version = ">= 1.8.7"
./vendor/bundle/ruby/2.4.0/gems/brakeman-4.0.1/bundle/ruby/2.3.0/gems/temple-0.7.7/temple.gemspec:  s.required_ruby_version = '>=1.9.2'
./vendor/bundle/ruby/2.4.0/gems/brakeman-4.0.1/bundle/ruby/2.3.0/gems/safe_yaml-1.0.4/safe_yaml.gemspec:  gem.required_ruby_version = ">= 1.8.7"
./vendor/bundle/ruby/2.4.0/gems/brakeman-4.0.1/bundle/ruby/2.3.0/gems/slim-3.0.7/slim.gemspec:  s.required_ru
$ git status
On branch master
You have unmerged paths.
  (fix conflicts and run "git commit")
  (use "git merge --abort" to abort the merge)

Changes to be committed:

	modified:   .babelrc
#!/bin/sh
for f in $(find public/packs -name *.js -or -name *.css -type f); do
if [ ! -f ${f}.br ]; then
brotli --quality 10 --input ${f} --output ${f}.br
chmod 644 ${f}.br
fi
done
#! /bin/sh
# based on https://github.com/h2o/h2o/blob/v2.2.2/share/h2o/fetch-ocsp-response
usage() {
cat <<EOT
Usage: $0 [<options>] <certificate-file>
Options:
--issuer <file> issuer certificate (if omitted, is extracted from the
certificate chain)

差し替えた方が良さそうな画像一覧

  • app/javascript/images/
    • elephant-fren.png
    • elephant-friend-1.png
    • fluffy-elephant-friend.png (リストラ?)
    • logo.png
    • logo.svg
    • mastodon-getting-started.png
  • mastodon-not-found.png
  • #000
  • rgb(0, 0, 0)
  • rgba(0, 0, 0, 0)