Skip to content

Instantly share code, notes, and snippets.

View Lewuathe's full-sized avatar
🈂️
👍

Kai Sasaki Lewuathe

🈂️
👍
View GitHub Profile
@Lewuathe
Lewuathe / app.js
Created March 24, 2013 12:38
file upload from iPhone to node server ref: http://qiita.com/items/88e89b5bb57335c17e05
/**
* Module dependencies.
*/
var express = require('express')
, routes = require('./routes')
, user = require('./routes/user')
, http = require('http')
, path = require('path');
@Lewuathe
Lewuathe / file0.txt
Created April 1, 2013 03:38
same quality cat with ffmpeg1.2 ref: http://qiita.com/items/0180586de9e4e070d500
$ ffmpeg -i input1.MOV -qscale 0 input1.mpg
# ffmpeg -i input2.MOV -qscale 0 input2.mpg
$ ffmpeg -i input3.MOV -qscale 0 input3.mpg
#import <UIKit/UIKit.h>
#import <AVFoundation/AVFoundation.h>
@interface AVPlayerView : UIView
@end
- (id)initWithIndexPath:(NSIndexPath*)indexPath andVideoPlayer:(AVPlayer *)videoPlayer{
self = [super init];
if( self ) {
AVPlayerLayer* layer = (AVPlayerLayer*)playerView.layer;
layer.videoGravity = AVLayerVideoGravityResizeAspect;
layer.player = videoPlayer;
label.text = [NSString stringWithFormat:@"Movie %d",indexPath.row];
$ git clone [email protected]:matschaffer/knife-solo.git
^(int n) {
return n + 1;
};
int (^plusOne) (int) = ^(int n) {
return n + 1;
};
//console
[source,cypher]
----
CREATE (n{name:'cypher'}) -[r:LIKES]-> ({name:'icecream'})
RETURN n.name, r;
----
= Cypher tutorial
This gist is for my Cypher learning.
// graph
// setup
[source,cypher]
----
CREATE (n:Actor {name:"Doraemon"})
----
@Lewuathe
Lewuathe / test.js
Created October 25, 2013 11:35
passport-yj test
var passport = require('passport');
var YJStrategy = require('../lib/passport-yj/strategy.js');
passport.use(new YJStrategy({
clientID : <CLIENT_ID>,
clientSecret : <CLIENT_SECRET>,
callbackURL : "http://lewuathe.github.io",
}, function(accessToken, refreshtoken, profile, done){
// With this accessToken you can access user profile data.
// In the case that accessToken is expired, you should
import sbt._
import sbt.Keys._
object TestBuild extends Build {
lazy val test = Project(
id = "test",
base = file("."),
settings = Project.defaultSettings ++ Seq(
name := "test",