One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
# -*- coding:utf-8 -*- | |
''' | |
python 2.7 | |
quote from the next url | |
https://github.com/yurri/py3_google_authenticator/blob/master/google_authenticator.py (python3.X) | |
大部分的代码都来自与上边的一个url。 | |
由于不需要全部的功能,而且是用2.7所以简单做了一下精简。 | |
只用了totp的模式。所以别的模式也还啊没验证。 | |
敬请见谅。 | |
不过很容易根据自己的需要修改。 |
set nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" alternatively, pass a path where Vundle should install plugins | |
"call vundle#begin('~/some/path/here') |
'use strict'; | |
const ruo = require('ruo'); | |
exports.complete = function *(id) { | |
const t = yield ruo.transaction({autocommit: false}); | |
let bill; | |
try { | |
bill = yield ruo.models.Bill.findOne({ | |
where: { |
// https://stackoverflow.com/questions/31424561/wait-until-all-es6-promises-complete-even-rejected-promises/36115549#36115549 | |
var a = () => Promise.resolve(1); | |
var b = () => Promise.reject(new Error(2)); | |
var c = () => Promise.resolve(3); | |
Promise.all([a(), b(), c()].map(p => p.catch(e => e))) | |
.then(results => console.log(results)) // 1,Error: 2,3 | |
.catch(e => console.log(e)); | |
const urls = [1, 2, 3]; | |
async function download(urls) { | |
return urls.map(async (url) => { | |
const content = await Promise.resolve(url); | |
console.log(content); | |
return content; | |
}); | |
} | |
(async () => { |
0xee6b81553fd32370865c74b05e0731b0404d523d |
// node version v10.15.0 | |
// "@vite/vitejs": "^1.1.4", | |
// "sleep-promise": "^8.0.1" | |
// output example | |
// generate account from: vite_b91c215ee845e80744c7d3536c5246724d9bd8938b710e96e9 | |
// generate account to: vite_2118b87c74c01abee0b95e160b4d0e615cc5a22a96e23d50c7 | |
// get some VTT to vite_b91c215ee845e80744c7d3536c5246724d9bd8938b710e96e9 | |
// https://explorer.vite.net/transaction/17fbe92009a549b332930c9a532076e90caa6bc2bcadab9ac95840bb4b66d8a3 | |
// send some VTT to vite_2118b87c74c01abee0b95e160b4d0e615cc5a22a96e23d50c7 |
[program:bilibili] | |
directory=/root/bilibili # 程序目录 | |
command=/root/B/bili/bin/python3 -u run.py # 运行命令 | |
stdout_logfile=/root/B/bili/bilibili-live-record-and-upload/run.log # 日志输出文件 | |
redirect_stderr=true #重定向错误到标准输出 | |
stopwaitsecs=600 #进程停止的等待时间 | |
startretries=60 #重启尝试次数 | |
autostart=true #是否自启动 | |
autorestart=true #是否进程重启 | |
stopasgroup=true #是否使用群组模式,包含有子进程的建议开启 |
### Keybase proof | |
I hereby claim: | |
* I am kaidiren on github. | |
* I am kaidiren (https://keybase.io/kaidiren) on keybase. | |
* I have a public key ASArVcj39KMoU9722ofzcmPjM9tXXbkRXMSsUHypJvq8sAo | |
To claim this, I am signing this object: |