cd /run/media/weet
su
mkdir dvd
This file contains 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
#!/usr/bin/env python | |
#coding: utf-8 | |
# ============================================================================== | |
# python -m doctest -v test_rsub.py | |
# ============================================================================== | |
class Left1(int): | |
""" |
This file contains 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
#coding: utf-8 | |
import os | |
import time | |
import signal | |
# from datetime import datetime | |
from multiprocessing import Process, Queue | |
import subprocess | |
import threading |
This file contains 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 glob | |
import logging | |
import logging.handlers | |
LOG_FILENAME = 'logging_rotatingfile_example.out' | |
# Set up a specific logger with our desired output level | |
my_logger = logging.getLogger('MyLogger') | |
my_logger.setLevel(logging.DEBUG) |
This file contains 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
\#* | |
*~ | |
*.swp | |
*.py[oc] | |
*.bin | |
flymake_* |
This file contains 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
#!/usr/bin/env python | |
#coding: utf-8 | |
import os | |
import sys | |
import time | |
msg = "Well done, take a break!" | |
def start(min, msg): | |
time.sleep(min * 60) |
This file contains 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
#### Easy way >> http://nginx.org/en/linux_packages.html | |
wget http://nginx.org/keys/nginx_signing.key | |
sudo apt-key add nginx_signing.key | |
## Code names: squeeze, wheezy | |
# deb http://nginx.org/packages/debian/ [codename] nginx | |
# deb-src http://nginx.org/packages/debian/ [codename] nginx | |
sudo apt-get update | |
sudo apt-get install nginx |
This file contains 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 urllib | |
def build_url(url, params): | |
query_string = '&'.join(['='.join([k, urllib.quote(v)]) for k, v in params.iteritems()]) | |
return '{}?{}'.format(url, query_string) | |
params = { | |
'abc':'some#def', | |
'integer': '234123' | |
} |
This file contains 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
FROM centos:centos7 | |
MAINTAINER weet <thewawar@gmail.com> | |
RUN rpm -ivh http://mirrors.ustc.edu.cn/fedora/epel/7/x86_64/e/epel-release-7-1.noarch.rpm | |
RUN yum install -y redis | |
EXPOSE 6379 | |
ENTRYPOINT ["/usr/bin/redis-server"] | |
# sudo docker run -p 6379:6379 -d centos-redis |
This file contains 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
FROM centos:centos7 | |
MAINTAINER weet <thewawar@gmail.com> | |
RUN yum install -y http://yum.postgresql.org/9.3/redhat/rhel-6-x86_64/pgdg-redhat93-9.3-1.noarch.rpm | |
RUN yum install -y postgresql93-server postgresql93-contrib | |
RUN /usr/pgsql-9.3/bin/postgresql93-setup initdb | |
RUN echo "host all all 0.0.0.0/0 md5" >> /var/lib/pgsql/9.3/data/pg_hba.conf | |
RUN echo "listen_addresses='*'" >> /var/lib/pgsql/9.3/data/postgresql.conf |
OlderNewer