Skip to content

Instantly share code, notes, and snippets.

View 7gano's full-sized avatar

Norihisa Nagano 7gano

View GitHub Profile
/**
* Module dependencies.
*/
var express = require('express')
, routes = require('./routes')
, user = require('./routes/user')
, http = require('http')
, path = require('path');
var f = function(){
var core = new Core(320,
320
);
core.onload = function(){
var sprite = new Sprite(32, 32);
sprite.x = 100;
sprite.y = 100;
sprite.backgroundColor = 'blue';
sprite.tl.moveTo(768 * 0.5 - 32,
var fs = require("fs");
var _currentBacking;
exports.setCurrentPage = function(backing){
_currentBacking = backing;
};
exports.getCurrentPage = function(){
var path = './' + _currentBacking + '/info.json';
var MOON = require('phantoMOON');
var directory = '90PC2AlZ1375836774851';
MOON.setCurrentPage(directory);
var page = MOON.getCurrentPage();
var backing = page.backing;
console.log(backing);
var paperJSON = MOON.getPaperJSON(backing);
console.log(paperJSON);
@7gano
7gano / gist:6434031
Created September 4, 2013 08:00
double tap!
UITapGestureRecognizer *doubleTapGestureRecognizer;
doubleTapGestureRecognizer = [[UITapGestureRecognizer alloc]
initWithTarget:self action:@selector(_doubleTapAction:)];
doubleTapGestureRecognizer.numberOfTapsRequired = 2;
[cell addGestureRecognizer:doubleTapGestureRecognizer];
UITapGestureRecognizer *singleTapGestureRecognizer;
singleTapGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(_singleTapAction:)];
singleTapGestureRecognizer.numberOfTapsRequired = 1;
[singleTapGestureRecognizer requireGestureRecognizerToFail:doubleTapGestureRecognizer];
var canvas = document.createElement('canvas');
canvas.width = 768;
canvas.height = 1024;
document.body.appendChild(canvas);
var context = canvas.getContext('2d');
context.fillStyle = 'red';
context.fillRect(100,100,100,100);
#import "RCViewController.h"
@import QuartzCore;
@implementation RCViewController
- (void)viewDidLoad
{
[super viewDidLoad];
CGRect rect;
[ 92%] Generating pyopencv_generated_funcs.h, pyopencv_generated_func_tab.h, pyopencv_generated_types.h, pyopencv_generated_type_reg.h, pyopencv_generated_const_reg.h
Traceback (most recent call last):
File "/Users/nagano/Dropbox/OpenCV/opencv/modules/python/src2/gen2.py", line 896, in <module>
generator.gen(srcfiles, dstdir)
File "/Users/nagano/Dropbox/OpenCV/opencv/modules/python/src2/gen2.py", line 826, in gen
decls = parser.parse(hdr)
File "/Users/nagano/Dropbox/OpenCV/opencv/modules/python/src2/hdr_parser.py", line 733, in parse
linelist = list(f.readlines())
File "/usr/local/Cellar/python3/3.3.3/Frameworks/Python.framework/Versions/3.3/lib/python3.3/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
- (void)drawRect:(CGRect)rect
{
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextAddRect(context, CGRectMake(50, 50, 200, 250));
CGContextAddRect(context, CGRectMake(60, 60, 100, 100));
CGContextSetRGBFillColor(context, 0, 0, 1, 1);
CGContextDrawPath(context, kCGPathEOFill);
}
@7gano
7gano / info.plist
Last active May 12, 2016 03:53
UILaunchImageName 4画面対応版
<key>UILaunchImages</key>
<array>
<dict>
<key>UILaunchImageName</key>
<string>Default</string>
<key>UILaunchImageMinimumOSVersion</key>
<string>7.0</string>
<key>UILaunchImageOrientation</key>
<string>Portrait</string>
<key>UILaunchImageSize</key>