Skip to content

Instantly share code, notes, and snippets.

View AveyBD's full-sized avatar
🏠
Enjoying MERN

Debashish D. Dev AveyBD

🏠
Enjoying MERN
View GitHub Profile
@AveyBD
AveyBD / webm2mp3.sh
Last active January 5, 2025 07:45
WEBM to MP3 Converter BASH Script
#!/usr/bin/env bash
# Adding colorization for outputs
RED='\033[0;31m'
GREEN='\033[0;32m'
NC='\033[0m' # No Color
# Check if ffmpeg is installed
if ! command -v ffmpeg &> /dev/null; then
echo -e "${RED}ffmpeg could not be found. Please install ffmpeg first.${NC}"
@AveyBD
AveyBD / 1-setup.md
Created June 19, 2023 11:17 — forked from troyfontaine/1-setup.md
Signing your Git Commits using GPG on MacOS

Methods of Signing with a GPG Key on MacOS

Last updated September 21, 2022

This Gist explains how to do this using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.

There has been a number of comments on this gist regarding some issues around the pinentry-program and M1 Macs. I've finally gotten a chance to try things out on an M1 and I've updated the documentation in 2-using-gpg.md to reflect my findings.

@AveyBD
AveyBD / github_gpg_key.md
Created December 26, 2022 07:37 — forked from ankurk91/github_gpg_key.md
Signing git commits using GPG (Ubuntu/Mac)

Github : Signing commits using GPG (Ubuntu/Mac) 🔐

  • Do you have an Github account ? If not create one.
  • Install required tools
  • Latest Git Client
  • gpg tools
# Ubuntu
sudo apt-get install gpa seahorse
# MacOS with https://brew.sh/
@AveyBD
AveyBD / grade.js
Created January 28, 2022 04:41
Solving Alya Dalya PH
var num = [95, 66, 80, 59, 47, 77];
var name = ['Alya', 'Dalya', 'Salya', 'Malya', 'Lilya', 'Jwalya'];
var i = 0;
while (i <= 5) {
if (num[i] >= 90) {
console.log(name[i] + ' Got A+');
} else if (num[i] >= 80) {
console.log(name[i] + ' Got A');
} else if (num[i] >= 70) {
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
<title>Form</title>
</head>
<body>
<div class="container">
<div class="row">
from django.shortcuts import render
from django.http import HttpResponse
from first_app.models import Album, Musician
from first_app.forms import forms
from . import forms
# Create your views here.
def home(request):
@AveyBD
AveyBD / forms.py
Created November 13, 2020 18:17
forms.py
from django import forms
from django.core import validators
class UserForm(forms.Form):
user_name = forms.CharField(validators= [validators.MaxLengthValidator(10)], label="User Name", widget= forms.TextInput(attrs= {'placeholder': 'Enter Your Name', 'style': 'width:300px'}))
user_email = forms.EmailField(label="Your Email", widget= forms.TextInput(attrs= {'placeholder': 'Enter Your Mail', 'style': 'width:300px'}))
user_vmail = forms.EmailField()
user_dob = forms.DateField(label="Date of Birth", widget= forms.TextInput(attrs= {'placeholder': 'Your Date of Birth', 'style': 'width:300px', 'type' : 'date'}))
student = forms.BooleanField()
@AveyBD
AveyBD / Simple Chatty Bot_.idea_.gitignore
Created October 25, 2020 17:12
Simple Chatty Bot HyperSkill
# Default ignored files
/shelf/
/workspace.xml