server – N77 Design | NickClaeboe.com https://www.nickclaeboe.com Atlanta Web, Graphic & Flyer Design • Design Portfolio & Rates for Nick Claeboe Custom Design Work Thu, 10 Jun 2021 12:29:15 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.5 https://www.nickclaeboe.com/wp-content/uploads/2016/05/favicon-60x60.png server – N77 Design | NickClaeboe.com https://www.nickclaeboe.com 32 32 Bitnami: Start or stop services https://www.nickclaeboe.com/2021/03/03/start-or-stop-services/ Wed, 03 Mar 2021 13:29:47 +0000 http://www.nickclaeboe.com/?p=8899

Each Bitnami stack includes a control script that lets you easily stop, start and restart services. I had to save this for myself as I use these commands DAILY!

Hope this helps others as much as it does me.

Obtain the status of a service:

sudo /opt/bitnami/ctlscript.sh status

Call it without any service name arguments to start all services:

sudo /opt/bitnami/ctlscript.sh start

Or use it to restart a single service, such as Apache only, by passing the service name as argument:

sudo /opt/bitnami/ctlscript.sh restart apache

Use this script to stop all services:

sudo /opt/bitnami/ctlscript.sh stop

Restart the services by running the script without any arguments:

sudo /opt/bitnami/ctlscript.sh restart
]]>
Accelerate Your Web Site Using Free Page Speed Test Tools https://www.nickclaeboe.com/2017/05/28/accelerate-web-site-using-free-pagespeed-test-tools/ Sun, 28 May 2017 14:34:25 +0000 http://www.nickclaeboe.com/?p=499

Your website’s page speed is of the utmost importance.

If your site doesn’t load fast enough, your potential customers and conversions are at risk. With our instant gratification culture of today, any page on your web site that takes more that 2 seconds to load fully will be abandoned immediately.

There can be a myriad of reasons that your site doesn’t load quickly. From not optimizing your images before uploading them, to improper server settings, your page load time can slow to a crawl. But, you’re in luck.

Below is a short list of my favorite resources for testing and addressing site page speed.

Free PageSpeed Test Tools:

GTMetrix.com

Pingdom.com

WebPageTest.org

Google Page Speed

Each of the page speed testing sites above will give you vital information on speeding up your website for optimal results. I use each of the urls above just a bit differently. GTMetrix is my favorite of the four. On your results page, they give you a breakdown of what’s causing your issues and give you guided hints on how to address and correct your page’s speed issues.

One of the biggest, and most common, page speed issues is Leverage Browser Caching (generally means that you can specify how long web browsers should keep images, CSS and JS stored locally).

Here is how to address Leverage Browser Caching on your site.  Add the following code to your .htaccess or httpd.conf file, dependent on your server type:

## EXPIRES CACHING ##
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType application/javascript "access 1 month"
ExpiresByType application/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 2 days"
## EXPIRES CACHING ##

Setting your leverage browser caching is one of several ways to improve your site’s page speed. A fast website will undoubtedly improve your visitor’s overall experience and catch those potential sales or conversions.

47% of consumers expect a web page to load in 2 seconds or less. (1)

PageSpeed Solution for WordPress Installations

I’ve also found this little gem for your WordPress blog or site. Speed Booster Pack WordPress Plugin address many, if not all, of your page speed issues for your WordPress installation.

Download the plugin for your WordPress site here.

Test, test, test and test some more to get your money making website to reach its fullest potential and as fast as possible. A slow site will kill your conversions and lose you potential sales and leads. Take the time to address every issue you possibly can related to page speed and show your website and visitors some love.

]]>
Get User Agent For Custom Browser Styles – PHP Get User Agent Variables https://www.nickclaeboe.com/2016/09/28/get-user-agent-custom-browser-styles-php-get-user-agent-variables/ Wed, 28 Sep 2016 11:36:29 +0000 http://www.nickclaeboe.com/?p=435

Often, I come across the need to pull the user agent from the browser to echo custom CSS styles for that specific browser. This comes in very handy when developing for mobile. Below is a list of the major user agent/browsers and the php call to get the user agent from the session.

Use the following code below to grad the user agent for you development needs.

/// get user agent for custom browser styles
function get_browser_name($user_agent)
{
if (strpos($user_agent, 'Opera') || strpos($user_agent, 'OPR/')) return 'Opera';
elseif (strpos($user_agent, 'Edge')) return 'Edge';
elseif (strpos($user_agent, 'Chrome')) return 'Chrome';
elseif (strpos($user_agent, 'Safari')) return 'Safari';
elseif (strpos($user_agent, 'Firefox')) return 'Firefox';
elseif (strpos($user_agent, 'MSIE') || strpos($user_agent, 'Trident/7')) return 'IE';

return 'Other';
}
?>

<style>
.IE #form form select {
width: 185px;
height: 26px;
margin-right: 5px;
margin-left: 9px;
padding: 0 0 0 15px;
font-size: 12px;
color: #666;
}
.IE input[type="text"]{
height:27px;
width: 185px;
margin-left: 8px;
/* margin-right: 8px; */
text-indent: 10px;
border: 1px solid #ccc;
}
.Firefox #form form select {
width: 159px !important;
height: 30px;
margin-right: 5px;
margin-left: 9px;
padding: 0 0 0 15px;
font-size: 12px;
color: #666;
}
.Chrome #form form select {
width: 190px;
height: 26px;
margin-right: 5px;
margin-left: 9px;
padding: 0 0 0 15px;
font-size: 12px;
color: #666;
}
.IE input::-ms-clear {
display:none;
}
</style>

<body class="<?php echo get_browser_name($_SERVER['HTTP_USER_AGENT']); ?>">

 

]]>