Snippets Collections
#!/bin/sh
set -e
 
echo "Deploying application ..."
 
# Enter maintenance mode
(php artisan down --message 'The app is being (quickly!) updated. Please try again in a minute.') || true
    # Update codebase
    git fetch origin deploy
    git reset --hard origin/deploy
 
    # Install dependencies based on lock file
    composer install --no-interaction --prefer-dist --optimize-autoloader
 
    # Migrate database
    php artisan migrate --force
 
    # Note: If you're using queue workers, this is the place to restart them.
    # ...
 
    # Clear cache
    php artisan optimize
 
    # Reload PHP to update opcache
    echo "" | sudo -S service php7.4-fpm reload
# Exit maintenance mode
php artisan up
 
echo "Application deployed!"
npx cap open ios #abrir o projecto no xcode

npx cap open android #abrir o projecto no android
<dict>
+  <key>NSCameraUsageDescription</key>
+  <string>To be able to scan barcodes</string>
</dict>
<?xml version="1.0" encoding="utf-8"?>
<manifest
  xmlns:android="http://schemas.android.com/apk/res/android"
+  xmlns:tools="http://schemas.android.com/tools" <-- adicionas esta linha não removendo nada e seguindo esta lógica

  package="com.example">

  <application
+    android:hardwareAccelerated="true" <-- adicionas esta linha não removendo nada e seguindo esta lógica
  >
  </application>

+  <uses-permission android:name="android.permission.CAMERA" /><-- adicionas esta linha não removendo nada e seguindo esta lógica

+  <uses-sdk tools:overrideLibrary="com.google.zxing.client.android" /><-- adicionas esta linha não removendo nada e seguindo esta lógica
</manifest>
ionic build --prod

#caso quiseres colocar a app para android dás o seguinte comando:
npm install @capacitor/android
npx cap add android

#caso quiseres colocar a app para iOS dás o seguinte comando:
npm install @capacitor/ios
npx cap add ios


#no final dão estes dois ultimos comandos

npx cap sync
npx cap copy Android ou ios #dependendo do qual escolheram
...

<ion-content class="scanner-hide" *ngIf="scanStatus == false">
  <div class="padding-container center">
    <ion-button color="primary" (click)="scanCode()"><ion-icon slot="start" name="qr-code-outline"></ion-icon> Scanear Código</ion-button> <!-- Botão que chama a função do scanner-->
  </div>
  <ion-card>
    <ion-card-content><h1>{{ result }}</h1></ion-card-content> <!-- mostra o resultado do scan -->
  </ion-card>
  
  <div class="scanner-ui"> <!-- Quando estamos a scanear, chama esta classe-->
    ...Scanner Interface
    </div>
    <div class="ad-spot"></div>
</ion-content>
...
import { BarcodeScanner } from '@capacitor-community/barcode-scanner';



...



export class HomePage {
  public scanStatus:boolean = false; // no inicio da página, coloca o estado do código qr para falso
  public result:any;

  constructor() {}


  async scanCode () {

    this.setPermissions(); /* chama as permissões à camera */
  
    BarcodeScanner.hideBackground(); // coloca o fundo transparente
    this.scanStatus = true; // ao mudar esta variável para true, estamos a puxar o qr code scanner 
    document.body.classList.add("qrscanner"); // adiciona a classe css que fizemos no global
    const result = await BarcodeScanner.startScan(); // começa a fazer scan e espera por um result
  
  // se o qr scanner detectou algum número, então ele faz o código abaixo
    if (result.hasContent) {

        
        this.scanStatus = false; //como é obvio, ele tem de desligar o scanner ao obter o resultado
        BarcodeScanner.stopScan(); //para o scan
        this.result = result.content; // passa o resultado para a variável global result
        BarcodeScanner.showBackground(); //volta a mostrar o fundo
        document.body.classList.remove("qrscanner"); //remove a classe css que criamos no global
    
    }
  }

  async setPermissions(){
    const status = await BarcodeScanner.checkPermission({ force: true }); /* força a permissão para true, caso o utilizador não aceite, o scanner não funciona */
    if (status.granted) {
      // the user granted permission
      return true; // se o utilizador aceitou as permissões retorna true
    }
  
      return false; // se o utilizador não aceitou retorna false
  }
}
.scanner-ui { display: none; }
.scanner-hide { visibility: visible; }

body.qrscanner { background-color: transparent; }
body.qrscanner .scanner-ui { display: block; }
body.qrscanner .scanner-hide { visibility: hidden; }
ionic start qrcode blank --type=ionic-angular
#variáveis

nome = "Meu Nome" #Sempre que colocas o valor entre "" significa que a variável é do tipo string
#variável do tipo string é um tipo de variável que usa texto como base

idade = "28" #variável do tipo string

x = 2
y = 5
#Sempre que defines um valor numérico sem "" significa que a variável passa a ser do tipo int
#variáveis do tipo int, só aceitam valores numéricos inteiros, não podendo colocar texto à mistura



#exemplos do que não podes fazer
!var@ = 1 
#não podes, aliás não consegues usar pontuação na definição das variáveis

total = x + idade 
#não podes juntar diferentes tipos de variáveis numa só
#ou seja não consegues somar a idade "28" que está no formato string, com uma do formato int
#que é específicamente um número, é como se aquele 28 fosse escrito assim "vinte e oito"





#resultados retornados
print(x+y) #vai retornar na tela o valor 7
- mkdir work_dir_company
- nano work_dir_company/.gitignore_company

```
[user]
        email = user@mail.com
        name = userName
[core]
        sshCommand = ssh -i ~/.ssh/id_ed25519_company
```

- nano ~/.gitconfig

```
[includeIf "gitdir:~/work_dir_company/"]
	path = ~/work_dir_company/.gitignore_company
[user]
        email = user@mail.com
        name = userName
[core]
        sshCommand = ssh -i ~/.ssh/id_ed25519_company
```

- Verify with `git config --list`
Settings | Tools | Python Integrated Tools | Docstring format
echo "$USER ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee "/etc/sudoers.d/dont-prompt-$USER-for-sudo-password"
#!/bin/bash

set -e

if [ -d ~/.local/share/JetBrains/Toolbox ]; then
    echo "JetBrains Toolbox is already installed!"
    exit 0
fi

echo "Start installation..."

wget --show-progress -qO ./toolbox.tar.gz "https://data.services.jetbrains.com/products/download?platform=linux&code=TBA"

TOOLBOX_TEMP_DIR=$(mktemp -d)

tar -C "$TOOLBOX_TEMP_DIR" -xf toolbox.tar.gz
rm ./toolbox.tar.gz

"$TOOLBOX_TEMP_DIR"/*/jetbrains-toolbox

rm -r "$TOOLBOX_TEMP_DIR"

echo "JetBrains Toolbox was successfully installed!"
# Reset
Color_Off='\033[0m'       # Text Reset
 
# Regular Colors
Black='\033[0;30m'        # Black
Red='\033[0;31m'          # Red
Green='\033[0;32m'        # Green
Yellow='\033[0;33m'       # Yellow
Blue='\033[0;34m'         # Blue
Purple='\033[0;35m'       # Purple
Cyan='\033[0;36m'         # Cyan
White='\033[0;37m'        # White
 
# Bold
BBlack='\033[1;30m'       # Black
BRed='\033[1;31m'         # Red
BGreen='\033[1;32m'       # Green
BYellow='\033[1;33m'      # Yellow
BBlue='\033[1;34m'        # Blue
BPurple='\033[1;35m'      # Purple
BCyan='\033[1;36m'        # Cyan
BWhite='\033[1;37m'       # White
 
# Underline
UBlack='\033[4;30m'       # Black
URed='\033[4;31m'         # Red
UGreen='\033[4;32m'       # Green
UYellow='\033[4;33m'      # Yellow
UBlue='\033[4;34m'        # Blue
UPurple='\033[4;35m'      # Purple
UCyan='\033[4;36m'        # Cyan
UWhite='\033[4;37m'       # White
 
# Background
On_Black='\033[40m'       # Black
On_Red='\033[41m'         # Red
On_Green='\033[42m'       # Green
On_Yellow='\033[43m'      # Yellow
On_Blue='\033[44m'        # Blue
On_Purple='\033[45m'      # Purple
On_Cyan='\033[46m'        # Cyan
On_White='\033[47m'       # White
 
# High Intensity
IBlack='\033[0;90m'       # Black
IRed='\033[0;91m'         # Red
IGreen='\033[0;92m'       # Green
IYellow='\033[0;93m'      # Yellow
IBlue='\033[0;94m'        # Blue
IPurple='\033[0;95m'      # Purple
ICyan='\033[0;96m'        # Cyan
IWhite='\033[0;97m'       # White
 
# Bold High Intensity
BIBlack='\033[1;90m'      # Black
BIRed='\033[1;91m'        # Red
BIGreen='\033[1;92m'      # Green
BIYellow='\033[1;93m'     # Yellow
BIBlue='\033[1;94m'       # Blue
BIPurple='\033[1;95m'     # Purple
BICyan='\033[1;96m'       # Cyan
BIWhite='\033[1;97m'      # White
 
# High Intensity backgrounds
On_IBlack='\033[0;100m'   # Black
On_IRed='\033[0;101m'     # Red
On_IGreen='\033[0;102m'   # Green
On_IYellow='\033[0;103m'  # Yellow
On_IBlue='\033[0;104m'    # Blue
On_IPurple='\033[0;105m'  # Purple
On_ICyan='\033[0;106m'    # Cyan
On_IWhite='\033[0;107m'   # White
sudo apt install rename
rename 's/$/\.parquet/' *
# Reset
Color_Off='\033[0m'       # Text Reset

# Regular Colors
Black='\033[0;30m'        # Black
Red='\033[0;31m'          # Red
Green='\033[0;32m'        # Green
Yellow='\033[0;33m'       # Yellow
Blue='\033[0;34m'         # Blue
Purple='\033[0;35m'       # Purple
Cyan='\033[0;36m'         # Cyan
White='\033[0;37m'        # White

# Bold
BBlack='\033[1;30m'       # Black
BRed='\033[1;31m'         # Red
BGreen='\033[1;32m'       # Green
BYellow='\033[1;33m'      # Yellow
BBlue='\033[1;34m'        # Blue
BPurple='\033[1;35m'      # Purple
BCyan='\033[1;36m'        # Cyan
BWhite='\033[1;37m'       # White

# Underline
UBlack='\033[4;30m'       # Black
URed='\033[4;31m'         # Red
UGreen='\033[4;32m'       # Green
UYellow='\033[4;33m'      # Yellow
UBlue='\033[4;34m'        # Blue
UPurple='\033[4;35m'      # Purple
UCyan='\033[4;36m'        # Cyan
UWhite='\033[4;37m'       # White

# Background
On_Black='\033[40m'       # Black
On_Red='\033[41m'         # Red
On_Green='\033[42m'       # Green
On_Yellow='\033[43m'      # Yellow
On_Blue='\033[44m'        # Blue
On_Purple='\033[45m'      # Purple
On_Cyan='\033[46m'        # Cyan
On_White='\033[47m'       # White

# High Intensity
IBlack='\033[0;90m'       # Black
IRed='\033[0;91m'         # Red
IGreen='\033[0;92m'       # Green
IYellow='\033[0;93m'      # Yellow
IBlue='\033[0;94m'        # Blue
IPurple='\033[0;95m'      # Purple
ICyan='\033[0;96m'        # Cyan
IWhite='\033[0;97m'       # White

# Bold High Intensity
BIBlack='\033[1;90m'      # Black
BIRed='\033[1;91m'        # Red
BIGreen='\033[1;92m'      # Green
BIYellow='\033[1;93m'     # Yellow
BIBlue='\033[1;94m'       # Blue
BIPurple='\033[1;95m'     # Purple
BICyan='\033[1;96m'       # Cyan
BIWhite='\033[1;97m'      # White

# High Intensity backgrounds
On_IBlack='\033[0;100m'   # Black
On_IRed='\033[0;101m'     # Red
On_IGreen='\033[0;102m'   # Green
On_IYellow='\033[0;103m'  # Yellow
On_IBlue='\033[0;104m'    # Blue
On_IPurple='\033[0;105m'  # Purple
On_ICyan='\033[0;106m'    # Cyan
On_IWhite='\033[0;107m'   # White
#!/bin/bash

# Once you have inputted your projects directory, it gives you the option to choose which project to run.

# - It will start Docker if it's available
# - It will start Vue.js if it's available
# - It will just simply open VSCode if neither of the above is available

# Commands to run (assuming the script is in a file called 'go')

# Run the script: ./go
# Re-run the setup ./go setup
# Reset the config: ./go reset

DefaultProjectsLocation="/var/www/sites/" # Default working path
SaveFile=~/bin/.go_config # Config file name

# Colours
Reset='\033[0m'
Black='\033[0;30m'
Red='\033[0;31m' 
Green='\033[0;32m'
Blue='\033[0;34m'
BRed='\033[41m'
BGreen='\033[42m'

#() readFile - Function to make a file readable and use its variables
readFile() {
	set -a
		source <(cat $1 | sed -e '/^#/d;/^\s*$/d' -e "s/'/'\\\''/g" -e "s/=\(.*\)/='\1'/g")
	set +a
}

#() reset - Delete the config file
reset() {
	if [ -f $SaveFile ]; then
		# Delete the config file
		rm $SaveFile
	fi
	echo -e "\n${Blue}Configuration has been reset.${Reset}\n"
	exit 0
}

#() configCheck - Checking if the config exists
configCheck() {
	# Create the bin directory if it doesn't exist
	if [ ! -d ~/bin/ ]; then
		mkdir ~/bin/
		exit 0
	fi

	# Create the file or skip
	if [ ! -f ${SaveFile} ]; then
		# Create a new config file
		touch ${SaveFile}
	fi
}

#() setProjectsPath - User input for setting the projects path
setProjectsPath() {
	
	echo -e "\n${Green}Where are your projects located?${Reset}\n"
	echo -e "----------------------------------------------------------\n"
	# User Input: Enter a directory path
	read -p "Projects directory path [press Enter for ${DefaultProjectsLocation}]: " I_ProjectLocation

	# Check for user input an d assign a variable
	if [ $I_ProjectLocation ]; then
		NewProjectLocation=$I_ProjectLocation
	else
		NewProjectLocation=$DefaultProjectsLocation
	fi

	# Function for user feedback
	SaveFileUpdates() {
		echo -e "${Green}Great.${Reset}"
		echo -e "\n${Blue}Projects directory path saved as${Reset} ${Red}${NewProjectLocation}${Reset}"
		echo -e "\nIf that's incorrect, run ${Green}'./go setup'${Reset} to change the directory path.\n"
	}

	configCheck

	# Make the file readable
	readFile $SaveFile

	# Check if the config file exists and create or update it
	if [ ! ${PROJECT_LOCATION} ]; then
		# Save the location to the config file
		echo "PROJECT_LOCATION=${NewProjectLocation}" >> ${SaveFile}
		SaveFileUpdates
	else
		# Update the config file with the new location
		sed -i "s!PROJECT_LOCATION=${PROJECT_LOCATION}!PROJECT_LOCATION=${NewProjectLocation}!" ${SaveFile}
		SaveFileUpdates
	fi
}

#() setName - User input for setting their name
setName() {
	echo -e "\n"
	read -p "What's your name? [press Enter to skip]: " I_name
	echo -e "\n"

	# Check for user input an d assign a variable
	if [ $I_name ]; then
		NewName=$I_name
	else
		NewName=
	fi

	if [ $I_name ]; then
		echo -e "${Green}Hi, ${I_name}!${Reset}"

		configCheck

		readFile $SaveFile

		if [ ${USER_NAME} ]; then
			sed -i "s!USER_NAME=${USER_NAME}!USER_NAME=${NewName}!" ${SaveFile}
		else
			echo "USER_NAME=${I_name}" >> ${SaveFile}
		fi
		
		echo -e "\n${Blue}Your name has been saved.${Reset}\n"
	else
		configCheck
		readFile $SaveFile
		if [ ${USER_NAME} ]; then
			sed -i "s!USER_NAME=${USER_NAME}!!" ${SaveFile}
		fi
		echo -e "${Blue}No problem, We don't have to be friends.${Reset}\n"
	fi
}

#() setup - Setup menu
setup() {
	clear
	PS3=$'\nWhat would you like to do? '
	select options in "Set your name" "Set directory path" "Reset configuration" "Exit"
	do
			if [ "$REPLY" == "1" ]; then
				echo -e "\n${Green}$options${Reset}\n"
				setName
				exit 0
			elif [ "$REPLY" == "2" ]; then
				echo -e "\n${Green}$options${Reset}\n"
				setProjectsPath
				exit 0
			elif [ "$REPLY" == "3" ]; then
				echo -e "\n${Green}$options${Reset}\n"
				reset
			else
				echo -e "\n${Blue}$options${Reset}"
				echo -e "\n${Green}Goodbye.${Reset}"
				exit 0
			fi
	done
}

#() fullSetup - Full setup that runs through steps
fullSetup() {
	clear
	echo -e "\n${Black}${BGreen} 1. Hi there, what do you want to be called? ${Reset}"
	setName
	echo -e "\n${Black}${BGreen} 2. Enter your working directory path. ${Reset}"
	setProjectsPath
	echo -e "\nYou're all setup! Run ${Green}'./go'${Reset} to get started."
	exit 0
}

#() go - Startup script
go() {

	# Check if config file exists then run the script or setup
	if [ -f ${SaveFile} ]; then
		# Make variables readable in bash
		readFile $SaveFile
		# Get path location
		ProjectsPath=${PROJECT_LOCATION}
		# Clear screen
		clear

		if [ -d $ProjectsPath ]; then

			readFile $SaveFile

			# Custom greeting
			if [ ${USER_NAME} ]; then
				Greet="Hi ${USER_NAME}, "
			else
				Greet=
			fi

			echo -e "\n${Green}${Greet}Choose which project you want to start:${Reset}"
			echo -e "\n----------------------------------------------------------\n"

			# Get a list of projects to select
			cd ${ProjectsPath}
			IFS= mapfile -t files < <(ls -t -d */)
			PS3=$'\nEnter the project number: '

			select dir in "${files[@]}"
			do
				test -n "$dir" && break
				echo -e "\n${Red}Whoops, that input isn't quite right. Put your glasses on and try again, perhaps?${Reset}"
				exit 0
			done

			# Set working path
			WorkPath=${ProjectsPath}${dir}/

			echo -e "\n${Green}Hold your horses, checking for ${Red}${dir}${Reset}\n"

			# Check if the inputted directory exists
			if [ -d ${WorkPath} ]; then

					echo -e "${Green}Looks good, starting ${Red}${dir}${Reset}\n"

					# Change directory
					cd ${ProjectsPath}${dir}

					# Check if a yml file exists
					if [ -f *"docker"* ]; then
						echo -e "${Blue}Docker detected${Reset}\n"

						# Run Docker
						docker-compose start
						echo -e "\n"

						# Open in browser if .env file exists
						ENVFILE=./.env
						if test -f "$ENVFILE"; then

							# Make env variables readable in bash
							readFile ".env"
							
							# Check if port exist
							if [ ! -z ${PORT} ]; then
								LocalPort=":${PORT}"
							else
								LocalPort=""
							fi
							echo -e "Opening http://localhost${LocalPort}"

							# Open in default browser
							xdg-open http://localhost${LocalPort}
							echo -e "${Green}done${Reset}\n"
						fi

					# Check if it's Vue
					elif [ -f ${WorkPath}/*/*.vue ]; then
						echo -e "${Blue}Vue.js detected${Reset}\n"

						# Open in VSCode
						echo -e "Opening VSCode..."
						code .
						echo -e "${Green}done${Reset}"

						echo -e "\n${Green}Starting Vue.js${Reset}"
						# Run Vue
						npm run serve
					else
						echo -e "${Blue}Nothing to run${Reset}\n"
					fi

				# Open in VSCode
				echo -e "Opening VSCode..."
				code .
				echo -e "${Green}done${Reset}"

			fi

			echo -e "\n----------------------------------------------------------\n"
		else
			echo -e "\n\n${Black}${BRed} Argh. ${Reset}"
			echo -e "\n${Red}It's all gone to pot. Your projects directory doesn't seem to exist.${Reset}\n"
			
			read -r -p "Would you like to re-enter your path? [Y/n]: " I_answer

			# Check user's input
			if [ "$I_answer" == "y" ] || [ "$I_answer" == "Y" ]; then
				setProjectsPath
			else
				echo -e "\n${Green}Fair enough, safe travels."
				exit 0
			fi
		fi

	else
		fullSetup
	fi

}

# Run setup if the user has inputted the setup variable
if [ "$1" == "setup" ]; then
	setup
elif [ "$1" == "name" ]; then
	clear
	setName
	exit 0
elif [ "$1" == "reset" ]; then
	clear
	reset
fi

go # Run the script
#We will activate the service, to activate synchronization between the computer and the servers on the internet:

sudo systemctl enable systemd-timesyncd.service
# We start the service :
timedatectl set-ntp true
a=(a b c); x=`echo ${!a[@]}` ;echo ${x: -1} # ArrayMaxIdxNo
Press CTRL + V to enable Visual Mode.

Using the up and down arrow key, highlight the lines you wish to comment out.

Once you have the lines selected, press the SHIFT + I keys to enter insert mode.

Enter your command symbol, for example, # sign, and press the ESC key. Vim will comment out all the highlighted lines.
sudo ufw allow 8000
sudo ufw delete allow 8000
sudo ufw allow 'Nginx Full'


sudo ufw status #kontrol
zsh -xl
zsh -xl | tee output.file
grep -r "VARIABLE" /* [directories to search] | tee ~/[output file and path] 
timezsh() {
  shell=${1-$SHELL}
  for i in $(seq 1 10); do /usr/bin/time $shell -i -c exit; done
}
$ mkdir pytest_project
$ cd pytest_project
$ python3 -m venv pytest-env
# Download
# Create a folder
$ mkdir actions-runner && cd actions-runner
# Download the latest runner package
$ curl -o actions-runner-linux-x64-2.291.1.tar.gz -L https://github.com/actions/runner/releases/download/v2.291.1/actions-runner-linux-x64-2.291.1.tar.gz# Optional: Validate the hash
$ echo "1bde3f2baf514adda5f8cf2ce531edd2f6be52ed84b9b6733bf43006d36dcd4c  actions-runner-linux-x64-2.291.1.tar.gz" | shasum -a 256 -c
# Extract the installer
$ tar xzf ./actions-runner-linux-x64-2.291.1.tar.gz
# Configure
# Create the runner and start the configuration experience
$ ./config.sh --url https://github.com/TousssaintThomas/wren.v1.0.0 --token AB7YEM2R2HZDVVBJ3VEFFLLCSI5U6# Last step, run it!
$ ./run.sh
# Using your self-hosted runner
# Use this YAML in your workflow file for each job
# runs-on: self-hosted
kubectl get pods <-n namespace> <--all-namespace> -o jsonpath="{.items[*].spec.containers[*].name}" |tr -s '[[:space:]]' '\n' |sort |wc -l

kubectl get pods <-n namespace> <--all-namespace> -o jsonpath="{.items[*].spec.initContainers[*].name}" |tr -s '[[:space:]]' '\n' |sort |wc -l
while IFS= read -r line; do
    echo "Text read from file: $line"
done < my_filename.txt
curl -v -X GET https://api-m.sandbox.paypal.com/v1/catalogs/products?page_size=2&page=1&total_required=true \
-H "Content-Type: application/json" \
-H "Authorization: Bearer Access-Token"
curl -v -X GET https://api-m.sandbox.paypal.com/v1/catalogs/products?page_size=2&page=1&total_required=true \
-H "Content-Type: application/json" \
-H "Authorization: Bearer Access-Token"
npx wrangler init my-worker
# try it out

cd my-worker && npx wrangler dev
# and then publish it
npx wrangler publish
# visit https://my-worker.<your workers subdomain>.workers.dev
$ npm uninstall -g @cloudflare/wrangler
npx @11ty/eleventy
npm install --save-dev @11ty/eleventy
npx wrangler init my-worker
# try it out

cd my-worker && npx wrangler dev
# and then publish it
npx wrangler publish
# visit https://my-worker.<your workers subdomain>.workers.dev
sudo apt update; sudo apt upgrade -y; sudo apt autoremove -y; clear;
yum list --installed | grep nginx
npx wrangler init my-worker
# try it out

cd my-worker && npx wrangler dev
# and then publish it
npx wrangler publish
# visit https://my-worker.<your workers subdomain>.workers.dev
#!/bin/bash
find $1 -type f -exec stat --format '%Y :%y %n' "{}" \; | sort -nr | cut -d: -f2- | head
# in source repo

git checkout -b <new branch> <source branch>

git filter-branch --subdirectory-filter <sub-directory path> -- -- all

git remote add <remote name> <remote URL>
  
git fetch <remote name>
  
git push <-U> <new remote> <new branch>
  
# or merge unrelated history and then push

git merge <new remote> --allow-unrelated-histories
sudo to root
yum install tcpdump
tcpdump -s1500 -ieth0 -vv 'host <IPaddr>' 
i=$((i+1))

((i=i+1))

let "i=i+1"
echo ${SEMVER} | sed 's/\..*//'
if git show-ref --quiet <branch_name>; then
	echo branch exists
fi
// delete branch locally
git branch -d localBranchName

// delete branch remotely
git push origin --delete remoteBranchName
az role definition list --query "sort_by([].{Name:roleName,Id:name}, &Name)" --output table
# Raspberry Pi Tips & Tricks - https://raspberrytips.nl

import Adafruit_DHT

humidity, temperature = Adafruit_DHT.read_retry(Adafruit_DHT.DHT11, 4)

humidity = round(humidity, 2)
temperature = round(temperature, 2)

if humidity is not None and temperature is not None:

  print 'Temperatuur: {0:0.1f}*C'.format(temperature)
  print 'Luchtvochtigheid: {0:0.1f}%'.format(humidity)

else:

  print 'Geen data ontvangen'
#!/bin/sh

curl -s https://status.slack.com/api/v2.0.0/current | \
  jq -r '"Status: " + (if (.status == "active") then "Active Incident" else "Ok" end),"Last Updated: " + .date_updated,if (.active_incidents[] | length) > 0 then "Active Incidents\n" + .active_incidents[] .title else "" end'
gcloud builds submit --pack image=us-central1-docker.pkg.dev/analytics-dev-308300/functions/talentcard-reports-to-landing-zone,env=GOOGLE_FUNCTION_TARGET=start
#!/bin/bash

set -eu -o pipefail # fail on error and report it, debug all lines

sudo -n true
test $? -eq 0 || exit 1 "you should have sudo privilege to run this script"

echo installing the must-have pre-requisites
while read -r p ; do sudo apt-get install -y $p ; done < <(cat << "EOF"
    perl
    zip unzip
    exuberant-ctags
    mutt
    libxml-atom-perl
    postgresql-9.6
    libdbd-pgsql
    curl
    wget
    libwww-curl-perl
EOF
)

echo installing the nice-to-have pre-requisites
echo you have 5 seconds to proceed ...
echo or
echo hit Ctrl+C to quit
echo -e "\n"
sleep 6

sudo apt-get install -y tig
ssh -i mykeypair_openssh.ppk <user>@<host ip>
  
# with port
ssh -i mykeypair_openssh.ppk <user>@<host ip> -P 50055
puttygen ~/.ssh/my.ppk -O private-openssh -o ~/.ssh/my_openssh.ppk
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

mkdir /mnt
mount /dev/vda /mnt
chroot /mnt

touch /etc/cloud/cloud-init.disabled

echo 'root:root' | chpasswd

ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa
ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa
ssh-keygen -f /etc/ssh/ssh_host_ed25519_key -N '' -t ed25519

cat <<EOF > /etc/netplan/01-dhcp.yaml 
network:
    version: 2
    ethernets:
        enp0s1:
            dhcp4: true
            addresses: [192.168.64.2/24]
            nameservers:
                addresses: [8.8.8.8, 8.8.4.4]    
EOF

exit
umount /dev/vda
curl -o initrd https://cloud-images.ubuntu.com/focal/current/unpacked/focal-server-cloudimg-arm64-initrd-generic
curl -o kernel.gz https://cloud-images.ubuntu.com/focal/current/unpacked/focal-server-cloudimg-arm64-vmlinuz-generic
gunzip kernel.gz
curl -o disk.tar.gz https://cloud-images.ubuntu.com/releases/focal/release/ubuntu-20.04-server-cloudimg-arm64.tar.gz
youtube-dl --merge-output-format mp4 --postprocessor-args "-strict experimental" -f "bestvideo+bestaudio/best" --embed-thumbnail --add-metadata [url]
if [[ $var ]]; then   # var is set and it is not empty
if [[ ! $var ]]; then # var is not set or it is set to an empty string
wget https://repo.anaconda.com/miniconda/Miniconda3-py39_4.11.0-Linux-x86_64.sh
bash Miniconda3-py39_4.11.0-Linux-x86_64.sh
conda install mamba -n base -c conda-forge
from flask import Flask, jsonify, request

from cashman.model.expense import Expense, ExpenseSchema
from cashman.model.income import Income, IncomeSchema
from cashman.model.transaction_type import TransactionType

app = Flask(__name__)

transactions = [
  Income('Salary', 5000),
  Income('Dividends', 200),
  Expense('pizza', 50),
  Expense('Rock Concert', 100)
]


@app.route('/incomes')
def get_incomes():
  schema = IncomeSchema(many=True)
  incomes = schema.dump(
    filter(lambda t: t.type == TransactionType.INCOME, transactions)
  )
  return jsonify(incomes.data)


@app.route('/incomes', methods=['POST'])
def add_income():
  income = IncomeSchema().load(request.get_json())
  transactions.append(income.data)
  return "", 204


@app.route('/expenses')
def get_expenses():
  schema = ExpenseSchema(many=True)
  expenses = schema.dump(
      filter(lambda t: t.type == TransactionType.EXPENSE, transactions)
  )
  return jsonify(expenses.data)


@app.route('/expenses', methods=['POST'])
def add_expense():
  expense = ExpenseSchema().load(request.get_json())
  transactions.append(expense.data)
  return "", 204


if __name__ == "__main__":
    app.run()
# start the cashman application
./bootstrap.sh &

# get incomes
curl http://localhost:5000/incomes

# add new income
curl -X POST -H "Content-Type: application/json" -d '{
  "description": "lottery",
  "amount": 1000.0
}' http://localhost:5000/incomes

# check if lottery was added
curl localhost:5000/incomes
#!/bin/sh
export FLASK_APP=./cashman/index.py
source $(pipenv --venv)/bin/activate
flask run -h 0.0.0.0
https://maltego-downloads.s3.us-east-2.amazonaws.com/linux/Maltego.v4.3.0.linux.zip
82FCD54A-74bf-2CE93-41d6-A4389de1bd2
npx tsc --init --rootDir src --outDir build \
--esModuleInterop --resolveJsonModule --lib es6 \
--module commonjs --allowJs true --noImplicitAny true
git remote set-url origin <new-url>
git push --set-upstream origin <branch-name>
pip freeze > requirements.txt
adduser USER_NAME
usermod -aG sudo USER_NAME

# Verify new user
grep '^sudo' /etc/group
npx create-html5-boilerplate new-site
#!/usr/bin/env bash

# install ZSH
sudo apt -y install zsh

# Install oh-my-zsh
git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh

# Install some external plugins:
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/custom/plugings/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-completions ~/.oh-my-zsh/custom/plugins/zsh-completions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting

# Set Zsh as your default shell:
chsh -s /bin/zsh
#!/bin/bash

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

source $HOME/.cargo/env
#!/usr/bin/env bash

# Update the list of packages
sudo apt-get update

# Install pre-requisite packages.
sudo apt-get install -y wget apt-transport-https software-properties-common

# Download the Microsoft repository GPG keys
wget -q https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb

# Register the Microsoft repository GPG keys
sudo dpkg -i packages-microsoft-prod.deb

# Update the list of packages after we added packages.microsoft.com
sudo apt-get update

# Install PowerShell
sudo apt-get install -y powershell

# Start PowerShell
pwsh
© 2022 GitHub, Inc.
#!/usr/bin/env bash

sudo apt-get -y update

# set config
XDG_CONFIG_HOME = ~/.config

# install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash

export NVM_DIR="$XDG_CONFIG_HOME/nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

# config
nvm alias default node # Always default to the latest available node version on a shell
nvm set-colors "yMeBg"

# install latest node and npm
nvm install node --latest-npm
nvm install-latest-npm

nvm use node
npm install -g npm

# setup npm
npm login
npm install -g eslint jshint prettier yarn npm-check doctoc tldr speedtest-cli serve
#!/bin/bash

wget https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64/cuda-wsl-ubuntu.pin
sudo mv cuda-wsl-ubuntu.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget https://developer.download.nvidia.com/compute/cuda/11.5.1/local_installers/cuda-repo-wsl-ubuntu-11-5-local_11.5.1-1_amd64.deb
sudo dpkg -i cuda-repo-wsl-ubuntu-11-5-local_11.5.1-1_amd64.deb
sudo apt-key add /var/cuda-repo-wsl-ubuntu-11-5-local/7fa2af80.pub
sudo apt-get -y update 
sudo apt-get -y install cuda
#!/bin/bash

curl -fsSL https://deb.nodesource.com/setup_17.x | sudo -E bash -
sudo apt-get install -y nodejs
#!/usr/bin/env sh

sudo apt-get update && sudo apt-get -y upgrade && sudo apt-get -y autoremove
sudo apt-get -y install neovim
sudo apt-get install python-neovim python3-neovim

mkdir -p ~/.dotfiles/neovim/.config/nvim
touch ~/.dotfiles/neovim/.config/nvim/init.vim

echo 'set runtimepath^=/.vim runtimepath+=~./vim/after\nlet &packpath = &runtimepath\nsource ~/.vimrc' >> ~/.dotfiles/neovim/.config/nvim/init.vim
cd .dotfiles
stow neovim
cd ~
!#/usr/bin/env bash

# update and ensure build-essentials/git
sudo apt update
sudo apt-get install build-essential curl file git

# install homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

# add to PATH
echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> /home/jimbrig/.profile
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
source ~/.profile

# test
test -d /home/linuxbrew/.linuxbrew && eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
test -r ~/.bash_profile && echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.bash_profile
echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.profile

brew doctor

# gcc installation
brew install gcc

# initial installations
brew install topgrade git-crypt git-cliff
#!/bin/bash

wget https://release.gitkraken.com/linux/gitkraken-amd64.deb
sudo dpkg -i ./gitkraken-amd64.deb
sudo apt-get install -f
gitkraken
#!/usr/bin/env bash

# install github-cli
VERSION=`curl  "https://api.github.com/repos/cli/cli/releases/latest" | grep '"tag_name"' | sed -E 's/.*"([^"]+)".*/\1/' | cut -c2-`
echo $VERSION
mkdir ~/downloads
curl -sSL https://github.com/cli/cli/releases/download/v${VERSION}/gh_${VERSION}_linux_amd64.tar.gz -o ~/downloads/gh_${VERSION}_linux_amd64.tar.gz
cd ~/downloads
tar xvf gh_${VERSION}_linux_amd64.tar.gz
sudo cp gh_${VERSION}_linux_amd64/bin/gh /usr/local/bin/
gh version
sudo cp -r ~/downloads/gh_${VERSION}_linux_amd64/share/man/man1/* /usr/share/man/man1/
# man gh
gh auth login

rm -r ~/downloads
#!/usr/bin/env bash

# install cargo
sudo apt-get update -y
sudo apt-get install -y cargo

echo '\n# Add .cargo to $PATH\nexport PATH="~/.cargo/bin:$PATH"\n' >> ~/.zshrc

cargo install cargo-update
#!/usr/bin/env bash

curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
az --version
az login
#!/usr/bin/env bash

# Install R on WSL
sudo apt-get update -qq -y
sudo apt-get install -y wget git
OS_DISTRIBUTION=$(lsb_release -cs)
wget -O- http://neuro.debian.net/lists/${OS_DISTRIBUTION}.us-nh.full | sudo tee /etc/apt/sources.list.d/neurodebian.sources.list
sudo apt-key adv --recv-keys --keyserver hkp://pool.sks-keyservers.net:80 0xA5D32F012649A5A9
sudo apt-get update

sudo apt-get install libopenblas-base r-base
sudo apt-get update -qq -y
sudo apt-get install -y libgit2-dev
sudo apt-get install -y libcurl4-openssl-dev libssl-dev
sudo apt-get install -y zlib1g-dev libssh2-1-dev libpq-dev libxml2-dev
curl -X POST -H "Content-Type: application/json" -H "x-api-key: YOUR_API_KEY" -d "{ 'name': 'Homer Simpson', 'email': 'homer@gmail.com', 'customer_id': '1234' }" https://api.trysend.com/customers
dmesg | grep "Intel Corporation" -A 1 | grep SerialNumber
#!/bin/bash
File="domainList.txt"
while IFS= read -r line
do
  cat sample.yml | sed 's/foo.com/'$line'/g' > /path_to_dir/dir_name/$line.yml

echo "domain: $line"
done < "$File"
#!/usr/bin/env bash
#
# Returns Magento document root if sourced or prints if launched as standalone
#

mageRoot="$(dirname $(realpath "${0}"))"

while [[ ! -e ${mageRoot}/app/Mage.php && ! -e ${mageRoot}/bin/magento ]]
do
    mageRoot="$(dirname $(realpath ${mageRoot}))"
done

return "${mageRoot}" 2>/dev/null || printf '%s' "${mageRoot}" && exit
sudo apt-get -y install xfce4 && sudo apt-get -y install xubuntu-desktop

sudo apt-get -y install xrdp

echo xfce4-session > ~/.xsession

sudo service xrdp restart

ifconfig | grep inet

<i>Then connect to the IP the is returned by the last command</i>

<img src="https://adamtheautomator.com/wp-content/uploads/2019/09/windows-subsystem-linux-gui.png"></img>
LOG=nightly-`date '+%Y-%m-%d_%H:%M:%S'`.log

rsync -av --delete --exclude '$RECYCLE.BIN' --exclude 'System\ Volume\ Information' --exclude 'found.000' --exclude 'Recovery' $SOURCE $DESTINATION | tee ~/logs/$LOG
wsl --shutdown
diskpart
# open window Diskpart
select vdisk file="C:\WSL-Distros\…\ext4.vhdx"
attach vdisk readonly
compact vdisk
detach vdisk
exit
# Stopping Zigbee2MQTT
sudo systemctl stop zigbee2mqtt

# Starting Zigbee2MQTT
sudo systemctl start zigbee2mqtt

# View the log of Zigbee2MQTT
sudo journalctl -u zigbee2mqtt.service -f
function show_colors() {
  color=16;
  
  while [ $color -lt 245 ]; do
    echo -e "$color: \\033[38;5;${color}mhello\\033[48;5;${color}mworld\\033[0m"
	((color++));
  done  
}
function colorgrid() {
    iter=16
    while [ $iter -lt 52 ]
    do
        second=$[$iter+36]
        third=$[$second+36]
        four=$[$third+36]
        five=$[$four+36]
        six=$[$five+36]
        seven=$[$six+36]
        if [ $seven -gt 250 ];then seven=$[$seven-251]; fi

        echo -en "\033[38;5;$(echo $iter)m█ "
        printf "%03d" $iter
        echo -en "   \033[38;5;$(echo $second)m█ "
        printf "%03d" $second
        echo -en "   \033[38;5;$(echo $third)m█ "
        printf "%03d" $third
        echo -en "   \033[38;5;$(echo $four)m█ "
        printf "%03d" $four
        echo -en "   \033[38;5;$(echo $five)m█ "
        printf "%03d" $five
        echo -en "   \033[38;5;$(echo $six)m█ "
        printf "%03d" $six
        echo -en "   \033[38;5;$(echo $seven)m█ "
        printf "%03d" $seven

        iter=$[$iter+1]
        printf '\r\n'
    done
}
git stash                       # skip if all changes are committed
git branch my_feature
git reset --hard origin/master
git checkout my_feature
git stash pop                   # skip if all changes were committed
<a class="twitter-share-button"
  href="https://twitter.com/intent/tweet"
  data-size="large"
  data-text="custom share text"
  data-url="https://dev.twitter.com/web/tweet-button"
  data-hashtags="example,demo"
  data-via="twitterdev"
  data-related="twitterapi,twitter">
Tweet
</a>
echo n > /sys/class/backlight/rpi_backlight/brightness
sudo bash -c "echo 0 > /sys/class/backlight/rpi_backlight/brightness" # if permission denied in above line
#### FIRST ####
sudo nano ~/.bash_profile

#Add this in your .bash_profile
if [ -r ~/.bashrc ]; then
   source ~/.bashrc
fi

#### SECOND ####
sudo nano ~/.bashrc
    
#Add this in your .bashrc
alias sail='bash vendor/bin/sail'
alias composer="/Users/username/composer.phar"
    
#!/bin/bash
# Bash Menu Script Example

PS3='Please enter your choice: '
options=("Option 1" "Option 2" "Option 3" "Quit")
select opt in "${options[@]}"
do
    case $opt in
        "Option 1")
            echo "you chose choice 1"
            ;;
        "Option 2")
            echo "you chose choice 2"
            ;;
        "Option 3")
            echo "you chose choice $REPLY which is $opt"
            ;;
        "Quit")
            break
            ;;
        *) echo "invalid option $REPLY";;
    esac
done
@echo off

SET %DOCKER%=”docker”

SET CONTAINER_NAME=”linux_sandbox”
SET IMAGE_TO_USE=”centos:latest”
SET IMAGE_TO_USE_SANDBOX=”sandbox:%CONTAINER_NAME%”

echo Container – %CONTAINER_NAME%
echo Select an Option to Continue:
echo [0] – Container – Create
echo [1] – Container – Start
echo [2] – Container – Stop
echo [3] – Container – Terminal
echo [4] – Container – Destroy

set /p CHOICE=”Enter Selection: ”

IF “%CHOICE%” == “0” (
%DOCKER% pull “%IMAGE_TO_USE%”

start /MIN “” “%DOCKER%” run -it –privileged –name %CONTAINER_NAME% %IMAGE_TO_USE% bash

timeout 10

%DOCKER% exec -it %CONTAINER_NAME% bash -c “yum -y update;yum clean all”
%DOCKER% exec -it %CONTAINER_NAME% bash -c “yum -y install openssh-server passwd; yum clean all”
%DOCKER% exec -it %CONTAINER_NAME% bash -c “mkdir /var/run/sshd”
%DOCKER% exec -it %CONTAINER_NAME% bash -c “ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ””
%DOCKER% exec -it %CONTAINER_NAME% bash -c “echo ‘root:password’ | chpasswd”

%DOCKER% commit %CONTAINER_NAME% %IMAGE_TO_USE_SANDBOX%
%DOCKER% stop %CONTAINER_NAME%
%DOCKER% rm %CONTAINER_NAME%

%DOCKER% run -d –privileged –name %CONTAINER_NAME% -p “22:22” %IMAGE_TO_USE_SANDBOX% /usr/sbin/sshd -D
)

IF “%CHOICE%” == “1” (
%DOCKER% start %CONTAINER_NAME%
)

IF “%CHOICE%” == “2” (
%DOCKER% stop %CONTAINER_NAME%
)

IF “%CHOICE%” == “3” (
%DOCKER% exec -it %CONTAINER_NAME% /bin/bash
)

IF “%CHOICE%” == “4” (
%DOCKER% stop %CONTAINER_NAME%
%DOCKER% rm %CONTAINER_NAME%
%DOCKER% rmi %IMAGE_TO_USE_SANDBOX%
)

pause
2 steps:
1/ Ctrl+ W
2/ Ctrl+ V
# WSL2 network port forwarding script v1
#   for enable script, 'Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser' in Powershell,
#   for delete exist rules and ports use 'delete' as parameter, for show ports use 'list' as parameter.
#   written by Daehyuk Ahn, Aug-1-2020

# Display all portproxy information
If ($Args[0] -eq "list") {
    netsh interface portproxy show v4tov4;
    exit;
} 

# If elevation needed, start new process
If (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator))
{
  # Relaunch as an elevated process:
  Start-Process powershell.exe "-File",('"{0}"' -f $MyInvocation.MyCommand.Path),"$Args runas" -Verb RunAs
  exit
}

# You should modify '$Ports' for your applications 
$Ports = (22,80,443,8080)

# Check WSL ip address
wsl hostname -I | Set-Variable -Name "WSL"
$found = $WSL -match '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}';
if (-not $found) {
  echo "WSL2 cannot be found. Terminate script.";
  exit;
}

# Remove and Create NetFireWallRule
Remove-NetFireWallRule -DisplayName 'WSL 2 Firewall Unlock';
if ($Args[0] -ne "delete") {
  New-NetFireWallRule -DisplayName 'WSL 2 Firewall Unlock' -Direction Outbound -LocalPort $Ports -Action Allow -Protocol TCP;
  New-NetFireWallRule -DisplayName 'WSL 2 Firewall Unlock' -Direction Inbound -LocalPort $Ports -Action Allow -Protocol TCP;
}

# Add each port into portproxy
$Addr = "0.0.0.0"
Foreach ($Port in $Ports) {
    iex "netsh interface portproxy delete v4tov4 listenaddress=$Addr listenport=$Port | Out-Null";
    if ($Args[0] -ne "delete") {
        iex "netsh interface portproxy add v4tov4 listenaddress=$Addr listenport=$Port connectaddress=$WSL connectport=$Port | Out-Null";
    }
}

# Display all portproxy information
netsh interface portproxy show v4tov4;

# Give user to chance to see above list when relaunched start
If ($Args[0] -eq "runas" -Or $Args[1] -eq "runas") {
  Write-Host -NoNewLine 'Press any key to close! ';
  $null = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown');
}
ssh-keygen
cat ~/.ssh/id_rsa.pub
git checkout receiving-branch
git merge --squash branch-to-squash
git commit --amend 'commit message'
git push
git stash --include-untracked # stashing with untracked files
git stash push -m "stash name" # name stash
git stash list # list stashes
git stash pop stash@{n} # pop stash
python3 manage.py runserver
heroku run python manage.py db upgrade --app name_of_your_application # upgrade db to heroku
heroku local # run locally on heroku and debug
ocrmypdf “$1” “$1”
$ find . -name './test' -prune -o -name 'file_*' -print
docker run -it -v /var/run/docker.sock:/var/run/docker.sock --volume=/Users/steve/dev/my-project:/my-project --workdir="/node-api" --memory=2g --memory-swap=2g --memory-swappiness=0 --entrypoint=/bin/bash node:9.3.0



set -x
VER="17.12.0-ce"
curl -L -o /tmp/docker-$VER.tgz https://download.docker.com/linux/static/stable/x86_64/docker-$VER.tgz
tar -xz -C /tmp -f /tmp/docker-$VER.tgz
mv /tmp/docker/* /usr/bin
for f in * ; do mv -- "$f" "my-prefix-$f" ; done
Normal Version: 
echo 'nice12343game' | sed -n 's/nice\(.*\)game/\1/p'

Jenkins Version:
sed -n 's/.*exited with code \\(.*\\)/\\1/p' stdout
find . -iname '*.jpg' -exec convert \{} -verbose -sampling-factor 4:2:0 -strip -quality 85\> \{} \;
find . -iname '*.jpg' -exec convert \{} -verbose -resize 400x400\> \{} \;
$fire.auth().createUserWithEmailAndPassword('email', 'password')
/*
Accenture - 573.0, ACN 
Microsoft -  20601.0, MSFT 
SalesForce - 69444.0, CRM 
Apple - 2355.0, AAPL 
Alphabet - 116351.0, GOOGL 
Amazon - 1703.0, AMZN 
Tesla - 1650150.0, TSLA 
Facebook- 1820060.0, FB 
Adobe - 808.0, ADBE 
Oracle - 23295.0, ORCL 
*/

parm = {'boardids': (573.0, 20601.0, 69444.0, 2355.0, 116351.0, 1703.0, 1650150.0, 1820060.0, 808.0, 23295.0)}

//query
comp_net = conn.raw_sql('SELECT * FROM boardex.na_wrds_company_networks WHERE boardid in %(boardids)s limit 100000', params=parm)
import re
bods = conn.get_table('boardex','na_wrds_company_names', columns=['boardid', 'boardname','ticker'])
acn_ser = bods['boardname'].str.contains('accenture', regex=True)
count = 0
for i in acn_ser:
  if i is True:
    count += 1
print(count)
ssh suibhne@wrds-cloud.wharton.upenn.edu
CcSgD.V:grKp7Ct
scp -r <username>@<host>:/chemin/source/fichier /home/user/Desktop/local
Get-Content ~/.ssh/id_rsa.pub | Set-Clipboard
defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder
defaults write com.apple.dashboard mcx-disabled -boolean YES
killall Dock
defaults write com.apple.screencapture location <location>
killall SystemUIServer
kill -9 $(lsof -ti tcp:8080)
# folder: .idea
git rm --cached -r .idea
# file: myfile.log
git rm --cached myfile.log
rm -r Directory/
rm -rf Directory/ (Fill ignore file permissions)
rm index.html app.js
sudo find / -name "libgsl.so.0"
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<Location>
export LD_LIBRARY_PATH
samtools view -b -F 4 file.bam > mapped.bam
seqkit head -n 100000 input.fa
seqkit range -r 1:100000 input.fa
samtools view -b -f 4 sample.bam > sample.unmapped.bam
if [ "$#" -ne 1 ]
then
  echo "Usage: ..."
  exit 1
fi
#!/bin/bash
# Bash Menu Script Example

PS3='Please enter your choice: '
options=("Option 1" "Option 2" "Option 3" "Quit")
select opt in "${options[@]}"
do
    case $opt in
        "Option 1")
            echo "you chose choice 1"
            ;;
        "Option 2")
            echo "you chose choice 2"
            ;;
        "Option 3")
            echo "you chose choice $REPLY which is $opt"
            ;;
        "Quit")
            break
            ;;
        *) echo "invalid option $REPLY";;
    esac
done
# List all networks a container belongs to
docker inspect -f '{{range $key, $value := .NetworkSettings.Networks}}{{$key}} {{end}}' [container]
# List all containers belonging to a network by name
docker network inspect -f '{{range .Containers}}{{.Name}} {{end}}' [network]
curl -fsSL https://deb.nodesource.com/setup_current.x | sudo -E bash -
sudo apt-get install -y nodejs
use Drupal\Core\DrupalKernel;
use Symfony\Component\HttpFoundation\Request;

if (PHP_SAPI !== 'cli') {
  return;
}

if (version_compare(PHP_VERSION, '5.4.5') < 0) {
  $version = PHP_VERSION;
  echo <<<EOF

ERROR: This script requires at least PHP version 5.4.5. You invoked it with
       PHP version {$version}.
\n
EOF;
  exit;
Esc # exit insert mode
:wq | :x # write and quit
gunzip -c /Users/sethshapiro/Downloads/20210305-KochavaTransactions000000000000.gz | awk 'NR==1 {print; exit}'
#!/bin/bash

if [ ! -f composer.json ]; then
    echo "Please make sure to run this script from the root directory of this repo."
    exit 1
fi

composer install
cp .env.example .env
php artisan key:generate
source "$(dirname "$0")/checkout_latest_docs.sh"
npm install
npm run dev
/home/rezaeir/canu-2.1.1/bin/canu -p lambda -d lambda-assembly genomeSize=50000 -nanopore-raw lambda_subsample.fastq.gz
rasusa --input control_lambda_7_2_2021.fastq.gz --coverage 30 --genomes-size 50000 --output lambda_subsample.fastq.gz
cat *.fastq.gz > control_lambda_7_2_2021.fastq.gz
./guppy_basecaller --compress_fastq -i <input dir> -s <output dir> --flowcell FLO-MIN106 --kit SQK-LSK109 -x "cuda:0" --gpu_runners_per_device 4 --num_callers 4 --chunks_per_runner 2048 --barcode_kits "EXP-NBD104" --trim_barcodes
for file in *
do
file=${file//.bam/}
samtools sort -@ 14 $file.bam > $file.sorted.bam
samtools index -@ 14 -b $file.sorted.bam
samtools idxstats -@ 14 $file.sorted.bam > $file.idxstats.txt
done
#!/usr/bin/env python3
import sys
import subprocess

with open(sys.argv[1]) as f:
        for line in f:
                old_name = line.strip()
                new_name = old_name.replace("jane","jdoe")
                subprocess.run(["mv",old_name,new_name])
        f.close()
#!/bin/bash

>oldFiles.txt
files=$(grep " jane " ../data/list.txt | cut -d ' ' -f 3)
for file in $files; do
        if [ -e $HOME$file ]; then
        echo $HOME$file >> oldFiles.txt;
        fi
done
#!/bin/bash

for logfile in /var/log/*log; do
	echo "Processing: $logfile"
    # the following line splits the logfile entry line with an empty space as delimiter and then keeps only everything from field five onwards
    cut -d" " -f5- $logfile | sort | uniq -c | sort -nr | head -5
done
#!/bin/bash

for file in *.HTM; do
  name=$(basename "$file" .HTM) # surround the filename with double quotes to account for file names with spaces
  echo mv "$file" "$name.html" # put echo in front when testing to see what the program would do without actually changing anything yet
done
#!bin/bash

for fruit in peach orange apple; do # we represent a list in Bash by simply listing valkues/variables with spaces in between
  	echo "I like $fruit!"
done
#!/bin/bash

n=1 # in Bash, there are no spaces allowed when declaring variables
while [ $n -le 5]; do # the "[ condition ]"-syntax is equivalent to the "test" command
  echo "Iteration number $n"
  ((n+=1)) # in Bash, we use double parentheses to perform arithmetic operations on variables
done
#!/bin/bash

echo "Starting at: $(date)" # the dollar sign tells the program to execute this file inside of the string and then convert the output of it into a string
echo # print empty line

# add separating line
line="-----------------------------------"

echo "UPTIME"
uptime
echo $line

echo "FREE"
free
echo $line

echo "WHO"; echo; free # you can write commands on the same line separating them by semicolons

echo "Finishing at: $(date)"
# print message
echo "Test!"

# create new directory
mkdir new_directory

# change directory
cd new_director

# print current working directory
pwd

# copy file
cp ../spider.txt .

# create empty file
touch myfile.txt

# list files and directories in current directory (with additional information using -l, including hidden files -a)
ls
ls -l
ls- la

# combine ls via a pipe to the less command to show only so many entries at a time
ls -l | less # you can quit with "q"

# rename a file
mv my.file.txt emptyfile.txt

# delete a file
rm *
  
# delete an empty directory
rmdir new_directory/
  
# list all running process on the computer
ps-ax
ps-ax | grep ping # filter process names through grep

# kill a process
kill 4619 # where 4619 is the process ID (PID)
ffmpeg -i input.mp4 -vcodec libx265 -crf 28 output.mp4 
ffmpeg -i input.mkv -codec copy output.mp4
$ find /home/sk/ostechnix/ -type f -printf '%T+ %p\n' | sort | head -n 1
sudo service postgresql status # check db status
sudo service postgresql start # start running db
sudo service postgresql stop # stop running db
ffmpeg -ss 6.0 -t 70.0 -i /path/to/file.mp4 -filter_complex "[0:v] fps=12,scale=w=640:h=-1,setpts=0.5*PTS,split [a][b];[a] palettegen [p];[b][p] paletteuse" /path/to/output.gif
#!/bin/bash
#PBS -l nodes=1:ppn=16,walltime=0:00:59
#PBS -l mem=62000mb
#PBS -m abe

bar=${foo}
echo "${bar}"


qsub -v foo='qux' myRunScript.sh

git push heroku master
heroku addons:create heroku-postgresql:hobby-dev # create postgres db in heroku app
heroku run python # run python repl with heroku
from app import db
db.create_all()
sudo curl https://raw.githubusercontent.com/TheRemote/PiBenchmarks/master/Storage.sh | sudo bash
#!/usr/bin/env bash

set -e

# Dotfiles' project root directory
ROOTDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# Host file location
HOSTS="$ROOTDIR/hosts"
# Main playbook
PLAYBOOK="$ROOTDIR/dotfiles.yml"

# Installs ansible
apt-get update && apt-get install -y ansible

# Runs Ansible playbook using our user.
ansible-playbook -i "$HOSTS" "$PLAYBOOK" --ask-become-pass

exit 0
# login/ssh to the machine that should host the webserver, then run:
> frecklecute hello-world.frecklet --domain example.com

# or, install the remote target machine from your local session:
> frecklecute --target admin@example.com \
      hello-world.frecklet --domain example.com
# configuration, save as: hello-world.frecklet

- static-website-from-folder:
    hostname: "{{:: domain ::}}"     # vhost config
    path: /var/www/html
    webserver: apache
    use_https: true
    server_admin: hello@example.com  # for let's Encrypt
- file-with-content:
    owner: www-data
    path: /var/www/html/index.html
    content: |
      <h1><i>{{:: domain ::}}</i> says "hello", World!</h1>
pip3 install --trusted-host pypi.org --trusted-host files.pythonhosted.org flask-wtf
sudo mkdir /mnt/z
sudo mount -t drvfs Z: /mnt/z
git branch --merged | egrep -v "(^\*|release|dev)" | xargs git branch -d
# Set URL for your scoped packages.
# For example package with name `@foo/bar` will use this URL for download
npm config set @my-org:registry https://private-gitlab.com/api/v4/projects/<your_project_id>/packages/npm/

# Add the token for the scoped packages URL. Replace <your_project_id>
# with the project where your package is located.
npm config set '//private-gitlab.com/api/v4/projects/<your_project_id>/packages/npm/:_authToken' "<your_token>"
defaults write com.apple.dt.Xcode IDEAdditionalCounterpartSuffixes -array-add "Router" "Interactor" "Builder" && killall Xcode
defaults write com.apple.dt.Xcode IDEAdditionalCounterpartSuffixes -array-add "ViewModel" "View" && killall Xcode
defaults write com.apple.screencapture include-date -bool true
wget https://raw.githubusercontent.com/composer/getcomposer.org/76a7060ccb93902cd7576b67264ad91c8a2700e2/web/installer -O - -q | php -- --quiet
sudo nano /etc/default/grub

# There is a line in that: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" (like this), replace with: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_idle.max_cstate=1"
# Save it (CTRL+O)

sudo update-grub
sudo reboot
firebase functions:config:set stripe.secret="STRIPE_SECRET_KEY_HERE"
// BASH
mkdir src
mkdir build
touch src/index.ts
touch .gitignore
touch README.md
tsc -y
npm init -y
npm install nodemon concurrently @types/express --save-dev

// package.json
...
"scripts": {
  "start:build": "tsc -w",
  "start:run": "nodemon ./build/index.js",
  "start": "concurrently npm:start:*"
},
...

// tsconfig.json
...
"outDir": "./build",
"rootDir": "./src",
...

// .gitignore
node_modules
*.env

// README.md
### Start
```bash
npm run start
```

// src/index.ts
import express from 'express'
const port = 3000
const app = express()

console.log("Hello, World!!!")

logSomething("This is a string that I'm logging")

app.listen(port, () => {
  console.log(`Listening on port ${port}`)
})
touch index.ts
mkdir src
mv index.ts ./src
//Error

PHP Fatal error: Uncaught exception 'ErrorException' with message 'proc_open(): fork failed - Cannot allocate memory' in phar

//Fix

/bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024
/sbin/mkswap /var/swap.1
/bin/chmod 0600 /var/swap.1
/sbin/swapon /var/swap.1
hello@nobo-prod-server:~$ sudo lsof -i:8082
COMMAND    PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
node\x20/ 2993 root   20u  IPv6  30271      0t0  TCP *:8082 (LISTEN)
hello@nobo-prod-server:~$ ps 2993
  PID TTY      STAT   TIME COMMAND
 2993 ?        Ssl   28:43 node /home/yasas/nobo-angular/server.js
hello@nobo-prod-server:~$
Restricted : aucun script ne peut être exécuté.

AllSigned : seuls les scripts signés peuvent être exécutés.

RemoteSigned : les scripts téléchargés depuis Internet doivent être signés pour être exécutés. 
	Les scripts présents sur votre poste de travail ne sont pas concernés et peuvent être exécutés.

Unrestricted : pas de restrictions. Les scripts peuvent être exécutés.

connaitre le mode d'execution
	Get-ExecutionPolicy
   
changer le mode d'execution
	Set-ExecutionPolicy <mode>

cree un utilisateur 
	New-ADUser 
		-Name <login> 
		-SamAccountName <login> 
		-UserPrincipaleName <mail> 
		-AccountPassword (ConvertTo-SecureString -AsPlainText <mdp> -Force ) 
		-PasswordNeverExpires $true
		-CannotChangePassword $true

activer Utilisateur
	Enable-ADAccount <samaccountname>
	Desable-ADAccount <samaccountname>

lancer script 
	powershell .\PATH

rechercher des utilisateur
	Get-ADUser -Filter *
	Get-ADUser -Filter * | select samAccountName, Name, UserPrincipalName | Export-Csv UserAdUTF8.csv -Encoding UTF8


cree un groupe 
	New-ADGroup $groupe -GroupScope Global

inserer des utilisateur dans un groupe
	Add-ADGroupMember -identity $groupe -Members <samAccountName>

recherche groupe
	Get-ADGroup -Filter *

afficher les utilisateur dans un groupe
	 Get-ADGroupMember $group | Select-Object name  | Export-Csv SEC.csv -Encoding UTF8

ide for powershell
	Notepad.exe	
git rev-parse --show-toplevel

could be enough if executed within a git repo.
From git rev-parse man page:

--show-toplevel
# WARNING: This will LOCK ALL PUBLIC REPOSITORIES ON YOUR GITHUB ACCOUNT
#
# dependencies hub and jq
# - hub: hub.github.com
# - jq: https://stedolan.github.io/jq/
#
# A better alternative would be to pipe the repos into a temporary file:
# $ hub api --paginate users/amingilani/repos | jq -r '.[]."full_name"' > repos.txt
# Then manually remove your active repositories
# And archive the remaining:
# $ cat repos.txt | xargs -I {} -n 1 hub api -X PATCH -F archived=true /repos/{}
#
# Anyways, to archive all public repositories in your GitHub account:
#
hub api --paginate users/amingilani/repos | jq -r '.[]."full_name"' | xargs -I {} -n 1 hub api -X PATCH -F archived=true /repos/{}
 https://cronhub.io/ping/1f5e3410-254c-11e8-b61d-55875966d031
star

Fri Jun 24 2022 14:38:23 GMT+0000 (UTC)

#bash #ionic #angular #capacitor
star

Fri Jun 24 2022 14:33:49 GMT+0000 (UTC)

#python #bash #variables #variáveis
star

Mon Jun 20 2022 03:35:09 GMT+0000 (UTC)

#bash
star

Mon Jun 20 2022 03:34:46 GMT+0000 (UTC)

#bash
star

Mon Jun 20 2022 03:34:24 GMT+0000 (UTC)

#bash
star

Mon Jun 20 2022 03:33:49 GMT+0000 (UTC)

#bash
star

Mon Jun 20 2022 03:32:16 GMT+0000 (UTC)

#bash
star

Mon Jun 20 2022 03:31:23 GMT+0000 (UTC)

#bash
star

Sat Jun 18 2022 07:30:02 GMT+0000 (UTC)

#bash #shell
star

Wed Jun 15 2022 07:35:08 GMT+0000 (UTC)

#bash
star

Fri Jun 10 2022 00:38:38 GMT+0000 (UTC)

#bash #shell #cli
star

Sun Jun 05 2022 23:43:21 GMT+0000 (UTC) https://linuxhint.com/comment-multiple-lines-vim/

#shell #bash #zsh
star

Sat Jun 04 2022 16:02:01 GMT+0000 (UTC) https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-22-04

#bash
star

Tue May 31 2022 18:16:39 GMT+0000 (UTC) https://unix.stackexchange.com/questions/813/how-to-determine-where-an-environment-variable-came-from

#zsh #bash
star

Mon May 30 2022 18:16:52 GMT+0000 (UTC) https://github.com/microsoft/vscode/issues/113869

#shell #bash #zsh
star

Sun May 29 2022 17:09:50 GMT+0000 (UTC) https://semaphoreci.com/community/tutorials/testing-python-applications-with-pytest

#bash
star

Sun May 29 2022 17:09:47 GMT+0000 (UTC) https://semaphoreci.com/community/tutorials/testing-python-applications-with-pytest

#bash
star

Sat May 28 2022 14:42:18 GMT+0000 (UTC) https://github.com/TousssaintThomas/wren.v1.0.0/settings/actions/runners/new?arch=x64&os=linux

#bash #linux #ubuntu
star

Fri May 27 2022 13:38:20 GMT+0000 (UTC)

#bash
star

Mon May 23 2022 07:02:00 GMT+0000 (UTC) https://stackoverflow.com/questions/10929453/read-a-file-line-by-line-assigning-the-value-to-a-variable

#bash
star

Fri May 20 2022 20:16:08 GMT+0000 (UTC) https://developer.paypal.com/docs/api/catalog-products/v1/

#bash
star

Fri May 20 2022 20:14:26 GMT+0000 (UTC) https://developer.paypal.com/docs/api/catalog-products/v1/

#bash
star

Thu May 19 2022 21:40:31 GMT+0000 (UTC) https://developers.cloudflare.com/workers/wrangler/get-started/

#bash
star

Thu May 19 2022 21:40:25 GMT+0000 (UTC) https://developers.cloudflare.com/workers/wrangler/get-started/

#bash
star

Thu May 19 2022 04:35:21 GMT+0000 (UTC) https://www.11ty.dev/docs/getting-started/

#bash
star

Thu May 19 2022 04:34:23 GMT+0000 (UTC) https://www.11ty.dev/docs/getting-started/

#bash
star

Wed May 18 2022 02:55:41 GMT+0000 (UTC) https://developers.cloudflare.com/workers/wrangler/get-started/

#bash
star

Sun May 15 2022 17:04:29 GMT+0000 (UTC)

#ubuntu #linux #bash #sariohara
star

Fri May 13 2022 06:35:52 GMT+0000 (UTC)

#bash
star

Wed May 11 2022 21:47:41 GMT+0000 (UTC) https://developers.cloudflare.com/workers/wrangler/get-started/

#bash
star

Wed May 11 2022 07:05:32 GMT+0000 (UTC) https://stackoverflow.com/questions/5566310/how-to-recursively-find-and-list-the-latest-modified-files-in-a-directory-with-s

#bash
star

Mon May 09 2022 06:00:24 GMT+0000 (UTC)

#bash
star

Thu May 05 2022 09:35:21 GMT+0000 (UTC) https://linuxize.com/post/bash-increment-decrement-variable/

#bash
star

Wed May 04 2022 07:22:25 GMT+0000 (UTC) https://typeofnan.dev/how-to-stop-all-docker-containers/

#bash
star

Mon May 02 2022 09:18:08 GMT+0000 (UTC)

#bash
star

Mon May 02 2022 08:09:04 GMT+0000 (UTC) https://stackoverflow.com/a/41991368

#bash
star

Thu Apr 28 2022 10:07:14 GMT+0000 (UTC) https://www.freecodecamp.org/news/how-to-delete-a-git-branch-both-locally-and-remotely/

#bash
star

Wed Apr 27 2022 10:51:53 GMT+0000 (UTC) https://axios-http.com/docs/intro

#bash
star

Mon Apr 25 2022 22:53:59 GMT+0000 (UTC) https://blog.jongallant.com/2020/05/azure-roles/

#bash
star

Sat Apr 23 2022 20:14:19 GMT+0000 (UTC) https://simplernerd.com/docker-jupyter-notebook/

#bash
star

Fri Apr 22 2022 17:12:36 GMT+0000 (UTC) https://www.ssls.com/knowledgebase/how-to-install-an-ssl-certificate-on-apache/?gclid

#bash #ssl #linux #apache #certificates
star

Fri Apr 22 2022 16:54:00 GMT+0000 (UTC) https://devcenter.heroku.com/articles/ssl-certificate-self

#bash #ssl #linux #unix #certificate
star

Tue Apr 05 2022 19:22:41 GMT+0000 (UTC) https://raspberrytips.nl/dht11-temperatuursensor-aansluiten/

#bash #raspberrypi
star

Mon Mar 28 2022 15:24:17 GMT+0000 (UTC)

#bash #wtfutil #slack
star

Mon Mar 21 2022 01:29:18 GMT+0000 (UTC) https://medium.com/google-cloud/cloud-functions-to-cloud-run-e297aac28eb8

#bash
star

Wed Mar 16 2022 02:14:12 GMT+0000 (UTC) https://askubuntu.com/questions/519/how-do-i-write-a-shell-script-to-install-a-list-of-applications

#bash #shell
star

Tue Mar 15 2022 04:10:40 GMT+0000 (UTC)

#ubuntu #bash #ssh
star

Tue Mar 15 2022 03:32:29 GMT+0000 (UTC) https://serverfault.com/questions/854208/ssh-suddenly-returning-invalid-format

#ubuntu #bash #ssh
star

Thu Mar 10 2022 23:49:22 GMT+0000 (UTC) https://ohmyz.sh/

#bash
star

Thu Mar 10 2022 23:48:20 GMT+0000 (UTC) https://medium.com/carvago-development/my-docker-on-macos-part-1-setup-ubuntu-virtual-machine-both-intel-and-apple-silicon-cpu-5d886af0ebba

#bash
star

Thu Mar 10 2022 23:47:39 GMT+0000 (UTC) https://medium.com/carvago-development/my-docker-on-macos-part-1-setup-ubuntu-virtual-machine-both-intel-and-apple-silicon-cpu-5d886af0ebba

#bash
star

Thu Mar 10 2022 23:46:42 GMT+0000 (UTC) https://medium.com/carvago-development/my-docker-on-macos-part-1-setup-ubuntu-virtual-machine-both-intel-and-apple-silicon-cpu-5d886af0ebba

#bash
star

Thu Mar 10 2022 23:46:15 GMT+0000 (UTC) https://medium.com/carvago-development/my-docker-on-macos-part-1-setup-ubuntu-virtual-machine-both-intel-and-apple-silicon-cpu-5d886af0ebba

#bash
star

Thu Mar 10 2022 23:45:57 GMT+0000 (UTC) https://medium.com/carvago-development/my-docker-on-macos-part-1-setup-ubuntu-virtual-machine-both-intel-and-apple-silicon-cpu-5d886af0ebba

#bash
star

Thu Mar 10 2022 23:45:23 GMT+0000 (UTC) https://medium.com/carvago-development/my-docker-on-macos-part-1-setup-ubuntu-virtual-machine-both-intel-and-apple-silicon-cpu-5d886af0ebba

#bash
star

Thu Mar 10 2022 22:01:06 GMT+0000 (UTC) https://apple.stackexchange.com/questions/58234/override-itunes-media-keys-play-pause-etc-for-spotify

#bash
star

Wed Mar 09 2022 19:53:36 GMT+0000 (UTC) https://auth0.com/docs/quickstart/backend/nodejs/01-authorization

#bash
star

Tue Mar 08 2022 11:33:18 GMT+0000 (UTC) https://superuser.com/questions/1527402/youtube-dl-download-best-audio-video-embed-thumbnail-and-convert-to-mp4

#bash
star

Fri Mar 04 2022 21:20:17 GMT+0000 (UTC) https://stackoverflow.com/questions/3869072/test-for-non-zero-length-string-in-bash-n-var-or-var

#sh #bash
star

Thu Mar 03 2022 23:37:21 GMT+0000 (UTC)

#cli #bash
star

Thu Mar 03 2022 07:17:40 GMT+0000 (UTC) https://auth0.com/blog/developing-restful-apis-with-python-and-flask/

#bash
star

Thu Mar 03 2022 07:16:46 GMT+0000 (UTC) https://auth0.com/blog/developing-restful-apis-with-python-and-flask/

#bash
star

Thu Mar 03 2022 07:16:06 GMT+0000 (UTC) https://auth0.com/blog/developing-restful-apis-with-python-and-flask/

#bash
star

Sat Feb 26 2022 04:37:33 GMT+0000 (UTC) web.Roblox.com

#java #actionscript3 #dart #css #bash
star

Tue Feb 15 2022 21:14:57 GMT+0000 (UTC) https://maltego-downloads.s3.us-east-2.amazonaws.com/linux/Maltego.v4.3.0.linux.zip

#bash #hax
star

Tue Feb 15 2022 21:14:13 GMT+0000 (UTC)

#bash
star

Mon Feb 14 2022 20:56:44 GMT+0000 (UTC) https://askubuntu.com/questions/410244/is-there-a-command-to-list-all-users-also-to-add-delete-modify-users-in-the

#bash
star

Mon Feb 14 2022 13:26:23 GMT+0000 (UTC)

#bash #git
star

Mon Feb 14 2022 10:04:08 GMT+0000 (UTC) https://khalilstemmler.com/blogs/typescript/node-starter-project/

#bash
star

Sun Feb 13 2022 10:23:02 GMT+0000 (UTC)

#bash
star

Mon Feb 07 2022 09:48:33 GMT+0000 (UTC)

#bash
star

Mon Feb 07 2022 09:08:00 GMT+0000 (UTC)

#bash
star

Mon Feb 07 2022 09:00:48 GMT+0000 (UTC)

#bash
star

Sun Feb 06 2022 11:34:48 GMT+0000 (UTC) https://www.liquidweb.com/kb/how-to-add-a-user-and-grant-root-privileges-on-ubuntu-16-04/

#linux #commandline #bash
star

Fri Feb 04 2022 19:41:26 GMT+0000 (UTC) https://cli.vuejs.org/

#bash
star

Thu Feb 03 2022 18:39:15 GMT+0000 (UTC) https://github.com/h5bp/create-html5-boilerplate

#bash
star

Wed Feb 02 2022 22:16:48 GMT+0000 (UTC) https://github.com/jimbrig/dotfiles-wsl/blob/main/scripts/dev/scripts/install-zsh.sh

#installation #linux #bash #wsl
star

Wed Feb 02 2022 22:16:16 GMT+0000 (UTC) https://github.com/jimbrig/dotfiles-wsl/blob/main/scripts/dev/scripts/install-rust.sh

#installation #linux #bash #wsl
star

Wed Feb 02 2022 22:15:45 GMT+0000 (UTC) https://github.com/jimbrig/dotfiles-wsl/blob/main/scripts/dev/scripts/install-pwsh.sh

#installation #linux #bash #wsl #powershell
star

Wed Feb 02 2022 22:15:12 GMT+0000 (UTC) https://github.com/jimbrig/dotfiles-wsl/blob/main/scripts/dev/scripts/install-nvm-node-npm.sh

#installation #linux #bash #wsl
star

Wed Feb 02 2022 22:14:32 GMT+0000 (UTC) https://github.com/jimbrig/dotfiles-wsl/blob/main/scripts/dev/scripts/install-nvidia-cuda.sh

#installation #linux #bash #wsl
star

Wed Feb 02 2022 22:14:04 GMT+0000 (UTC) https://github.com/jimbrig/dotfiles-wsl/blob/main/scripts/dev/scripts/install-nodesrc.sh

#installation #linux #bash #wsl
star

Wed Feb 02 2022 22:13:33 GMT+0000 (UTC) https://github.com/jimbrig/dotfiles-wsl/blob/main/scripts/dev/scripts/install-neovim.sh

#installation #linux #bash #wsl
star

Wed Feb 02 2022 22:12:47 GMT+0000 (UTC) https://github.com/jimbrig/dotfiles-wsl/blob/main/scripts/dev/scripts/install-homebrew.sh

#installation #linux #bash #wsl
star

Wed Feb 02 2022 22:09:23 GMT+0000 (UTC) https://github.com/jimbrig/dotfiles-wsl/blob/main/scripts/dev/scripts/install-gitkraken.sh

#installation #linux #bash #wsl #git
star

Wed Feb 02 2022 22:08:42 GMT+0000 (UTC) https://github.com/jimbrig/dotfiles-wsl/blob/main/scripts/dev/scripts/install-gh-cli.sh

#installation #linux #bash #wsl #github #cli
star

Wed Feb 02 2022 22:07:52 GMT+0000 (UTC) https://github.com/jimbrig/dotfiles-wsl/blob/main/scripts/dev/scripts/install-cargo.sh

#installation #linux #bash #wsl #cargo #rust
star

Wed Feb 02 2022 22:07:13 GMT+0000 (UTC) https://github.com/jimbrig/dotfiles-wsl/blob/main/scripts/dev/scripts/install-az-cli.sh

#installation #linux #bash #wsl #azure
star

Wed Feb 02 2022 22:06:40 GMT+0000 (UTC) https://github.com/jimbrig/dotfiles-wsl/blob/main/scripts/dev/scripts/install-R.sh

#r #installation #linux #bash #wsl
star

Tue Feb 01 2022 11:05:50 GMT+0000 (UTC)

#bash
star

Thu Jan 27 2022 17:41:20 GMT+0000 (UTC)

#bash
star

Mon Jan 24 2022 19:53:09 GMT+0000 (UTC)

#bash #depthai
star

Sat Jan 22 2022 07:34:20 GMT+0000 (UTC)

#bash
star

Sat Jan 08 2022 06:07:58 GMT+0000 (UTC) https://gist.github.com/juliyvchirkov/2c5c8d54b182528e39d4565d1632f8ee#file-magentodocumentroot-sh

#bash #magento #document_root #resolve #shell
star

Mon Jan 03 2022 23:14:30 GMT+0000 (UTC) https://spin.atomicobject.com/2019/05/18/smb-self-hosting-rsync/

#bash #windows
star

Mon Dec 27 2021 12:25:33 GMT+0000 (UTC) https://github.com/microsoft/WSL/issues/4699#issuecomment-627133168

#bash #powershell
star

Tue Dec 21 2021 14:38:32 GMT+0000 (UTC) https://stackoverflow.com/questions/4157189/how-to-git-pull-while-ignoring-local-changes

#bash #git
star

Mon Dec 20 2021 14:38:13 GMT+0000 (UTC) https://nodejs.dev/learn/update-all-the-nodejs-dependencies-to-their-latest-version

#bash #nmp
star

Fri Dec 17 2021 17:26:37 GMT+0000 (UTC) https://www.zigbee2mqtt.io/guide/installation/01_linux.html#determine-location-of-the-adapter-and-checking-user-permissions

#bash #mqtt
star

Thu Dec 16 2021 17:14:02 GMT+0000 (UTC)

#bash #colors
star

Thu Dec 16 2021 17:13:34 GMT+0000 (UTC)

#bash #colors
star

Mon Dec 06 2021 16:51:34 GMT+0000 (UTC) https://stackoverflow.com/questions/2941517/how-to-fix-committing-to-the-wrong-git-branch

#bash
star

Fri Dec 03 2021 12:28:53 GMT+0000 (UTC) https://developer.twitter.com/en/docs/twitter-for-websites/tweet-button/guides/parameter-reference1

#bash
star

Mon Nov 15 2021 04:01:22 GMT+0000 (UTC) https://raspberrypi.stackexchange.com/questions/46225/adjusting-the-brightness-of-the-official-touchscreen-display

#bash
star

Sun Nov 07 2021 22:22:10 GMT+0000 (UTC)

#bash
star

Mon Oct 18 2021 07:57:50 GMT+0000 (UTC) https://askubuntu.com/questions/1705/how-can-i-create-a-select-menu-in-a-shell-script

#bash #sh #script #shell #shellscript
star

Wed Oct 06 2021 00:42:00 GMT+0000 (UTC) https://garrett.dev/2018/12/11/docker-sandbox-script/

#dockerfile #bash
star

Sun Oct 03 2021 18:44:44 GMT+0000 (UTC)

#bash
star

Sat Sep 04 2021 08:05:25 GMT+0000 (UTC)

#bash #powershell
star

Thu Aug 26 2021 17:41:12 GMT+0000 (UTC)

#bash
star

Tue Aug 17 2021 07:54:07 GMT+0000 (UTC)

#bash
star

Tue Aug 17 2021 07:53:53 GMT+0000 (UTC)

#bash
star

Tue Aug 17 2021 07:52:48 GMT+0000 (UTC)

#bash
star

Tue Aug 17 2021 07:49:52 GMT+0000 (UTC)

#bash
star

Tue Aug 17 2021 07:48:11 GMT+0000 (UTC)

#bash
star

Tue Aug 17 2021 07:37:07 GMT+0000 (UTC)

#bash
star

Tue Aug 17 2021 07:35:48 GMT+0000 (UTC)

#bash
star

Tue Aug 17 2021 07:33:21 GMT+0000 (UTC)

#bash
star

Mon Aug 16 2021 03:55:49 GMT+0000 (UTC) https://github.com/jbarlow83/OCRmyPDF

#bash
star

Wed Aug 04 2021 07:39:33 GMT+0000 (UTC) https://www.linuxshelltips.com/exclude-directory-while-finding-files-in-linux/

#bash
star

Fri Jul 30 2021 08:44:21 GMT+0000 (UTC) https://medium.com/@steveliles/debugging-bitbucket-pipelines-locally-35d13f1adcd5

#bash
star

Tue Jul 20 2021 05:02:34 GMT+0000 (UTC)

#bash
star

Sun Jul 18 2021 19:18:06 GMT+0000 (UTC)

#bash #shell
star

Thu Jun 24 2021 04:55:58 GMT+0000 (UTC)

#bash
star

Thu Jun 24 2021 04:55:05 GMT+0000 (UTC)

#bash
star

Sun Jun 20 2021 10:59:15 GMT+0000 (UTC) https://vueschool.io/lessons/sign-up-in-or-out-with-firebase-authentication

#bash
star

Tue Jun 15 2021 02:34:39 GMT+0000 (UTC)

#bash
star

Sun Jun 13 2021 00:52:05 GMT+0000 (UTC)

#bash
star

Sat Jun 12 2021 22:26:48 GMT+0000 (UTC) https://wrds-www.wharton.upenn.edu/pages/support/the-wrds-cloud/using-ssh-connect-wrds-cloud/

#bash
star

Fri Jun 11 2021 21:10:14 GMT+0000 (UTC)

#bash
star

Fri Jun 11 2021 21:08:56 GMT+0000 (UTC)

#bash
star

Fri Jun 11 2021 21:08:28 GMT+0000 (UTC)

#bash
star

Fri Jun 11 2021 21:02:58 GMT+0000 (UTC)

#bash
star

Fri Jun 11 2021 21:02:18 GMT+0000 (UTC)

#bash
star

Fri Jun 11 2021 21:00:02 GMT+0000 (UTC)

#bash
star

Fri Jun 11 2021 20:59:03 GMT+0000 (UTC)

#bash
star

Fri Jun 11 2021 20:58:27 GMT+0000 (UTC)

#bash
star

Fri Jun 11 2021 20:57:47 GMT+0000 (UTC)

#bash
star

Fri Jun 11 2021 20:52:59 GMT+0000 (UTC)

#bash #php
star

Fri Jun 11 2021 20:50:53 GMT+0000 (UTC)

#bash
star

Fri Jun 11 2021 20:49:51 GMT+0000 (UTC)

#bash
star

Sun Jun 06 2021 08:22:12 GMT+0000 (UTC)

#bash
star

Sun Jun 06 2021 08:20:34 GMT+0000 (UTC)

#bash
star

Sun Jun 06 2021 08:19:45 GMT+0000 (UTC)

#bash
star

Sun Jun 06 2021 08:12:38 GMT+0000 (UTC)

#bash
star

Sun Jun 06 2021 08:12:17 GMT+0000 (UTC)

#bash
star

Sun Jun 06 2021 08:05:00 GMT+0000 (UTC)

#bash
star

Sun Jun 06 2021 08:03:50 GMT+0000 (UTC)

#bash
star

Sun Jun 06 2021 08:01:37 GMT+0000 (UTC)

#bash
star

Sun Jun 06 2021 08:01:11 GMT+0000 (UTC)

#bash
star

Sun Jun 06 2021 07:53:42 GMT+0000 (UTC)

#bash
star

Sun Jun 06 2021 07:51:52 GMT+0000 (UTC)

#bash
star

Sun Jun 06 2021 07:51:24 GMT+0000 (UTC)

#bash
star

Sun Jun 06 2021 07:40:31 GMT+0000 (UTC)

#bash
star

Sun Jun 06 2021 07:37:30 GMT+0000 (UTC)

#bash
star

Sun Jun 06 2021 07:35:00 GMT+0000 (UTC)

#bash
star

Sun Jun 06 2021 07:32:49 GMT+0000 (UTC)

#bash
star

Thu May 27 2021 20:17:23 GMT+0000 (UTC) https://stackoverflow.com/questions/22222666/error-while-loading-shared-libraries-libgsl-so-0-cannot-open-shared-object-fil

#bash
star

Mon May 24 2021 06:22:23 GMT+0000 (UTC) https://www.cyberciti.biz/faq/unix-linux-check-if-port-is-in-use-command/

#bash
star

Sun May 23 2021 15:11:19 GMT+0000 (UTC) https://www.biostars.org/p/56246/

#bash
star

Fri May 21 2021 20:40:46 GMT+0000 (UTC) https://www.biostars.org/p/131837/

#bash
star

Sat May 08 2021 18:59:44 GMT+0000 (UTC) https://www.biostars.org/p/67268/

#bash
star

Sat Apr 24 2021 21:04:50 GMT+0000 (UTC)

#bash
star

Sat Apr 24 2021 21:00:41 GMT+0000 (UTC) https://askubuntu.com/questions/1705/how-can-i-create-a-select-menu-in-a-shell-script

#bash
star

Tue Apr 20 2021 17:12:01 GMT+0000 (UTC) https://maximorlov.com/4-reasons-why-your-docker-containers-cant-talk-to-each-other/

#bash
star

Tue Apr 20 2021 17:11:50 GMT+0000 (UTC) https://maximorlov.com/4-reasons-why-your-docker-containers-cant-talk-to-each-other/

#bash
star

Sun Apr 18 2021 16:35:19 GMT+0000 (UTC)

#ubuntu #bash #linux
star

Tue Apr 06 2021 15:27:19 GMT+0000 (UTC)

#bash
star

Tue Apr 06 2021 08:53:58 GMT+0000 (UTC)

#bash
star

Wed Mar 31 2021 14:58:05 GMT+0000 (UTC)

#bash
star

Wed Mar 31 2021 06:35:25 GMT+0000 (UTC) https://github.com/laravel/laravel.com-next/blob/master/bin/setup.sh

#bash
star

Sun Mar 28 2021 12:54:21 GMT+0000 (UTC) https://www.notion.so/rezaeir/Code-Snippets-f347e2e7bc2d4217854f17cb0a5e0746

#bash #gzip
star

Sun Mar 28 2021 12:53:33 GMT+0000 (UTC) https://www.notion.so/rezaeir/Code-Snippets-f347e2e7bc2d4217854f17cb0a5e0746

#bash #assembly #canu
star

Sun Mar 28 2021 12:52:57 GMT+0000 (UTC) https://www.notion.so/rezaeir/Code-Snippets-f347e2e7bc2d4217854f17cb0a5e0746

#bash #wgs #subsample #rasusa
star

Sun Mar 28 2021 12:51:52 GMT+0000 (UTC) https://www.notion.so/rezaeir/Code-Snippets-f347e2e7bc2d4217854f17cb0a5e0746

#bash #fastq #join
star

Sun Mar 28 2021 12:51:14 GMT+0000 (UTC) https://www.notion.so/rezaeir/Code-Snippets-f347e2e7bc2d4217854f17cb0a5e0746

#bash #guppy #nanopore #basecall
star

Sun Mar 28 2021 12:49:54 GMT+0000 (UTC) https://www.notion.so/rezaeir/Code-Snippets-f347e2e7bc2d4217854f17cb0a5e0746

#bash #samtools #bam #count
star

Sun Mar 28 2021 11:12:42 GMT+0000 (UTC)

#bash
star

Sun Mar 28 2021 11:12:11 GMT+0000 (UTC)

#bash
star

Sun Mar 28 2021 09:50:19 GMT+0000 (UTC)

#bash
star

Sun Mar 28 2021 09:48:07 GMT+0000 (UTC)

#bash
star

Sun Mar 28 2021 09:42:01 GMT+0000 (UTC)

#bash
star

Sun Mar 28 2021 09:19:34 GMT+0000 (UTC)

#bash
star

Sun Mar 28 2021 09:18:21 GMT+0000 (UTC)

#bash
star

Sun Mar 21 2021 04:37:24 GMT+0000 (UTC)

#bash
star

Sun Mar 21 2021 04:34:01 GMT+0000 (UTC)

#bash
star

Sat Mar 20 2021 07:37:59 GMT+0000 (UTC) https://ostechnix.com/find-oldest-file-directory-tree-linux/

#bash
star

Thu Mar 18 2021 08:35:27 GMT+0000 (UTC)

#bash
star

Mon Mar 15 2021 13:38:05 GMT+0000 (UTC) https://engineering.giphy.com/how-to-make-gifs-with-ffmpeg/

#bash
star

Fri Mar 12 2021 21:07:11 GMT+0000 (UTC) https://stackoverflow.com/a/17068891

#bash
star

Fri Mar 12 2021 11:02:42 GMT+0000 (UTC)

#python #bash
star

Thu Mar 11 2021 12:17:01 GMT+0000 (UTC) https://stackoverflow.com/questions/54066437/date-month-in-bash-without-leading-0-or-space

#bash
star

Sat Mar 06 2021 23:08:44 GMT+0000 (UTC) https://jamesachambers.com/raspberry-pi-4-usb-boot-config-guide-for-ssd-flash-drives/

#bash
star

Wed Mar 03 2021 04:09:21 GMT+0000 (UTC) https://thebroken.link/managing-dotfiles-with-ansible/

#bash #ansible
star

Wed Mar 03 2021 03:43:25 GMT+0000 (UTC) https://freckles.io/

#bash #freckles
star

Wed Mar 03 2021 03:43:09 GMT+0000 (UTC) https://freckles.io/

#bash #freckles
star

Mon Feb 15 2021 16:00:50 GMT+0000 (UTC)

#bash #python
star

Mon Feb 15 2021 09:17:53 GMT+0000 (UTC)

#bash
star

Mon Feb 08 2021 16:11:59 GMT+0000 (UTC)

#bash
star

Tue Dec 29 2020 20:45:20 GMT+0000 (UTC)

#bash
star

Sat Dec 12 2020 01:14:26 GMT+0000 (UTC) https://macos-defaults.com/xcode/ideadditionalcounterpartsuffixes.html

#bash
star

Sat Dec 12 2020 01:14:26 GMT+0000 (UTC) https://macos-defaults.com/xcode/ideadditionalcounterpartsuffixes.html

#bash
star

Sat Dec 12 2020 01:13:52 GMT+0000 (UTC) https://macos-defaults.com/screenshots/include-date.html

#bash
star

Wed Dec 09 2020 00:38:46 GMT+0000 (UTC) https://getcomposer.org/doc/faqs/how-to-install-composer-programmatically.md

#bash
star

Sun Dec 06 2020 21:15:55 GMT+0000 (UTC) https://askubuntu.com/questions/761706/ubuntu-15-10-and-16-04-keep-freezing-randomly

#bash #ubuntu
star

Wed Dec 02 2020 19:20:04 GMT+0000 (UTC)

#bash
star

Sun Nov 29 2020 16:44:07 GMT+0000 (UTC) https://forums.docker.com/t/start-a-gui-application-as-root-in-a-ubuntu-container/17069

#bash #docker #ubuntu
star

Wed Nov 18 2020 12:29:43 GMT+0000 (UTC) https://blog.sodifrance.fr/nmap-commandes-utiles/

#bash
star

Wed Nov 18 2020 00:08:27 GMT+0000 (UTC) https://youtu.be/1__Leh5MBEM

#bash
star

Sun Nov 08 2020 17:58:52 GMT+0000 (UTC)

#bash
star

Tue Oct 27 2020 05:59:09 GMT+0000 (UTC) https://getcomposer.org/doc/articles/troubleshooting.md#proc-open-fork-failed-errors

#bash
star

Thu Oct 08 2020 05:35:47 GMT+0000 (UTC)

#bash
star

Tue Oct 06 2020 09:30:19 GMT+0000 (UTC)

#bash
star

Sun Oct 04 2020 00:52:52 GMT+0000 (UTC)

#shell #bash
star

Sat Jun 13 2020 08:20:55 GMT+0000 (UTC) https://www.computerhope.com/unix/signals.htm

#bash #linux
star

Sat Jun 06 2020 16:35:29 GMT+0000 (UTC) chrome-extension://annlhfjgbkfmbbejkbdpgbmpbcjnehbb/images/saveicon.png

#bash
star

Thu Jun 04 2020 19:50:21 GMT+0000 (UTC) https://stackoverflow.com/questions/12293944/how-to-find-the-path-of-the-local-git-repository-when-i-am-possibly-in-a-subdire

#bash
star

Wed Jun 03 2020 13:35:00 GMT+0000 (UTC)

#bash
star

Fri May 22 2020 13:55:18 GMT+0000 (UTC) https://docs.cronhub.io/

#bash

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension