Skip to content

Instantly share code, notes, and snippets.

View bijoy26's full-sized avatar
🎯
Focusing

Anjum Rashid bijoy26

🎯
Focusing
View GitHub Profile
from datetime import datetime
from dateutil import relativedelta
# Assign your birth date and average life expectancy
birth_date = input("Enter your birth date (YYYY-MM-DD): ")
birth = datetime.strptime(birth_date, "%Y-%m-%d")
avg_life = 72
current = datetime.now()
@metux
metux / totp-token.py
Created September 21, 2023 10:53
simple TOTP token generator w/ qrcode image decoding
#!/usr/bin/env python3
# deps: zbar-tools, oathtool
#
# call it as toptp-token.py <qrimage-filename>
#
# 1. decodes the qrcode image via zbar-img
# 2. parses totp url and extracts parameters (secret, stepping, algo, ...)
# 3. calls oathtool to generate the current token
import subprocess
@shankar-bavan
shankar-bavan / DKIM-SPF-DMARC-check-via-command-line.md
Created December 25, 2022 14:26
DKIM, SPF, and DMARC check via command line

SPF record check

  • Open the command line (Start > Run > cmd).
  • Enter nslookup -type=txt followed by a space and a domain or hostname, for example, nslookup -type=txt google.com.
  • If an SPF record exists, the result will be something like this: v=spf1 include:_spf.google.com ~all.
  • If there are no results or no v=spf1, then there is a problem getting the record for the domain, or it doesn’t exist.

DKIM record check

@kkrypt0nn
kkrypt0nn / ansi-colors-discord.md
Last active April 30, 2025 03:01
A guide to ANSI on Discord

A guide to ANSI on Discord

Discord is now slowly rolling out the ability to send colored messages within code blocks. It uses the ANSI color codes, so if you've tried to print colored text in your terminal or console with Python or other languages then it will be easy for you.

Quick Explanation

To be able to send a colored text, you need to use the ansi language for your code block and provide a prefix of this format before writing your text:

\u001b[{format};{color}m
@bonnopc
bonnopc / multipleSSHkeysForUnix.md
Created November 23, 2021 17:06
Enable Multiple SSH Keys for MacOS/ Ubuntu/ Debian etc.

Enable Multiple SSH Keys for UNIX Based OS

Follow these steps below to enable multiple SSH keys on your device with UNIX Based OS (MacOS/ Ubuntu/ Debian etc.). Suppose, you have two different users/ accounts, one is personalAccount and another is companyAccount. And you have already a default key configured with personalAccount. (If you haven't set up your default ssh-key yet, please follow this article before going ahead with these steps described below.)

1. Generate another ssh-key

Generate a new ssh-key for your companyAccount.

cd ~/.ssh
ssh-keygen -t rsa -C "[email protected]"
@Tynael
Tynael / README.md
Last active April 11, 2025 07:03
How to use npx to run gist based scripts
@vimtaai
vimtaai / markdown-flavors.md
Last active April 9, 2025 14:11
Comparison of features in various Markdown flavors

Comparison of syntax extensions in Markdown flavors

I created a crude comparison of the syntax of the various common Markdown extensions to have a better view on what are the most common extensions and what is the most widely accepted syntax for them. The list of Markdown flavors that I looked at was based on the list found on CommonMark's GitHub Wiki.

Flavor Superscript Subscript Deletion*
Strikethrough
Insertion* Highlight* Footnote Task list Table Abbr Deflist Smart typo TOC Math Math Block Mermaid
GFM
@thehappydinoa
thehappydinoa / CVE_2017_7529.py
Last active March 20, 2025 04:27
Nginx - Remote Integer Overflow Vulnerability
#!/usr/bin/env python
# -*- coding:utf-8 -*-
# Nginx - Remote Integer Overflow Vulnerability
# CVE-2017-7529
import sys
import logging
import argparse
@sundowndev
sundowndev / GoogleDorking.md
Last active April 29, 2025 18:14
Google dork cheatsheet

Google dork cheatsheet

Search filters

Filter Description Example
allintext Searches for occurrences of all the keywords given. allintext:"keyword"
intext Searches for the occurrences of keywords all at once or one at a time. intext:"keyword"
inurl Searches for a URL matching one of the keywords. inurl:"keyword"
allinurl Searches for a URL matching all the keywords in the query. allinurl:"keyword"
intitle Searches for occurrences of keywords in title all or one. intitle:"keyword"