A little something about everything

internet marketing and website development made simple..

Launch Site: Choose and Cut FraserFirs, LLC new website


The #1 place to go for the perfect cut your own experience in southern Minnesota this Christmas. Don't settle with imitation trees or a frozen bundle you can't see before you take it home. Looking for the perfect smaller Christmas tree to go in the office or an extra large 15 foot Christmas tree to fill up your home? Nothing is better then that wonderful aroma of a fresh choose and cut Christmas tree aroma.

Get into the holiday spirit at fraserfirs.com.

 

Site Information

Code:

Asp.net, JS, CSS, HTML5

Support:

Desktop, Tablet, Mobile

Type:

Presentation, Animation, Music, Seasonal

Optimizations:

Look and feel

VB.net Redirect script for mobile/desktop

Basic page Redirect Code:

<script language="vb" runat="server">
Public Sub Page_Load(sender As [Object], e As EventArgs)
If Request.Browser("IsMobileDevice") = "true" Then
Response.Redirect("/Mobile/")
Else
Response.Redirect("/")
End If
End Sub
</script>

Windows Explorer 10 is Slow, unusable, unstable, high CPU, issues

I've run into this issue several times now where windows explorer 10 has some sort of conflict with windows search service. This happens on clean installs and more frequently to those that have upgraded from windows 7 or 8 to windows 10.

Here is the quick fix to resolve this:

Ctrl+Alt+Del > Select "Task Manager"

Once task manager opens select the wind and type "w" until it selects "Windows Explorer", right click and end task. This will cause all of your windows explorer items to be removed from the windows interface and you should notice the pc has returned to normal, no longer slow.

If this is the case continue with the next step,

Choose "file" from "Task Manager" then enter "services.msc" and click "ok", now scroll down to "Windows Search" double click and change the startup type to "Disabled" then "Stop" the service.

(please note, this will disable your windows search function)

To restore windows explorer select "file" from the task manager and "run new task" enter "explorer.exe" and click ok. Everything should now be working properly other than "Windows Search" which is now disabled.

Step by Step install of CentOS 6.9 on Microsoft Hyper-V Server with Linux Integration Services Version 4.2.5

Here are the Steps:

  • Download CentOS 6.9-minimal.iso start VM, Choose Media > DVD Drive and "Insert Disk..." then install and reboot.
  • Download LinuxICv4.2.5.iso, Choose Media > DVD Drive and "Insert Disk..."
mkdir -p /mnt/cdrom
mount /dev/cdrom /mnt/cdrom
cd /mnt/cdrom
./install.sh
umount /mnt/cdrom
  • Now update your network settings via vi
vi /etc/sysconfig/network-scripts/ifcfg-eth0

use "i" to insert text, (esc) to exit and ":wq" to write your changes.

It should look something like this:

DEVICE="eth0"
 HWADDR=(MAC ADDRESS, This should match what is configured in Hyper-V)
 TYPE="Ethernet"
 UUID={don't change this}
 ONBOOT="yes"
 BOOTPROTO=none
 IPADDR=(YOUR SERVER IP)
 GATEWAY=(YOUR DEFAULT GATEWAY)
 DNS1=(PRIMARY DNS SERVER IP)
 DNS2=(SECONDARY DNS SERVER IP)
 Networking=yes

Start the network by using... 

 service network restart

Now you can update using yum:

#yum update
Is this ok [y/N]: y

That's it, your done.

 

lightweight Javascript toggle function without jquery to display block/none for an element

Here is a quick lightweight javascript toggle function for sites where you dont want to use jquery.

The JavaScript:

<script>
function toggle(id) {
var e = document.getElementById(id);
if(e.style.display == 'block')
e.style.display = 'none';
else
var list = document.getElementsByClassName("tmc");
for (var i = 0; i < list.length; i++) {
list[i].style.display="none";
e.style.display = 'block';
}
}
</script>

Some example CSS:

<style>
.dbn {
display:block;
float:right;
width:40vw;
border:.05em solid #000;
padding:.8em;
margin:1em;
box-shadow:0 0 .3em #000;
}
#aa {background-color:#f00;}
#bb {background-color:#0f0;}
#cc {background-color:#00f;}
</style>

Some excmple HTML:

<ul>
<li><a onclick="toggle('aa');" style="cursor:pointer ">one</a></li>
<li><a onclick="toggle('bb');" style="cursor:pointer ">two</a></li>
<li><a onclick="toggle('cc');" style="cursor:pointer ">three</a></li>
</ul>
<div id="aa" class="dbn">
Content of Div aa
</div>
<div id="bb" class="dbn">
Content of Div bb
</div>
<div id="cc" class="dbn">
Content of Div cc
</div>

Example:

Content of Div aa
Content of Div bb
Content of Div cc