ubuntu 14.04 LTS
1 | # sudo add-apt-repository ppa:git-core/ppa && sudo apt-get update #如果要安裝最新版就要先裝ppa |
on server
1 | #建立git server所使用的路徑。/opt/git也可以。 |
on client
1 | #第一次使用git時會被強制要求提做識別資訊。雖然之後要改也不是不是,可是git log裡會是舊的資訊。 |
1 | # sudo add-apt-repository ppa:git-core/ppa && sudo apt-get update #如果要安裝最新版就要先裝ppa |
1 | #建立git server所使用的路徑。/opt/git也可以。 |
1 | #第一次使用git時會被強制要求提做識別資訊。雖然之後要改也不是不是,可是git log裡會是舊的資訊。 |
hbar
test embeded d3
1 | sudo sh -c ‘echo “deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main” >> /etc/apt/sources.list.d/pgdg.list’ |
sudo su – postgres
psql1
2
3
4
5
6
7
8\conninfo
create table test (name char(12));
select * from test;
insert into test select 'aaa';
insert into test select 'aaabbb';
insert into test select 'aaabbbccc';
select * from test;
\q
exit
sudo apt-get install pgadmin3
CentOS/RHEL 7
rpm -Uvh http://yum.postgresql.org/9.5/redhat/rhel-7-x86_64/pgdg-centos95-9.5-2.noarch.rpm
CentOS/RHEL 6
rpm -Uvh http://yum.postgresql.org/9.5/redhat/rhel-6-x86_64/pgdg-redhat95-9.5-2.noarch.rpm
CentOS/RHEL 5
rpm -Uvh http://yum.postgresql.org/9.5/redhat/rhel-5-x86_64/pgdg-redhat95-9.5-2.noarch.rpm
Fedora 23
rpm -Uvh http://yum.postgresql.org/9.5/fedora/fedora-23-x86_64/pgdg-fedora95-9.5-3.noarch.rpm
Fedora 22
rpm -Uvh http://yum.postgresql.org/9.5/fedora/fedora-22-x86_64/pgdg-fedora95-9.5-3.noarch.rpm
Fedora 21
rpm -Uvh http://yum.postgresql.org/9.5/fedora/fedora-21-x86_64/pgdg-fedora95-9.5-2.noarch.rpm
yum install postgresql95-server postgresql95
/usr/pgsql-9.5/bin/postgresql95-setup initdb
CentOS/RHEL 7 and Fedora 23
systemctl start postgresql-9.5
systemctl enable postgresql-9.5
CentOS/RHEL 6/5 and Fedora 22/21
service postgresql-9.5 start
chkconfig postgresql-9.5 on
su - postgres
psql
1 | \password postgres |
sudo su postgres -c psql postgres1
2alter user postgres with password 'assignednewpassword';
\q
sudo passwd -d postgres
sudo su postgres -c passwd
sudo vi /etc/postgresql/9.0/main/postgresql.conf1
2
3
4#listen_addresses = ‘localhost’
listen_addresses = ‘*’
#password_encryption = on
password_encryption = on
sudo vi /etc/postgresql/9.0/main/pg_hba.conf1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16#TYPE DATABASE USER CIDR-ADDRESS METHOD
#"local" is for Unix domain socket connections only
#開放本地端同資料庫使用者帳號的 linux 使用者可以不用密碼從本機登入系統
local all all ident sameuser
#IPv4 local connections: IPV4本地端
host all all 127.0.0.1/32 ident sameuser
#IPv6 local connections: IPV6本地端
host all all ::1/128 ident sameuser
#IPv4 local connections:
#可以透過 tcp/ip 從 127.0.0.1/32 及 110.111.69.0/24 登入
host all all 127.0.0.1/32 md5
host all all 110.111.69.0/24 md5
#本地端的使用者使用 Unix domain socket及 md5 密碼登入
local all all md5
1 | create user testuser with password 'password4testuser'; |
netstat -an | grep 5432
1 | sudo sh -c ‘echo “deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main” >> /etc/apt/sources.list.d/pgdg.list’ |
sudo su – postgres
psql1
2
3
4
5
6
7
8\conninfo
create table test (name char(12));
select * from test;
insert into test select 'aaa';
insert into test select 'aaabbb';
insert into test select 'aaabbbccc';
select * from test;
\q
exit
sudo apt-get install pgadmin3
CentOS/RHEL 7
rpm -Uvh http://yum.postgresql.org/9.5/redhat/rhel-7-x86_64/pgdg-centos95-9.5-2.noarch.rpm
CentOS/RHEL 6
rpm -Uvh http://yum.postgresql.org/9.5/redhat/rhel-6-x86_64/pgdg-redhat95-9.5-2.noarch.rpm
CentOS/RHEL 5
rpm -Uvh http://yum.postgresql.org/9.5/redhat/rhel-5-x86_64/pgdg-redhat95-9.5-2.noarch.rpm
Fedora 23
rpm -Uvh http://yum.postgresql.org/9.5/fedora/fedora-23-x86_64/pgdg-fedora95-9.5-3.noarch.rpm
Fedora 22
rpm -Uvh http://yum.postgresql.org/9.5/fedora/fedora-22-x86_64/pgdg-fedora95-9.5-3.noarch.rpm
Fedora 21
rpm -Uvh http://yum.postgresql.org/9.5/fedora/fedora-21-x86_64/pgdg-fedora95-9.5-2.noarch.rpm
yum install postgresql95-server postgresql95
/usr/pgsql-9.5/bin/postgresql95-setup initdb
CentOS/RHEL 7 and Fedora 23
systemctl start postgresql-9.5
systemctl enable postgresql-9.5
CentOS/RHEL 6/5 and Fedora 22/21
service postgresql-9.5 start
chkconfig postgresql-9.5 on
su - postgres
psql
1 | \password postgres |
sudo su postgres -c psql postgres1
2alter user postgres with password 'assignednewpassword';
\q
sudo passwd -d postgres
sudo su postgres -c passwd
sudo vi /etc/postgresql/9.0/main/postgresql.conf1
2
3
4#listen_addresses = ‘localhost’
listen_addresses = ‘*’
#password_encryption = on
password_encryption = on
sudo vi /etc/postgresql/9.0/main/pg_hba.conf1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16#TYPE DATABASE USER CIDR-ADDRESS METHOD
#"local" is for Unix domain socket connections only
#開放本地端同資料庫使用者帳號的 linux 使用者可以不用密碼從本機登入系統
local all all ident sameuser
#IPv4 local connections: IPV4本地端
host all all 127.0.0.1/32 ident sameuser
#IPv6 local connections: IPV6本地端
host all all ::1/128 ident sameuser
#IPv4 local connections:
#可以透過 tcp/ip 從 127.0.0.1/32 及 110.111.69.0/24 登入
host all all 127.0.0.1/32 md5
host all all 110.111.69.0/24 md5
#本地端的使用者使用 Unix domain socket及 md5 密碼登入
local all all md5
1 | create user testuser with password 'password4testuser'; |
netstat -an | grep 5432
sudo apt-get update
sudo apt-get install git
sudo apt-get install gnome-session-fallback -> relogin and select “Gnome Flashback”
sudo shutdown -h now
sudo reboot
uname -m &&lsb_release -a && cat /etc/issue &&cat /etc/release
http://www.ubuntu-tw.org/modules/tinyd0/
1.開啟Universal-USB-Installer
1.選ubuntu
1.選iso檔
1.選usb碟(空間要足夠)
1.按create建立
sudo apt-get install ssh
sudo apt-get install openssh-server
sudo service ssh status
sudo service ssh restart
date
sudo vi /etc/default/rcS
UTC=no
sudo tzselect
sudo cp /usr/share/zoneinfo/Aisa/Taipei /etc/localtime
sudo vi /etc/timezone
Asia/Taipei
sudo apt-get isntall ntpdate
sudo ntpdate time.stdtime.gov.tw
sudo hwclock -w
date
sudo crontab -e
@daily /usr/sbin/ntpdate -u time.stdtime.gov.tw > /dev/null
sudo apt-get install ntp
service ntp status
sudo apt-get install htop iftop iotop atop iptraf monit nethogs bmon nmon glances sysstat tcptrack vnstat pktstat ifstat iostat monitorix netwatch trafshow
sudo apt-get install traceroute
sudo apt-get install net-snmp
sudo apt-get install rsync iotop p7zip-full tree hardinfo
sudo add-apt-repository ppa:vbernat/haproxy-1.5
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install haproxy
vi /etc/haproxy/haproxy.cfg
default
option forwardfor
option http-server-close
frontend http-frontend
bind public_ip:80
reqadd X-Forwarded-Proto:\ http
default_backend wwwbackend
backend wwwbackend
server 1-www private_ip_1:80 check
server 2-www private_ip_2:80 check
server 3-www private_ip_3:80 check
sudo service haproxy restart
sudo apt-get install nginx
haproxy -v
vi /etc/default/haproxy
ENABLED=1
sudo service haproxy
sudo service haproxy restart
sudo sh -c “echo \
https://github.com/elabs/mobile-websocket-example/blob/master/android/WebsocketExampleClientProject/WebsocketExampleClient/src/main/java/se/elabs/websocketexampleclient/MainActivity.java
http://www.elabs.se/blog/66-using-websockets-in-native-ios-and-android-apps
https://developer.kaazing.com/documentation/5.0/dev-android/p_dev_android_client.html
http://www.kevinhoyt.com/2015/09/16/websocket-on-android/
https://kheresy.wordpress.com/2013/04/02/html5-websocket-client/
https://kheresy.wordpress.com/2014/03/06/websocketpp-client/
http://grokbase.com/t/cassandra/user/119g2qczmt/how-to-reduce-disk-read-and-bloom-filter-performance
https://docs.datastax.com/en/cassandra/1.2/cassandra/operations/ops_tuning_bloom_filters_c.html
https://grockdoc.com/cassandra/2.1/articles/tuning-reads-via-the-bloom-filter_88c8f57a-71d0-41ee-b77f-617c64ad4739
set PYTHONHOME=c:\Python27
set PYTHONPATH=c:\Python27\Lib
set PATH=%PYTHONHOME%;%PYTHONHOME%\Scripts;%PATH%
python ez_setup.py
rem ### wget https://bootstrap.pypa.io/get-pip.py —no-check-certificate
python get-pip.pypip install “ipython[notebook]”
pip install ipython[all]
rem ### @see https://gist.github.com/fyears/7601881
pip install -U setuptools
pip install -U pip
pip install numpy
pip install scipy
pip install matplotlib
pip install pandas
pip install ipython[all]
rem ### you may lack of visual c compiler for python
error: Microsoft Visual C++ 9.0 is required (Unable to find vcvarsall.bat). Get it from http://aka.ms/vcpython27
just download and install it.
rem ### get pydata-book
git clone http://github.com/pydata/pydata-book
wget https://3230d63b5fc54e62148e-c95ac804525aac4b6dba79b00b39d1d3.ssl.cf1.rackcdn.com/Anaconda2-2.4.1-Windows-x86_64.exe —no-check-certificate
安裝完Anaconda後就可以執行 ipython noteook ,開啟 http://localhost:8888/ 就可看到 jupyter 的 web 介面
接下來可以按靠近右上的”new”按鈕;選擇python2建立新的notebook
建立了新的notebook,可以在running tab裡看到目前正在運作的所有notebook。(每個notebook會對映到各自的.ipynb檔案)
enter enter edit mode
shift- enter run cell, select below
ctrl- enter run cell
alt- enter run cell, insert below
ipython profile create nbserver
python -c “import IPython;print IPython.lib.passwd()”
or
IN [1]: from IPython.lib import passwd
IN [2]: passwd()
Enter password:
Verify password:
Out[2]: ‘sha1:xxxxxxxxxxxxxxxxxxxxxxxxx’
openssl req -x509 -nodes -days 10000 -newkey rsa:1024 -keyout mycert.pem -out mycert.pem
c = get_config()
c.IPKernerlApp.pylab = ‘inline’
c.NotebookApp.ip = ‘*’
c.NotebookApp.open_browser = False
c.NotebookApp.password = u’sha1:xxxx your hashed password’
c.Notebook.App.port = 9999 #可設為其他端口
-A RH-Firewall-1-INPUT -m state —state NEW -m tcp -p tcp —dport 9999 -j ACCEPT
-A OUTPUT -m state —state NEW -m tcp -p tcp —dport 9999 -j ACCEPT
ipython notebook —profile=nbserver —certfile=/path/to/your/mycert.pem
pet project check list
data
size
自動導入格式
人工輸入界面
人工檢核界面
sync,update,version-control,diff
database
schema
ORM hibernate
transaction
NoSQL?
Cache
ehcache
memcache
redis
MVC
security
fb/google/github login
access limit
shortlink
urlrewrite
filter
apache/nginx finetune
frondend
HTML
CSS
javascript
bootstrap
template
UI/UX
API
REST
entry url
json schema
security
search
solr
斷詞
near realtime
Visualization
statistic
MLDM
基本資料型態
結構資料型態
操作,使用,轉換
字串處理
測試
尋找
替換
大小寫
encoding
unicode,utf8
建立,輸入,顯示
IO讀寫
text,binary
塊讀,行讀,流讀
buffering
壓縮
local file system
url,network
date,time
search,sorting,regularexpression
OOP
abstract,class,interface
design pattern
template
generalize
persistence,database
debug,test
process,thread,sync,lock
security
OS specific supports
GUI
XML,HTML,JSON
FTP,MIME,POP,HTTPS,IRC
Web,HTTP,HTTPS,REST,OPML,RSS
distribution
algorithm
Functional Programming
support library/ecosystem