Skip to content

Instantly share code, notes, and snippets.

View takuan-osho's full-sized avatar
🏠
Working from home

SHIMIZU Taku takuan-osho

🏠
Working from home
View GitHub Profile
@tily
tily / scaling_isomorphic_javascript_code.ja.markdown
Last active May 1, 2023 09:03
サバクラ両方で動く JavaScript の大規模開発を行うために

サバクラ両方で動く JavaScript の大規模開発を行うために

原文:Scaling Isomorphic Javascript Code (This is just for study, please contact me at tily05 atmark gmail.com if any problem.)

考えてみれば Model-View-Controller とか MVC ってよく聞くよね。実際どんなものか知ってる? 抽象的に言うなら「オブジェクト情報の保持されるグラフィック・システム (つまり、ラスターではないグラフィック。ゲームとか) 上に構築された、表示系を中心としたアプリケーションにおいて、主要な機能どうしの関わりをうまく分離すること」とでも言おうか。もう少し深く考えを押し進めてみれば、これは当然、他のさまざまなアプリケーションにもあてはまる言葉 (bucket term ?) だ。

過去に多くの開発コミュニティが MVC による解決案を提供し、それによってよくあるユースケースにうまく対処し、地位を築くことができた。例をあげるなら、Ruby や Python コミュニティは Rails や Django を作り、MVC アーキテクチャを実現した。

@alice1017
alice1017 / gist:1427471
Created December 3, 2011 16:13
gettitle.py
#!/usr/bin/env python
#coding: utf-8
import urllib
import cgi
import os
import json
import re
import sys
========================================
In defense of zope libraries 翻訳
========================================
Pyramid が Zope ライブラリを使っていることについての非常に長い defence
----------------------------------------------------------------------
freenode の #pyramid IRC チャンネルで、以下のような質問に私は
うんざりするほど多くの時間を割いてきた。
@alice1017
alice1017 / gist:1594907
Created January 11, 2012 14:29
顔文字変換.py
#a = "(`・ω・´)"; flatten(a) #=> (´・ω・`) ノ場合
a = "(`・ω・´)"
def flatten(smiley):
print smiley.replace("`","´").replace("´","`")
# >>> flatten(a) #=>(´・ω・`)
# a = "(´・ω・`)"; aodag(a) #=> (´・m・`) ノ場合
b = "(´・ω・`)"
@oyakata
oyakata / README.txt
Created January 11, 2012 14:52
顔文字なアレ.py
--- sample1 ---
(`・ω・´)
(´・ω・`)
(´・m・`)
(`・ω・´)
(´・ω・`)
(´・m・`)
(`・ω・´)
--- sample2 ---
|
@harlanbarnes
harlanbarnes / Vagrantfile
Created January 17, 2012 23:34
Vagrantfile Multi VM
user = ENV['OPSCODE_USER'] || ENV['USER']
base_box = ENV['VAGRANT_BOX'] || 'centos-5.5-x86_64'
Vagrant::Config.run do |config|
config.vm.define :web do |web_config|
web_config.vm.box = base_box
web_config.vm.forward_port("http", 80, 8080)
web_config.vm.provision :chef_client do |chef|
@shimizukawa
shimizukawa / console
Created January 18, 2012 00:04
エキPy読書会2nd #3 スクリーン
>>> a = range(10)
>>> import itertools
>>> b, c = itertools.tee(a)
>>> a2 = iter(a)
>>> b, c = itertools.tee(a2)
>>> next(b)
0
>>> next(b)
1
>>> next(b)
@inoshiro
inoshiro / create_list.py
Created January 21, 2012 08:11
create twitter list from connpass event
>>> import from_connpass
>>> content = from_connpass.getContent("http://connpass.com/event/213/")
>>> users = from_connpass.getidlist(content)
OUT: get id: tmae
OUT: get id: noguchi616
OUT: get id: th0x0472
# 長いので省略
OUT: get id: utsuidai
OUT: get id: n0ts
OUT: get id: matetsu
@alice1017
alice1017 / getflv.py
Created February 2, 2012 10:05
return nicovideo movie url from movieid
#!/usr/bin/env python
#coding: utf-8
import commands
import urllib
import getflv_api
import sys
def auth():
@dupuy
dupuy / README.rst
Last active June 4, 2025 14:19
Common markup for Markdown and reStructuredText

Markdown and reStructuredText

GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.