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
'use strict'; | |
var React = require('react-native'); | |
var Fluxxor = require('fluxxor'); | |
var { | |
AppRegistry, | |
TouchableHighlight, | |
StyleSheet, | |
Text, |
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/sh | |
# vim で、特定ファイル全部を、確認しながら置換する | |
# http://subtech.g.hatena.ne.jp/cho45/20100405/1270444967 | |
# をシェルスクリプトにしてみた。 | |
# $ replace-confirn /Foo/Bar/ *.txt のようにして使う。 | |
# (変な引数を渡すと当然変な結果になるので注意) | |
# コマンドが起動するとvimが開き、パターンにマッチする部分がハイライト表示されるので | |
# そのまま置換するときはy、置換せずに次のマッチに飛ぶときはnをタイプする。 | |
# すべてのファイルを表示し終わると普通のvimのコマンドモードになるので:qをタイプして終了する。 |
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
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 |
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
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| |
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
#!nginx -p . -c cocproxy.nginx.conf | |
error_log /dev/stderr debug; | |
daemon off; | |
events { | |
worker_connections 48; | |
} | |
http { |
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
// ==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== |
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
#coding: utf8 | |
"""pymongoのAutoReferenceにパッチ当てるやつ | |
リスト内のDBRef全部にクエリを発行せずに{$in: [1,2,...,n]}する。 | |
Example: | |
>>> from pymongo.son_manipulator import AutoReference, NamespaceInjector | |
>>> import autoreference_dbref_patch | |
""" |
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
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 |
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
class ListFormMixin(MultipleObjectMixin, FormMixin): | |
'''フォームを持つListViewの実装のためのMixin | |
memo: | |
get_context_dataメソッドが重複する | |
''' | |
class BaseListFormView(ListFormMixin, View): | |
def get(self, request, *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
Titanium.UI.setBackgroundColor('#000'); | |
var window = Ti.UI.createWindow({ | |
title:'テスト', | |
backgroundColor:'#FFF' | |
}); | |
var label = Ti.UI.createLabel({ | |
bottom:0, | |
color:'#FFF', |
OlderNewer