This file contains hidden or 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
// | |
// HeroView.swift | |
// Roku Clone | |
// | |
// Created by Edward Jimenez on 3/19/23. | |
// | |
import SwiftUI | |
struct HeroView: View { |
This file contains hidden or 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 | |
/* | |
Print the last 4 charactrs of a credit card number replacing the first 12 characters with asterisks | |
using the PHP substr_replace function | |
*/ |
This file contains hidden or 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 | |
/* | |
Checking if an email address contains the '@' symbol | |
using the PHP strpos function | |
*/ |
This file contains hidden or 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 | |
/* | |
In your functions.php file on the child theme, enter the following code | |
*/ | |
function prefix_theme_enqueue_styles() { | |
$parent_style = 'parent-style'; // style.css of the parent theme | |
wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' ); | |
wp_enqueue_style( 'child-style', |
This file contains hidden or 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
# BEGIN WordPress | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^index\.php$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule . /index.php [L] | |
</IfModule> |
This file contains hidden or 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
/* | |
Add the following to the .htaccess file to enable gzip compression | |
*/ | |
<IfModule mod_deflate.c> | |
# Compress HTML, CSS, JavaScript, Text, XML and fonts | |
AddOutputFilterByType DEFLATE application/javascript | |
AddOutputFilterByType DEFLATE application/rss+xml | |
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject | |
AddOutputFilterByType DEFLATE application/x-font | |
AddOutputFilterByType DEFLATE application/x-font-opentype |
This file contains hidden or 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
/* | |
Put the following function in your functions.php file to remove the query strings from css and javascript files | |
*/ | |
function prefix_remove_script_and_style_version( $src ){ | |
$ver = explode( '?ver', $src ); | |
return $ver[0]; | |
} | |
add_filter( 'script_loader_src', 'prefix_remove_script_and_style_version', 15, 1 ); | |
add_filter( 'style_loader_src', 'prefix_remove_script_and_style_version', 15, 1 ); |
This file contains hidden or 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 | |
/* | |
Add this function to your fuctions.php to | |
version your style.css. Make sure to | |
define a constant to hold your CSS version. | |
*/ | |
define( 'OUR_APP_VERSION', '2.0' ); | |
function prefix_default_style( $styles ) { | |
/* Use our default version style */ |
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en-US" > | |
<head> | |
<meta http-equiv="Content-Type" content="text/html" charset="utf-8" /> | |
<meta name="author" content="Edward Jimenez"> | |
<meta name="description" content="Site Description"> | |
<!-- CSS stylesheets --> | |
<link rel="stylesheet" tye="text/css" href="style.css" > |
This file contains hidden or 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
# Expires Caching Start # | |
<IfModule mod_expires.c> | |
ExpiresActive On | |
ExpiresByType text/css "access 8 days" | |
ExpiresByType text/html "access 8 days" | |
ExpiresByType image/gif "access 8 days" | |
ExpiresByType image/png "access 8 days" | |
ExpiresByType image/jpg "access 8 days" | |
ExpiresByType image/jpeg "access 8 days" | |
ExpiresByType image/x-icon "access 8 days" |
NewerOlder