Skip to content

Instantly share code, notes, and snippets.

View wozozo's full-sized avatar
😇
Hello

wozozo

😇
Hello
  • Tokyo, Japan
  • 16:28 (UTC +09:00)
View GitHub Profile
@hotchpotch
hotchpotch / cocproxy.nginx.conf
Created May 25, 2011 04:50
cocproxy for nginx
#!nginx -p . -c cocproxy.nginx.conf
error_log /dev/stderr debug;
daemon off;
events {
worker_connections 48;
}
http {
@jupiterjs
jupiterjs / JavaScriptMVC.md
Created May 24, 2011 16:58 — forked from moschel/JavaScriptMVC.md
JavaScriptMVC Overview

The following is a VERY rough draft of an article I am working on for Alex MacCaw's @maccman's Book. It is very rough, but even now a worthwhile read. Suggestions / comments are very welcome! Please help me :-)

Introduction

JavaScriptMVC (JMVC) is an open-source jQuery-based JavaScript framework. It is nearly a comprehensive (holistic) front-end development framework, packaging utilities for testing, dependency management, documentation, and a host of useful jQuery plugins.

Yet every part of JavaScriptMVC can be used without every other part, making the library lightweight. Its Class, Model, View, and Controller combined are only 7k minified and compressed, yet even they can be used independently. JavaScriptMVC's independence lets you start small and scale to meet the challenges of the most complex applications on the web.

This chapter covers only JavaScriptMVC's $.Class, $.Model, $.View, and $.Controller. The following describes each component:

@juno
juno / github-api-practice.rb
Created January 22, 2011 12:49
w/HTTParty
require 'json'
require 'httparty'
class Github
include HTTParty
base_uri 'http://github.com/api/v2/json'
# @param [String] username GitHub username
# @param [String] password Password or API token
def initialize(username, password)
@yoshuki
yoshuki / instagram_backup.rb
Created January 21, 2011 17:53
Backup Instagram photos.
require 'fileutils'
require 'net/http'
require 'instagram'
USER_ID = # Your id as integer.
def main
photos = Instagram::by_user(USER_ID)
photos.each do |photo|
git clone https://github.com/symfony/symfony-bootstrapper.git
mkdir -p symfony-bootstrapper/src/vendor
cd symfony-bootstrapper/src/vendor
git clone git://github.com/symfony/symfony.git symfony
git clone git://github.com/doctrine/doctrine2.git doctrine
git clone git://github.com/doctrine/data-fixtures doctrine-data-fixtures
git clone git://github.com/doctrine/dbal.git doctrine-dbal
git clone git://github.com/doctrine/common.git doctrine-common
#!/bin/sh
# vim で、特定ファイル全部を、確認しながら置換する
# http://subtech.g.hatena.ne.jp/cho45/20100405/1270444967
# をシェルスクリプトにしてみた。
# $ replace-confirn /Foo/Bar/ *.txt のようにして使う。
# (変な引数を渡すと当然変な結果になるので注意)
# コマンドが起動するとvimが開き、パターンにマッチする部分がハイライト表示されるので
# そのまま置換するときはy、置換せずに次のマッチに飛ぶときはnをタイプする。
# すべてのファイルを表示し終わると普通のvimのコマンドモードになるので:qをタイプして終了する。
@bellbind
bellbind / getscreenshot.py
Created June 29, 2009 15:50
[python][pywebkitgtk]Get web page screenshot
#
# Get web page screenshot
#
# usage:
# xvfb-run -s "-screen 0 1024x768x24" python getschreenshot.py test.html
#
# libs:
# - pygtk: http://www.pygtk.org/
# - pywebkitgtk(python-webkit): http://code.google.com/p/pywebkitgtk/
# - PIL: http://www.pythonware.com/products/pil/