Skip to content

Instantly share code, notes, and snippets.

View tsuyukimakoto's full-sized avatar
🏠
Working from home

makoto tsuyuki tsuyukimakoto

🏠
Working from home
View GitHub Profile
tap "homebrew/bundle"
tap "homebrew/cask"
tap "homebrew/core"
brew "tree"
cask "alfred"
cask "backblaze"
cask "dropbox"
cask "google-backup-and-sync"
cask "google-chrome"
cask "iterm2"
tap "homebrew/bundle"
tap "homebrew/cask"
tap "homebrew/core"
brew "gist"
brew "tree"
cask "alfred"
cask "backblaze"
cask "dropbox"
cask "google-backup-and-sync"
cask "google-chrome"
@tsuyukimakoto
tsuyukimakoto / private_var.py
Last active May 4, 2020 13:21
Python's private variable starts with dunder(double under) and not ends with dunder.
class Spam:
def __init__(self):
self._var = "I'm under var"
self.__dunder_var = "I'm double under var"
def get_var(self):
return self._var
def get_dunder_var(self):
@tsuyukimakoto
tsuyukimakoto / convert_alnum_zenhan.py
Created June 20, 2021 02:01
数字・アルファベット・+-を全角から半角に変換(他の文字はそのまま)
ALNUM_ZEN = ("0123456789"
"ABCDEFGHIJ"
"KLMNOPQRST"
"UVWXYZ"
"abcdefghij"
"klmnopqrst"
"uvwxyz"
"+ー")
ALNUM_HAN = ("0123456789"
@tsuyukimakoto
tsuyukimakoto / if_then.go
Created July 2, 2022 10:29
scopeを狭くできるif
package main
import "fmt"
func a() (x string, y bool) {
return "test", true
}
func main() {
if _, y := a(); y {
# Update exif information of image files in yyyy_mm_dd folder to yyyy_mm_dd 10:00:00
# need exiftool <- brew install exiftool
from pathlib import Path
import subprocess
def dt_fmt(dir_name):
yyyy, mm, dd = dir_name.split('_')
return f'{yyyy}:{mm}:{dd} 10:00:00'
@tsuyukimakoto
tsuyukimakoto / gopro_hero9_mp4_exif_sample.txt
Created September 9, 2023 03:48
GoPro Hero9 mp4 exif sample
This file has been truncated, but you can view the full file.
$ exiftool -ee GX010351.MP4
ExifTool Version Number : 12.50
File Name : GX010351.MP4
Directory : /Volumes/Untitled/DCIM/100GOPRO
File Size : 4.0 GB
File Modification Date/Time : 2023:09:07 07:17:03+09:00
File Access Date/Time : 2023:09:09 12:43:12+09:00
File Inode Change Date/Time : 2023:09:07 07:17:03+09:00
File Permissions : -rwxrwxrwx