Skip to content

Instantly share code, notes, and snippets.

View njfamirm's full-sized avatar
👍
nothing

S. Amir Mohammad Najafi njfamirm

👍
nothing
View GitHub Profile
@MM25Zamanian
MM25Zamanian / Convert2SimpleText.js
Created January 4, 2022 11:15
Remove useless letter and convert to simple text with javascript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Convert2SimpleText = void 0;
exports.Convert2SimpleText = function (word) {
return (word
.replaceAll('\u0610', '') //ARABIC SIGN SALLALLAHOU ALAYHE WA SALLAM
.replaceAll('\u0611', '') //ARABIC SIGN ALAYHE ASSALLAM
.replaceAll('\u0612', '') //ARABIC SIGN RAHMATULLAH ALAYHE
.replaceAll('\u0613', '') //ARABIC SIGN RADI ALLAHOU ANHU
.replaceAll('\u0614', '') //ARABIC SIGN TAKHALLUS
@farhad-taran
farhad-taran / README.md
Last active January 7, 2024 13:27
How to run a Javascript function at a specific time of day

some scenarios require us to run a piece of code at a specific time of day, the following method allows us to do this:

function runAtSpecificTimeOfDay(hour, minutes, func)
{
  const twentyFourHours = 86400000;
  const now = new Date();
  let eta_ms = new Date(now.getFullYear(), now.getMonth(), now.getDate(), hour, minutes, 0, 0).getTime() - now;
  if (eta_ms < 0)
 {
@gengwg
gengwg / fedora_rtl8812au.md
Created August 29, 2020 18:35
Fedora install rtl8812au driver for Realtek Wifi Dongle

Tested on Fedora 32.

sudo dnf groupinstall "Development Tools"
git clone https://github.com/gnab/rtl8812au.git
sudo dkms build 8812au/4.2.2
sudo dkms install 8812au/4.2.2
sudo modprobe 8812au
@k8adev
k8adev / promote-dev-cool-project.yml
Created July 3, 2020 16:00
Example of workflow for monorepo with GitHub Action 📦
name: promote-dev-cool-package
on:
push:
paths:
- packages/cool-package/**
branches-ignore:
- master
- refs/tags/*

Recon and Attack Vectors from My Logs

This document contains excerpts from my web server logs collected over a period of 7 years that shows various kinds of recon and attack vectors.

There were a total of 37.2 million lines of logs out of which 1.1 million unique HTTP requests (Method + URI) were found.

$ sed 's/^.* - - \[.*\] "\(.*\) HTTP\/.*" .*/\1/' access.log &gt; requests.txt
@fnky
fnky / ANSI.md
Last active April 24, 2024 21:19
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active April 25, 2024 01:09
crack activate Office on mac with license file
@steven2358
steven2358 / ffmpeg.md
Last active April 21, 2024 02:08
FFmpeg cheat sheet
@michaelneu
michaelneu / README.md
Last active December 29, 2023 04:06
A basic, but fast git prompt.

bash-basic-git-prompt

This is a considerably faster, but much more basic alternative to bash-git-prompt.

When adding this script to your .bash_profile or .bashrc, it'll display the selected branch of the current folder (if it's a git repo), and whether it's modified (yellow) or contains staged files (cyan).

example

The script makes the assumption, that a .git folder only exists when the directory is a git repo. Also, it checks for the english version of the git status command, so if you're using git in a different locale, make sure to adjust this.

@turbo
turbo / std.md
Last active April 14, 2024 09:18
Git Commit Message Standard

Merged from https://github.com/joelparkerhenderson/git_commit_message and https://chris.beams.io/posts/git-commit/

General Rules

  • Commit messages must have a subject line and may have body copy. These must be separated by a blank line.
  • The subject line must not exceed 50 characters
  • The subject line should be capitalized and must not end in a period
  • The subject line must be written in imperative mood (Fix, not Fixed / Fixes etc.)
  • The body copy must be wrapped at 72 columns
  • The body copy must only contain explanations as to what and why, never how. The latter belongs in documentation and implementation.