Snippets Collections
ffmpeg -i video \
       -vf "select='between(t,4,6.5)+between(t,17,26)+between(t,74,91)',
            setpts=N/FRAME_RATE/TB" \
       -af "aselect='between(t,4,6.5)+between(t,17,26)+between(t,74,91)',
            asetpts=N/SR/TB" out.mp4
        ffmpeg -i C.mp4 -af volume=20dB -c:v libx265 C_high_volume.mp4

$ pipreqs /home/project/location
Successfully saved requirements file in /home/project/location/requirements.txt
setarch i686 ./configure --add-module=$HOME/ngx_pagespeed-release-${NPS_VERSION}
PS_NGX_EXTRA_FLAGS="--with-cc=/opt/rh/devtoolset-2/root/usr/bin/gcc"
sudo rpm --import http://linuxsoft.cern.ch/cern/slc6X/i386/RPM-GPG-KEY-cern
sudo wget -O /etc/yum.repos.d/slc6-devtoolset.repo http://linuxsoft.cern.ch/cern/devtoolset/slc6-devtoolset.repo
sudo yum install devtoolset-2-gcc-c++ devtoolset-2-binutils
PS_NGX_EXTRA_FLAGS="--with-cc=/opt/rh/devtoolset-2/root/usr/bin/gcc"
sudo wget http://linuxsoft.cern.ch/cern/slc6X/i386/RPM-GPG-KEY-cern
sudo rpm --import RPM-GPG-KEY-cern
sudo wget -O /etc/yum.repos.d/slc5-devtoolset.repo http://linuxsoft.cern.ch/cern/devtoolset/slc5-devtoolset.repo
sudo yum install devtoolset-2-gcc-c++ devtoolset-2-binutils
PS_NGX_EXTRA_FLAGS="--with-cc=/usr/lib/gcc-mozilla/bin/gcc  --with-ld-opt=-static-libstdc++"
sudo apt-get install gcc-mozilla
sudo apt-get install build-essential zlib1g-dev libpcre3 libpcre3-dev unzip uuid-dev
sudo yum install gcc-c++ pcre-devel zlib-devel make unzip libuuid-devel
bash <(curl -f -L -sS https://ngxpagespeed.com/install) --help
bash <(curl -f -L -sS https://ngxpagespeed.com/install) \
     --nginx-version latest
setarch i686 ./configure --add-module=$HOME/ngx_pagespeed-release-${NPS_VERSION}
PS_NGX_EXTRA_FLAGS="--with-cc=/opt/rh/devtoolset-2/root/usr/bin/gcc"
sudo rpm --import http://linuxsoft.cern.ch/cern/slc6X/i386/RPM-GPG-KEY-cern
sudo wget -O /etc/yum.repos.d/slc6-devtoolset.repo http://linuxsoft.cern.ch/cern/devtoolset/slc6-devtoolset.repo
sudo yum install devtoolset-2-gcc-c++ devtoolset-2-binutils
PS_NGX_EXTRA_FLAGS="--with-cc=/opt/rh/devtoolset-2/root/usr/bin/gcc"
sudo wget http://linuxsoft.cern.ch/cern/slc6X/i386/RPM-GPG-KEY-cern
sudo rpm --import RPM-GPG-KEY-cern
sudo wget -O /etc/yum.repos.d/slc5-devtoolset.repo http://linuxsoft.cern.ch/cern/devtoolset/slc5-devtoolset.repo
sudo yum install devtoolset-2-gcc-c++ devtoolset-2-binutils
PS_NGX_EXTRA_FLAGS="--with-cc=/usr/lib/gcc-mozilla/bin/gcc  --with-ld-opt=-static-libstdc++"
sudo apt-get install gcc-mozilla
sudo apt-get install build-essential zlib1g-dev libpcre3 libpcre3-dev unzip uuid-dev
sudo yum install gcc-c++ pcre-devel zlib-devel make unzip libuuid-devel
bash <(curl -f -L -sS https://ngxpagespeed.com/install) \
     --nginx-version latest
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
printf "%s\n%s\nus-east-1\njson" "$KEY_ID" "$SECRET_KEY" | aws configure --profile my-profile
➜ cat ~/.aws/config
[profile_1]
output = json
region = eu-west-1
[profile_2]
output = json
region = eu-west-1

➜ cat ~/.aws/credentials
[profile_1]
aws_access_key_id =
aws_secret_access_key =
[profile_2]
aws_access_key_id =
aws_secret_access_key = 
➜ cat ~/.aws/config
[profile_1]
output = json
region = eu-west-1
[profile_2]
output = json
region = eu-west-1

➜ cat ~/.aws/credentials
[profile_1]
aws_access_key_id =
aws_secret_access_key =
[profile_2]
aws_access_key_id =
aws_secret_access_key = 
for repo in $(curl -s --header "PRIVATE-TOKEN: your_private_token" "https://<your-host>/api/v4/groups/<group_id>" | jq ".projects[].ssh_url_to_repo" | tr -d '"'); do git clone $repo; done;
#!/usr/bin/env sh

which() {
    local path

    if [ $# -gt 0 ]; then
        for path in $(IFS=: && echo ${PATH}); do
            [ -x "${path}/${1}" ] && echo -n "${path}/${1}" && return 0
        done

        return 1
    else
        echo >&2 "Usage: which COMMAND"
        echo >&2 "Writes the full path of COMMAND to standard output"

        return 255
    fi
}
#!/usr/bin/env sh

__git_ps1() {
    git rev-parse --abbrev-ref HEAD 2>/dev/null | tr -d '\n'
}
#!/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
powershell -Command "Start-Process cmd -Verb RunAs -ArgumentList '/c cd /d %CD% && %*'"
@echo on
printf "\n>name\naagg" >> temp.fa
git branch | grep -v "master" | xargs git branch -D
Explanation:

🛒 Get all branches (except for the master) via git branch | grep -v "master" command
👇 Select every branch with xargs command
💦 Delete branch with xargs git branch -D
# For brews
$ brew info --json $(brew list) | jq -r '.[] | select(.caveats != null) | "\n\nName: \(.name)\nCaveats: \(.caveats)"'

# For casks
$ brew cask --json=v1 info $(brew cask list) | jq -r '.[] | select(.caveats != null) | "\n\nName: \(.name)\nCaveats: \(.caveats)"'
#!/bin/bash

PBTEMP=$(mktemp -t pbtemp)
pbpaste > $PBTEMP
nano -t $PBTEMP
source $PBTEMP
rm $PBTEMP
#!/bin/bash

read -p "Are you sure you wish to execute \`$(pbpaste)\`? (Y/n) "    
[[ $REPLY =~ ^[Yy]?$  ]] && pbpaste | bash
star

Thu Oct 27 2022 19:35:55 GMT+0000 (UTC) https://developers.cloudflare.com/workers/wrangler/get-started/

#sh
star

Wed Oct 26 2022 14:10:07 GMT+0000 (UTC) https://stackoverflow.com/questions/50594412/cut-multiple-parts-of-a-video-with-ffmpeg

#sh #ffmpeg
star

Fri Oct 21 2022 10:20:05 GMT+0000 (UTC) https://stackoverflow.com/questions/71186040/ffmpeg-how-to-increase-the-volume-of-copied-audio

#sh
star

Wed Aug 03 2022 18:12:57 GMT+0000 (UTC) https://stackoverflow.com/questions/69525472/how-to-check-if-all-packages-listed-in-requirements-txt-file-are-used-in-python

#sh
star

Thu Mar 17 2022 00:55:15 GMT+0000 (UTC) https://www.modpagespeed.com/doc/build_ngx_pagespeed_from_source

#sh
star

Thu Mar 17 2022 00:55:00 GMT+0000 (UTC) https://www.modpagespeed.com/doc/build_ngx_pagespeed_from_source

#sh
star

Thu Mar 17 2022 00:54:58 GMT+0000 (UTC) https://www.modpagespeed.com/doc/build_ngx_pagespeed_from_source

#sh
star

Thu Mar 17 2022 00:54:56 GMT+0000 (UTC) https://www.modpagespeed.com/doc/build_ngx_pagespeed_from_source

#sh
star

Thu Mar 17 2022 00:54:54 GMT+0000 (UTC) https://www.modpagespeed.com/doc/build_ngx_pagespeed_from_source

#sh
star

Thu Mar 17 2022 00:54:52 GMT+0000 (UTC) https://www.modpagespeed.com/doc/build_ngx_pagespeed_from_source

#sh
star

Thu Mar 17 2022 00:54:50 GMT+0000 (UTC) https://www.modpagespeed.com/doc/build_ngx_pagespeed_from_source

#sh
star

Thu Mar 17 2022 00:54:48 GMT+0000 (UTC) https://www.modpagespeed.com/doc/build_ngx_pagespeed_from_source

#sh
star

Thu Mar 17 2022 00:54:46 GMT+0000 (UTC) https://www.modpagespeed.com/doc/build_ngx_pagespeed_from_source

#sh
star

Thu Mar 17 2022 00:54:44 GMT+0000 (UTC) https://www.modpagespeed.com/doc/build_ngx_pagespeed_from_source

#sh
star

Thu Mar 17 2022 00:54:42 GMT+0000 (UTC) https://www.modpagespeed.com/doc/build_ngx_pagespeed_from_source

#sh
star

Thu Mar 17 2022 00:41:18 GMT+0000 (UTC) https://www.modpagespeed.com/doc/build_ngx_pagespeed_from_source

#sh
star

Thu Mar 17 2022 00:41:06 GMT+0000 (UTC) https://www.modpagespeed.com/doc/build_ngx_pagespeed_from_source

#sh
star

Thu Mar 17 2022 00:41:03 GMT+0000 (UTC) https://www.modpagespeed.com/doc/build_ngx_pagespeed_from_source

#sh
star

Thu Mar 17 2022 00:41:01 GMT+0000 (UTC) https://www.modpagespeed.com/doc/build_ngx_pagespeed_from_source

#sh
star

Thu Mar 17 2022 00:40:58 GMT+0000 (UTC) https://www.modpagespeed.com/doc/build_ngx_pagespeed_from_source

#sh
star

Thu Mar 17 2022 00:40:55 GMT+0000 (UTC) https://www.modpagespeed.com/doc/build_ngx_pagespeed_from_source

#sh
star

Thu Mar 17 2022 00:40:53 GMT+0000 (UTC) https://www.modpagespeed.com/doc/build_ngx_pagespeed_from_source

#sh
star

Thu Mar 17 2022 00:40:50 GMT+0000 (UTC) https://www.modpagespeed.com/doc/build_ngx_pagespeed_from_source

#sh
star

Thu Mar 17 2022 00:40:47 GMT+0000 (UTC) https://www.modpagespeed.com/doc/build_ngx_pagespeed_from_source

#sh
star

Thu Mar 17 2022 00:39:42 GMT+0000 (UTC) https://www.modpagespeed.com/doc/build_ngx_pagespeed_from_source

#sh
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

Tue Feb 08 2022 12:31:59 GMT+0000 (UTC) https://stackoverflow.com/questions/34839449/aws-configure-bash-one-liner/34844267

#sh
star

Tue Feb 08 2022 12:31:53 GMT+0000 (UTC) https://stackoverflow.com/questions/34839449/aws-configure-bash-one-liner/34844267

#sh
star

Tue Feb 08 2022 12:31:24 GMT+0000 (UTC) https://stackoverflow.com/questions/34839449/aws-configure-bash-one-liner/34844267

#sh
star

Sat Jan 22 2022 04:57:08 GMT+0000 (UTC) https://stackoverflow.com/questions/64963796/create-react-app-is-not-working-since-version-4-0-1

#sh
star

Fri Jan 14 2022 07:36:23 GMT+0000 (UTC) https://stackoverflow.com/questions/29099456/how-to-clone-all-projects-of-a-group-at-once-in-gitlab

#sh #git
star

Sat Jan 08 2022 07:33:03 GMT+0000 (UTC) https://gist.github.com/juliyvchirkov/d2c7ff01846157f58b1fc1f3a3b1e36c

#shell #sh #which
star

Sat Jan 08 2022 06:27:13 GMT+0000 (UTC) https://gist.github.com/juliyvchirkov/883a050c34e23f4b4fba6ecaeb050c3b

#sh #git #ps1 #shell
star

Thu Dec 09 2021 20:15:48 GMT+0000 (UTC) https://stackoverflow.com/questions/57110542/how-to-write-a-nvmrc-file-which-automatically-change-node-version

#sh
star

Wed Nov 17 2021 09:57:14 GMT+0000 (UTC) https://stackoverflow.com/questions/38882654/docker-entrypoint-running-bash-script-gets-permission-denied/38882798

#sh
star

Thu Nov 11 2021 02:47:56 GMT+0000 (UTC) https://stackoverflow.com/questions/835501/how-do-you-stash-an-untracked-file

#sh
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

Tue Aug 03 2021 04:10:33 GMT+0000 (UTC) https://stackoverflow.com/questions/59895/how-can-i-get-the-source-directory-of-a-bash-script-from-within-the-script-itsel?noredirect

#sh
star

Wed Jun 02 2021 15:33:20 GMT+0000 (UTC) https://stackoverflow.com/questions/9652720/how-to-run-sudo-command-in-windows/55643173#55643173

#sh
star

Sat May 29 2021 21:03:45 GMT+0000 (UTC) https://stackoverflow.com/questions/2518127/how-to-reload-bashrc-settings-without-logging-out-and-back-in-again

#sh
star

Fri May 21 2021 20:37:55 GMT+0000 (UTC)

#sh
star

Fri Feb 12 2021 22:18:32 GMT+0000 (UTC) https://stackoverflow.com/questions/10610327/delete-all-local-git-branches

#sh
star

Wed Feb 03 2021 09:56:26 GMT+0000 (UTC) https://stackoverflow.com/questions/13333585/how-do-i-replay-the-caveats-section-from-a-homebrew-recipe/13333858

#sh
star

Fri Dec 04 2020 04:55:38 GMT+0000 (UTC) https://apple.stackexchange.com/questions/72182/is-there-a-way-to-make-pasting-into-terminal-safe?rq

#sh
star

Fri Dec 04 2020 04:55:33 GMT+0000 (UTC) https://apple.stackexchange.com/questions/72182/is-there-a-way-to-make-pasting-into-terminal-safe?rq

#sh
star

Fri Aug 14 2020 01:34:38 GMT+0000 (UTC) https://stackoverflow.com/questions/34796888/how-to-open-google-chrome-from-terminal

#sh

Save snippets that work with our extensions

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