curl -sL https://rpm.nodesource.com/setup_10.x | sudo bash -
curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo
sudo yum install -y nodejs yarn
https://github.com/h2non/bimg#installation
curl -s https://raw.githubusercontent.com/h2non/bimg/master/preinstall.sh | sudo bash -
You need to get access token and refresh token first.
Open this url with your browser. After a few clicks, you will be redirect to http://127.0.0.1:23333
, the authorization code is in the url params.
POST https://login.microsoftonline.com/common/oauth2/v2.0/token
Content-Type: application/x-www-form-urlencoded
client_id=4caae01e-515a-490f-bde7-92cff3b895ac&redirect_uri=http://127.0.0.1:23333&client_secret=qohmO45%%-jtxUVCAGP372{
&code=YOUR_CODE_HERE&grant_type=authorization_code
curl
curl -d "client_id=4caae01e-515a-490f-bde7-92cff3b895ac&redirect_uri=http://127.0.0.1:23333&client_secret=qohmO45%%-jtxUVCAGP372{&code=YOUR_CODE_HERE&grant_type=authorization_code" -X POST https://login.microsoftonline.com/common/oauth2/v2.0/token
yitu.json
{
"Cert": "path/to/cert",
"Key": "path/to/key",
"HttpAddr": ":80",
"HttpsAddr": ":443",
"Database": {
"Driver": "sqlite3",
"Source": "./yitu.db?parseTime=true&loc=Local"
},
"OneDrive": {
"ClientID": "4caae01e-515a-490f-bde7-92cff3b895ac",
"ClientSecret": "qohmO45%%-jtxUVCAGP372{",
"AccessToken": "AccessToken",
"RefreshToken": "RefreshToken",
"RedirectURI": "http://127.0.0.1:23333"
}
}
0 * * * * cd ~/yitu/scripts/backup && bash sqlite3.sh
0 * * * * mysqldump -u root -pPassword --single-transaction --quick --lock-tables=false yitu > yitu-$(date +\%Y\%m\%d\%H\%M\%S).sql