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
// 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
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
# 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 |
NewerOlder