Skip to content

Instantly share code, notes, and snippets.

View wozozo's full-sized avatar
😇
Hello

Yoichi Fujimoto wozozo

😇
Hello
  • Tokyo, Japan
  • 09:31 (UTC +09:00)
  • X @wozozo
View GitHub Profile
'use strict';
var React = require('react-native');
var Fluxxor = require('fluxxor');
var {
AppRegistry,
TouchableHighlight,
StyleSheet,
Text,
#!/bin/sh
# vim で、特定ファイル全部を、確認しながら置換する
# http://subtech.g.hatena.ne.jp/cho45/20100405/1270444967
# をシェルスクリプトにしてみた。
# $ replace-confirn /Foo/Bar/ *.txt のようにして使う。
# (変な引数を渡すと当然変な結果になるので注意)
# コマンドが起動するとvimが開き、パターンにマッチする部分がハイライト表示されるので
# そのまま置換するときはy、置換せずに次のマッチに飛ぶときはnをタイプする。
# すべてのファイルを表示し終わると普通のvimのコマンドモードになるので:qをタイプして終了する。
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
@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|
@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 {
@syoichi
syoichi / gyazocom_redirect_to_ima.user.js
Created June 19, 2011 00:36 — forked from youpy/gyazocom_redirect_to_ima.user.js
gyazo.comの画像にアクセスすると広告ページへリダイレクトするようになっていたので、cache.gyazo.comの画像にリダイレクトするように修正した。
// ==UserScript==
// @name Gyazo.com: Redirect to image
// @namespace http://buycheapviagraonlinenow.com/
// @include http://gyazo.com/*
// @include http://cache.gyazo.com/*
// @author youpy
// @compatibility Firefox 5.0(Scriptish 0.1.3), Chrome 12.0.742.122, Safari 5.0.5(NinjaKit 0.8), Opera 11.50 on Windows 7 Enterprise 32bit
// @charset UTF-8
// @version 0.0.3.20110715134929
// ==/UserScript==
@ukyo
ukyo / autoreference_dbref_patch.py
Created September 25, 2011 05:05
pymongo AutoReference DBRef patch
#coding: utf8
"""pymongoのAutoReferenceにパッチ当てるやつ
リスト内のDBRef全部にクエリを発行せずに{$in: [1,2,...,n]}する。
Example:
>>> from pymongo.son_manipulator import AutoReference, NamespaceInjector
>>> import autoreference_dbref_patch
"""
@leah
leah / json-response.py
Created October 5, 2011 19:08
JSONResponse classes
import re
import simplejson
from django.http import HttpResponse
from django.conf import settings
class JSONResponse(HttpResponse):
def __init__(self, request, data):
indent = 2 if settings.DEBUG else None
@aita
aita / gist:1300634
Created October 20, 2011 07:57
ListFormView
class ListFormMixin(MultipleObjectMixin, FormMixin):
'''フォームを持つListViewの実装のためのMixin
memo:
get_context_dataメソッドが重複する
'''
class BaseListFormView(ListFormMixin, View):
def get(self, request, *args, **kwargs):
@Seasons7
Seasons7 / app.js
Created October 30, 2011 13:27
Titanium Growl Animation
Titanium.UI.setBackgroundColor('#000');
var window = Ti.UI.createWindow({
title:'テスト',
backgroundColor:'#FFF'
});
var label = Ti.UI.createLabel({
bottom:0,
color:'#FFF',