Entries from 2013-01-01 to 1 year
http://jordanhollinger.com/2011/07/09/writing-an-ajax-long-polling-server-in-ruby-part-2
http://qiita.com/sumyapp/items/6843ceebbbfc09a2b6ac http://qiita.com/u1_fukui/items/b86b21f6ed39f4c10d5d http://www.rubylife.jp/rails/ini/index2.html http://shokai.org/blog/archives/7262
http://qiita.com/u1_fukui/items/b86b21f6ed39f4c10d5d http://ruby.about.com/od/sinatra/a/sinatra5.htmver1.4から「only serving localhost in development mode」だそうです。 = 1.4.0 / 2013-03-15対応方法最初に見たドキュメントの通り、environment…
http://d.hatena.ne.jp/yoshidaa/20090511/1241967137 http://blog.livedoor.jp/sasata299/archives/51488276.htmlhttp://jordanhollinger.com/2011/05/15/writing-an-ajax-long-polling-server-in-ruby-part-1
http://www.studyinghttp.net/method http://yohei-y.blogspot.hk/2005/04/rest-5-get-post-put-delete.html
http://ruby-doc.org/core-2.0/Enumerable.html#method-i-inject[1, 2, 3, 4].inject(0) { |result, element| result + element } # => 10ary = %w(1 2 2 3 3 3 4 4 4 4) ary.inject(Hash.new(0)){|hash, a| hash[a] += 1; hash} #=> {"1"=>1, "2"=>2, "3"=>…
原因:OpenSSLの証明書が間違っているもしくは古くなった。HTTPSの意味はなくなるが、簡単に動く様になる方法。 a.agent.http.verify_mode = OpenSSL::SSL::VERIFY_NONE ※特定のサイトで相手を完全に信用している場合は、これで良い。http://limi.co.uk/post…
2つのルーターが別々のネットワークに繋がっていて場合、1台のPCに2枚のネットワークカードをインストールしそれぞれのネットワークにつなげると、デフォルト・ネットワークでしかポートフォワードが設定できない。原因=>PCにデフォルト・ルートがNetworkM…
https://help.ubuntu.com/community/NetworkConfigurationCommandLine/Automatic ip: policy routing http://www.softpanorama.net/Net/Internet_layer/Routing/policy_routing.shtml
The way to use network manager for default network assignment is by checking the 'Use this connection only for resources on its network' option in editing IPv4 routes on all connections you do NOT want to be the default.To do this without …
vino-preferences
【sshd】ポートの設定 pオプション 接続を受け付けるポートの指定(デフォルト=22番). 以下のように複数のポートを受け付けることが可能(sshd の設定ファイルは /etc/ssh/sshd_config). Port 22 #デフォルト Port 10000 #追加分 変更後,sshd を再起…
sudo apt-get install libssl-dev rvm remove 2.0.0 # get rid of unsuccessful installation rvm get head --autolibs=3 # get the latest RVM and build required libs rvm requirements # just in case, install all other required stuff rvm reinstall …
https://help.ubuntu.com/community/VNC/ServersLXDE session automatically after tightvncserver starts to make me able see desktop when connecting to the host via vncclient? http://askubuntu.com/questions/178962/how-to-start-lxde-session-auto…
組み込み変数の$@を使う。begin open("notfound.txt", "r") do |file| puts file.readlines end rescue puts $@ end ファイル名、行数、メソッド名が出力される。morningcoffee.rb:2:in `initialize'
Net::SFTP.start('host', 'username', :password => 'password') do |sftp| # upload a file or directory to the remote host sftp.upload!("/path/to/local", "/path/to/remote") # download a file or directory from the remote host sftp.download!("/p…
Re: Internal error with apport-gpu-error-intel.py If you have no problems with your system then you can disable apport's reports . For one session only sudo service apport stop Permanent gksudo gedit /etc/default/approt and change the enab…
require 'nokogiri'html = ' foo bar 'doc = Nokogiri::HTML(html) doc.at('p:contains("bar")').text.strip => "bar"
/etc/ppp/options に以下を設定しておけば、PPP,PPTP接続時のDNSを設定してくれるms-dns 8.8.8.8 ms-dns 8.8.4.4
thePage=a.get(href).body.toutf8 dom=Nokogiri::HTML( thePage ) print dom.at('p[property="main_title"]').inner_text print dom.at('input[name="comment"]')['value'] form=dom.at('form[id="toukou"]') Mechanize::Form.new(form,a,a.page){|f| f['dat…
sTime = Time.now until chkip=`curl -ss checkip.dyndns.com`.match(/Current\sIP\sAddress:\s(#{IP_Regex})/) or (Time.now-sTime)>3*60 do sleep 1 end
http://www.geekpage.jp/practical/utp/index.php
http://askubuntu.com/questions/180941/blocking-multiple-sites-with-etc-hosts http://jaxov.com/2009/09/how-to-block-websites-in-ubuntu-linux/ hosts example127.0.0.1 localhost 192.168.1.199 UbuntuServer 0.0.0.0 r.twimg.com 0.0.0.0 p.twitter.…
http://docs.rubygems.org/read/chapter/16 http://docs.rubygems.org/read/chapter/2 http://docs.rubygems.org/read/chapter/10
http://www.ubuntugeek.com/howto-configure-pptp-vpn-in-ubuntu-intrepid-and-jaunty.htmlirst you need to install the following packages sudo apt-get install pptp-linux ppp pptpdConfigurationFirst you need to edit /etc/ppp/chap-secrets file su…
apt-get update sudo apt-get install build-essential sudo apt-get install libxslt-dev libxml2-dev
Ubuntu server 12.10 より上のバージョンだとNXのリドローが上手く行かず、再コネクトするとテキストが見えなくなる。(以下を参照)http://askubuntu.com/questions/198790/nomachine-nx-text-missing-on-all-gtk-interface-unity-and-gnome-classicそこで…
http://anahorny.blogspot.hk/2011/08/selenium-webdriver-ruby-tutorial.html http://qiita.com/items/9cb81d7a98150ff22f53
sudo apt-get install nautilus-open-terminal$ sudo add-apt-repository ppa:nae-team/ppa $ sudo apt-get update && sudo apt-get install nautilus-open-as-root