Skip to content

Instantly share code, notes, and snippets.

@koshian
koshian / rlbcchecker.rb
Last active October 22, 2023 18:14
Automate your Rocket League match data retrieval, efficiently fetching from Ballchasing.com via their API for further analysis through webhooks.
#!/usr/bin/env ruby
#
# This script takes data from Rocket League matches. It uses the API of Ballchasing.com,
# a service that can store replay data.
#
# It is written to run every minute in crontab.
#
# We use it to get win/loss data from private matches and to notify the results to Discord.
#
# Uploading replays to ballchasing.com can be done automatically by BakkesMod.
@koshian
koshian / opendata2json.rb
Created July 6, 2020 21:55
covid-19 open data の CSV をまとめて JSON にしてみる https://www.mhlw.go.jp/stf/covid-19/open-data.html
#!/usr/bin/env ruby
# coding: utf-8
require 'open-uri'
require 'csv'
require 'json'
CSV_LIST = [
'https://www.mhlw.go.jp/content/pcr_positive_daily.csv',
'https://www.mhlw.go.jp/content/pcr_tested_daily.csv',
'https://www.mhlw.go.jp/content/cases_total.csv',
[{"code":"zh","name":"中国語"},{"code":"en","name":"英語"},{"code":"ja","name":"日本語"},{"code":"ko","name":"ハングル"}]
@koshian
koshian / keybase.md
Last active August 20, 2019 01:29
keybase.md

Keybase proof

I hereby claim:

  • I am koshian on github.
  • I am koshian (https://keybase.io/koshian) on keybase.
  • I have a public key ASDULZOnf49rctv1ijPAyeR77gJTobPB6hLzh_FIXVK98Qo

To claim this, I am signing this object:

@koshian
koshian / j-magazine-scraper.rb
Created September 25, 2018 11:16
日本雑誌協会の印刷部数公表データからコミック誌の部数を拾ってきてCSV出力するスクリプトです。
#!/usr/bin/env ruby
# coding: utf-8
require 'nokogiri'
require 'open-uri'
require 'csv'
uri_template = 'https://www.j-magazine.or.jp/user/printed/index/%d/%d'
result = []
periods = []
@koshian
koshian / hbpost.rb
Last active April 20, 2017 07:26
はてなブックマークとマストドンを連携するためのCGIスクリプト
#!/usr/bin/ruby
# coding: utf-8
#
require 'cgi'
require 'net/https'
API_POINT = 'https://mstdn.jp/api/v1/statuses'
HBKEY='XXXXXXXXXXX'
ACCESS_TOKEN = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
@koshian
koshian / mozc_emacs_helper_build.patch
Last active February 20, 2016 21:17
To build mozc_emacs_helper on Mac OS X
diff --git a/src/build_mozc.py b/src/build_mozc.py
index b972602..59a65d0 100644
--- a/src/build_mozc.py
+++ b/src/build_mozc.py
@@ -211,6 +211,8 @@ def GetGypFileNames(options):
# Include subdirectory of win32 and breakpad for Windows
if options.target_platform == 'Windows':
gyp_file_names.extend(glob.glob('%s/win32/*/*.gyp' % SRC_DIR))
+ elif options.target_platform == 'Mac':
+ gyp_file_names.extend(glob.glob('%s/unix/emacs/*.gyp' % SRC_DIR))

段落

あのイーハトヴォのすきとおった風、夏でも底に冷たさをもつ青いそら、うつくしい森で飾られたモーリオ市、郊外のぎらぎら光る草の波。

あのイーハトヴォのすきとおった風、夏でも底に冷たさをもつ青いそら、うつくしい森で飾られたモーリオ市、郊外のぎらぎら光る草の波。

フォトライフ

@koshian
koshian / # sfntly - 2015-12-30_10-24-43.txt
Created December 30, 2015 01:25
sfntly (bramstein/webfonttools/sfntly) on OS X 10.11.2 - Homebrew build logs
Homebrew build logs for bramstein/webfonttools/sfntly on OS X 10.11.2
Build date: 2015-12-30 10:24:43
#!/bin/sh
SRC=$1
EXT=`basename $SRC | sed -e 's/^.*\.\(.*\)$/\1/'`
SIZES='iTunesArtwork_512x512 iTunesArtwork@2x_1024x1014 Icon-60@2x_120x120 Icon-60@3x_180x180 Icon-57_57x57 Icon-57@2x_114x114 Icon-29_29x29 Icon-29@2x_58x58 Icon-29@3x_87x87 Icon-40@2x_80x80 Icon-40@3x_120x120 Icon-76_76x76 Icon-76@2x_152x152 Icon-72_72x72 Icon-72@2x_144x144 Icon-50_50x50 Icon-50@2x_100x100'
for s in $SIZES; do
OPT=`echo $s | sed -e 's/^\(.*\)_\(.*\)$/\2 \1/'`
convert $SRC -resize ${OPT}.${EXT}
done