This file contains hidden or 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
# ------------------------------ | |
# 定数定義 | |
# ------------------------------ | |
# Zsh | |
export ZSH="$HOME/.oh-my-zsh" | |
export ZSH_THEME="robbyrussell" | |
# export RPROMPT="%m" | |
# export ZSH_THEME="agnoster" |
This file contains hidden or 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
# ------------------------------ | |
# 定数定義 | |
# ------------------------------ | |
# Zsh | |
export ZSH_THEME="robbyrussell" | |
export RPROMPT="%m" | |
# Oh My Zsh | |
export ZSH=~/.oh-my-zsh |
This file contains hidden or 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
{ | |
~省略~ | |
"keybindings": | |
[ | |
~省略~ | |
以下を追加 | |
{ "command": "closeTab", "keys": "ctrl+shift+w" }, | |
{ "command": "newTab", "keys": "ctrl+t" }, | |
{ "command": { "action": "splitPane", "split": "vertical" }, "keys": "alt+\\" }, |
This file contains hidden or 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 bash | |
POSTGRES_VERSION=9.2 | |
POSTGRES_REPOSITORY=https://download.postgresql.org/pub/repos/yum/9.2/redhat/rhel-6-x86_64/pgdg-centos92-9.2-8.noarch.rpm | |
PG_CONF_PATH=/var/lib/pgsql/$POSTGRES_VERSION/data/pg_hba.conf | |
echo Adding repository for postgresql... | |
sudo yum -y localinstall $POSTGRES_REPOSITORY | |
echo Installing postgresql${POSTGRES_VERSION/./}... |
This file contains hidden or 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
const cancelAnimationFrame = window.cancelAnimationFrame | |
|| window.mozcancelAnimationFrame | |
|| window.webkitcancelAnimationFrame | |
|| window.mscancelAnimationFrame; | |
let animationHandler = (callback, fps, autoFps) => { | |
if (!fps) fps = 1; | |
let basetime = Date.now(); | |
const fpms = 1000/fps; | |
const requestAnimationFrame = window.requestAnimationFrame |
This file contains hidden or 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 electronicWatermark = (function(){ | |
// 書き込み用バッファ | |
var _implanted = []; | |
// チャンク探索 | |
var _process = function(png, type, handler) { | |
var dataLength; | |
var chunkType; | |
var nextChunkPos; | |
var Signature = String.fromCharCode(137, 80, 78, 71, 13, 10, 26, 10); |
This file contains hidden or 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
class db{ | |
// ホスト名 | |
protected $host = null; | |
// ユーザ名 | |
protected $id = null; | |
// パスワード | |
protected $pw = null; | |
// データベース名 | |
protected $db = null; | |
// セッション |
This file contains hidden or 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
TEMP_FILE='.FILE_LIST.tmp' | |
make_temp_file() { | |
cd ${NAME} | |
ls -F | grep -v ./ > ${TEMP_FILE} | |
cd ../. | |
} | |
convert_png() { | |
BUFIFS=${IFS} |
This file contains hidden or 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 lang="ja"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Easter egg</title> | |
</head> | |
<body> | |
<div style="width:100%;height:100%;position:relative;"> | |
<div style="width:510;height:430;position:absolute;top:50%;left:50%;margin-left:-255;margin-top:-240;"> |
This file contains hidden or 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
# 第一引数をコンマ区切りで配列に変換 | |
STRING=${1##*/} | |
ary=( `echo $STRING | tr -s '.' ' '`) | |
# コンバート後のファイルの保存ディレクトリ | |
DIR="./" | |
# ディレクトリ指定がある場合はパスにシュラッシュを付加して代入 | |
if [ $# -gt 1 ] ; then | |
# 保存先のディレクトリが存在するかチェック |
NewerOlder