This file contains 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
# Bash snippet | |
## List service | |
service --status-all | |
ls -F /etc/init.d/ | grep '*$' | |
## File Descriptors | |
### Open socket by node.js | |
lsof -n -i -P | grep node | wc -l |
This file contains 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 fastify = require('./fastify')({ logger: { level: 'debug' } }) | |
fastify.addSchema({ | |
$id: 'http://example.com/ref-to-external-validator.json', | |
type: 'object', | |
properties: { | |
hello: { type: 'string' } | |
} | |
}) | |
const body = { |
This file contains 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
// Review a GitHub Pull Request ID | |
git fetch origin pull/ID/head:foo | |
git checkout foo | |
// View all your stashes, also which you have deleted! | |
git fsck --unreachable | grep commit | cut -d ' ' -f3 | xargs git log --merges --no-walk | |
// Restore a deleted stash | |
git update-ref refs/stash da02442ffa1584b489dc37a0fcf70fb1b60d9d2c -m "Piuf no one is lost" |
This file contains 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
'use strict' | |
const fastify = require('./fastify')({ logger: true }) | |
// Requests | |
fastify.addSchema({ | |
$id: 'Request/Auth/Login', | |
type: 'object', | |
required: ['email', 'password'], | |
properties: { |
This file contains 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
db.getCollection("aaaaaaa").find({}).limit(10) | |
.forEach(function(i) { | |
delete i._id; | |
i._id = UUID().toString().split('"')[1] | |
i.when = new Date(); | |
i.userId = "from_ONE_2_TWO"; | |
db.getCollection("aaaaaaaa").insert(i); | |
}); |
This file contains 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
/** | |
* node --max-old-space-size=4048 --initial-old-space-size=4048 --max-heap-size=4048 stress-memory | |
* x64 | |
* rss 3.39 GB | |
* heapTotal 3.74 GB | |
* heapUsed 3.73 GB | |
*/ | |
const os = require('os') | |
console.log(os.arch()) |
This file contains 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 fs = require('fs') | |
const path = require('path') | |
// massive-wax upgrade -L -R -m 'test(/|\\)?.*\.js$' -t 'chore tap 15' -r repo-list -p ./tap-15.js -K <GITHUB_TOKEN> | |
module.exports = function factory (args, logger) { | |
return { | |
onRepo (repo) { | |
const repoPath = path.join(repo.owner, repo.repo) | |
const pkjPath = path.join(repoPath, './package.json') |
Do you want to start contributing to Open Souce Software and the Fastify project?
It would be best if you started asking yourself where to start:
- Do you want to write code?
- Do you want to understand how things work?
- Do you like DevOps stuff?
- Do you want to work on Github action automation?
- Do you want to make an impact on the community?
The number of people who come to Fastify's repositories to say they are forced to use Expressjs, or whatever, is uncountable.
So, I'm writing these lines because every time I read these words, I get upset for many reasons that I will list here.
ℹ Note I'm a Fastify contributor and the opinions expressed are solely my own and do not express the views or opinions of the Fastify community or other contributors.
So, let me share this catchy title:
OlderNewer