-
ubuntu12.05 LTS デスクトップエディションでセットアップ
-
vmware toolsのインストール
-
言語サポートの日本語を入れる
-
SuperキーでIMEの切り替えを行う
- compize-settings-managerをいれる
- Unityのコマンド入力ウィンドウを出して(Alt+F2),about:config
-
Superキーの設定を無効にする
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
def get_column_diff(file1, file2) | |
file1.length.times do |i| | |
line1 = file1[i] | |
line2 = file2[i] | |
line1s = line1.split(",") | |
line2s = line2.split(",") | |
line1s.length.times do |i| | |
if line1s[i] == line2s[i] | |
print " - ," | |
else |
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
;;--------------------------------------------------- | |
;; | |
;; Emacs全般の設定 | |
;;--------------------------------------------------- | |
;; 起動時に出てくるメッセージを消す | |
(setq inhibit-startup-message t) | |
;; 行、列の表示 | |
(line-number-mode t) |
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
LIMIT_TIME=`date -j -f %Y-%m-%d-%H:%M:%S 2014-02-03-17:00:00 +%s` | |
CORRENT_TIME=`date +%s` | |
REMINING=`expr $LIMIT_TIME - $CORRENT_TIME` | |
REMINING_DAY=`expr $REMINING / 86400` | |
SURPLUS_DAY=`expr $REMINING % 86400` | |
REMINING_HOUR=`expr $SURPLUS_DAY / 3600` | |
SURPLUS_HOUR=`expr $REMINING % 3600` | |
REMINING_MIN=`expr $SURPLUS_HOUR / 60` |
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
# -*- coding: utf-8 -*- | |
Bundler.require(:default) | |
require 'net/https' | |
require 'json' | |
require 'logger' | |
log = Logger.new(STDOUT) | |
log.level = Logger::INFO | |
# 適当なものを定義すること。 |
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> | |
<meta charset="utf-8"> | |
<head> | |
<title>Demo - media query (CSS3)</title> | |
</head> | |
<style> | |
.demo { display: none;} | |
@media (min-width: 1200px) { |
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
# -*- coding: utf-8 -*- | |
begin | |
puts "例外です" | |
raise StandardError | |
rescue StandardError => e | |
puts "例外は認めない" | |
retry | |
end |
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
# 誰かあたまのいい方法を教えてくれ | |
import os | |
import sys | |
import commands | |
argvs = sys.argv | |
argc = len(argvs) | |
print argvs | |
if (argc != 3): | |
print "Usage: $ python %s command file" % argvs[0] | |
quit() |
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
class String | |
def to_vbcode | |
prev = nil | |
ary = [] | |
self.unpack("U*").each do |codepoint| | |
if codepoint == 10 | |
break | |
elsif prev == nil | |
prev = codepoint | |
ary << codepoint |
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
puts gets.split(//).map{|c|c=["ア","ッ","ー"].sample}.join |