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
var navIsSticky = false, | |
stickyNavOffset = 50; | |
$(window).scroll(function() { | |
if (!navIsSticky && $(window).scrollTop() >= stickyNavOffset) { | |
$('.nav').addClass('nav--sticky'); | |
navIsSticky = true; | |
} else if (navIsSticky && $(window).scrollTop() < stickyNavOffset) { | |
$('.nav').removeClass('nav--sticky'); | |
navIsSticky = false; | |
} |
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> | |
<head> | |
<title>Site Maintenance</title> | |
<style type="text/css"> | |
body { text-align: center; padding: 150px; } | |
h1 { font-size: 50px; } | |
body { font: 20px Helvetica, sans-serif; color: #333; } | |
article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
a { color: #dc8100; text-decoration: none; } |
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
# Maintenance page | |
RewriteCond %{REMOTE_ADDR} !^000\.000\.000\.000 | |
RewriteCond %{REQUEST_URI} !^/maintenance\.php$ | |
RewriteCond %{REQUEST_URI} !^/company-logo.png$ | |
RewriteRule ^(.*)$ https://www.domain.com/maintenance.php [R=307,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
$(window).resize(function() { | |
if (this.resizeTo) clearTimeout(this.resizeTo); | |
this.resizeTo = setTimeout(function() { | |
$(this).trigger('resizeEvent'); | |
}, 500); | |
}); | |
$(window).bind('resizeEvent', function() { | |
// Rezize events | |
}); |
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
RewriteRule ^/?test/.* /my-static-content/test.html [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
for file in $(find public_html/ -name error_log); do cat $file >> ~/error_logs; done |
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
# Unlink your existing php installation | |
brew unlink php55 | |
# Install the version you need | |
brew install php56 | |
# Check for errors | |
# If you get: "Error: Directory not empty - /usr/local/opt/php56" | |
# Simply remove the directory with | |
sudo rm -rf /usr/local/opt/php56 |
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 | |
require_once '../../../../wp-load.php'; | |
$page = 0; | |
do { | |
$news = get_posts( [ | |
'posts_per_page' => 50, | |
'paged' => $page |
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 | |
class Strings | |
{ | |
/** | |
* Generate a secure random string | |
* | |
* @param $length | |
* @param string $characters | |
* @param string $encoding |
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
du -hcs ./*/ |
OlderNewer