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
You are Manus, an AI agent created by the Manus team. | |
You excel at the following tasks: | |
1. Information gathering, fact-checking, and documentation | |
2. Data processing, analysis, and visualization | |
3. Writing multi-chapter articles and in-depth research reports | |
4. Creating websites, applications, and tools | |
5. Using programming to solve various problems beyond development | |
6. Various tasks that can be accomplished using computers and the internet |
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
const largeRecipientList = new Array(2000).fill().map((_, idx) => `customer${idx}@nowhere.com`) | |
// largeRecipientList is an array of email addresses | |
const recipientLimit = 100 | |
const batches = largeRecipientList.reduce((batches, r) => { | |
const lastBatch = batches[batches.length - 1] | |
if(lastBatch.length < recipientLimit) | |
lastBatch.push(r) | |
else | |
batches.push([r]) | |
return batches |
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
const slope = getSlope(firstPoint, secondPoint); | |
const perpSlope = getPerpSlope(slope); | |
let perpPointOne = findPointOnLine(firstPoint, perpSlope, 10); | |
let perpPointTwo = findPointOnLine(firstPoint, perpSlope, -10); | |
ctx.moveTo(perpPointOne.x, perpPointOne.y); | |
ctx.lineTo(perpPointTwo.x, perpPointTwo.y); | |
perpPointOne = findPointOnLine(secondPoint, perpSlope, 10); |
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://qiita.com/Jxck_/items/defd80843a4beb5fcfc8 | |
# 定义公共的契约调用规则 | |
function contract(rule) { | |
return function(target, name, descriptor) { | |
let rule = new Rule(target, name, descriptor); | |
let original = descriptor.value; | |
descriptor.value = function() { | |
if (rule.before) rule.before.apply(rule, arguments); | |
if (rule.invaliant) rule.invaliant(this); |
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
module.exports = { | |
singleQuote: true, | |
semi: false | |
} |
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
usually use the -p flag with a git checkout from the other branch which I find easier and more granular than most other methods I have come across. | |
In principle: | |
git checkout <other_branch_name> <files/to/grab in/list/separated/by/spaces> -p | |
example: | |
git checkout mybranch config/important.yml app/models/important.rb -p | |
You then get a dialog asking you which changes you want in "blobs" this pretty much works out to every chunk of continuous code change which you can then signal y (Yes) n (No) etc for each chunk of code. |
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
1. 发生了什么?what | |
2. 什么时候发生的?when | |
3. 发生在哪个页面? where | |
4. 影响哪些用户?who | |
5. 为什么会发生问题?why | |
6. 怎么解决?how |
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
# Docker Commands, Help & Tips | |
### Show commands & management commands | |
``` | |
$ docker | |
``` | |
### Docker version info |
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
#!/bin/sh | |
DIR=`pwd` | |
NODE=`which node` | |
# get action | |
ACTION=$1 | |
# help | |
usage() { | |
echo "Usage: ./appctl.sh {start|stop|restart}" | |
exit 1; |
NewerOlder