Entries from 2017-01-01 to 1 year

Serving static files/images with Sinatra

require 'sinatra'get '/' do #File.read(File.join('./public', 'index.html')) File.expand_path('index.html', settings.public_folder) end

Ruby web server Why not WEBrick

http://dev.classmethod.jp/server-side/ruby-on-rails/sinatra__make_api_server/Why not WEBrick By default WEBrick is single threaded, single process. This means that if two requests come in at the same time, the second must wait for the firs…

Sinatraで簡易APIサーバー

http://dev.classmethod.jp/server-side/ruby-on-rails/sinatra__make_api_server/

byobu cheat sheet

http://qiita.com/nmrmsys/items/03f97f5eabec18a3a18bTo start a new Byobu session with a specified name: byobu new -s To change the name of a pre-existing session: byobu rename -t include the session-name in status bar for byobu-tmux $tmux s…

Ubuntu 14.04 rvm "rack requires Ruby version >= 2.2.2"

update rvm rvm get latest

"RVM is not a function" on server byobu.....

source ~/.rvm/scripts/rvm

selenium-webdriver 3.4.0, firefox-53.0.2, geckodriver-v0.16.1-linux64.tar.gz

https://github.com/mozilla/geckodriver/releases geckodriver-v0.16.1-linux64.tar.gz$ unzip geckodriver_geckodriver-v0.16.1-linux64.tar.gz $ sudo mv geckodriver /usr/bin/ $ cd /usr/bin $ sudo chmod +x geckodriverRuby Selenium::WebDriver::Fir…

DSLメモ

"plog" command to see the status or "ifconfig ppp0" for general interface infoConfiguration file `/etc/ppp/peers/dsl-provider'sudo apt-get install pppoe sudo ppoeconf/etc/ppp/options /etc/ppp/peers/dsl-provider sudo nano chap-secrets sudo …

tidy HTML indent 字下げ ubuntu

Use a config file with just the indent, tidy-mark, and quiet options:indent: auto indent-spaces: 2 quiet: yes tidy-mark: no Name it tidy_config.txt and save it the same directory as the .html file. Run it like this:tidy -config tidy_config…