Skip to content

Instantly share code, notes, and snippets.

View motoishmz's full-sized avatar

Motoi Shimizu motoishmz

View GitHub Profile
@ofZach
ofZach / gitignore OF
Created September 12, 2012 14:41
good gitignore for OF
# Some general ignore patterns
build/
obj/
*.o
Debug*/
Release*/
*.mode*
*.app/
*.pyc
.svn/
@keijiro
keijiro / fbm-camera-shaking-effect.md
Created September 16, 2012 06:30
Perlin Noise (fBm) を使ったカメラ揺れエフェクト

Perlin Noise (fBm) を使ったカメラ揺れエフェクト

概要

Perlin Noise (fBm 関数)をオブジェクトの動きに取り入れることによって、色々と面白い効果が生み出せます。例えば、これを位置と回転に適用するだけで、カメラの手ブレ風エフェクトなどを作り出せます。

サンプル

http://keijiro.github.com/unity-perlin/

@novi
novi / bmpcc.md
Last active December 22, 2015 23:29
Blackmagic Design Pocket Cinema Camera メモ

たまにアップデートします

ボタンダブルクリックなどの操作もあるので一度説明書は読んだほうがよい。 サポートからダウンロードできるアプリで本体のファームウェアをアップデートできる。(ファームはネット経由の自動アップデートではないので毎回自分でアプリを更新する)

電源

  • 電池フル充電で1時間持たない。40分くらい。
  • Nikon純正の互換予備バッテリ必須。
@sponomarev
sponomarev / command.sh
Created November 9, 2013 10:43
Remove iTerm2 icon from Dock
# remove
/usr/libexec/PlistBuddy -c 'Add :LSUIElement bool true' /Applications/iTerm.app/Contents/Info.plist
# restore
/usr/libexec/PlistBuddy -c 'Delete :LSUIElement' /Applications/iTerm.app/Contents/Info.plist
@rtt
rtt / tinder-api-documentation.md
Last active October 17, 2024 17:55
Tinder API Documentation

Tinder API documentation

Note: this was written in April/May 2014 and the API may has definitely changed since. I have nothing to do with Tinder, nor its API, and I do not offer any support for anything you may build on top of this. Proceed with caution

http://rsty.org/

I've sniffed most of the Tinder API to see how it works. You can use this to create bots (etc) very trivially. Some example python bot code is here -> https://gist.github.com/rtt/5a2e0cfa638c938cca59 (horribly quick and dirty, you've been warned!)

@shobhitg
shobhitg / server.js
Last active July 9, 2024 03:35
File upload example using busboy with express
var path = require('path');
var fs = require('fs');
var os = require('os');
var express = require('express');
var app = express();
var Busboy = require('busboy');
app.get('/', function (req, res) {
res.send('<html><head></head><body>\
<form method="POST" enctype="multipart/form-data">\
@satoruhiga
satoruhiga / ofxNanoSVG.h
Created February 16, 2015 16:09
ofxNanoSVG.h
#pragma once
#define NANOSVG_IMPLEMENTATION
#include "nanosvg.h"
class ofxNanoSVG
{
public:
bool load(const string& filepath)
@protrolium
protrolium / ffmpeg.md
Last active November 12, 2024 21:27
ffmpeg guide

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

You can get the list of installed codecs with:

@kylemcdonald
kylemcdonald / FAT-lost.md
Last active August 29, 2015 14:26
The other reasons F.A.T. Lab died.

Today F.A.T. Lab shut its doors with this lovely note from Magnus Eriksson and Evan Roth.

But the "we lost to them" narrative is only one perspective. As a "virtual research fellow" since 2011, I had the opportunity to both look up to F.A.T. as an outsider for its first half, and get the inside scoop for the second half. But my first project appears on page 20 of the blog's 200+ pages. With that in mind, here are some other stories about why F.A.T. "lost":

  1. F.A.T. lost its rowdy juvenile edge when almost everyone got married, had kids, got (mostly) real jobs. The biggest producers from early F.A.T. effectively "retired" from producing F.A.T.-style work.
  2. There was not enough new energy to replace these retired members. To fix this, sometimes a member would propose adding someone. Inevitably, someone else would suggest they "weren't F.A.T. enough", or just thinking about how many inactive members we had, and how much of a boys club it was, would get us down and discussion woul
auto conv_utf8_to_sjis = [](string srcUTF8) -> string
{
int lenghtUnicode = MultiByteToWideChar(CP_UTF8, 0, srcUTF8.c_str(), srcUTF8.size() + 1, NULL, 0);
wchar_t* bufUnicode = new wchar_t[lenghtUnicode];
MultiByteToWideChar(CP_UTF8, 0, srcUTF8.c_str(), srcUTF8.size() + 1, bufUnicode, lenghtUnicode);
int lengthSJis = WideCharToMultiByte(CP_THREAD_ACP, 0, bufUnicode, -1, NULL, 0, NULL, NULL);
char* bufShiftJis = new char[lengthSJis];
WideCharToMultiByte(CP_THREAD_ACP, 0, bufUnicode, lenghtUnicode + 1, bufShiftJis, lengthSJis, NULL, NULL);
string strSJis(bufShiftJis);
delete bufUnicode;