Loading...
More Shell Posts
CLIENT_VPN_ID="cvpn-endpoint-xxxxxxxxxxxx"for region in $(aws ec2 describe-regions --query "Regions[].RegionName" --output text); doecho "Searching in region: $region"aws ec2 describe-client-vpn-endpoints --region $region --query "ClientVpnEndpoints[?ClientVpnEndpointId=='$CLIENT_VPN_ID']" --output tabledone
name="John"echo ${name}echo ${name/J/j} #=> "john" (substitution)echo ${name:0:2} #=> "Jo" (slicing)echo ${name::2} #=> "Jo" (slicing)echo ${name::-1} #=> "Joh" (slicing)echo ${name:(-1)} #=> "n" (slicing from right)echo ${name:(-2):1} #=> "h" (slicing from right)echo ${food:-Cake} #=> $food or "Cake"
// check versionnode -v || node --version// list installed versions of node (via nvm)nvm ls// install specific version of nodenvm install 6.9.2// set default version of nodenvm alias default 6.9.2// switch version of nodenvm use 6.9.1
# Run "test" script on all packagesnpm run test --workspaces# Tip - this also works:npm run test -ws----------------------------------------------------# Runs "test" only on package-anpm run test --workspace package-a# Tip - this also works:npm run test -w package-a----------------------------------------------------# Install `lodash` on `package-a`npm install lodash --workspace package-a# Install `tap` on `package-b` as a dev dependencynpm install tap --workspace package-b --save-dev# Install `package-a` on `package-b`npm install package-a --workspace package-b# Install `eslint` in all packagesnpm install eslint --workspaces
echo -e ${PATH//:/\\n} | awk '{print length, $0}' | sort -n | cut -f2- -d' '
#for ssh abuse attemptsaction = %(action_)s%(action_abuseipdb)s[abuseipdb_apikey="", abuseipdb_category="18,22"]actionban = curl --fail --ciphers ecdhe_ecdsa_aes_256_sha --data 'key=<abuseipdb_apikey>' --data-urlencode 'comment=<matches>' --data 'ip=<ip>' --data 'category=<abuseipdb_category>' "https://www.abuseipdb.com/report/json"