See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope>
is optional
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# FileName : redistools.py | |
# Author : wuqingfeng@ | |
from functools import wraps | |
try: | |
import cPickle as pickle | |
except ImportError: | |
import pickle |
Linux pstree shows running processes as a tree. The tree is rooted at either pid or init if pid is omitted. If a user name is specified, all process trees rooted at processes owned by that user are shown. | |
Install pstree | |
#On Mac OS | |
brew install pstree | |
#On Fedora/Red Hat/CentOS | |
yum install psmisc #using psmisc package for pstree | |
#On Ubuntu/Debian APT |
#!/bin/sh | |
# 下载nvd的数据源备份 | |
data_source="https://nvd.nist.gov/feeds/json/cve/1.1/" | |
download_dir="/data/SFTP/data/SDA/release/NVD/" | |
# file_name="nvdcve-1.1-{}.json.gz" |
from functools import wraps | |
from flask import ( | |
Flask, | |
json, | |
redirect, | |
render_template_string, | |
request, | |
session, | |
url_for, |
import os | |
from tqdm import tqdm | |
import azure.cognitiveservices.speech as speechsdk | |
key = "写你自己的key" | |
region = "eastasia" | |
endpoint = "https://eastasia.api.cognitive.microsoft.com/sts/v1.0/issuetoken" | |
# Read user input | |
filename = input("Please enter the name of the text file to convert: ") |
#!/bin/bash | |
log_file=/var/log/curl_error.log | |
max_age=86400 # one day in seconds | |
max_loop=1000 # maximum number of loops to execute | |
loop_count=0 # current number of loops executed | |
if [ ! -f "$log_file" ]; then | |
touch "$log_file" | |
fi |
import django.contrib.auth.password_validation as validators | |
from rest_framework import serializers | |
class RegisterUserSerializer(serializers.ModelSerializer): | |
password = serializers.CharField(style={'input_type': 'password'}, write_only=True) | |
class Meta: | |
model = User | |
fields = ('id', 'username', 'email, 'password') |
#!/bin/bash | |
# This file is accessible as https://install.direct/go.sh | |
# Original source is located at github.com/v2ray/v2ray-core/release/install-release.sh | |
CUR_VER="" | |
NEW_VER="" | |
ARCH="" | |
VDIS="64" | |
ZIPFILE="/tmp/v2ray/v2ray.zip" |
Become a Seeder: If you have a spare node (like a Raspberry PI with external HDD), you can setup a ZeroNet node here, which can automatically download and seen each new site published here.
Script to download new sites:
ZERO_DIR=~/ZeroNet-master
ZERO_HOST=127.0.0.1