Jekyll本机运行时有个问题,首页分页效果出不来.虽然是3.0版本,也去掉了permalink,加了pagination和pagination的路径,但是还是不行.就想干脆迁移到hexo吧
- step1 :
npm install hexo-cli -g
hexo init blog
cd blog
npm install
allowed = ['.asp','.aspx','.jsp','.jspx','.php','.png','.jpg','.jpeg','.gif'] | |
filebasename = os.path.basename path | |
findsuffixhit = (filebasename.indexOf(i) for i in allowed) | |
hitlen =findsuffixhit.filter((v) -> | |
if v != -1 | |
return v | |
return | |
).length | |
# hitlen = findsuffixhit.filter(function(v){if(v!=-1){return v}}) |
#Dynamicly add field | |
# https://stackoverflow.com/questions/22358489/dynamically-define-fields-in-a-peewee-model | |
class FileProperty(Model): | |
filename = CharField() | |
my_field = peewee.IntegerField(null=False, default=0) | |
my_field.add_to_class(FileProperty, 'filetype') | |
FileProperty.filetype |
# from peewee import * | |
from peewee import Model, CharField, IntegerField, FloatField, DateTimeField, ForeignKeyField, PrimaryKeyField | |
from peewee import SqliteDatabase | |
from peewee import OperationalError, IntegrityError | |
from colorama import Fore,Style,Back | |
from uuid import uuid1 | |
from sh import Command | |
import pprint |
tables=$(osqueryi --json ".tables" | awk -F "=>" '{print $2}') | |
for table in $tables | |
do | |
echo TableName $table | |
osqueryi --json "select * from $table" | python -m json.tool >> jsonunixsysinfo | |
done | |
#!/bin/bash | |
#Script From https://github.com/Nyr/openvpn-install | |
# OpenVPN road warrior installer for Debian, Ubuntu and CentOS | |
# This script will work on Debian, Ubuntu, CentOS and probably other distros | |
# of the same families, although no support is offered for them. It isn't | |
# bulletproof but it will probably work if you simply want to setup a VPN on | |
# your Debian/Ubuntu/CentOS box. It has been designed to be as unobtrusive and |
我之前看到的教程没有ctrl
这一块。
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="xxxxxxxx
sudo apt-get install build-essential autoconf libtool pkg-config python-opengl python-imaging python-pyrex python-pyside.qtopengl idle-python2.7 qt4-dev-tools qt4-designer libqtgui4 libqtcore4 libqt4-xml libqt4-test libqt4-script libqt4-network libqt4-dbus python-qt4 python-qt4-gl libgle3 python-dev
sudo apt install libkrb5-dev
sudo apt-get install libsasl2-dev python-dev libldap2-dev libssl-dev\nsudo apt-get install -y python-dev libldap2-dev libsasl2-dev libssl-dev
sudo apt install mysql-server
sudo apt-get install libmysqlclient-dev
make apps
selenium.common.exceptions.WebDriverException: Message: unknown error: unhandled inspector error: {"code":-32000,"message":"Cannot navigate to invalid URL"} (Session info: headless chrome=64.0.3282.167) (Driver info: chromedriver=2.35.528139 (47ead77cb35ad2a9a83248b292151462a66cd881),platform=Linux 4.13.0-32-generic x86_64)
不加http导致的
selenium.common.exceptions.WebDriverException: Message: Service . / chromedriver unexpectedly exited. Status code was: 127
yum install chromium
# https://martinfitzpatrick.name/article/multithreading-pyqt-applications-with-qthreadpool/ | |
import sys | |
from PyQt4.QtGui import QApplication | |
from PyQt4.QtCore import QThreadPool, QObject, QRunnable, pyqtSignal | |
class WorkerSignals(QObject): | |
result = pyqtSignal(int) | |
class Worker(QRunnable): |