バイク旅03日目(福井~京都)

福井県 温泉宿で朝食を済ませてから東尋坊へ. 東尋坊その1. 東尋坊その2. 東尋坊その3. ガソリンスタンドのお兄さんから「こんな何もないところによ...

2014-07-02 · aoi

バイク旅02日目(石川~福井)

石川県 ライダーハウスで朝のコーヒーをご馳走になってから出発した.まずは祖父の墓地へ行き旅の無事を祈った.その後,道中にあった小松の道の駅でお...

2014-07-01 · aoi

バイク旅01日目(富山~石川)

退職して時間ができたので,バイクで旅をすることにした.無理せずのんびりと全国を巡ってみたい. 今日は富山県を出て石川県へ.能登島経由で穴水町ま...

2014-06-30 · aoi

Private gyazo server on sinatra

Project aoimotoya/gyazo * GitHub What is this? This is a private gyazo server works on sinatra. It provides not only gyazo server function but also image gallery. Requirements Sinatra (includes WEBrick) Rack (interface between sinatra and nginx) Nginx (or other reverse-proxy/web-server) Procedure Gyazo server Nginx only works as a reverse proxy. Image gallery Dynamic contents and static contents are provided by sinatra and nginx respectively. Difference between official and mine File name Official gyazo names image files based on MD5 hash....

2014-04-22 · aoi

[Ruby] Sinatra アプリを Rack でデーモン化する際の注意点

結論 ソースコード中のパスをすべて絶対パスで記述しないとエラーとなる. 経緯 デーモン化したら動かない Sinatra で作ったアプリを rackup -D コマンドによりデーモン...

2014-04-21 · aoi

[Ruby] rbenv でシステム全体の Ruby を管理する

rbenv はユーザ個人に対して Ruby 環境の設定を行う.しかし,どうせならシステム全体の Ruby を管理したい.というわけで以下の記事を見ながら設定を行った. rb...

2014-04-18 · aoi

[Ruby] 62 進数のランダム文字列を出力する

背景 短縮 URL 等で使われているようなランダム文字列を生成したい. 62 進数は半角英数字 0-9a-zA-Z で表現することとする. コード STR_LENGTH = 3 table = [('0'..'9'), ('a'..'z'), ('A'..'Z')].map { |i| i.to_a }.flatten hash = STR_LENGTH.times.map {...

2014-04-16 · aoi

zsh-completions

What is this? zsh-users/zsh-completions * GitHub This projects aims at gathering/developing new completion scripts that are not available in Zsh yet. The scripts are meant to be contributed to the Zsh project when stable enough. Installation % mkdir ~/.zsh % cd ~/.zsh % git clone git://github.com/zsh-users/zsh-completions.git % vim ~/.zshrc fpath=(~/.zsh/zsh-completions/src $fpath) autoload -U compinit compinit % source ~/.zshrc How it works (on FreeBSD)? % pkg [Tab] add -- Registers a package and installs it on the system audit -- Reports vulnerable packages autoremove -- Removes orphan packages backup -- Backs-up and restores the local package database check -- Checks for missing dependencies and database consistency clean -- Cleans old packages from the cache convert -- Convert database from/to pkgng create -- Creates software package distributions fetch -- Fetches packages from a remote repository help -- Displays help information info -- Displays information about installed packages install -- Installs packages from remote package repositories query -- Queries information about installed packages register -- Registers a package into the local database remove delete -- Deletes packages from the database and the system repo -- Creates a package repository catalogue rquery -- Queries information in repository catalogues search -- Performs a search of package repository catalogues set -- Modifies information about packages in the local database shell -- Opens a debug shell shlib -- Displays which packages link against a specific shared library stats -- Displays package database statistics update -- Updates package repository catalogues updating -- Displays UPDATING information for a package upgrade -- Performs upgrades of packaged software distributions version -- Displays the versions of installed packages which -- Displays which package installed a specific file It shows not only commands but help documents....

2014-04-15 · aoi

[FreeBSD] Routing table

How to view % netstat -rn Default gateway We can specify the IP address of the default gateway by below command. % sudo route add default 10.20.30.1 Reference 30.2. Gateways and Routes, Chapter 30. Advanced Networking, FreeBSD Handbook

2014-04-09 · aoi

花見

2014-04-09 · aoi