Skip to content

Instantly share code, notes, and snippets.

View 2bbb's full-sized avatar

2bit 2bbb

View GitHub Profile
@2bbb
2bbb / wedonttypo.h
Created April 22, 2014 03:08
We don't typo!
#define flaot float
#define unsinged unsigned
#define cosnt const
@interface NSString (AnotherClassExtension)
- (NSURL *)toURL;
- (NSURL *)toFileURL;
- (NSString *)toDocumentDirectoryPath;
- (NSURL *)toDocumentDirectoryFileURL;
- (NSString *)toCachePath;
- (NSURL *)toCacheFileURL;
- (UIImage* *)toImage;
@2bbb
2bbb / HelloWorld.swift
Last active August 29, 2015 14:02
HelloWorld.swift
//
// main.swift
// SwiftLine
//
// Created by ISHII 2bit on 2014/06/03.
// Copyright (c) 2014 buffer Renaiss. All rights reserved.
//
import Foundation
@2bbb
2bbb / ofApp.cpp
Last active August 29, 2015 14:02
輝かしい未来に向けての準備
#include "ofApp.h"
//--------------------------------------------------------------
void ofApp::setup(){
for(int i = 0; i < 20; i++) {
ofRectangle rect;
rect.width = ofRandomWidth() * 0.5f;
rect.height = ofRandomHeight() * 0.5f;
rect.x = ofRandom(ofGetWidth() - rect.width);
rect.y = ofRandom(ofGetHeight() - rect.height);
@2bbb
2bbb / SirRogerPenrose.pde
Last active August 29, 2015 14:02
Sir Roger Penrose
final int N = 7;
final int R = 300;
final float scale = 0.2;
final PVector[] basicVertecies = new PVector[N];
final PVector[] innerVertecies = new PVector[N];
final PVector[] outerVertecies = new PVector[2 * N];
final PVector[] assistVertecies = new PVector[N];
color[] colors;
@2bbb
2bbb / pwvg.js
Created August 25, 2014 17:36
perfume world voxel gen.
var f = function(m) { return (Math.random() * m) | 0; },
vs = [],
n = 0;
for(var y = 0; y < 2000; y += 5) {
for(var _ = 0; _ < 2; _++) {
var t = Math.random() * Math.PI * 2,
r = f(15),
x = 40 + (r * Math.cos(t)) | 0,
z = 30 + (r * Math.sin(t)) | 0,
c = (f(64) + 192) * 256 + f(256);
@2bbb
2bbb / PerfumeWorldImageImporter.pde
Last active August 29, 2015 14:05
PerfumeWorldImageImporter
final String fileName = "penrose.png";
final String outJsonName = "out.json";
final int voxelsWidth = 80;
final int voxelsHeight = 60;
class Voxel {
public Voxel(int x_, int y_) {
x = x_;
y = y_;
@2bbb
2bbb / ofMain.cpp
Created October 16, 2014 00:59
ofxTldTracker+ofxJpegGlitch
//
// author:
// TOMOTO Yusuke https://github.com/yusuketomoto
// modify:
// ISHII 2bit https://github.com/2bbb
//
// Dependencies:
// ofxCV https://github.com/kylemcdonald/ofxCv
// ofxTldTracker https://github.com/yusuketomoto/ofxTldTracker
// ofxJpegGlitch https://github.com/2bbb/ofxJpegGlitch
@2bbb
2bbb / TBTSimpleCamera.h
Created October 26, 2014 04:56
TBTSimpleCamera
//
// TBTSimpleCamera.h
//
// Created by ISHII 2bit on 2014/10/08.
// Copyright (c) 2014年 buffer Renaiss. All rights reserved.
//
#import <Foundation/Foundation.h>
typedef void(^TBTDidStartRecordingCallback)(NSURL *fileURL);
@2bbb
2bbb / MaxPS3.js
Last active August 29, 2015 14:10
PS3 Controller parser for Max
autocompile = true;
outlets = 2;
var Controller = {
Buttons: {
Push: {
x: 19, a: 20, b: 21, y: 22,
top: 11, right: 12, bottom: 13, left: 14,
l1: 17, r1: 18, l2: 15, r2: 16,
select: 7, start: 10, ps: 23