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
Problem: | |
run import OpenSSL, meet: | |
11 from cryptography import utils | |
12 from cryptography.exceptions import InternalError | |
---> 13 from cryptography.hazmat.bindings._openssl import ffi, lib | |
14 from cryptography.hazmat.bindings.openssl._conditional import CONDITIONAL_NAMES | |
15 | |
ImportError: DLL load failed: The operating system cannot run %1. |
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 python2.7 | |
#encoding:utf-8 | |
#@description:一个python守护进程的例子 | |
#@tags:python,daemon | |
import sys | |
import os | |
import time | |
import atexit | |
from signal import SIGTERM |
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
# Change YOUR_TOKEN to your prerender token and uncomment that line if you want to cache urls and view crawl stats | |
# Change example.com (server_name) to your website url | |
# Change /path/to/your/root to the correct value | |
server { | |
listen 80; | |
server_name example.com; | |
root /path/to/your/root; | |
index index.html; |
Personal Linux program installation Note
- mysql installation
sudo apt-get install mysql-server
sudo apt-get install mysql-client
sudo apt-get install libmysqlclient-dev
- redis installation
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
I screwed up using git ("git checkout --" on the wrong file) and managed to delete the code I had just written... but it was still running in a process in a docker container. Here's how I got it back, using https://pypi.python.org/pypi/pyrasite/ and https://pypi.python.org/pypi/uncompyle6
apt-get update && apt-get install gdb
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
yum groupinstall 'Development Tools' | |
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel | |
wget https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tar.xz | |
tar Jxvf Python-3.5.0.tar.xz | |
cd Python-3.5.0 | |
./configure --prefix=/usr/local/python3 | |
make && make install | |
echo 'export PATH=$PATH:/usr/local/python3/bin' >> ~/.bashrc | |
rm /usr/bin/python | |
ln -sv /usr/local/bin/python3.5 /usr/bin/python |