ChangeLog を書く際によく使われる英語をまとめました。
ほとんど引用です。
__os=$(shell uname) | |
__wget=$(shell which wget) | |
__tar=$(shell which tar) | |
__make=$(shell which make) | |
__mkdir=$(shell which mkdir) | |
__cp=$(shell which cp) | |
__rm=$(shell which rm) | |
__prefix=$(shell pwd)/build | |
__include=$(__prefix)/include |
#!/usr/bin/env python | |
from __future__ import with_statement | |
import contextlib | |
import logging | |
import os | |
import sys | |
import urllib2 | |
from boto.ec2.connection import EC2Connection |
...... | |
"paths": { | |
"jquery": "http://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery", | |
"underscore": "http://cdnjs.cloudflare.com/ajax/libs/lodash.js/2.2.1/lodash.underscore", | |
"backbone" : "http://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.1.0/backbone-min" | |
}, | |
"shim": { | |
"backbone": { | |
"deps": ["underscore", "jquery"], |
OSがLinuxかチェック | |
# -- | |
[ "x`uname -s`" != "xLinux" ] && echo "For Linux OS.\t[ NG ]" && exit 1 | |
rootユーザかチェック | |
# -- | |
[ "x`whoami`" != "xroot" ] && echo "Only root can run." && exit 1 | |
import multiprocessing | |
# Turn on debugging in the server. [False] | |
debug=True | |
# Install a trace function that spews every line executed by the server. [False] | |
spew=False | |
# The Access log file to write to. [None] | |
#accesslog='/var/log/gunicorn.access.log' |
[loggers] | |
keys=root,example.default,gunicorn.access,gunicorn.error | |
[logger_root] | |
level=DEBUG | |
handlers=example | |
[logger_example.default] | |
level=DEBUG | |
handlers=example |
/** | |
* web server: express | |
* | |
* リクエストを別のHTTPサーバーに問い合わせるプログラム | |
* - リクエストヘッダー等はコピーしていないです。 | |
*/ | |
var fs = require('fs'); | |
var path = require('path'); | |
var zlib = require('zlib'); |
// ----------------------------------------------------------------- | |
// MDN: bind | |
// @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind | |
// ----------------------------------------------------------------- | |
if (!Function.prototype.bind) { | |
Function.prototype.bind = function (oThis) { | |
if (typeof this !== "function") { | |
// closest thing possible to the ECMAScript 5 internal IsCallable function | |
throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable"); |
var b64 = canvas.toDataURL() | |
var $img = new Image(); | |
$img.crossOrigin = 'Anonymous'; | |
$img.src = b64; | |
// もとに戻すとき null を入れるといいよ。 | |
$img.crossOrigin = null; | |