Skip to content

Instantly share code, notes, and snippets.

@imaizume
imaizume / Request.swift
Created September 19, 2025 14:10
iOSDC Japan 2025 発表関連のコード
//
// Request.swift
// VisionFrameworkDemo
//
// Created by tomohiro-imaizumi on 2025/09/19.
//
import CoreGraphics
import Vision
@imaizume
imaizume / LICENCE
Created September 19, 2025 05:32
This license applies to all public gists https://gist.github.com/imaizume
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
@imaizume
imaizume / open_url.zsh
Last active August 11, 2025 03:24
起動・接続しているiOS/AndroidデバイスでURLを開くZSH関数
#!/usr/bin/env zsh
# URL履歴ファイル
URL_HISTORY_FILE="$HOME/.url_history"
URL_HISTORY_MAX=100
# URL履歴にURLを追加
add_to_history() {
local url=$1
@imaizume
imaizume / html5-blank-template
Created August 6, 2022 09:24 — forked from iwek/html5-blank-template
HTML5 Blank Template with jQuery
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Blank HTML5</title>
<style>
</style>
</head>
<body>
@imaizume
imaizume / update_memo.rb
Last active September 19, 2022 11:50
A simple workflow to save YouTube video to Notion page.
# Copyright (c) 2022 Tomohiro Imaizumi All rights reserved.
require 'uri'
require 'net/http'
require "json"
require 'optparse'
# Secrets
NOTION_API_TOKEN = ENV["NOTION_API_TOKEN"]
//
// ViewController.swift
//
// Created by @imaizume on 2021/09/03.
//
import UIKit
class ViewController: UIViewController {
@imaizume
imaizume / meet.rb
Created June 3, 2020 12:49
A simple Ruby script to open google meet URL from CLI. Thankfully inspied by miyagawa's perl script (https://gist.github.com/miyagawa/986e4034a09e6c822a832a4e283f331f)
#!/usr/bin/env ruby
require 'date'
require 'pp'
calendar = 'your-calendar@example.com'
regex = /^https?:\/\/meet\.google.com\/[\w-]+$/i
now = DateTime.now
ends = now + Rational(1, 24) # within 1h
@imaizume
imaizume / pod_updatable_info.awk
Last active May 18, 2020 14:46
A simple awk script which parse output from "pod outdated" and format into markdown table so that you can easily have a grasp of update availability for libraries you use.
#
# pod_updatable_info.awk
#
# Created by Tomohiro Imaizumi on 5/18/20.
# Copyright © 2017 Tomohiro Imaizumi. Licensed under MIT.
#
BEGIN {
print "| Library | Current | Podfile Latest | Global Latest | `pod update` | Podfile Specification |"
print "|:---:|:---:|:---:|:---:|:---:|:---:|"
@imaizume
imaizume / index.html
Last active July 25, 2025 08:17
ボタンによるメニュー表示と非表示切り替えのサンプル
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>sample</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/uikit@3.21.13/dist/css/uikit.min.css" />
<script src="https://cdn.jsdelivr.net/npm/uikit@3.21.13/dist/js/uikit.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/uikit@3.21.13/dist/js/uikit-icons.min.js"></script>
</head>
@imaizume
imaizume / README.md
Last active September 2, 2019 07:52
Simple ruby script to generate screen shot preview as markdown files from snapshot testing result.

README

For iOSSnapshotTestCase (screenshots-preview-generator-for-ios-snapshot-testcase.rb)

This scripts works under the condition that your test case

  • includes .OS, .screenSize to fileNameOptions at least.
  • specifies folderName which will be the markdown file name.
  • specifies identifier for each FBSnapshotVerifyView call which will be the header of columns.