This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with (require('./nano')) { | |
get('/hello', 'Hello, world'); | |
get('/index.html', readfile('index.html')); | |
static_file('/about.html'); | |
get('/bye', function() { | |
return 'Bye~ ' + request.args['name']; | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ajaxize(selector) { | |
$(selector).each(function(idx, el) { | |
el = $(el); | |
var opts = (el.attr('rel') || '').split(' '); | |
var hasOption = function(opt) { return opts.indexOf(opt) > -1 } | |
var pos = hasOption('before') ? 'Before' : 'After'; | |
var toggle = hasOption('toggle'); | |
var increase = hasOption('increase'); | |
var inherit = hasOption('inherit'); | |
var target_name = el.attr('target'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($){ | |
$.Class = function(code){ | |
var klass = function() { | |
var instance = (arguments[0] !== null && this.__init__ && typeof this.__init__ == 'function') ? this.__init__.apply(this, arguments) : this; | |
return instance; | |
}; | |
$.extend(klass, this); | |
$.extend(klass.prototype, { | |
'bind': function(type, fn) { | |
this.__events__ = this.__events__ || {}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
gunicorn="/usr/local/bin/gunicorn" | |
prog="dev.maroo.info" | |
PROJECT_HOME="/home/maroo/sites/$prog" | |
pid="/var/lock/$prog" | |
RETVAL=0 | |
start() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on adding folder items to dropbox after receiving added_files | |
set firstFileName to the name of item 1 of added_files | |
set numFiles to count items in added_files | |
repeat with i from 1 to number of items in added_files | |
set posixPath to POSIX path of (item i of added_files as string) as string | |
do shell script "git add " & posixPath | |
end repeat | |
do shell script "git commit -a -m'added " & firstFileName & "...'" | |
do shell script "git push" | |
end adding folder items to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
juice.namespace('sample'); | |
juice.include('http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.6/jquery-ui.min.js') | |
.css('http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.6/themes/flick/jquery-ui.css') | |
.require('ui.Form') | |
(function() { | |
juice.sample.Calendar = Class({ | |
__init__: function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pymongo import Connection | |
from BeautifulSoup import BeautifulSoup | |
from flask import Flask, render_template, request, redirect, url_for | |
from .util import normalize_url | |
app = Flask(__name__) | |
conn = Connection('localhost') | |
db = conn.test | |
bookmarkr = db.bookmarkr |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 객체들끼리 서로 밀어내며 자리를 찾아 지속적으로 동일한 간격을 유지하게 하는 프로그램 예제 | |
* @author 거친마루 <comfuture@_GMAIL_COM_> | |
*/ | |
package | |
{ | |
import flash.display.DisplayObject; | |
import flash.display.Sprite; | |
import flash.events.Event; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package jp.plaync.image.codec | |
{ | |
import flash.display.BitmapData; | |
import flash.errors.IOError; | |
import flash.utils.ByteArray; | |
import flash.utils.Endian; | |
/** | |
* Windows BMP file decoder | |
* @see http://ntt.cc/2008/10/01/using-bmpdecoder-class-to-load-an-external-bmp-file-rle-compression-support.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib | |
import urlparse | |
import oauth2 as oauth | |
import time | |
consumer_key = 'YOUR_CONSUMER_KEY' | |
consumer_secret = 'YOUR_CONSUMER_SECRET' | |
class Latitude(oauth.Client): |
OlderNewer