This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Configuration. | |
/.htaccess | |
/.htaccess_lscachebak_* | |
/wp-config.php | |
/sitemap.xml | |
/sitemap.xml.gz | |
# Files in the root. | |
*.jpg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<system.webServer> | |
<rewrite> | |
<rules> | |
<rule name="Root Hit Redirect" stopProcessing="true"> | |
<match url="^$" /> | |
<action type="Redirect" url="/redirect-for-root" /> | |
</rule> | |
</rules> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ignore directories generated by Composer | |
/drush/contrib/ | |
/vendor/ | |
/web/core/ | |
/web/modules/contrib/ | |
/web/themes/contrib/ | |
/web/profiles/contrib/ | |
/web/libraries/ | |
# Ignore sensitive information |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AL|Alabama | |
AK|Alaska | |
AZ|Arizona | |
AR|Arkansas | |
CA|California | |
CO|Colorado | |
CT|Connecticut | |
DE|Delaware | |
DC|District Of Columbia | |
FL|Florida |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func DirExists(path string) (bool, error) { | |
_, err := os.Stat(path) | |
if err == nil { | |
return true, nil | |
} else if os.IsNotExist(err) { | |
return false, nil | |
} | |
return false, err | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a new note. | |
new_daily_note() { | |
cd ~/Documents/DailyNotes | |
currentDate=$(date '+%Y-%m-%d') | |
currentTime=$(date '+%H:%M') | |
fileName="${currentDate}.todo" | |
if [ -f "$fileName" ]; then | |
echo "Daily note file ($fileName) already exists." | |
else | |
cp _new.todo $fileName |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ignore custom settings. | |
sites/default/settings.local.php | |
# phpStorm settings. | |
/.idea/ | |
# Ignore paths that contain user-generated content. | |
/sites/*/files | |
/sites/*/private | |
/files/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run the updates. | |
alias update="sudo -- sh -c 'apt-get update; apt-get upgrade -y --allow-unauthenticated; apt-get dist-upgrade -y --allow-unauthenticated; apt-get autoremov$ | |
# Colors! | |
if [ "$TERM" != "dumb" ]; then | |
[ -e "$HOME/.dir_colors" ] && | |
DIR_COLORS="$HOME/.dir_colors" [ -e "$DIR_COLORS" ] || | |
DIR_COLORS="" | |
eval "`dircolors -b $DIR_COLORS`" | |
alias ls='ls --color=auto' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Non-existing URLs that are usually visited by bots. We will issue a server | |
# redirect to 404.html to avoid any overhead caused by bots trying to break into | |
# the site. | |
# | |
# WordPress folders. | |
RedirectMatch 301 /wp-admin /404.html | |
RedirectMatch 301 /wp-content /404.html | |
RedirectMatch 301 /wp-includes /404.html | |
# WordPress files. | |
RedirectMatch 301 /wp-cron.php /404.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global $user; | |
$order = commerce_cart_order_load($user->uid); | |
commerce_cart_order_empty($order); |
NewerOlder