Skip to content

Instantly share code, notes, and snippets.

View fkei's full-sized avatar
😀

fkei fkei

😀
View GitHub Profile

ChangeLog を支える英語

ChangeLog を書く際によく使われる英語をまとめました。

ほとんど引用です。

基本形

@fkei
fkei / Makefile
Last active November 8, 2017 02:07
ffmpeg/imagemagick compile script (include libx264/ffmpeg,ffprobe/convert only/arch=x86_64 only/not doc/static library)
__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
@fkei
fkei / backup.py
Created August 23, 2012 06:27 — forked from rore/backup.py
A script to automate freezing XFS and locking MongoDB and snapshotting EBS volumes
#!/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
@fkei
fkei / example.require.config.js
Created October 27, 2013 15:49
configure: require.js + backbone.js + jquery + lodash.underscore
......
"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"],
@fkei
fkei / bash and make memo
Created September 3, 2013 07:38
bash and make memo #1
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
@fkei
fkei / example-gunicorn.py
Last active December 22, 2015 04:49
gunicorn sample config
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'
@fkei
fkei / example-gunicorn-log.conf
Created September 3, 2013 05:37
example gunicorn log config
[loggers]
keys=root,example.default,gunicorn.access,gunicorn.error
[logger_root]
level=DEBUG
handlers=example
[logger_example.default]
level=DEBUG
handlers=example
@fkei
fkei / gist:6362774
Created August 28, 2013 06:37
リクエストを別のHTTPサーバーに問い合わせるプログラム
/**
* web server: express
*
* リクエストを別のHTTPサーバーに問い合わせるプログラム
* - リクエストヘッダー等はコピーしていないです。
*/
var fs = require('fs');
var path = require('path');
var zlib = require('zlib');
@fkei
fkei / gist:6362679
Created August 28, 2013 06:19
MDN: bindを切り出したソース
// -----------------------------------------------------------------
// 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");
@fkei
fkei / gist:6361924
Created August 28, 2013 03:43
blog.fkei.me : Canvas.toDataURL() -> img.src -> CORS(´・ω・`)ショボーン
var b64 = canvas.toDataURL()
var $img = new Image();
$img.crossOrigin = 'Anonymous';
$img.src = b64;
// もとに戻すとき null を入れるといいよ。
$img.crossOrigin = null;