Skip to content

Instantly share code, notes, and snippets.

View matsumotius's full-sized avatar

Matsumoto Akihiro matsumotius

View GitHub Profile
@matsumotius
matsumotius / hello.js
Created October 13, 2011 09:51
express server
var express = require('express');
var app = module.exports = express.createServer();
var store = new (require('connect').session.MemoryStore)();
app.configure(function(){
app.set('views', __dirname + '/view');
app.set('view options', { layout : false, filename : __dirname + '/view/index.jade' });
app.set('view engine', 'jade');
app.use(express.static(__dirname + '/static'));
app.use(express.bodyParser());
app.use(express.cookieParser());
@matsumotius
matsumotius / time_t_sample.c
Created July 18, 2011 09:18
time_t sample
#include <stdio.h>
#include <time.h>
int main(void)
{
time_t now;
struct tm *ts;
int year;
char buf[80];
// Get the current time
@matsumotius
matsumotius / phonegapCamera.js
Created May 18, 2011 23:11
phonegap - camera
function getPicture(){
navigator.camera.getPicture(function(data){
// success handler
alert('success');
}, function(){
// error handler
alert('error');
}, {
// options
quality: 50