Skip to content

Instantly share code, notes, and snippets.

@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
Created February 2, 2020 05:55
ボタンによるメニュー表示と非表示切り替えのサンプル
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>sample</title>
<style>
// .hidden { display: none; } // [A] 用
.hidden2 { display: none; } // [B] 用
#content {
@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.
@imaizume
imaizume / RemoteConfigManager.swift
Last active February 18, 2021 06:36
How to manage parameters for Firebase Remote Config in Swift easily.
// MARK:- definition
/// Constraint for Parameter Type Definition.
protocol ParameterProtocol {
/// Parameter name in Firebase console. e.g. "beta_test_1"
var name: String { get }
/// Default value to be set to Remote Config object.
var defaultValue: [String: NSObject] { get }
}
@imaizume
imaizume / matome.md
Last active January 9, 2019 10:13 — forked from atsushisakai-gh/matome.md
井戸端iOS飯で過去に見た動画まとめ

井戸端iOS

とは?

井戸端iOSとは、昼休み1時間+MTG分の30分の計1時間30分を利用して、 NBFオフィスのコラボのプロジェクターとスクリーンを利用して、 最新のスマホアプリ開発技術に関する動画を見ながらご飯を食べて、 交流する場です。

ぜひお気軽にご参加ください。

#!/bin/bash
IFS_bak=$IFS
IFS=$'\n'
s3_movies=($(aws s3 ls --profile=s3-admin s3://private.imaizu.me/movies/ | awk '{print $4 " " $5}'))
local_movies=($(ls -1 *.mp4))
archive_dir=${HOME}/Desktop/archived_movies/
for s in "${s3_movies[@]}"; do