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 | |
# Function to display usage information | |
usage() { | |
echo "Usage: $0 /path/to/input.mp4 [ /path/to/output_directory ]" | |
exit 1 | |
} | |
# Check if at least one argument (input file) is provided | |
if [ $# -lt 1 ]; then |
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/sh | |
print_usage() { | |
echo "usage: compress_video <input_file>" | |
echo "supported formats: mp4, webm, mkv, mov, avi, flv" | |
} | |
get_extension() { | |
f="${1##*/}" | |
case "$f" in |
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 {z} from "zod" | |
type Implements<Model> = { | |
[key in keyof Model]-?: undefined extends Model[key] | |
? null extends Model[key] | |
? z.ZodNullableType<z.ZodOptionalType<z.ZodType<Model[key]>>> | |
: z.ZodOptionalType<z.ZodType<Model[key]>> | |
: null extends Model[key] | |
? z.ZodNullableType<z.ZodType<Model[key]>> | |
: z.ZodType<Model[key]>; |
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
#include<stdio.h> | |
int main() { | |
//Enter your mark to find your grade => Kowsar Ahmed 🙂 | |
int number; | |
printf("Enter Mark : "); | |
scanf("%d",&number); | |
if (number < 0 || number > 100) printf("404 not found!!!"); | |
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
#include <stdio.h> | |
int main() { | |
int number; | |
printf("Enter the Number : "); | |
scanf("%d",&number); | |
if (number == 0) printf("The number is zero."); | |
if (number < 0) printf("The number is negative"); | |
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
version: '3.6' | |
services: | |
rabbit: | |
image: rabbitmq:3-management | |
volumes: | |
- ./rabbitmq.conf:/etc/rabbitmq/rabbitmq.conf:ro | |
ports: | |
- '8080:15672' | |
redis: |
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
FROM node:16-slim AS builder | |
WORKDIR /app | |
COPY package.json . | |
COPY yarn.lock . | |
COPY prisma ./prisma/ | |
RUN yarn install |
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
docker run --name postgres -e POSTGRES_PASSWORD=abcd1234 -e POSTGRES_DB=backend -e POSTGRES_USER=root -p 5432:5432 -v postgres:/var/lib/postgresql/data -d postgres:13.5-alpine |
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
let generateButton = document.getElementById("generate-btn"); | |
const generatePinField = document.getElementById("random-pin-box"); | |
let pinInputField = document.getElementById("pin-input-field"); | |
let buttons = Array.from(document.getElementsByClassName("button")); | |
generateButton.addEventListener("click", function () { | |
generatePinField.innerText = Math.round(1000 + Math.random() * 9000); | |
}); | |
buttons.map((button) => { | |
button.addEventListener("click", (e) => { | |
switch (e.target.innerText) { |
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
<div class="w-screen h-screen"> | |
<div class="flex flex-row justify-center items-center mx-auto w-full h-full"> | |
<div class="grid grid-cols-6 grid-rows-3 h-full w-full"> | |
<div class="col-span-2 row-span-3 bg-teal-500 h-full w-full"></div> | |
<div class="col-span-2 row-span-3 bg-red-700 h-full w-full"></div> | |
<div class="col-span-2 row-span-1 bg-blueGray-800 h-full w-full"></div> | |
<div class="col-span-2 row-span-1 bg-violet-700 h-full w-full"></div> | |
<div class="col-span-1 row-span-1 bg-blue-400 h-full w-full"></div> | |
<div class="col-span-1 row-span-1 bg-fuchsia-600 h-full w-full"></div> | |
</div> |
NewerOlder