This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cd somedir | |
| wget -c https://pypi.python.org/packages/d4/0c/9840c08189e030873387a73b90ada981885010dd9aea134d6de30cd24cb8/virtualenv-15.1.0.tar.gz | |
| wget -c https://www.python.org/ftp/python/2.7.13/Python-2.7.13.tar.xz | |
| cd Python-2.7.13 | |
| mkdir $PWD/../python2.7 | |
| ./configure --prefix=$PWD/../python2.7 | |
| #sudo aptitude install libbz2-dev | |
| #libreadline6-dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| https://docs.docker.com/engine/installation/linux/centos/ | |
| sudo systemctl restart docker | |
| /home/nemo.zhang/mysqldata | |
| chcon -Rt svirt_sandbox_file_t /home/nemo.zhang/mysqldata | |
| sudo docker run --name test-mysql -v /home/nemo.zhang/mysqldata:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=mypassword -d mysql/mysql-server |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| do this in dev instance `rm /home/propus/.download/PIL-1.1.7-cp27-none-linux_x86_64.whl` | |
| and do this `yum install libjpeg-turbo-devel` | |
| and remove `PIL` and `python-pillow`. we dont need a system package. | |
| we just need install PIL in python virtualenv environment. | |
| the reason of this issue is that centos 7 use `libjpeg-turbo-devel` instead of `libjpeg-devel`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| zdb@dabin:~$ cat /etc/fail2ban/filter.d/sslproxy.local | |
| [Definition] | |
| failregex = read error remote error: tls: unknown certificate authority <HOST>:\d+ | |
| zdb@dabin:~$ cat /etc/fail2ban/jail.local | |
| [sslproxy] | |
| enabled = true | |
| port = 443 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # http://docs.ansible.com/ansible/intro.html | |
| #################################################### | |
| # create env | |
| cd somedir | |
| export PATH=$PATH:$PWD/env/bin | |
| wget -c https://pypi.python.org/packages/d4/0c/9840c08189e030873387a73b90ada981885010dd9aea134d6de30cd24cb8/virtualenv-15.1.0.tar.gz | |
| wget -c https://www.python.org/ftp/python/2.7.13/Python-2.7.13.tar.xz | |
| cd Python-2.7.13 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| from twisted.internet import reactor, defer | |
| from twisted.python import log | |
| log.startLogging(sys.stdout) | |
| @defer.inlineCallbacks | |
| def foo(): | |
| reactor.stop() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| request lib set http proxy | |
| process.env.https_proxy='http://192.168.196.71:7000' | |
| process.env.http_proxy='http://192.168.196.71:7000' | |
| webkit set http proxy | |
| nw.App.setProxyConfig("http=192.168.196.71:7000;https=192.168.196.71:7000") | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| https://www.postgresql.org/docs/current/static/app-psql.html | |
| \d+ tablename | |
| \list or \l: list all databases | |
| \dt: list all tables in the current database | |
| \connect database_name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| wget -c https://repo.continuum.io/archive/Anaconda2-4.2.0-Linux-x86_64.sh | |
| sh Anaconda2-4.2.0-Linux-x86_64.sh | |
| ./conda --version | |
| export http_proxys=127.0.0.1:7000 | |
| ./conda create -vv -n mystock python=2.7 numpy pandas matplotlib ipython scipy | |
| source activate mystock | |
| (mystock) [nemo.zhang@cws71 bin]$ ipython --pylab | |
| Python 2.7.12 |Continuum Analytics, Inc.| (default, Jul 2 2016, 17:42:40) | |
| Type "copyright", "credits" or "license" for more information. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| grep -irnI 'foo' * # find text foo in current folder | |
| find . -iname '*bar* # find file that matches bar | |
| du --max-depth=1 -h # list size of each in current folder | |
| df -h # disk size | |
| rsync -avzp -e 'ssh -i /tmp/ttt' /path1 user@server:/path2/ |