Step 1
If any version of postman is installed we need to remove it
sudo rm -rf /opt/Postman
Step 2
curl -L https://github.com/aws/aws-sam-cli/releases/latest/download/aws-sam-cli-linux-x86_64.zip -o aws-sam-cli-linux-x86_64.zip | |
unzip aws-sam-cli-linux-x86_64.zip -d sam-installation | |
sudo ./sam-installation/install | |
where sam | |
sam --version |
#!/usr/bin/bash | |
img=(`find ~/pictures/wallpapers/ -name '*' -exec file {} \; | grep -o -P '^.+: \w+ image' | cut -d':' -f1`) | |
while true | |
do | |
feh --bg-scale "${img[$RANDOM % ${#img[@]} ]}" | |
sleep 30m | |
done |
// zod schema | |
z.object({ | |
// valid if string or: | |
optional: z.string().optional(), // field not provided, or explicitly `undefined` | |
nullable: z.string().nullable(), // field explicitly `null` | |
nullish: z.string().nullish(), // field not provided, explicitly `null`, or explicitly `undefined` | |
}); | |
// type | |
{ |
const arr = [ | |
// List of Valid Email Addresses | |
"email@example.com", | |
"firstname.lastname@example.com", | |
"email@subdomain.example.com", | |
"firstname+lastname@example.com", | |
"email@123.123.123.123", | |
"email@[123.123.123.123]", | |
"\"email\"@example.com", |
#!/bin/bash | |
event () { | |
timestamp="$(date "+%Y-%m-%d %H:%M:%S")"; | |
event_type=$1 | |
container_id=$2 | |
name=$(docker inspect --format {{.Name}} $container_id) | |
# curl to hook maybe |
export $(cat .env) > /dev/null 2>&1; docker stack deploy ${1:-STACK_NAME} |
if [ -f .env ] | |
then | |
export $(grep -v '^#' .env | xargs) | |
fi |
var express = require('express') | |
var app = express() | |
app.listen(1337) | |
app.all('/stream/:chunks', function (req, res, next) { | |
res.writeHead(200, { | |
'Content-Type': 'text/plain', |
'use strict'; | |
/** | |
* @callback BeforeShutdownListener | |
* @param {string} [signalOrEvent] The exit signal or event name received on the process. | |
*/ | |
/** | |
* System signals the app will listen to initiate shutdown. | |
* @const {string[]} |