Skip to content

Instantly share code, notes, and snippets.

View S-Stephen's full-sized avatar

S M Shorrock S-Stephen

  • University of Cambridge
  • Cambridge
View GitHub Profile
@S-Stephen
S-Stephen / settings.json
Created February 3, 2021 19:48
python flake8 linting on file save VSC copy into .vscode/settings.json pip install flake8
{
"python.linting.pylintEnabled": false,
"python.linting.flake8Enabled": true,
"python.linting.flake8Args": ["--ignore=E24,W504", "--verbose"],
"python.linting.enabled": true,
"python.lintOnSave": true
}
@S-Stephen
S-Stephen / LoginController.js
Created February 9, 2021 19:52 — forked from psi-4ward/LoginController.js
Sails.JS JWT Auth
// controllers/LoginController.js
module.exports = {
index: function(req, res) {
var email = req.param('email');
var password = req.param('password');
// delay everthing to prevent bruteforce, dos and timing attacks
setTimeout(function() {
@S-Stephen
S-Stephen / docker-cleanup-resources.md
Last active May 20, 2021 11:01 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - Useful command to list used resources

$ docker system df --verbose

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes