Monthly Archives: August 2012

upstart vs System V init

  Most valuable reference http://askubuntu.com/questions/198794/how-do-i-choose-which-way-to-enable-disable-start-stop-or-check-the-status-of upstart cookbook http://manpages.ubuntu.com/manpages/precise/en/man5/init.5.html How to disable a service http://upstart.ubuntu.com/cookbook/#disabling-a-job-from-automatically-starting example:http://www.gaggl.com/2012/06/disable-services-on-boot-ubuntu-12-04/ How to check running service (System-V style) initctl list, bum (GUI) (System-V style) chkconfig –list (System-V style) service –status-all (? is upstart job)

Posted in centos, chkconfig, ubuntu, upstart | Tagged | Leave a comment

mount windows share from Ubuntu

gvfs-fuse sudo apt-get install gvfs-fuse dpkg -L gvfs-fuse gvfs-mount -l gvfs-mount smb://victor.yang@192.168.1.100/reuters-data/, then it will prompt for DOMAIN and password. to umount: gvfs-mount -u smb://victor.yang@192.168.1.100/reuters-data/ smbfs sudoapt-get installsmbfs smbclient //test-https.blah.net/ipc$ -U id -Wdomain sudo mount -t cifs //remote_windows/share $ $HOME/windows -o user=uid,dom=office

Posted in smb, ubuntu | Leave a comment

connect to MS SQL server and Sybase from linux freetds sqsh freebcp

sudo apt-get install freetds-dev sqsh freetds-bin  cat /etc/freetds/freetds.conf  [tds1] host = 10.21.1.1 port = 1433 tds version = 7.0  sqsh -S tds1 -U id -P password -i foo.sql -o foo.out freebcp (from freetds-bin package) freebcp mydb.dbo.table out table.csv -U id … Continue reading

Posted in mssql, sqsh, sybase | Tagged | Leave a comment

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; }

Posted in nginx, urlrewrite | Leave a comment

Enable SQL server 2012 for TCP

Enable SQL server 2012 for TCP port 1433

Posted in mssql | Leave a comment

nmcli Network-Manager nmtool

nm-tool to display network-manager status nmcli con down id VPN_CONN_NAME nmcli con up id VPN_CONN_NAME nmcli con automation with nmcli To automatically connect “nmcli con up id VPN_CONN_NAME” in .profile (upon login) http://linoxide.com/linux-command/nmcli-tool-red-hat-centos-7/ NetworkManager http://en.wikipedia.org/wiki/NetworkManager Restart network-manager: sudo service network-manager restart

Posted in network, ubuntu | Leave a comment

gevent

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

Posted in gevent | Leave a comment

erlang for gaming

http://smyck.net/2012/04/22/why-erlang/

Posted in erlang | Leave a comment

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. Python eventlet why gevent Gevent: good, bad and ugly gevent tutorial Java: library level. Akka

Posted in erlang, eventlet, gevent, java, python | Leave a comment