start new:
tmux
start new with session name:
tmux new -s myname
import os, os.path, sys, urllib2, requests | |
class PyPiError(Exception): | |
def __init__(self, value): | |
self.value = value | |
def __str__(self): | |
return repr(self.value) | |
def _chunk_report(bytes_so_far, chunk_size, total_size): | |
if (total_size != None): |
# -*- coding: utf-8 -*- | |
# | |
# author: USAMI Kenta <[email protected]> | |
# license: NYSL 0.9982 | |
# | |
puts %w( | |
字佐美健太 | |
-忠吉さん,_tadsan | |
--Zonu.EXE |
#!/usr/bin/env python | |
"""Simple HTTP Server With Upload. | |
This module builds on BaseHTTPServer by implementing the standard GET | |
and HEAD requests in a fairly straightforward manner. | |
""" | |
// ==UserScript== | |
// @name kget_noflash | |
// @namespace http://sorah.jp/ | |
// @description remove flash, and javascript will retrieve lyric for you; own your risk | |
// @include http://lyric.kget.jp/* | |
// ==/UserScript== | |
// License: Public Domain | |
window.addEventListener("load", function() { |
Ruby の HTTP クライアントライブラリ Faraday が便利そう
API ラッパの開発には [RestClient gem][rest_client_gem] だとか
OAuth の必要なものは [Net/HTTP][net_http] + [OAuth gem][oauth_gem] を使ってた
[Twitter gem][twitter_gem] や [Instagram gem][instagram_gem] など API ライブラリのソースを読んでみると
[Faraday gem][faraday_gem] というものがよく使われてた
// ==UserScript== | |
// @name ZeroFix | |
// @namespace applest.net | |
// @version 0.9 | |
// @description ZeroFix is ZeroWatch of niconico fixer. ZeroWatchが改良するまでの暫定的なユーザースクリプトです。 タイトルの縮小、タグの複数段表示、市場エリアを投稿者情報に、コメント入力エリアを下に、フェードを無効化などの機能があります。 | |
// @include http://www.nicovideo.jp/watch/* | |
// @license MIT License(http://en.wikipedia.org/wiki/MIT_License) | |
// ==/UserScript== | |
/********************************************* |
As configured in my dotfiles.
start new:
tmux
start new with session name:
class Api::RegistrationsController < Api::BaseController | |
respond_to :json | |
def create | |
user = User.new(params[:user]) | |
if user.save | |
render :json=> user.as_json(:auth_token=>user.authentication_token, :email=>user.email), :status=>201 | |
return | |
else |
この文章は http://www.adobe.com/jp/joc/max2011/cyb/index.html (Adobe MAX 2011 : 上司の説得が必要な方へ)一般向けテンプレートが元ネタです。ネタを活かしきれていないですがご容赦を。(下記テンプレの文責はmakamakaに帰しますが、実際に使用した結果の責任は負いかねます)
#上司の説得が必要な方へ
「YAPC::Asia Tokyo 2011に参加したいが、上司が首を縦に激しく振ってくれない」という方のために、YAPC::Asiaに参加するメリットをアピールするための文章テンプレートを用意しました。ぜひ、カスタマイズしてご利用ください。っていうか、そのまま使うのはおやめください。