Skip to content

Instantly share code, notes, and snippets.

@VaguelySerious
VaguelySerious / addhash
Created July 2, 2020 16:46
Bash script to add a file's hash to it's own filename
#!/bin/bash
# Put this file in your /usr/local/bin directory and run "sudo chmod +x" on it.
# Use like so:
# addhash somefile.txt
# results in file being renamed to:
# somefile.9g2lap4.txt
for name in "$@"
do
@ObjSal
ObjSal / app.js
Last active February 22, 2024 13:29
Posting form data in 3 ways to a Node.js server without third-party libraries - application/json, application/x-www-form-urlencoded, and multipart/form-data
// Author: Salvador Guerrero
'use strict'
const fs = require('fs')
// Project modules
const { CreateServer } = require('./server')
const SecurityUtils = require('./security-utils')