Skip to content

Instantly share code, notes, and snippets.

View shinyaoguri's full-sized avatar
😎
I want to eat Ramen

Shinya Oguri shinyaoguri

😎
I want to eat Ramen
View GitHub Profile
@shinyaoguri
shinyaoguri / KeyState.pde
Created April 15, 2018 17:48
Processingで複数のキーが押されたときの挙動
public class KeyState{
HashMap<Integer, Boolean> Key;
KeyState(){
this.Initialize();
}
void Initialize(){
this.Key = new HashMap<Integer, Boolean>();
@shinyaoguri
shinyaoguri / highlight.sh
Created April 8, 2018 05:58
クリップボードにコピーしたスクリプトをシンタックスハイライトさせる
#!/bin/sh
#brew install highlight
pbpaste | highlight -l -k monaco -K 33 -s Candy -S $1 -O rtf | pbcopy
#もしも背景が白の場合にはCandyをFine-Blueにする
#memo
#https://qiita.com/koudaiii/items/1a9503141212a2115485
@shinyaoguri
shinyaoguri / refresh_finder_app.py
Created April 8, 2018 05:54
macでFinderに表示されるアプリを更新するスクリプト(たまに削除したはずのものが残ってたりする現象の回避)
#!/usr/bin/env python3
import subprocess
def main():
print("Finderで表示される起動するアプリ一覧を更新するよ!")
cmd = "/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user"
subprocess.check_call(cmd.split(" "))
print("Refresh Finder App list.")
cmd2 = "killall Finder"
@shinyaoguri
shinyaoguri / processing_syphon.pde
Last active April 8, 2018 05:55
sample script using processing + syphon
import codeanticode.syphon.*;
PGraphics canvas;
SyphonServer server;
PImage img;
void setup() {
size(1600,900, P3D);
canvas = createGraphics(1600, 900, P3D);
server = new SyphonServer(this, "Processing Syphon");