Entries from 2014-01-01 to 1 year

OSX compile in Objective-C

clang -fobjc-arc -framework Foundation main.m -o prog1 $~:./prog1

0 /usr/bin/ruby1.8 50 auto mode

1 /usr/bin/ruby1.8 50 manual mode 2 /usr/bin/ruby1.9.1 10 manual modePress enter to keep the current choice[*], or type selection number: 2 update-alternatives: using /usr/bin/ruby1.9.1 to provide /usr/bin/ruby (ruby) in manual mode.

ubuntu bundle install no such file to load -- rubygems

http://stackoverflow.com/questions/2896485/no-such-file-to-load-rubygems-loaderror$:~/script/git_tutorial/ruby-getting-started$ bundle install /usr/lib/ruby/vendor_ruby/bundler/rubygems_ext.rb:8:in `require': no such file to load -- rubyge…

ruby class module mixin extend import classMethond instanceMethod Singletonメソッド 無名クラス

http://melborne.github.io/2013/02/07/understand-ruby-object/

ruby slim render

https://github.com/slim-template/slim/blob/master/README.jp.md

ruby class property 、C++、Javaのクラスしか知らない人向け

rubyのclassにはプロパティはないが、似たようなことは出来る。 http://tobysoft.net/wiki/index.php?Ruby%2F%A5%AF%A5%E9%A5%B9%A4%CE%BA%EE%A4%EA%CA%FD%B6%B5%A4%A8%A4%EC http://www.rubylife.jp/ini/class/index6.html propertyメソッドの利用 http://r…

ruby css sass scss mixin slim

http://qiita.com/one-a/items/2758511326c09200fded http://css-happylife.com/archives/2012/0127_0020.php http://www7b.biglobe.ne.jp/~makandat/gg_sites/Sinatra_Diary_01.html http://www7b.biglobe.ne.jp/~makandat/gg_sites/Sinatra_Diary_01.html …

別のサブネットへ到達するには

192.168.1.0,192.168.2.0の2つのネットワークが有り、192.168.1.3に更にルータが接続されこれをゲートウェイにしてネットワーク:192.168.3.0が繋がっている。 自分は以下のように接続されている。$ ifconfig eth0 Link encap:Ethernet HWaddr 10:bf:48:ba:ae…

OpenVPN 注意 繋がらない,動かない, server:No DNS/DNS-forwarder on server host, client:"push DNS-option" can't be pushed into NetworkManager setting

start dnsmasq server:$ sudo dnsmasq -a 10.8.0.1 (server mode default) http://stackoverflow.com/questions/24797401/solved-openvpn-ubuntu-network-manager-connection-ok-but-not-resolving-not client:$ sudo nano /etc/NetworkManager/NetworkManag…

Ubuntu PCをルータ代わりに, OpenVPN,DNS,routing

http://d.hatena.ne.jp/chibatching/20130428/1367154401 http://www.clear-code.com/blog/2010/11/19.html http://blog.kazu634.com/2013/09/20/how_to_install_openvpn_under_ubuntu_1204/ http://www.openvpn.jp/document/how-to/ http://www.slsmk.com/g…

OpenVPN using TUN & routing

インストール $ sudo apt-get install openvpn libssl-dev openssl 鍵/証明書の準備(12.04 Create the easy-rsa folder and copy the sample files into it) $ sudo mkdir /etc/openvpn/easy-rsa/ $ sudo cp -R /usr/share/doc/openvpn/examples/easy-rsa/…

OpenVPN Client NetworkManager could not resolve ... Host server does not have DNS

user@server:$ sudo apt-get install dnsmasq

ubuntu iptables nat 確認 ip

$sudo iptables -t nat -A POSTROUTING -s 10.8.0.0/255.255.0.0 -o eth0 -j MASQUERADE →◎ 「10.8.0.0/255.255.0.0」からきたものはeth0宛てにNATする設定(因みに $iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -d 192.168.0.0/24 -j MASQUERADE, 「1…

OpenVPN

ブリッジとルーティングによる設定 http://www.openvpn.jp/document/how-to/ブリッジの場合はブリッジ(br0とtap0)の設定を行い、サーバーはサブネットの一部でサブネット上のゲートウェイである必要は無い。 http://www.slsmk.com/getting-started-with-op…

Using a nested wireless LAN router / Split Tunneling based on port by /etc/ppp/ip-up.d

Using a nested wireless LAN router http://ubuntuguide.org/wiki/Ubuntu_Trusty_Networking#Network_ManagerSplit Tunneling based on port by /etc/ppp/ip-up.d https://wiki.archlinux.org/index.php/PPTP_VPN_client_setup_with_pptpclient

about DNS

http://server.riopi.net/bind9.html http://www.tatsuyababa.com/NW-DNS/NW-200308-DNS.pdf http://www.tatsuyababa.com/NW-DNS/ https://www.upken.jp/kb/ubuntu-bind.html https://forums.ubuntulinux.jp/viewtopic.php?id=16090 http://www.atmarkit.co.…

ubuntu lightdm disable/enable

http://askubuntu.com/questions/16371/how-do-i-disable-x-at-boot-time-so-that-the-system-boots-in-text-mode http://askubuntu.com/questions/139014/how-to-disable-lightdm http://ubuntuforums.org/showthread.php?t=1911143teeコマンド http://blog…

ubuntu 14.04 x2go install error "Authentification Failed The host key for this server was not found but an othertype of key exists.An Attacker might change" / blanc&black screen problem

Server installation ( ubuntu server 14.04.1) http://wiki.x2go.org/doku.php/doc%3ainstallation%3ax2goserver http://www.howtoforge.com/how-to-install-x2goserver-on-ubuntu-14.04-as-vnc-alternative# sudo apt-get install python-software-common(…

window manager (not desktop manager) i3wm Qtile

http://askubuntu.com/questions/65083/what-kinds-of-desktop-environments-and-shells-are-available http://askubuntu.com/questions/524478/is-there-a-light-weight-minimal-unity-desktop-for-ubuntu-14-04 http://askubuntu.com/questions/65083/what…

GNOME Fallback/Classic on Ubuntu 14.04 /12.04 with Autologin

http://www.jakenovak.com/gnome-fallback-on-ubuntu-14-04-with-autologin/sudo apt-get install gnome-session-fallback -yAnd that’s it, if you want to have to select the “GNOME Flashback” mode each time you login. Personally, I think that’s a …

SSH SFTP X forward port specify指定

SSH: ssh -p @ SSH to accept socks 5 proxy on port you specify: ssh -p @ -D Forward the X server from your remote box: ssh -X -p @ SFTP: sftp -oPort= @ SCP:copy a directory (when "get") scp -P -r @: (when "put") scp -P -r @: Key-based SSH l…

sftp in win xp winscp and putty for key generation

Win XP scp as sftp virtual file system load http://winscp.net/KeyGen for Public Key login http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html http://www.putty.org/

FreeNX ssh sshd_conf public key

http://d.hatena.ne.jp/mobitan/20090130/1233403256$ sudo nano /etc/ssh/sshd_config AllowUsers nx "nx allowed username"$ sudo nano /etc/nxserver/node.conf ENABLE_PASSDB_AUTHENTICATION="1"$ sudo nxserver --adduser "nx allowed username" $ sudo…

windows xp ubuntu RDP remote desktop リモートデスクトップ 設定

以下でサーバ側のRDPをON マイコンピュータ>プロパティ>リモート コントロールパネル>システム>プロパティ>リモート“このコンピュータにユーザーがリモートで接続することを許可する”また、サーバ側のファイヤーウォールに例外を儲けRDPをスルー スター…

ubuntu ssh 公開鍵 public key SSHを使ってパスワードなしで接続

http://ubuntu.u-aizu.ac.jp/004/index.html まず、自分の端末側で、秘密鍵と公開鍵を作成する。 最初に、ディレクトリ .ssh を作成する。このディレクトリは自分だけが読み書きできるようになっている必要がある。 mkdir .ssh chmod 700 .ssh 続いて、鍵を…

FreeNXでiBus 起動しない。手動で起動しても「入力ウィンドウがありません」エラーがでる。

NX,FreeNXの起動ファイル$ sudo nano /etc/nxserver/node.confCOMMAND_START_GNOME='/usr/bin/X11/startxfce4'に対して$ sudo nano /usr/bin/X11/startxfce4_wiBus#!/bin/bashexport LC_CTYPE=ja_JP.utf8 export XMODIFIERS=@im=ibus export QT_IM_MODULE=ib…

vnc vs nx

http://www.wikivs.com/wiki/NX_vs_VNCNX allows users to create new X11 sessions and forwards all X communication to the remote client.VNC simply forwards what a logged in user sees on the desktop similar to how video would be transmitted.(…

ubuntu server 12.04 install Xfce without xubuntu-desktop さくらVPS 最小デスクトップ

sudo apt-get install xfce4のみだと、以下の問題がでる。 (0)そもそも実装KVMでもFreeNX仮想KVMでもgdm/lightDMが元々入っていないためにxfce4(に限らずどんなデスクトップも)が立ち上がらない。 (1)デスクトップのサムネイルがなくなる(汚い) (…

add-apt-repository: command not found , sudo: add-apt-repository: コマンドが見つかりません

sudo apt-get install python-software-properties

Ubuntu12.04(インストールした直後) apt-get update ソフトウェアアップデートができない

sudo apt-get updateW: bzip2:/var/lib/apt/lists/partial/jp.archive.ubuntu.com_ubuntu_dists_precise_main_source_Sources の取得に失敗しました ハッシュサムが適合しませんW: bzip2:/var/lib/apt/lists/partial/jp.archive.ubuntu.com_ubuntu_dists_pre…