models.contracts.findAll({
attributes: ['id', [models.sequelize.fn('sum', models.sequelize.col('payments.payment_amount')), 'total_cost']],
include: [{ model: models.payments, attributes: [] }],
group: ['contracts.id']
});
Model.findAll({
attributes: ['id', [sequelize.fn('count', sequelize.col('likes.id')), 'likecount']],
include: [{ attributes: [], model: Like }],
This file contains hidden or 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
| ## [Web Shell](https://github.com/pm2-hive/pm2-webshell) | |
| ### Host | |
| server { | |
| listen 80; ## listen for ipv4; this line is default and implied | |
| #listen [::]:80 default ipv6only=on; ## listen for ipv6 | |
| root /home/public; | |
| index index.html index.htm; |
This file contains hidden or 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
| function hb(total, count) { | |
| var i; | |
| var left = total; | |
| var redpacks = []; | |
| var redpack; | |
| function generate(amount, size) { | |
| var min = 0.01; | |
| var avg; | |
| var money; |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <!-- saved from url=(0188)http://d.alipay.com/i/index.htm?cid=5895&iframeSrc=alipays%3A%2F%2Fplatformapi%2FstartApp%3FappId%3D20000042%26publicId%3D2014070700006872%26followType%3DPUBLIC%26sourceId%3Dshortlink#once --> | |
| <html><head><meta http-equiv="Content-Type" content="text/html; charset=GBK"> | |
| <meta charset="UTF-8"> | |
| <title>支付宝</title> | |
| <meta name="apple-mobile-web-app-capable" content="yes"> | |
| <meta name="apple-mobile-web-app-status-bar-style" content="black"> | |
| <meta name="format-detection" content="telephone=no"> | |
| <meta name="format-detection" content="email=no"> |
CREATE DATABASE <NEW_DB> WITH TEMPLATE "<OLD_DB>" OWNER <OWNER>;-- see StackOverflow
DO $$
DECLARE
This file contains hidden or 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
| forever start [forever-options] `which http-server` [http-server options] |
wget -r -p -np -e robots=off [url]wget -mpnp -e robots=off [url]wget -m [url]=wget -r -N -l inf --no-remove-listing [url]
wget -E -H -k -K -p -e robots=off [url]
This file contains hidden or 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
| (function start() { | |
| const today = new Date(); | |
| const year = today.getFullYear(); | |
| const month = today.getMonth(); | |
| const date = today.getDate(); | |
| const url = 'https://daojia.jd.com/client?xxx'; | |
| const hour = 10; | |
| // server time delay, do not fix! | |
| const startDate = new Date(year, month, date, hour - 1, 59, 59, 500); | |
| const endDate = new Date(year, month, date, hour, 0, 5); |
.card {
&:global(.ant-card) {
margin-bottom: 5px;
}
}=>
This file contains hidden or 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
| # https://bitbucket.org/BitPusher16/dotfiles/raw/49a01d929dcaebcca68bbb1859b4ac1aea93b073/refs/git/git_examples.sh | |
| #!/bin/bash | |
| ########## | |
| # contents | |
| ########## | |
| # contents | |
| # notes |
OlderNewer