Friday, August 24, 2012

upstart init daemon

Configuration  

/etc/init.conf
/etc/init/*.conf

User Job

$HOME/.init/


Upstart commands


Wednesday, August 22, 2012

mount windows share from Ubuntu


Install

sudo apt-get install smbfs

Inspect

smbclient //test-https.blah.net/ipc$ -U id -Wdomain

mount

sudo mount -t cifs //remote_windows/share $ $HOME/windows -o user=uid,dom=office

Tuesday, August 21, 2012

connect to MS SQL server and Sybase from linux



  • sudo apt-get install unixodbc unixodbc-dev freetds-dev sqsh tdsodbc
  •  cat /etc/freetds/freetds.conf
    •  [tds1]
      host = 10.21.1.1
      port = 1433
      tds version = 7.0
  •  sqsh -S tds1 -U id -P password

Friday, August 17, 2012

browser shortcut with nginx and DNS

OS: Ubuntu

DNS

/etc/hosts
127.0.0.1 foo

Nginx 

in sites-enabled/default

if ( $host = wiki ) {  
   rewrite ^ https://wiki.example.com;
}

Enable SQL server 2012 for TCP

Thursday, August 16, 2012

nmcli without Network Manager GUI

nmcli 

nmcli con down id VPN_CONN_NAME
nmcli con up id VPN_CONN_NAME
nmcli con

automation with nmcli

network-manager restart

sudo service network-manager restart


To automatically connect VPN.

put "nmcli con up id VPN_CONN_NAME" in .profile (upon login)

Friday, August 10, 2012

gevent

installation

  • sudo apt-get install libevent-dev
  • pip install gevent

Wednesday, August 8, 2012

erlang for gaming

concurrency model with Actor



Actor model everything is a Actor, natively concurrent.

Support in programming language 

Erlang: language level. Erlang is the best platform for concurrency and distributed application so far.
Java: library level. Akka