Skip to content

Instantly share code, notes, and snippets.

View funwarioisii's full-sized avatar

Kazuyuki Hashimoto funwarioisii

View GitHub Profile

東京に3年住んだ感想

来週で東京に住んで3年になる。 冬と夏で東京への感想は180度変わるのだが、冬バージョンで書いておきたい。

前提

もし自分を知らない人が読んだ際に、違和感を覚える可能性が否めないので書いてみる。

@funwarioisii
funwarioisii / backup-photo.rb
Last active February 26, 2023 05:44
This is a script that uploads files from an external storage device connected to macOS to Google Cloud Storage and copies them to the appropriate directory based on their file type.
def execute? = ENV["EXECUTE"] == '1'
date = Time.now.strftime("%Y%m%d")
sources = Dir.glob("/Volumes/Untitled/DCIM/*")
gcs_path = "gs://funwarioisii-photo-backup"
sources.each do |source|
command = "gcloud storage cp #{source}/* #{gcs_path}/original/#{date}"
print "RUN: #{command}\n"

speek という gem をリリースしてみた

speek という gem をリリースしてみたという記事です。

なにができるのか

users.schema のようなテーブル定義からモデルファイルの型定義を出力します。 ターミナルでの入力例はこんな感じです。

最近の悩み。メディア管理について

  • スマホでの撮影
    • Google Photo
  • X-T30での撮影
    • スマホ
      • Google Photo
    • PC
  • GCS
@funwarioisii
funwarioisii / working_time.rb
Created May 28, 2022 01:17
slack での打刻から勤怠を計算するスクリプト
def extract_post_time_from_slack_url(url)
unix_time = url.slice(/p(\d+)/).slice(1, 100).slice(0, 10).to_i
Time.at(unix_time)
end
def round_time(stamping_time) = Time.new(
stamping_time.year,
stamping_time.mon,
stamping_time.day,
stamping_time.hour,

cd-ghq というコマンドを便利に使っている

function cd-ghq {
  cd "$( ghq list --full-path | peco)"
}

alias cd-ghq='cd-ghq'
% firebase init hosting

     ######## #### ########  ######## ########     ###     ######  ########
     ##        ##  ##     ## ##       ##     ##  ##   ##  ##       ##
     ######    ##  ########  ######   ########  #########  ######  ######
     ##        ##  ##    ##  ##       ##     ## ##     ##       ## ##
     ##       #### ##     ## ######## ########  ##     ##  ######  ########

2021年6月の月報

もっと技術に関係ない文章もどんどん投稿したりしてみたいなと思ったのでgistからnoteに移ることにした

業務

最近は業務がすごく楽しい。楽しい理由は主に2つ。

Flutter(Provider+ChangeNotifier)で初期値を非同期に設定する方法

import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';

class User {
  String id;
@funwarioisii
funwarioisii / kakikata.md
Created June 9, 2021 13:47
Pull Requestのdescriptionの書き方

Pull Requestのdescriptionの書き方

(社内で公開した記事を少し編集して公開します)
入社してから半年近く、Pull Requestのdescriptionが足りないという指摘を受け続けていました。
最近はその指摘を受けることは減った気がします。

自分ではマシになったと思っていて、それは大体以下のテンプレに沿って書いているからだと思っています。

テンプレ