Posts Tagged ‘Programming’
In my last Git, Capistrano, SSH, and WordPress tutorial, I showed you how to setup your WordPress theme to be easily deployable. Now, I’ve simplified the process even more by eliminating a large amount of duplicate code. Read more…
I’ve been working with Spree over the past few weeks for my senior project. So far, I’ve really enjoyed working with it. For being a below-1.0 software, it is very stable, and very full-featured. Even better, it’s very easy to create extensions and integrate them into the e-commerce framework. However, I was running into a permissions issue with an extended controller method. Read more…
Using a “float” in a web design is fairly common these days; it is used to float images for wrapping text, as well as being one of the easier, standard-compliant methods to achieve columns. For example, if you want to have a content column, with a sidebar column floating to the right, you would probably have something similar to this (example after the jump):
Read more…
At Ferris State University, the network implements a system called Cisco Clean Access (CCA). This is a system designed to keep all Windows-based computers up-to-date, secure, and authorized to use the network. On the Windows-side of things, it works decently. All that is truly required is the installation of Clean Access Manager, Norton Antivirus, and setting up your Windows Update settings to point to FSU’s Windows Update Server.
This is totally different if you use a Mac (or Linux, or any other OS). While there is technically a Mac client for CCA, it does not work as well as the Windows-based client. Luckily, there is still a backup plan for other operating systems: CCA will redirect you to a web-based login page, you fill in your user credentials, and bam! you’re on the network. Only a few caveats:
- If you disconnect from the network for any reason (i.e. you’re using a laptop and you close the lid) for more than 5 minutes, you will have to re-login
- Occasionally there are issues with computer identification and DHCP: I have run into issues where I was logged in, closed my laptop for 15 minutes, and was given an “IP in use” error. This has happened on more than one occasion, and not only to me, but a few of my classmates.
- It’s just a hassle to have your web session interrupted by a Java app (and on that point, why is it a Java app? I’m pretty sure a standards-compliant web form would suffice) asking you to login
To get around most of these issues, I came up with a script to automatically login with my iMac. Essentially, it’s just a shell/bash script that is executed by launchd (you could use Cron on *NIX) every 5 minutes.
Read more…
Update: This tutorial has been updated! Several bugs have been fixed, please be sure to read all of the updates (especially if you’ve referenced this tutorial before).
Also, there is now a gem to help with the deployment script. Please visit the new tutorial after reading this one for more information.
I’m not going to lie: lately I’ve been on quite the WordPress-kick. I love being able to create a design, cut it up into HTML-ready chunks, and then use a standard WordPress template to get it into production and on the web ASAP! Generally, my workflow looks like this:
- Create the design
- Cut it up for a web layout
- Create a sample web layout and test across browsers
- Cut the HTML up into a standard WordPress template
- FTP the design to a WordPress install (into the wp-content/themes directory)
Read more…
An extension method to remove all but digits from a phone number. This should be useful for sanitizing input to put into your database.
using System.Text.RegularExpressions;
namespace CustomStringMethods
{
public static class PhoneNumber
{
#region Class Methods
public static string StripAllButDigits(this string s)
{
return (s == null) ? string.Empty : Regex.Replace(s, @"\D", string.Empty);
}
#endregion
}
}Obviously this can be used for more than just phone numbers.
Why can’t C# allow for a constructor definition in an Interface? For example, say you have this interface:
namespace ValidationServices.Customers
{
public interface ICustomer
{
// Properties
ValidationRequest Request{ get; set;}
// Methods
ValidationResponse ValidateOrder();
//....
// and so on
//....
}
} Read more…
Over the last week or so, I have been searching for a method to properly include XSL files via xsl:include within a .NET embedded resource. Apparently, using GetManifestResourceStream() (via an Assembly) wasn’t good enough (it wouldn’t follow the xsl:includes, simply ignoring them). Luckily, I came across a (semi-)working solution over at Signs on the Sand. Now, the concepts behind this were right, it just wasn’t working for my particular situation. Here’s the scoop:
Read more…
So far, my internship has been going great! I’ve had many opportunities to work in a new environment, and I’ve been able to tap into one of my more underused skills: programming. Since I’ve been working for Independent, I’ve been able to learn a lot of new concepts; not only in programming, but in some of the operations of a business. Here is a brief overview of some of the things I have learned, or am learning.
Read more…