-
名前
- 内藤 建 (Takeru Naito)
-
twitter
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
#!/bin/bash | |
# | |
# Open new Terminal tabs from the command line | |
# | |
# Author: Justin Hileman (http://justinhileman.com) | |
# | |
# Installation: | |
# Add the following function to your `.bashrc` or `.bash_profile`, | |
# or save it somewhere (e.g. `~/.tab.bash`) and source it in `.bashrc` | |
# |
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
;;; clipboard-to-kill-ring.el | |
;;; * 概要 | |
;;; OS Xのクリップボードを定期的に監視してkill-ringに入れます | |
;;; deferred.elが必要です | |
;;; | |
;;; * 使い方 | |
;;; (clipboard-to-kill-ring t) | |
;;; で監視を始めます | |
;;; clipboard-to-kill-ring:interval を設定するとポーリングの間隔を変えられます. |
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 ruby | |
for n in 1..30 | |
if 0 == n % 15 | |
p "fizzbuzz" | |
elsif 0 == n % 5 | |
p "buzz" | |
elsif 0 == n % 3 | |
p "fizz" | |
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
class String | |
def strimwidth(width) | |
self.split(//)[0...width].join | |
end | |
end | |
#see also http://www.ruby-lang.org/ja/man/html/Array.html#self.5bstart.2e.2eend.5d |