Snippets Collections
rm -r generated/* var/cache/* var/view_preprocessed/* pub/static/*
pip install fpdf2
https://pypi.org/project/fpdf2/
for /R %f in (*.txt) do type “%f” >> c:\Test\output.txt
Error: Similar to -> You can only commit if your email is one of the verified emails

In your terminal, navigate to the repo you want to make the changes in.
Execute git config --list to check current username & email in your local repo.

Check the username -> git config [--global] user.name
Check the email -> git config [--global] user.email

Change username & email as desired. Make it a global change or specific to the local repo:
git config [--global] user.name "Full Name"
git config [--global] user.email "email@address.com"
git config [--global] user.password "your password"

Per repo basis you could also edit .git/config manually instead.
Done!

Then execute ->
git commit --amend --reset-author --no-edit
python -m ipykernel install --user --name <conda_environment_name> --display-name "<Display_name>"
#Setup SSH Access

1. Copy from access env via ssh (Open Tool -> SSH)
/bin/bash <(curl -s --insecure "https://10.27.40.23/user/aisquad/integratedTest/shared/ssh/setup?token=b8400e90e97c016d1596c21fa993e94b5c1e37fa&host=10.27.40.23&port=443")

2. Give a name and select yes yes for multiple questions

3. execute below to copy 
scp -r root@hardik_connection_to_integrated:/workspace/pa_demand_forecast/pa_demand_forecast/raw_forecast/_demandforecaster_model_ASA_REGION_ID_GOOD_2022 /workspace/PyCharm/pa_demand_forecast/pa_demand_forecast/raw_forecast
setfacl -m u:jane:rw file.txt
chmod u+w file.txt
chmod 755 file.txt
chmod [permissions] [file/directory]
#!/bin/bash

if [ $# -ne 3 ]; then
  echo "Usage: $0 <directory_name> <start_number> <end_number>"
  exit 1
fi

directory_name=$1
start_number=$2
end_number=$3

# Validate start and end numbers
if ! [[ $start_number =~ ^[0-9]+$ ]] || ! [[ $end_number =~ ^[0-9]+$ ]]; then
  echo "Start and end numbers must be integers."
  exit 1
fi

# Create directories
for ((i = start_number; i <= end_number; i++)); do
  directory="${directory_name}${i}"
  mkdir "$directory"
  echo "Created directory: $directory"
done

~        
git config pull.rebase true
dbt run		--Materialize models
dbt snapshot	--Run models in snapshot folder only
dbt deps	--Run and install dependencies
dbt run-operation required_tests	--Run tests defined in dbt_project.yml
 -"Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9010 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=192.168.59.99"


Ex: 
pkill -f -9 vn.vtcc.service.NERAPI
#nohup java -cp "*" service $1 &
#nohup java -Dcom.sun.management.jmxremote.port=8991 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Xms1024m -Xmx1024m -cp "*" vn.vtcc.service.NERAPI $1 &
java \
 -Dcom.sun.management.jmxremote \
 -Dcom.sun.management.jmxremote.port=port \
 -Dcom.sun.management.jmxremote.rmi.port=port \
 -Dcom.sun.management.jmxremote.local.only=false \
 -Dcom.sun.management.jmxremote.authenticate=false \
 -Dcom.sun.management.jmxremote.ssl=false \
 -Djava.rmi.server.hostname=host\
 -cp "*" service $1 &
//Follow this when customizing terminal - https://www.josean.com/posts/terminal-setup 
~/.oh-my-zsh/themes/robbyrussell.zsh-theme
// create a .nvmrc file in the project root directory and include node version u need to manage 
// ex: v16.16.0
// Execute following command in the root directory using a terminal

$ nvm use
Found '/path/to/project/.nvmrc' with version <5.9>
Now using node v5.9.1 (npm v3.7.3)
sfdx auth:logout --orgnametarget my-hub-org
sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo
sudo yum -y install terraform
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart \
 -activate -configure -access -on \
 -configure -allowAccessFor -allUsers \
 -configure -restart -agent -privs -all
find . -name '*.ko*' | wc -l # number of modules under raspberry , . means /lib/modules/5/kernel
lsmod #list all loaded modules
lsmod | wc -l # how many modules are loaded
rmmode -f mod #force deletion of a modules
modinfo mod # get info
insmod #insert a module , needs the path 
mymod #loads/remove module and its dependencies
sudo ls -l /dev/sda*# list all disc partitions
sudo ls -l /dev/sdb*#list all usb devices and parts
sudo fdisk -l ~# details about partitions and discs of all kind
sudo grep -rl BOOT_IMAGE# list all files who have this name
grep "^c" # grep lines starting with a c (character device)
## start : create a device on linux
med@raspberrypi:/tmp $ sudo mknod shity_device c 1 2
med@raspberrypi:/tmp $ cat shity_device
cat: shity_device: No such device or address
## done
file /usr/sbin/init ## what s this file 
ls -l /lib/modules/$(uname -r) #add output of command to argument
grep -rf ftracec. | grep -v output #search on doc kernel about ftrace
grep -rli sys_read include #search for files inclufing sys_read , ignoring case and search on all subdic on include



tail -f /var/log/messages #following debug messages from the kernel
grep "define __NR" unistd.h | wc -l #count system calls on a kernel
dmesg #display kernel debugs from RAM
journalctl -t kernel #show systemd journaling about kernel
journalctl -f #monitor journaling generated by the systemd
grep MemTotal  /proc/meminfo #get memory available to kernel
uname -r #display kernel version
ls -l /boot/kerne* #get size of the kernel image
strace -c date #monitor all system calls of a program/command with the kernel
strace sh sscript.sh #monitor sys calls inside a script / builtin commands on bash /etc
strace ./script /etc #same as above along with args to script
grep -i ethernet file #ignore case/capitalization
sudo sysctl -a | grep ip_forward # get config from /proc/sys
## start : check kernel command args put by the grub during booting
cat /proc/cmdline
dmesg | grep -i command
##

#automatic dhcp client services
dhclient
dhcpd
#static config
ifconfig eth0 10.10.2.110 255.255.255.0 10.10.2.255 (opt : broadcast)
#display ip routing table
route
#add a routing entry
route add -net 192.168.1.0 netmask 255.255.255.0 dev wlan0
#add a default gateway
route add default gw 10.10.2.1
#dns config
cat /etc/resolv.conf
#debian package repos
cat /etc/apt/source.list
On Error Resume Next

ReDim args(WScript.Arguments.Count-1)

For i = 0 To WScript.Arguments.Count-1
    If InStr(WScript.Arguments(i), " ") > 0 Then
        args(i) = Chr(34) & WScript.Arguments(i) & Chr(34)
    Else
        args(i) = WScript.Arguments(i)
        End If

Next

CreateObject("WScript.Shell").Run Join(args, " "), 0, False

#
#

 WScript.exe //B "\\Path\To\Launcher.VBS" powershell.exe -ExecutionPolicy ByPass -file "\\Powershell\Script\To\Run"
powercfg /batteryreport /output "C:\battery-report.html" 
security find-generic-password -ga "<SSID>" | grep "password:"
$ docker run --rm -it -p 4566:4566 -p 4571:4571 localstack/localstack
#!/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
brew services restart mongodb/brew/mongodb-community





















adduser USER_NAME
usermod -aG sudo USER_NAME

# Verify new user
grep '^sudo' /etc/group
testing testing 123
mvn -U io.quarkus:quarkus-maven-plugin:create \
        -DprojectGroupId=org.agoncal.quarkus.microservices \
        -DprojectArtifactId=rest-book \
        -DclassName="org.agoncal.quarkus.microservices.book.BookResource" \
        -Dpath="/api/books" \
        -Dextensions="resteasy-jsonb, smallrye-openapi"
    useEffect(() => {
        if(timeRemaining > 0) {
            setTimeout(() => {
                setTimeRemaining(time => time - 1)
            }, 1000)
        }
    }, [timeRemaining])
# Push the commit and update the deployed version on Heroku
git push heroku main

# Open the app in the browser (from terminal)
heroku open

#fetch heroku logs
heroku logs

#specify number of logs
heroku logs -n 200

#find all your fucking heroku deployment errors then cry yourself to sleep
heroku logs --tail

# Open the terminal in the app dyno in Heroku
heroku run bash
 
# Run a file 
node seeds/index.js
//screenshot entire screen, named ‘test.jpg’ in current working Terminal directory
screencapture test.jpg

// change path
screencapture ~/Desktop/screenshot.jpg

// copy to clipboard
screencapture -c

// specify file type
screencapture -t tiff sample.tiff
push esc

then :qw or whatever you want to do 
Ubuntu
	- lsof -i tcp:8003
	- kill -9 PID
    
Windows
	- netstat -a -o -n
	- Cntrl + f
	- taskkill /F /PID PID_of_port
* Start the VM
	- vagrant up
	- vagrant ssh
* Shutdown and remove everything in memory
	- vagrant halt
* Close the VM for later use
	- vagrant suspend
	- vagrant resume
* Changed the homestead.yaml file?
	- vagrant provision
npx degit sveltejs/template my-svelte-project
cd my-svelte-project
npm install
npm run dev
npx gsx-pdf-optimize raw_pdf.pdf optimized_pdf.pdf --dpi=150
git init
git add .
git commit -m "Message"

(Manually create a github repository without a readme file)
git remote add origin https://github.com/hassanms/typescript-practice.git
git branch -M main
git push -u origin main
python@3.8 is keg-only, which means it was not symlinked into /usr/local,
because this is an alternate version of another formula.

If you need to have python@3.8 first in your PATH run:
  echo 'export PATH="/usr/local/opt/python@3.8/bin:$PATH"' >> ~/.zshrc

For compilers to find python@3.8 you may need to set:
  export LDFLAGS="-L/usr/local/opt/python@3.8/lib"

For pkg-config to find python@3.8 you may need to set:
  export PKG_CONFIG_PATH="/usr/local/opt/python@3.8/lib/pkgconfig"

➜  ~ python --version
zsh: command not found: python3.8
➜  ~ vim .zshrc
➜  ~ source .zshrc
➜  ~ echo 'export PATH="/usr/local/opt/python@3.8/bin:$PATH"' >> ~/.zshrc
➜  ~ source .zshrc
cd /path/to/child/directory
cp ./* ../ -R
(REACT JS)
npx create-react-app <app>
-npm run start , build ...
-yarn start , build ...

(REACT NATIVE CLI)
npx react-native init <app>
-npx react-native start
-npx react-native run-android (run_ios)

(REACT NATIVE EXPO CLI)
expo init <app>
-npm start
sudo find /var/www/ -type d -exec chmod 755 {} \;
sudo find /var/www/ -type f -exec chmod 644 {} \;
pip install youtube-dl
youtube-dl --yes-playlist --write-auto-sub https://www.youtube.com/playlist?list=PLJ8cMiYb3G5czofUrrizDiyC_yNLOe_CF
ip addr | grep eth0 | grep inet | awk '{print $2}' | awk -F '/' '{print $1}' | awk '{printf "%s:3000", $0}' | clip.exe
$ git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY
star

Mon Feb 12 2024 09:21:24 GMT+0000 (Coordinated Universal Time)

#commandline
star

Tue Jan 23 2024 13:42:53 GMT+0000 (Coordinated Universal Time)

#commandline #git #pdf
star

Tue Jan 16 2024 10:31:15 GMT+0000 (Coordinated Universal Time) https://pypi.org/project/fpdf2/

#commandline #git #pdf
star

Tue Dec 05 2023 22:21:41 GMT+0000 (Coordinated Universal Time) https://www.online-tech-tips.com/free-software-downloads/combine-text-files/

#commandline
star

Sun Nov 05 2023 16:44:56 GMT+0000 (Coordinated Universal Time)

#mac #terminal #commandline
star

Tue Oct 17 2023 06:10:38 GMT+0000 (Coordinated Universal Time) https://superuser.com/questions/1419625/gitlab-you-cannot-push-commits-for-you-can-only-push-commits-that-were-commit

#commandline #git
star

Tue Oct 03 2023 13:11:12 GMT+0000 (Coordinated Universal Time)

#commandline
star

Tue Oct 03 2023 13:10:13 GMT+0000 (Coordinated Universal Time)

#commandline
star

Thu Aug 31 2023 14:15:13 GMT+0000 (Coordinated Universal Time) https://medium.com/@EvgeniIvanov/how-to-verify-checksum-on-mac-988f166b0c4f

#checksum #commandline #sha-256 #mac
star

Wed Aug 23 2023 15:25:24 GMT+0000 (Coordinated Universal Time) undefined

#commandline
star

Tue Aug 22 2023 18:37:17 GMT+0000 (Coordinated Universal Time)

#python #commandline #conda #virtual #environment
star

Thu Jul 20 2023 08:51:56 GMT+0000 (Coordinated Universal Time)

#commandline
star

Thu Jul 20 2023 08:39:55 GMT+0000 (Coordinated Universal Time)

#commandline
star

Thu Jul 20 2023 08:38:33 GMT+0000 (Coordinated Universal Time)

#commandline
star

Thu Jul 20 2023 08:36:41 GMT+0000 (Coordinated Universal Time)

#commandline
star

Thu Jul 20 2023 08:35:18 GMT+0000 (Coordinated Universal Time)

#commandline
star

Thu Jul 20 2023 07:51:37 GMT+0000 (Coordinated Universal Time)

#commandline
star

Tue Jul 11 2023 22:38:03 GMT+0000 (Coordinated Universal Time) https://3fgrafica.com.ar/

#commandline #html
star

Wed Jun 07 2023 09:28:55 GMT+0000 (Coordinated Universal Time)

#git #rebase #commandline
star

Wed Jun 07 2023 09:26:29 GMT+0000 (Coordinated Universal Time)

#git #merge #rebase #commandline
star

Sat May 06 2023 14:54:55 GMT+0000 (Coordinated Universal Time)

#dbt #commandline
star

Thu Apr 20 2023 08:19:05 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/30069643/remote-monitoring-with-visualvm-and-jmx

#commandline
star

Sat Jan 21 2023 12:21:58 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/27885057/zsh-theme-for-full-path-display-git-changes

#sh #commandline
star

Sat Jan 21 2023 03:10:17 GMT+0000 (Coordinated Universal Time) https://github.com/nvm-sh/nvm#nvmrc

#commandline #nodejs
star

Mon Jan 16 2023 12:30:43 GMT+0000 (Coordinated Universal Time)

#salesforce #commandline
star

Sat Dec 31 2022 14:41:30 GMT+0000 (Coordinated Universal Time) https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli

#commandline
star

Fri Nov 18 2022 03:36:42 GMT+0000 (Coordinated Universal Time) https://apple.stackexchange.com/questions/30238/how-to-enable-os-x-screen-sharing-vnc-through-ssh

#bsh #macos #commandline #vnc #remotemanagement #mac
star

Sat Sep 17 2022 23:49:53 GMT+0000 (Coordinated Universal Time)

#commandline
star

Sat Sep 17 2022 20:13:55 GMT+0000 (Coordinated Universal Time)

#commandline
star

Sat Sep 17 2022 17:19:56 GMT+0000 (Coordinated Universal Time)

#commandline
star

Tue Sep 13 2022 10:17:55 GMT+0000 (Coordinated Universal Time)

#commandline
star

Thu Aug 25 2022 12:21:19 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/50990966/powershell-in-task-manager-shows-window/51007810#51007810

#commandline
star

Thu Aug 18 2022 20:04:53 GMT+0000 (Coordinated Universal Time) https://www.windowscentral.com/how-check-your-laptops-battery-health-windows-10

#commandline
star

Mon Aug 15 2022 18:50:01 GMT+0000 (Coordinated Universal Time) https://osxdaily.com/2015/07/24/find-wi-fi-network-router-password-command-line-mac/

#commandline
star

Sat Jul 16 2022 19:20:26 GMT+0000 (Coordinated Universal Time) https://gist.github.com/berkorbay/6feda478a00b0432d13f1fc0a50467f1

#commandline
star

Thu Jul 07 2022 10:56:49 GMT+0000 (Coordinated Universal Time) https://ineed.coffee/Old+Posts/A+beginner's+tutorial+for+mbpfan+under+Ubuntu

#mbpfan #ubuntu20.04 #commandline #macbookpro #terminal #fanspeed
star

Wed Mar 16 2022 22:05:33 GMT+0000 (Coordinated Universal Time) https://docs.localstack.cloud/get-started/#docker

#commandline
star

Wed Mar 16 2022 12:56:00 GMT+0000 (Coordinated Universal Time) https://askubuntu.com/questions/519/how-do-i-write-a-shell-script-to-install-a-list-of-applications

##terminal #linux #commandline
star

Sat Mar 12 2022 13:58:00 GMT+0000 (Coordinated Universal Time)

#terminal #commandline
star

Thu Mar 03 2022 16:05:26 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/41928729/docker-failed-to-register-layer

#commandline #docker
star

Thu Mar 03 2022 16:05:05 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/41928729/docker-failed-to-register-layer

#commandline #docker
star

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

#linux #commandline #bash
star

Tue Jan 25 2022 12:23:43 GMT+0000 (Coordinated Universal Time)

#commandline
star

Tue Jan 25 2022 12:22:01 GMT+0000 (Coordinated Universal Time)

#commandline
star

Sat Nov 20 2021 03:15:12 GMT+0000 (Coordinated Universal Time)

#commandline #python
star

Tue Nov 02 2021 04:41:46 GMT+0000 (Coordinated Universal Time)

#commandline
star

Tue Aug 03 2021 10:14:19 GMT+0000 (Coordinated Universal Time)

#commandline #java
star

Thu Jul 01 2021 18:54:30 GMT+0000 (Coordinated Universal Time)

#commandline
star

Thu Jul 01 2021 09:18:14 GMT+0000 (Coordinated Universal Time)

#commandline
star

Mon Jun 14 2021 12:11:52 GMT+0000 (Coordinated Universal Time)

#heroku #nodejs #commandline
star

Mon Jun 07 2021 07:00:32 GMT+0000 (Coordinated Universal Time) https://osxdaily.com/2011/08/11/take-screen-shots-terminal-mac-os-x/

#iterm #terminal #commandline #osx
star

Sat May 22 2021 08:35:18 GMT+0000 (Coordinated Universal Time)

#commandline
star

Tue May 04 2021 16:02:42 GMT+0000 (Coordinated Universal Time) https://docs.github.com/en/github/authenticating-to-github/checking-for-existing-ssh-keys

#commandline
star

Wed Apr 28 2021 11:21:00 GMT+0000 (Coordinated Universal Time) https://duvien.com/blog/installing-composer-mac-osx

#larav #commandline
star

Mon Apr 26 2021 03:40:13 GMT+0000 (Coordinated Universal Time)

#angular #commandline
star

Fri Mar 26 2021 08:36:55 GMT+0000 (Coordinated Universal Time)

#commandline
star

Sat Mar 20 2021 06:03:45 GMT+0000 (Coordinated Universal Time)

#commandline #laravel
star

Fri Mar 19 2021 16:25:11 GMT+0000 (Coordinated Universal Time) https://blog.logrocket.com/why-people-arent-switching-to-svelte-yet/

#commandline
star

Wed Mar 17 2021 11:29:19 GMT+0000 (Coordinated Universal Time) https://askubuntu.com/questions/13441/how-to-kill-applications#:~:text=Just%20go%20to%20the%20%22run,and%20it'll%20be%20killed.

#commandline
star

Mon Mar 15 2021 13:40:38 GMT+0000 (Coordinated Universal Time) https://github.com/mattdesl/gsx-pdf-optimize

#nodejs #commandline #npx
star

Wed Mar 10 2021 07:12:49 GMT+0000 (Coordinated Universal Time) https://kbroman.org/github_tutorial/pages/init.html

#commandline
star

Wed Dec 23 2020 16:31:49 GMT+0000 (Coordinated Universal Time)

#terminal #commandline
star

Wed Oct 28 2020 20:32:40 GMT+0000 (Coordinated Universal Time) https://askubuntu.com/questions/1192190/how-can-i-copy-the-contents-of-a-child-folder-to-its-parent-folder-using-command

#commandline
star

Sun Oct 04 2020 00:56:34 GMT+0000 (Coordinated Universal Time)

#commandline
star

Thu May 14 2020 17:25:49 GMT+0000 (Coordinated Universal Time) https://askubuntu.com/questions/722088/reset-default-permissions-for-var-www

#commandline
star

Tue Apr 28 2020 19:57:07 GMT+0000 (Coordinated Universal Time) https://dev.to/lydiahallie/cs-visualized-useful-git-commands-37p1

#commandline
star

Sat Mar 07 2020 21:45:45 GMT+0000 (Coordinated Universal Time) https://dev.to/m0nica/automating-file-creation-with-javascript-8j5

#commandline #javascript #tutorial #react
star

Fri Feb 21 2020 18:02:15 GMT+0000 (Coordinated Universal Time)

#python #commandline
star

Sun Jan 12 2020 17:26:19 GMT+0000 (Coordinated Universal Time)

#commandline #git
star

Fri Dec 27 2019 13:19:35 GMT+0000 (Coordinated Universal Time) https://dev.to/codeluggage/today-i-wrote-a-handy-little-snippet-to-easily-access-ubuntu-from-windows-in-wsl2-19l

#commandline #interesting #windows #ubuntu #linux
star

Wed Dec 25 2019 18:55:34 GMT+0000 (Coordinated Universal Time) https://help.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository

#commandline #git #github #howto
star

https://medium.com/@thiscodeworks.com/how-to-redirect-your-node-js-app-hosted-on-heroku-from-http-to-https-50ef80130bff

#javascript #nodejs #commandline

Save snippets that work with our extensions

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