##Sass Functions Cheat Sheet
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
@mixin borderTrianlge($direction, $size, $color) | |
{ | |
$trans: $size solid transparent; | |
$color: $size solid $color; | |
width: 0; | |
height: 0; | |
@if $direction==up or $direction==down | |
{ | |
border-left: $trans; | |
border-right: $trans; |
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
# Enable Compression | |
<ifmodule mod_deflate.c> | |
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript | |
</ifmodule> | |
# END GZIP | |
## EXPIRES CACHING ## | |
<IfModule mod_expires.c> | |
ExpiresActive On | |
ExpiresByType image/jpg "access plus 1 year" |
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
#Force HTTPS | |
RewriteEngine On | |
RewriteCond %{HTTPS} off | |
RewriteRule (.*) https://domain.com%{REQUEST_URI} [R=301,L] | |
#NEW | |
########## | |
RewriteEngine On | |
RewriteCond %{HTTPS} off | |
RewriteRule ^(.*)$ https://gilpinezo.com/$1 [R=301,L] |
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
<link rel="canonical" href="https://domain.com/"> |
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
#Gets files from past day and zips them in tar file. | |
find . -mtime -1 | xargs tar --no-recursion -czf myfile.tgz | |
#Update | |
find . -type f -mtime -30 -print | xargs tar -czf changed.tar.gz |
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
<?php | |
$args = array( | |
'child_of' => 6, | |
'post_type' => 'attachment' | |
); | |
$categories = get_categories( $args ); | |
foreach($categories as $category) { | |
echo '<h2>'.$category->name.'</h2>'; |
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
php wp-cli.phar media import wp-content/uploads/**/**/*.* --preserve-filetime |
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
rsync --dry-run -avz -e 'ssh -p {PORT}' username@domain.com:/home/username/public_html/ ./public_html/ --exclude 'wp-config.php' --exclude '.*' --exclude 'cgi-bin' --exclude 'error_log' |
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
RewriteEngine On | |
RewriteCond %{SERVER_PORT} 80 | |
RewriteRule ^(.*)$ https://www.domain.com/$1 [R=301,L,NE] | |
# Redirect this entire domain, abc.com, to the domain xyz.com | |
RedirectMatch 301 ^(.*)$ http://www.xyz.com |
OlderNewer