Skip to content

Instantly share code, notes, and snippets.

View motoishmz's full-sized avatar

Motoi Shimizu motoishmz

View GitHub Profile
@motoishmz
motoishmz / leading_zero_example.maxpat
Created December 1, 2016 22:17
@rhizmer このJsonをコピって File Open > New From Clipboard
{
"boxes" : [ {
"box" : {
"maxclass" : "message",
"text" : "salt",
"outlettype" : [ "" ],
"style" : "",
"numinlets" : 2,
"id" : "obj-37",
"patching_rect" : [ 383.0, 19.0, 29.5, 22.0 ],

twitterの検索術 (search/tweetssearch/universal)

search/tweets では一週間以上前のツイートは検索できないので注意

search/universal は公式のConsumerKey/ConsumerSecretでないと使用できない

当方では一切の責任を負いません

@motoishmz
motoishmz / 蜘蛛.txt
Created August 17, 2016 17:30
2年前の自分の謎メモ
パリティ
ストップビット
paf daddy
痛み十条
スーパーの女
1A = 100w
1A=1W÷1Vです
/*!
// for iOS: https://gist.github.com/motoishmz/5645053
// cite: http://qiita.com/Jacminik/items/a4c8fe20a4cba62f428b
icon_512x512@2x.png (1024px)
icon_512x512.png
icon_256x256@2x.png (512px)
icon_256x256.png
icon_128x128@2x.png (256px)
icon_128x128.png
@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
@motoishmz
motoishmz / amazon-calc.js
Created March 12, 2016 04:54 — forked from koyopro/amazon-calc.js
Amazonで一年間に使った金額と、注文履歴のTSVを出力するブックマークレット【2015年版】
// Amazonの注文履歴をTSV形式で出力するスクリプト
//
// 2015-01-01 時点での DOM 構造に対応, GoogleCrome, Opera でテスト済。
// formatEntry関数を書き換えれば自由な書式で出力できます。
//
// 参考:
// - Amazonの注文履歴をCSV形式にして出力するスクリプト
// https://gist.github.com/arcatdmz/8500521
// - Amazon で使った金額の合計を出す奴 (2014 年バージョン)
// https://gist.github.com/polamjag/866a8af775c44b3c1a6d
@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 / GLSL-Math.md
Created February 13, 2016 03:06 — forked from patriciogonzalezvivo/GLSL-Math.md
GLSL Math functions

Trigonometry

const float PI = 3.1415926535897932384626433832795;
const float PI_2 = 1.57079632679489661923;
const float PI_4 = 0.785398163397448309616;

float PHI = (1.0+sqrtf(5.0))/2.0;
@motoishmz
motoishmz / GLSL-color.md
Created February 13, 2016 03:06 — forked from patriciogonzalezvivo/GLSL-color.md
GLSL color functions

RGB - YUB

mat3 yuv2rgb = mat3(1.0, 0.0, 1.28033, 1.0, -0.21482, -0.38059, 1.0, 2.12798, 0.0);
mat3 rgb2yuv = mat3(0.2126, 0.7152, 0.0722, -0.09991, -0.33609, 0.43600, 0.615, -0.5586, -0.05639);

RGB - HSV

@motoishmz
motoishmz / GLSL-Lights.md
Created February 13, 2016 03:06 — forked from patriciogonzalezvivo/GLSL-Lights.md
GLSL Shaders Lights Funtions