Skip to content

Instantly share code, notes, and snippets.

View masui's full-sized avatar

Toshiyuki Masui masui

View GitHub Profile
@masui
masui / local.json
Last active August 19, 2023 00:05
ローカル地名なぞなぞ
{
"questions": [
"犬をもらったのは?",
"鉄条網で怪我したのは?",
"日下部君の家は?",
"上田君の家は?",
"ミサホの家は?",
"祖父母の家は?",
"マサコの家は?",
"いっとき住んでたのは?",
@masui
masui / episopass.json
Created August 13, 2023 01:10
人名なぞなぞ
{
"questions": [
"背負い投げされたのは?",
"土管が積まれてたのは?",
"すぐ行方不明になるのは?",
"かるたで負けたのは?",
"犬に似てるのは?",
"腕相撲で勝ったのは?",
"梅干しの種を投げたのは?",
"大吉なのは?",
@masui
masui / empty.json
Created August 12, 2023 12:16
EpisoPassの空データ
{
"answers": [
"(回答例1)"
],
"questions": [
"(問題例1)"
]
}
@masui
masui / kaigai.json
Created August 6, 2023 03:53
海外なぞなぞ
{
"answers": [
"ボストン",
"ニューヨーク",
"フィラデルフィア",
"ワシントンDC",
"アトランタ",
"ニューオーリンズ",
"ピッツバーグ",
"ペンシルベニア",
@masui
masui / kenmei.json
Created August 6, 2023 03:24
県名なぞなぞ
{
"answers": [
"北海道",
"青森",
"岩手",
"宮城",
"秋田",
"山形",
"福島",
"茨城",

Keybase proof

I hereby claim:

  • I am masui on github.
  • I am masui (https://keybase.io/masui) on keybase.
  • I have a public key ASA40groz95nO2cW-i5mIW6RTTMWM1xh88GmTTrUAYPFego

To claim this, I am signing this object:

@masui
masui / gyazo.rb
Created December 28, 2015 13:23
gyazoコマンド
#!/usr/bin/ruby
# -*- coding: utf-8 -*-
#
require 'shellwords'
if ARGV.length == 0
STDERR.puts "% gyazo query"
STDERR.puts "% gyazo -f uploadfile1 uploadfile2"
exit
end
@masui
masui / gyazofull.rb
Created October 30, 2015 14:31
gyazofull
#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
#
# 全画面Gyazoると同時にファイル情報/アプリ情報のメタデータをアップする
#
require 'net/http'
require 'json'
require 'digest/md5'
@masui
masui / register.sh
Created August 25, 2015 12:01
Gyazo2
#!/bin/sh
pushd /var/www/html/master.gyazo.com/current/; RAILS_ENV=staging bundle exec rails runner /home/nota/masui/register.rb $1 $2 $3; popd
@masui
masui / register.rb
Created August 25, 2015 12:00
Gyazo1
id = ARGV[0]
time = ARGV[1]
url = ARGV[2]
exit unless id && time && url
time = time.gsub(/_/,' ')
d = Image.find_by(image_id: id)
d.date = Time.zone.parse(time).utc
d.metadata = { 'url' => url }