#!/bin/bash
my_string="hello"
if [ -n "$my_string" ]; then
echo "The string is not empty."
else
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
<img | |
referrerpolicy="no-referrer" | |
src="link-to-image" | |
/> |
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
import * as z from 'zod'; | |
const LocalStorageSchema = z.object({ | |
name: z.string(), | |
age: z.number(), | |
isEmployed: z.boolean(), | |
}); | |
type LocalStorageData = z.infer<typeof LocalStorageSchema>; |
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
-- HTML | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title></title> | |
</head> | |
<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
#!/bin/bash | |
randomScreenShotName="$RANDOM.png" | |
screenShotPath="/tmp/$randomScreenShotName" | |
screencapture $screenShotPath | |
screenShotDir="$HOME/screenshots/$(date +"%Y-%m-%d")" | |
if ! [ -d $screenShotDir ]; then | |
mkdir -p $screenShotDir |
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
import express, { Request, Response } from 'express'; | |
import z, { AnyZodObject, ZodError } from 'zod'; | |
import { generateError } from 'zod-error'; | |
const app = express(); | |
const mySchema = z.object({ | |
body: z.object({ | |
name: z.string(), | |
}), |
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 IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Attach to Node", | |
"port": 9229, | |
"request": "attach", |
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
for file in *; do | |
# Check if the file name contains spaces | |
if [[ "$file" == *" "* ]]; then | |
# Replace spaces with dots and rename the file | |
new_name=$(echo "$file" | tr ' ' '.') | |
mv "$file" "$new_name" | |
echo "Renamed '$file' to '$new_name'" | |
fi | |
done |
OlderNewer