Skip to content

Instantly share code, notes, and snippets.

View hideyukisaito's full-sized avatar

Hideyuki Saito hideyukisaito

View GitHub Profile
#include <iostream>
auto main() -> int
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSURL *basePath = [NSURL URLWithString:@"path/to/directory"];
NSFileManager *fm = [NSFileManager defaultManager];
NSArray<NSString *> *files = [fm contentsOfDirectoryAtPath:[basePath absoluteString] error:nil];
ofVbo mHemisphere;
void ofApp::setup()
{
const auto resolution_ = 256;
const auto radius_ = 100.0;
std::vector<ofVec3f> vertices_;
for (auto i = 0; i < resolution_; ++i)
#include "ofMain.h"
class ofApp : public ofBaseApp
{
public:
ofMesh mesh, ellipse;
double scale = 200.0;
//--------------------------------------------------------------
@hideyukisaito
hideyukisaito / file0.applescript
Created August 27, 2015 07:15
Finder で指定したフォルダをルートとしてローカルサーバを起動する ref: http://qiita.com/hideyukisaito/items/03c46c075151947f3569
on run {argv}
display dialog "Enter port number" default answer "8888"
set targetPort to text returned of result
tell application "Terminal"
set currentTab to do script "cd " & (argv)'s POSIX path
delay 1
do script "php -S localhost:" & targetPort in currentTab
end tell
end run
@hideyukisaito
hideyukisaito / get_friend_images.rb
Created March 30, 2014 13:32
Facebook から友人のプロフィール画像をぶっこぬく
#encoding: utf-8
require 'rubygems'
require 'open-uri'
require 'koala'
access_token = 'my_holy_token'
@graph = Koala::Facebook::API.new(access_token)
@hideyukisaito
hideyukisaito / osc4node_example.js
Created January 14, 2012 04:15
osc4node and express example
var express = require('express')
, osc = require('osc4node')
, app = express.createServer()
, port = process.env.PORT || 3000;
app.configure(function() {
app.use(app.router);
});
app.get('/', function(req, res) {