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
@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/*
@florianbeer
florianbeer / set-tmux-title
Created April 21, 2015 10:47
Set tmux pane title to short hostname on ssh connections
ssh() {
if [ "$(ps -p $(ps -p $$ -o ppid=) -o comm=)" = "tmux" ]; then
tmux rename-window "$(echo $* | cut -d . -f 1)"
command ssh "$@"
tmux set-window-option automatic-rename "on" 1>/dev/null
else
command ssh "$@"
fi
}
@savely-krasovsky
savely-krasovsky / README.md
Last active February 5, 2023 14:04
Telegram webhooks with nginx reverse proxy

Make config file:

sudo nano /etc/nginx/sites-available/bot.conf

Then copy and paste bot.conf content and edit YOUR.DOMAIN strings. Now install Let's Encrypt on your server. For example in Debian you need to add jessie-backports and easily install it with apt-get:

sudo apt-get install -t jessie-backports letsencrypt

Then get cert for you domain:

@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
@Brainiarc7
Brainiarc7 / xclip-copy-to-clipboard.md
Created April 26, 2017 17:53
Using xclip to copy terminal content to the clip board on Linux

Using xclip to copy terminal content to the clip board:

Say you want to pipe shell output to your clipboard on Linux. How would you do it? First, choose the clipboard destination, either the Mouse clip or the system clipboard.

For the mouse clipboard, pipe straight to xclip:

echo 123 | xclip

For the system clip board, pipe to xclip and select clip directly:

@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
@dantheman213
dantheman213 / install-deepin-arch-manjaro-readme.md
Last active November 19, 2023 01:20
Install Deepin Desktop Environment from a minimum Arch or Manjaro Install Operating System

Install Deepin Desktop Environment In Arch or Manjaro

I recommend doing this as a net/minimum install with Manjaro (no desktop manager attached with the install).

Update sources & packages

pacman -Syu
reboot -h now
@sarvsav
sarvsav / Bash project
Created September 25, 2015 18:48
Bash project directory structure
├── bin => Contains binary of your project
├── docs => Contains documentation and future aspects about your project
│ └── ToDo => ToDo List of your project
├── etc => Add configuration files under this directory
│ └── imdb-xplorer.cfg => Configuration file
├── LICENSE => Add license for your project
├── logs => This directory contains logs about behaviour of your script
│ └── imdb-xplorer.log => log file
├── README.md => Contains how to install, and use your project
├── setup.sh => install the project on your machine
@millermedeiros
millermedeiros / .vimrc
Last active December 11, 2023 14:44
My VIM settings (.vimrc)
" =============================================================================
" Miller Medeiros .vimrc file
" -----------------------------------------------------------------------------
" heavily inspired by: @factorylabs, @scrooloose, @nvie, @gf3, @bit-theory, ...
" =============================================================================
" -----------------------------------------------------------------------------
" BEHAVIOR
@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.