Skip to content

Instantly share code, notes, and snippets.

View evalphobia's full-sized avatar

evalphobia

View GitHub Profile
@evalphobia
evalphobia / ch10_brainwweight.csv
Last active August 29, 2015 14:21
Rによるやさしい統計学
species body_weight brain_weight
Mountain_Beaver 1.35 8.1
Cow 465 423
Grey_Wolf 36.33 119.5
Goat 27.66 115
Guine_Pig 1.04 5.5
Diplodocus 11700 50
Asian_Elephant 2547 4603
Donley 187.1 419
Horse 521 655
@evalphobia
evalphobia / README.md
Created May 12, 2015 15:27
geek salon vol.7
@evalphobia
evalphobia / sample.sh
Last active August 29, 2015 14:19
推薦システムを試してみる
# ダウンロードは下記より
# http://examples.oreilly.com/9780596529321/
$ cd Downloads/PCI_Code\ Folder/chapter2/
$ python
# 推薦モジュールのインポート
>>> import recommendations
# 映画批評家のLisa RoseとGene Seymourの類似性を計算する
#!/bin/bash
#===================
# Config
#===================
REPO_ROOT=`git rev-parse --show-toplevel`
GOLINT_TMP="/tmp/.golint.txt"
TSLINT_TMP="/tmp/.tslint.txt"
@evalphobia
evalphobia / learning_go.md
Last active August 29, 2015 14:10
Learning Go を読み進める

Ch.1 イントロダクション

  • Goとは
  • v1 が最初の安定版(現在はv1.3)
  • 公式ドキュメント
% go doc builtin

Hello World

@evalphobia
evalphobia / capture_dbstatus.rb
Last active August 29, 2015 14:06
Send MySQL Innodb Status
#!/usr/bin/env ruby
require 'mail'
#======================
# config
#======================
# db setting
mycnf_path="/usr/lib/zabbix/scripts/<your-database>.conf"
@evalphobia
evalphobia / せってい.md
Last active August 29, 2015 14:05
開発用 メール送信先 制限設定(posfix)

postfixのインストールと起動

$ su - 
# yum install postfix
# alternatives --display mta  # 確認
# alternatives --config mta  # 確認

2 プログラムがあり 'mta' を提供します。
@evalphobia
evalphobia / .gitconfig
Created August 8, 2014 01:46
.gitconfig alias
[alias]
l = log --graph --date=iso --name-status --pretty=format:\"%C(red)%h %C(green)%an %C(blue)%ad %Creset%s %C(yellow)%d%Creset\"
st = status
co = checkout
@evalphobia
evalphobia / mail-server-status
Created July 17, 2014 03:35
Send mail for server stats by SES
#!/bin/bash
FROM="$1"
TO="$2"
SUBJECT="server stats for `hostname` on `date +\"%Y-%m-%d %H:%M:%S\"`"
if [ "$FROM" == '' -o "$TO" == '' ]; then
echo 'set FROM and TO address'
echo 'usage: $ mail-server-status from-address@example.com to-address@example.com'
@evalphobia
evalphobia / pre-commit
Last active August 29, 2015 14:02
PHP用pre-commit
#!/bin/sh
# @from http://blog.manaten.net/entry/645
IMAGES='\.(gif|png|jpg)$'
BLOCK_FUNCS='(var_dump)\('
if git rev-parse --verify HEAD >/dev/null 2>&1
then
against=HEAD