Skip to content

Instantly share code, notes, and snippets.

View motoishmz's full-sized avatar

Motoi Shimizu motoishmz

View GitHub Profile
@motoishmz
motoishmz / osxSetup.command
Last active February 3, 2023 07:47 — forked from rettuce/osxSetup.command
osx setup command. use com.apple.dock.plist
#!/bin/sh
### Desktop & Screen Saver
# Desktopを黒に
echo "Change Desctop Pictures"
osascript -e 'tell application "Finder" to set desktop picture to POSIX file "/Library/Desktop Pictures/Solid Colors/Black.png"'
# ScreenSaver Kill
echo "Disable screensaver"
@motoishmz
motoishmz / mov2gif.py
Created August 24, 2022 08:43 — forked from satoruhiga/mov2gif.py
convert mov to gif animation
#!/usr/bin/env python
'''
DEPENDENCIES:
$ brew install ffmpeg
$ brew install imagemagick
$ python ./mov2gif.py input.mov output.gif 15
'''
@motoishmz
motoishmz / create_object_merge.py
Last active April 19, 2022 07:05
Creates `geo/object_merge` with the selected Null nodes such as `OUT_MyObject` #Houdini
"""
- Select Null node(s)
- Run this script
- New geo(s) consists of `object_merge` which imports the selected Null node are created on /obj. The geo name would be the selected Null node name with removing prefix `OUT_`.
"""
def create_object_merge(selected_node):
prefix = "OUT_"
#!/bin/sh
# Tested on:
# macOS Catalina - Version 10.15.2
#
# !!!: # Reboot after running this script, or uncomment the last line
#
# ```
# How to disable SIP (System Integrity Protection)
# 1. Boot macOS with pressing Cmd+R
# me - this DAT
# scriptOp - the OP which is cooking
import mediapipe as mp
mp_face_detection = mp.solutions.face_detection
mp_drawing = mp.solutions.drawing_utils
"""
https://google.github.io/mediapipe/solutions/face_detection.html
MODEL_SELECTION
Array.prototype.shuffle = function()
{
var i = this.length;
while (i)
{
var j = Math.floor(Math.random() * i);
var t = this[--i];
this[i] = this[j];
this[j] = t;
}
@motoishmz
motoishmz / move_to_next_slide.scpt
Last active July 3, 2020 03:44
AppleScript + Keynote
tell application "Keynote"
activate
if not (exists document 1) then error number -128
try
if playing is false then start the front document
end try
tell the front document -- or "tell document 1"
-- my console_log("slide number of current slide: " & slide number of current slide, "my_log")
-- my console_log("slide number of last slide: " & slide number of last slide, "my_log")
if slide number of current slide is less than slide number of last slide then

BACKSPACE Productions Inc. / backspacetokyo パートナー・アルバイトスタッフ募集

この募集は2019年10月10日に締め切りました。
沢山の御応募ありがとうございました。

@motoishmz
motoishmz / ffmpeg.md
Created October 9, 2019 22:36 — forked from protrolium/ffmpeg.md
using ffmpeg to extract audio from video files

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

Convert WAV to MP3, mix down to mono (use 1 audio channel), set bit rate to 64 kbps and sample rate to 22050 Hz: