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
/* iPhone 6 landscape */ | |
@media only screen and (min-device-width: 375px) | |
and (max-device-width: 667px) | |
and (orientation: landscape) | |
and (-webkit-min-device-pixel-ratio: 2) | |
{ } | |
/* iPhone 6 portrait */ | |
@media only screen | |
and (min-device-width: 375px) |
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
server { | |
listen 80; | |
server_name localhost; | |
root /Users/YOUR_USERNAME/Sites; | |
access_log /Library/Logs/default.access.log main; | |
location / { | |
include /usr/local/etc/nginx/conf.d/php-fpm; | |
} |
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 | |
//This is a filter to change the default validation message that Gravity Forms generates | |
add_filter('gform_validation_message', 'change_validation_message', 10, 2); | |
function change_validation_message($message, $form) | |
{ | |
return "<div class='validation_error'><strong>Oops!</strong> Looks like there’s something wrong. Please review the form above.</div>"; | |
} | |
// Often forms in Gravity Forms to need to start with default values and we need to check the form in case the user hasn't entered new data and give them a validation message back |
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 | |
//This is a filter to change the default validation message that Gravity Forms generates | |
add_filter('gform_validation_message', 'change_validation_message', 10, 2); | |
function change_validation_message($message, $form) | |
{ | |
return "<div class='validation_error'><strong>Oops!</strong> Looks like there’s something wrong. Please review the form above.</div>"; | |
} | |
// Often forms in Gravity Forms to need to start with default values and we need to check the form in case the user hasn't entered new data and give them a validation message back |
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
/************************************************ | |
Stylesheet: Media Queries | |
*************************************************/ | |
// Media Queries | |
$screen: "only screen" !default; | |
$breakpoints: ( | |
small: 480px, | |
medium: 640px, | |
large: 1024px, | |
xlarge: 1200px, |
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 | |
/** | |
* Update a specific site from 'http://' to 'https://'. | |
* | |
* Only touches the 'home' and 'siteurl' options. | |
* Depending on plugins, etc., you may need to update other options too. | |
* | |
* Run on WordPress multisite with: | |
* | |
* wp site list --field=url | xargs -I % wp eval-file http-to-https.php --url=% |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> | |
<title>Site Title</title> | |
<link rel="stylesheet" href="/assets/css/style.min.css"> |
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
# This file is: ~/.ssh/config | |
# You may have other (non-CodeCommit) SSH credentials stored in this | |
# config file – in addition to the CodeCommit settings shown below. | |
# NOTE: Make sure to run [ chmod 600 ~/.ssh/config ] after creating this file! | |
# Credentials for Account1 | |
Host awscc-account1 # 'awscc-account1' is a name you pick | |
Hostname git-codecommit.us-east-1.amazonaws.com # This points to CodeCommit in the 'US East' region |
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
/** | |
* Register hero block | |
*/ | |
add_action('acf/init', 'hero'); | |
function hero() { | |
// check function exists | |
if( function_exists('acf_register_block') ) { | |
// register a hero block |
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
# Sample Nginx config with sane caching settings for modern web development | |
# | |
# Motivation: | |
# Modern web development often happens with developer tools open, e. g. the Chrome Dev Tools. | |
# These tools automatically deactivate all sorts of caching for you, so you always have a fresh | |
# and juicy version of your assets available. | |
# At some point, however, you want to show your work to testers, your boss or your client. | |
# After you implemented and deployed their feedback, they reload the testing page – and report | |
# the exact same issues as before! What happened? Of course, they did not have developer tools | |
# open, and of course, they did not empty their caches before navigating to your site. |
OlderNewer