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
/* | |
<!doctype html> | |
<html> | |
<head> | |
<title></title> | |
</head> | |
<body> | |
以下でFileを選択するとbody に imgタグがappendされる | |
<input type="file" id="files" /> | |
</body> |
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
RewriteEngine on | |
# ディレクトリまたはファイルが存在する場合は、それを直接に使う | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
# それ以外は index.php に転送する | |
RewriteRule ^(.*) index.php |
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
//クラスの作成と継承 | |
var fuga, hoge, | |
__hasProp = {}.hasOwnProperty, | |
__extends = function(child, parent) { | |
//親のプロパティをすべて引き継ぐ | |
for (var key in parent) { | |
if (__hasProp.call(parent, key)) child[key] = parent[key]; | |
} | |
//コンストラクタ関数を定義 | |
function ctor() { |
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
cd /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support | |
./lsregister -kill -r -domain system -domain local -domain user | |
# 上記の2つのコマンドを叩いたら Finderを再起動する |
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
package main | |
import "github.com/gographics/imagick/imagick" | |
func main() { | |
imagick.Initialize() | |
defer imagick.Terminate() | |
mw := imagick.NewMagickWand() | |
defer mw.Destroy() |
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
_usage() { | |
cat << _USAGE_ | |
usage: upload_ipa <config_json> <version> | |
This program depends on the following commands | |
jq | |
ipa (shenzhen) | |
and needs config.json like this. | |
{ |
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
package main | |
import ( | |
"fmt" | |
"io" | |
"net/http" | |
gq "github.com/PuerkitoBio/goquery" | |
"golang.org/x/text/encoding/japanese" | |
"golang.org/x/text/transform" |
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
#!/usr/bin/env python | |
# sqlalchemy | |
# https://github.com/zzzeek/sqlalchemy | |
# sqlalchemy engine | |
# http://docs.sqlalchemy.org/en/rel_1_0/core/engines.html | |
# reflection | |
# http://docs.sqlalchemy.org/en/latest/core/reflection.html |
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
function parse_yaml () { | |
local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @|tr @ '\034') | |
sed -ne "s|^\($s\)\($w\)$s:$s\"\(.*\)\"$s\$|\1$fs\2$fs\3|p" \ | |
-e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 | | |
awk -F$fs '{ | |
indent = length($1)/2; | |
vname[indent] = $2; | |
for (i in vname) {if (i > indent) {delete vname[i]}} | |
if (length($3) > 0) { | |
vn=""; for (i=0; i<indent; i++) {vn=(vn)(vname[i])("___")} |
OlderNewer