Skip to content

Instantly share code, notes, and snippets.

View ka2n's full-sized avatar

Katsuma Ito ka2n

View GitHub Profile
@ka2n
ka2n / gist:2863673
Created June 3, 2012 14:14
guardで監視してJSXをコンパイルしてlivereload
# Guardfile
# livereload and compile .jsx
guard :shell do
watch(/(.+)\.jsx/) {|m| `./node_modules/jsx/bin/jsx --output #{m[1]}.js #{m[0]}` }
end
guard 'livereload' do
watch(/.jsx/)
end
@ka2n
ka2n / gist:2725570
Created May 18, 2012 14:36
saveNSStringAsImg
- (void)saveMessageAsImg: (NSString *)comment fileName:(NSString *) filePath
{
UIFont *font = [UIFont fontWithName:@"HiraKakuProN-W3" size:60];
CGSize size = [comment sizeWithFont: font];
UIGraphicsBeginImageContextWithOptions(CGSizeMake(size.width, size.height), NO, [[UIScreen mainScreen] scale]);
CGContextRef ctx = UIGraphicsGetCurrentContext();
CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
仕事も遊びも楽しく共有できる空間を作りたい!
そんな思いから名古屋大須に誕生したのが「Art Factory」です。
Art Factoryの特徴としては、学校みたいな楽しげな雰囲気の中
コワーキングしていただける空間になっています。
システムとして学校の時間割のようなものを採用しています。
授業中(仕事や勉強をする時間)
昼休憩(一緒に食事をしたり、交流する時間)
#lightbox{ position: absolute; left: 0; width: 100%; z-index: 100; text-align: center; line-height: 0;}
#lightbox img{ width: auto; height: auto;}
#lightbox a img{ border: none; }
#outerImageContainer{ position: relative; background-color: #fff; width: 250px; height: 250px; margin: 0 auto; }
#imageContainer{ padding: 10px; }
#loading{ position: absolute; top: 40%; left: 0%; height: 25%; width: 100%; text-align: center; line-height: 0; }
#hoverNav{ position: absolute; top: 0; left: 0; height: 100%; width: 100%; z-index: 10; }
#imageContainer>#hoverNav{ left: 0;}
@ka2n
ka2n / builder.py
Created July 21, 2011 11:47
builder.py/1.7.1 quick fix for Android SDK R12
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Android Simulator for building a project and launching
# the Android Emulator or on the device
#
import os, sys, subprocess, shutil, time, signal, string, platform, re, glob, hashlib, imp
import run, avd, prereq, zipfile, tempfile, fnmatch, codecs, traceback, simplejson
from os.path import splitext
from compiler import Compiler