You know how, in JavaScript, we can set a value to a variable if one doesn't, like this:
name = name || 'joe';
This is quite common and very helpful. Another option is to do:
name || (name = 'joe');
#!/bin/bash | |
# selects an android device | |
PROGNAME=$(basename $0) | |
UNAME=$(uname) | |
DEVICE_OPT= | |
for opt in "$@" | |
do | |
case "$opt" in |
#!/usr/bin/env bash | |
magick convert *.jpg -set filename:basename "%[basename]" "%[filename:basename].png" |
#!/usr/bin/env bash | |
sqllocation=~/.sql_backup_files | |
# echo $(wp --version) | |
wp --version >/dev/null 2>&1 || { | |
echo "I need 'wp' command to be able to execute further" | |
exit 1 | |
} | |
# Check if it is a wordpress directory or is installed |
#!/bin/bash | |
# Setup Variables | |
DBNAME=dbname | |
DBUSER=dbuser | |
DBPASS=dbpass | |
DBHOST=localhost | |
DBPREFIX=oxo_ | |
URL=http:// |
You know how, in JavaScript, we can set a value to a variable if one doesn't, like this:
name = name || 'joe';
This is quite common and very helpful. Another option is to do:
name || (name = 'joe');
#!/bin/bash | |
# Setup Variables | |
DBNAME=database_name | |
DBUSER=database_user | |
DBPASS=database_password | |
#DBHOST=localhost | |
#DBPREFIX=gits_ | |
URL=domain_name |
<?php | |
/* | |
* Converts CSV to JSON | |
* Example uses Google Spreadsheet CSV feed | |
* csvToArray function I think I found on php.net | |
*/ | |
header('Content-type: application/json'); | |
// Set your CSV feed |
This script fetches all of the files from the currently deployed version of a Firebase Hosting site. You must be signed in via the Firebase CLI and have "Site Viewer" permission on the site in question to be able to properly run the script.
npx https://gist.github.com/mbleigh/9c8680cf319ace2f506f57380da66e7d <site_name>
{ | |
"info": { | |
"name": "BDWebs WHMCS", | |
"version": "1.0.0", | |
"download_link": "https://github.com/appsforbd/bdwebs-whmcs-monitoring/releases/latest" | |
}, | |
"links": [ | |
{ | |
"title": "BDWebs.com", | |
"link": "https://www.bdwebs.com/" |