start new:
tmux
start new with session name:
tmux new -s myname
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |
############################################################################### | |
## ## | |
## GIT IGNORE FOR WORDPRESS SITES ## | |
## ------------------------------ ## | |
## By: BigWilliam <[email protected]> ## | |
## Last Modified: 2016-06-16 ## | |
## ## | |
## License: MIT - aka you can use/modify this how you want :) ## | |
## ## | |
############################################################################### |
<?php if (($wp_query->current_post +1) == ($wp_query->post_count)) { | |
echo 'This is the last post'; | |
} ?> | |
<?php if (($wp_query->current_post +1) != ($wp_query->post_count)) { | |
echo 'This is the not the last post'; | |
} ?> |
mix3d asked for some help using this guide with windows so here we go. This was tested with Windows 10. Run all commands in Git Bash once it's installed.
Github will be the main account and bitbucket the secondary.
# ----------------------------------------------------------------- | |
# .gitignore | |
# Bare Minimum Git | |
# https://salferrarello.com/starter-gitignore-file/ | |
# ver 20221125 | |
# | |
# From the root of your project run | |
# curl -O https://gist.githubusercontent.com/salcode/10017553/raw/.gitignore | |
# to download this file | |
# |
# ----------------------------------------------------------------- | |
# .gitignore for WordPress @salcode | |
# ver 20180808 | |
# | |
# From the root of your project run | |
# curl -O https://gist.githubusercontent.com/salcode/b515f520d3f8207ecd04/raw/.gitignore | |
# to download this file | |
# | |
# By default all files are ignored. You'll need to whitelist | |
# any mu-plugins, plugins, or themes you want to include in the repo. |
<!-- http://mike.eire.ca/2010/02/25/easy-svg-grid/ --> | |
<!-- "I needed a grid in the background while I was debugging an SVG image I was creating, something like Photoshop’s transparency grid. Here’s what I did." --> | |
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="200" height="400"> | |
<defs> | |
<pattern id="grid" width="20" height="20" patternUnits="userSpaceOnUse"> | |
<rect fill="black" x="0" y="0" width="10" height="10" opacity="0.1"/> | |
<rect fill="white" x="10" y="0" width="10" height="10"/> | |
<rect fill="black" x="10" y="10" width="10" height="10" opacity="0.1"/> | |
<rect fill="white" x="0" y="10" width="10" height="10"/> |
#/bin/bash | |
REMOTE_URL="https://staging.example.com" | |
LOCAL_URL="http://example.dev" | |
REMOTE_PATH="/home/staging_example/public_html" | |
LOCAL_PATH="/var/www/example.dev" | |
SSH_HOST="[email protected]" |