Entries from 2015-01-01 to 1 year

XcodeのプロジェクトをコピーしてiOSアプリの名前を変更、複製する

http://stackoverflow.com/questions/17744319/duplicate-and-rename-xcode-project-associated-folders http://kubou.net/archives/325 http://woodsmall.co.jp/xcode-2/application-name-change/

ios connect database

http://code.tutsplus.com/tutorials/titanium-mobile-database-driven-tables-with-sqlite-part-2--mobile-4031 http://www.raywenderlich.com/3932/networking-tutorial-for-ios-how-to-create-a-socket-based-iphone-app-and-server http://www.raywender…

Initial Server Setup with Ubuntu 14.04 server

$ adduser admin_user_name $ gpasswd -a admin_user_name sudohttps://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-14-04

ubuntu 14.04 pptp server

PPTP Installation$apt-get install pptpd$nano /etc/pptpd.conf localip 10.0.0.1 remoteip 10.0.0.100-200$nano /etc/ppp/chap-secrets :# Secrets for authentication using CHAP # client server secret IP addresses vpn89Hn pptpd oij$7H0Hp * vpn32oA…

Ubuntu 14.04 wol Nic指定と永続化

ethtool -s eth1 wol g (確認は $ethtool eth1)でWOL設定できるが、一回限りで次回のリブート後同じ設定を繰り返さなくてはいけないので、以下で永続化をする。$ sudo nano /etc/init.d/wakeonlan ## /etc/init.d/wakeonlan # # description: Force NIC in…

ubuntu 14.04 - Replace Realtek r8168 network card to enable wake-on-lan

http://www.realtek.com/downloads/downloadsView.aspx?Langid=1&PNid=5&PFid=5&Level=5&Conn=4&DownTypeID=3&GetDown=false#RTL8111B/RTL8168B/RTL8111/RTL8168RTL8111C/RTL8111CP/RTL8111D(L)RTL8168C/RTL8111DP/RTL8111ERTL8168E/RTL8111F/RTL8411RTL8111…

Ubuntu 14.04 - Terminal command to list folder size and corresponding file sizes within

http://superuser.com/questions/869969/ubuntu-14-04-terminal-command-to-list-folder-size-and-corresponding-file-sizesdu -lah|grep -v -e '^.*K:space:'|sort -r -n

selenium cookie add_cookie

http://www.rubydoc.info/gems/selenium-webdriver/0.0.28/Selenium/WebDriver/Optionshttp://stackoverflow.com/questions/18692542/create-a-domain-specific-site-com-cookie-with-rubys-selenium-webdriverhttp://stackoverflow.com/questions/28187331/…

selenium webdriver phontomjs stop images loading

http://stackoverflow.com/questions/15371495/phantomjs-1-8-with-selenium-on-python-how-to-block-imageswebdriver.PhantomJS(service_args=['--load-images=no'])試していません

画像ダウンロードを停止する ruby selenium chromedriver

prefs = { 'profile' => { #'default_content_settings' => {'images' => 2}, 'managed_default_content_settings' => {'images' => 2}, } }ch = Selenium::WebDriver.for(:chrome, :prefs => prefs)但しchromedriverのバージョンは selenium-webdriver 2.37…

ubuntu selenium webdriver chromedriver chrome set up

download chromedriverhttps://github.com/SeleniumHQ/selenium/wiki/ChromeDriver https://sites.google.com/a/chromium.org/chromedriver/downloads unzip it to /usr/bin/chromedriverthen require 'selenium-webdriver'#Selenium初期化 ff = Selenium::W…

ubuntu14.04 Anthy Fcitx

Software Centerから fcitx Anthy Fcitx wrapper for Anthy IM engine

ubuntu server 14.04 gnome

sudo apt-get install xorg gnome-core gnome-system-tools gnome-app-install

NetworkManager PPTP "VPN Service failed to start" and Deep Packet Inspection (DPI)

https://answers.launchpad.net/ubuntu/+source/network-manager/+question/254531

App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file. fatal error: unexpectedly found nil while unwrapping an Optional value

http://d.hatena.ne.jp/kazukingband/20150910/1441875442

ios osx vnc to ubuntu , encryption off

http://interwebworld.co.uk/2014/11/23/fix-screen-sharing-mac-os-x-ubuntu/dconf-toolsでExpand ‘org’>‘gnome’>‘Desktop’>‘Remote Access’>‘Require Encrption'=Uncheck 要するにUbuntu側のencriptionを解除する。ios,osx側のvncに暗号化の設定がな…

osx suddenly "disk is almost full" check /core and delete them

osx suddenly "disk is almost full" check /core and delete them

Ubuntu USB Drive Mount 接続

Open "Disk Utility", and look for your device, and click on it. This will let you be sure you know the correct filesystem type and device name for it. In my case, it was 'ext4' and '/dev/sdb1' respectively. Next: Decide what you want to ca…

Ubuntu selenium-webdriver

Gemsgem install headless gem install selenium-webdriver使い方require "selenium-webdriver" require 'headless'headless = Headless.new headless.start driver = Selenium::WebDriver.for :chrome driver.navigate.to "http://google.com"element = dri…

Ruby/Tk ウィンドウを消した後でも Ruby の処理は続けたい場合 destroy exit

http://www.mnet.ne.jp/~tnomura/tksample.html http://ronor.web.fc2.com/rubytk/require 'tk'name = ''TkLabel.new(nil, 'text'=>'Put your name below.').pack entry = TkEntry.new.pack TkButton.new(nil, 'text'=>'OK', 'command'=>proc{ name = entry.…

Ruby/Tk can't fork

Ruby/Tk does NOT support forking the process on which Tk interpreter is running (unless NEVER control Tk interpreter under the forked child process). In the library 'tk.rb', a Tk interpreter is initialized. Therefore, if you want running T…

Ruby/Tk can't fork

Ruby/Tk does NOT support forking the process on which Tk interpreter is running (unless NEVER control Tk interpreter under the forked child process). In the library 'tk.rb', a Tk interpreter is initialized. Therefore, if you want running T…

ubuntu 12.04 rmagick

$ sudo apt-get install imagemagick $ sudo apt-get install libmagickwand-dev$ gem install rmagick

Ruby/Tk RMagick

気がついたことrmagickは - 画像処理するもので、その表示位置をデスクトップや他のXserver上の表示位置をコントロールするものではない。例えば そういうときはTcl/Tkを使う。tkは - rbenv,rvmでつにねに現在使っているrubyの再コンパイルが必要。要するに…

ubuntu 12.04 ruby 2.1 rvm Ruby/Tk 動かない

http://futurismo.biz/archives/2226$ sudo apt-get remove tk-dev $ sudo apt-get install tk8.4-dev tcl8.4-dev$ sudo ln -sfn /usr/lib/tcl8.4/tclConfig.sh /usr/lib/tclConfig.sh $ sudo ln -sfn /usr/lib/tk8.4/tkConfig.sh /usr/lib/tkConfig.sh$ rvm…

ruby/Tk auto close root automatically

require 'tk'TkRoot.new {geometry '300x200+100+100'} TkAfter.new(3000, # milliseconds 1, proc{exit} # what to call when the timer expires ).startTk.mainloop

ubuntu 14.04 ruby 2.2 rvm Ruby/Tk 動かない

http://stackoverflow.com/questions/20874900/ruby-require-tk-yields-loaderror-no-such-file-to-load-tk http://5zalt.hatenablog.com/entry/2015/02/12/124228 $ sudo apt-get install tk-dev $ rvm reinstall ruby-2.2-head --with-tcltkversion=8.6 --…

ubuntu12.04 printer network ファイアウォールデーモンが起動していません

http://qiita.com/iberianpig@github/items/826809e978965d1a03a2FireWall使ってないので、どうやらこれはバグらしい。$ system-config-printerをTerminalで入力すると、以前のGUIが立ち上がる。

unicorn sinatra non-modular app inline __END__

http://stackoverflow.com/questions/15639998/sinatra-via-rackup-does-not-like-inline-templates https://github.com/rstacruz/nanomonk/blob/master/vendor/sinatra-1.0/README.jp.rdocenable :inline_templates bundle exec unicorn_rails --path /notM…

mechanize submit encode フォーム送信 エンコード・デコードツール、request header 確認ツール

mechanizeでフォーム送信すると期待されたエンコードで送信されない事がある。送信結果が文字化けしてしまう。 以下の条件に当てはまるウェブページで起こる。 - HTML 中に meta 要素の charset が存在しない - レスポンスヘッダのContent-Typeにもcharsetが…