- Published:
- September 29, 2008 – 9:49 am
- Author:
- By Dave
These images been around the web before, but I just rediscovered some examples of both good server room cabling, and bad datacenter cabling. Data center cabling is really an art. It takes some time to get the network, power,and other cabling organized but worth it in the end. The benefits are more than aesthetic, good cabling improves airflow, cooling, and reduces problems with plug dropouts. Not to mention that good labeling helps in troubleshooting when an issue does arrive. The Good More of The Best The Bad more of The Worst And The Ugly via Pingdom More examples of good/bad wiring: http://www.ixibo.com/index.php/2008/09/24/is-this-your-server-room/ http://royal.pingdom.com/2008/01/24/when-data-center-cabling-becomes-art/ http://www.ixibo.com/index.php/2008/09/29/this-is-how-your-server-room-should-be/ http://royal.pingdom.com/2008/01/09/the-worst-cable-mess-ever/ http://www.darkroastedblend.com/2007/03/really-bad-wiring-jobs_20.html http://www.vibrant.com/cable-messes.php Before/After Photos of Bad Cabling Fixing Datacenter Best Practices
Categories: Hardware,Other Technology,System Administration
Tagged: cabling, datacenter, examples, wiring
- Published:
- September 27, 2008 – 1:19 am
- Author:
- By Dave
Adding a module position in a Joomla 1.5 template is not as easy as it was in the 1.0 templates. It is a two step process: 1. Add code to template PHP file. For example, this would go in the index.php file in the template folder – or if you are adding it in an include file. 12345<?php if ($this->countModules(‘user6′)) : ?> <div> <jdoc:include type="modules" name="user6" style="xhtml" /> </div> <?php endif; ?> 2. Add module name to templateDetails.xml You then need to tell Joomla which module positions are available in this template. If you don’t do this step, then Joomla will not present the module position when giving you the option of where to place a module. templateDetails.xml is in XML format. Within the 1<install> namespace, add this: 123<positions> <position>user6</position> </positions> If you already have positions listed, just add….
Categories: Code Samples,Configurations,Joomla,PHP
Tagged: design, HTML, Joomla, templates, XML
- Published:
- September 18, 2008 – 9:01 am
- Author:
- By Dave
Following up on my previous post, we also had to demonstrate a sample Java TCP Server and TCP Client. The code footprint pretty small and it gives you a good idea about how a TDP Server opens up a port, and then the TCP Client sends or receives data from that port. This is a good page on the differences between TCP and UDP. To compile these, install Java JDK to your system. Then compile the program with javac TCPClient.java – this will create a TCPClient.class. Execute the file with java TCPClient – leave off the .class, or you will get the error: “Exception in thread “main” java.lang.NoClassDefFoundError”. Here is sample code for a simple Java TCP Server/Client, originally from the excellent Computer Networking: A Top Down Approach, by Kurose and Ross: TCPServer.java 123456789101112131415161718192021222324import java.io.*; import java.net.*; class TCPServer { public static void main(String argv[]) throws Exception ….
Categories: Code Samples,Java,Software
Tagged: code, Code Samples, java, networking, tcp
- Published:
- September 17, 2008 – 6:58 am
- Author:
- By Dave
For a class I am taking, we are testing out a simple UDP Server and UDP Client to demonstrate what each one does and how sockets work. The code size is very small and give you a good idea about how a UDP Server opens up a port, and then the UDP Client sends or receives data from that port. To compile these, install Java JDK to your system. Then compile the program with javac UDPClient.java – this will create a UDPClient.class. Execute the file with java UDPClass – leave off the .class, or you will get the error: “Exception in thread “main” java.lang.NoClassDefFoundError”. Here is sample code for a simple Java UCP Server and Client, originally from Computer Networking: A Top Down Approach, by Kurose and Ross: UDPServer.java: 1234567891011121314151617181920212223242526import java.io.*; import java.net.*; class UDPServer { public static void main(String args[]) throws Exception { ….
Categories: Code Samples,Java,Software
Tagged: Code Samples, communications, java, networking, server, tcp/ip
- Published:
- September 15, 2008 – 10:38 pm
- Author:
- By Dave
I couldn’t readily find an answer to this question via the google. So here it is: If you want to insert a ‘last updated’ or ‘last modified’ date on your wordpress page, then there is a simple bit of PHP code you can use for this: 1<?php the_modified_time(‘F jS, Y’);?> And via Ardamis’s Blog, there is a great way to only display this information if it has been modified after the original post date. This is a good way to let people know if there have been updates since the original post: 12345678<?php $u_time = get_the_time(‘U’); $u_modified_time = get_the_modified_time(‘U’); if ($u_modified_time >= $u_time + 86400) { echo "and last modified on "; the_modified_time(‘F jS, Y’); echo " at "; the_modified_time(); echo ", "; } ?> This will display the last modified date and time if it is more than 86400 seconds after the creation date – that is 24 hours.
Categories: Code Samples,PHP,Software
Tagged: code, templates, wordpress
- Published:
- September 3, 2008 – 8:01 pm
- Author:
- By Dave
If you wish to run a command which typically uses a lot of CPU (for example, running tar on a large file), then you probably don’t want to bog down your whole system with it. Linux systems provide the nice command to control your process priority at runtime, or renice to change the priority of an already running process. The full manpage has help, but the command if very easy to use: 1$ nice -n prioritylevel /command/to/run The priority level runs from -20 (top priority) to 19 (lowest). For example, to run tar and gzip at a the lowest priority level: 1$ nice -n 19 tar -czvf file.tar.gz bigfiletocompress similarly, if you have a process running, use ps to find the process ID, and then use renice to change it’s priority level: 1$ renice -n 19 -p 987 32 This would change processes 987 and 32 to priority level 19.
Categories: Linux,Shell,System Administration
Tagged: command, cpu, Linux, nice, priority
- Published:
- September 2, 2008 – 9:04 am
- Author:
- By Dave
For many people using hosted Exchange services, password saving problems could plague you. That is mainly because Outlook doesn’t like it if the Exchange server’s domain doesn’t match your domain. Fortunately there is a way around this, because by the default way it is set up, you would have to enter your password every time you open up Outlook. First step is to change the registry key: 1HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa Change lmcompatibilitylevel to “2″ Here is the meanings of these numbers (source): 0 – Clients use LM and NTLM authentication, but they never use NTLMv2 session security. Domain controllers accept LM, NTLM, and NTLMv2 authentication. 1 – Clients use LM and NTLM authentication, and they use NTLMv2 session security if the server supports it. Domain controllers accept LM, NTLM, and NTLMv2 authentication. 2 – Clients use only NTLM authentication, and they use NTLMv2 session security if the server supports it. Domain controller….
Categories: Code Samples,Configurations,Email,Other Code,Software
Tagged: exchange, hosted exchange, outlook, passwords, Windows