Skip to content

Instantly share code, notes, and snippets.

View hrstt's full-sized avatar

sato hiroyuki hrstt

View GitHub Profile
@hrstt
hrstt / file0.sql
Created March 26, 2013 15:17
7つのデータベース 7つの世界 2章 PostgreSQL 1日目 ref: http://qiita.com/items/18847b18646a1965c398
CREATE TABLE countries (
country_code char(2) PRIMARY KEY,
country_name text UNIQUE
);
@hrstt
hrstt / file0.txt
Created March 21, 2013 12:53
vagrant 起動時のshared folder 関連のエラー対処 ref: http://qiita.com/items/0b1a15492123146bce82
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
@hrstt
hrstt / file0.txt
Created March 21, 2013 12:52
Ubuntu にPostgreSQLを用意する ref: http://qiita.com/items/5f40a6aed6b81521b8f7
$ sudo apt-get install postgres postgres-client psotgresql-contrib
@hrstt
hrstt / .bashrc
Created March 10, 2013 09:30
Wekaでheap sizeが小さいと怒られるので... ref: http://qiita.com/items/e47017b31e404ebc1d47
alias weka='weka -m 512m'
@hrstt
hrstt / sublime_user_settings.json
Created November 14, 2012 05:22
sublime text 2 user settings
// Settings in here override those in "Default/Preferences.sublime-settings", and
// are overridden in turn by file type specific settings.
{
"draw_white_space" : "all",
"highlight_line": true,
"tab_size": 4,
"line_padding_top": 4,
"font_size": 12,
"font_face": "Consolas",
"word_wrap" : true,
@hrstt
hrstt / ghci_color_conf.sh
Created October 18, 2012 04:35
coloring the code in ghci
# ------
# > sudo cabal install hscolour
# > vi ~/.profile
if [ -f "$HOME/.profile" ]; then
. $HOME/.profile
fi
alias ghci='ghci 2>&1 | HsColour -tty '
@hrstt
hrstt / git_rm_all.sh
Created June 19, 2012 04:59
ファイル削除後にgit rm を一括でする
git status | grep deleted: | awk '{print $3}' | xargs git rm
# ただしカラースキーム付きの場合は保証しない.
@hrstt
hrstt / Mastermind.java
Created July 4, 2012 12:57
mastermindゲームの課題回答用
package jp.hrst.sample;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class Mastermind {
@hrstt
hrstt / select_operation_test.html
Created June 14, 2012 06:41
select 要素 の操作(隠したりdisableにしたり
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'></script>
<script>
$(function(){
var target = $("select#test");
/** 単純に操作不可にする方法
target.change(function() {
target.attr("disabled","disabled");
SELECT * FROM INFORMATION_SCHEMA.TABLES
SELECT * FROM INFORMATION_SCHEMA.COLUMNS