This file contains 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
def fb_session_required(arg1=True): | |
verify = arg1 is True | |
def decorate(f): | |
@wraps(f) | |
def check(*args, **kwargs): | |
if not request.values.has_key('fb_sig_session_key'): | |
return "Requires facebook session", 403 | |
if verify and get_access_token(use_cache=False): | |
return "Requires valid facebook session", 403 | |
return f(*args, **kwargs) |
This file contains 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 maroo.codec | |
{ | |
import flash.utils.ByteArray; | |
import mx.utils.Base64Decoder; | |
public class PList | |
{ | |
public static function parse(source:XML):Object | |
{ | |
switch (source.name().localName) { |
This file contains 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 | |
date=`date "+%Y-%m-%dT%H_%M_%S"` | |
HOME=/YOUR/LOCALHOME | |
SERVER=ID@HOST | |
DIR=backup | |
rsync -azP \ | |
--bwlimit=500 \ | |
--delete \ | |
--delete-excluded \ |
This file contains 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
{ | |
"Version":"2011-02-15", | |
"Id":"only allowed referers", | |
"Statement":[ | |
{ | |
"Sid":"Allow get requests referred by maroo.info and apps.facebook.com", | |
"Effect":"Allow", | |
"Principal":"*", | |
"Action":"s3:GetObject", | |
"Resource":"arn:aws:s3:::static.maroo.info/*", |
This file contains 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
{ | |
"Version": "2008-10-17", | |
"Id": "static.maroo.info", | |
"Statement": [ | |
{ | |
"Sid": "2- Allow referrers from my domain.", | |
"Effect": "Deny", | |
"Principal": { | |
"AWS": "*" | |
}, |
This file contains 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
<languageVersion : 1.0;> | |
kernel BrightContrast | |
< namespace : "jp.ncsoft.image.filters"; | |
vendor : "maroo"; | |
version : 1; | |
description : "adjust contrast and brightness"; | |
> | |
{ |
This file contains 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
var less = require('./less'); | |
with (require('./nano')) { | |
get(/\/lessc\/(.*)/, function(match) { | |
try { | |
var _parsed = URL.parse(match[1], true); | |
var client = make_client(80, _parsed.host); | |
var less_req = client.request('GET', _parsed.pathname, {'host': _parsed.host}); | |
less_req.addListener('response', function(less_resp) { |
This file contains 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
exports.plugin = function(bot) { | |
bot.on('join', function(chan, nick) { | |
if (nick == 'ircian') { | |
bot.talk(chan, [[ | |
nick + ':나가!', | |
nick + ':나가지마!', | |
nick + ':안녕', | |
nick + ':메롱' | |
]]); | |
} |
This file contains 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
#!/usr/bin/python | |
import mimetypes | |
import urllib | |
import os.path | |
import sys | |
import S3 # grep http://developer.amazonwebservices.com/connect/entry.jspa?externalID=134&categoryID=47 | |
AWS_ACCESS_KEY_ID = '****' | |
AWS_SECRET_ACCESS_KEY = '****' | |
BUCKET_NAME = '****' |
This file contains 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
#!/usr/bin/python | |
import os | |
import glob | |
import re | |
def recover(s, e='sjis'): | |
return re.sub(r'\\(...)', lambda m: chr(int(m.group(1), 8)), s).decode(e) | |
def rename(f): |