Skip to main content

Posts

Showing posts from 2010

Alright... Who Configured Sudo?

noob@genie:~$ make me lots of money bash: make: command not found (thinks...) "Ah ha!" noob@genie:~$ sudo apt-get install make [sudo] password for root: Where did you learn to type? [sudo] password for root: Maybe if you used more than just two fingers... [sudo] password for root: Just what do you think you're doing Dave? sudo: 3 incorrect password attempts (whaa... Aw, crap!  Why do I need root's password?!?!)  "Who configured sudo on this server?  Oh wait... I know..." noob@genie:~$ sudo apt-get install make [sudo] password for root: Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed:   make 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. ... (after a short while) noob@genie:~$ make me lots of money bash: No more wishes remaining.  Goodbye! logout ".... $&#*"

Recurring Events in MySQL

This article describes how to store recurring events in a MySQL database. This might be useful if you're building a calendar or some sort of job scheduler. The table for storing recurring events is inspired by cron http://www.manpagez.com/man/5/crontab/ . You will notice obvious similarities between the table structure and the structure of a crontab file. The table structure also uses the SET datatype in MySQL. You should be familiar with this type before you continue. Documentation can be found here . Just as an example, I'll create a table that can be used to schedule the automatic updating of files. Here is the SQL statement you might use to create this table: CREATE TABLE `File Update Scheduler` (  `Filename` varchar(255) NOT NULL default '',  `LastRefreshed` timestamp NULL default NULL COMMENT 'Timestamp indicating when the file was last refreshed',  `ScheduledMinutes` set('0','15','30','45') NOT NULL COMMENT...

JavaScript Sticky Footer and Scroll Effect

This post talks about two different HTML/JavaScript effects: How to keep a page footer stuck at the bottom of the browser window. How to create a scrolling <div> without using a scroll bar OK. So... you have a website. You want a header stuck at the top of your page and the footer stuck at the bottom of your page. The stuff in the middle, you want to be able to scrollable. But, you don't want those ugly scrollbars to the right of your scrollable text. Maybe, instead, you'll have up arrows and down arrows above and below your <div>. When you mouseover the arrows, the text in the <div> will move up or down and create a scrolling effect. Suppose your page looks like this... <html> <head> <title>Test</title> </head> <body> <div style="position: relative; width: 700px; margin-left: auto; margin-right: auto;"> <div id="header">Header</div> <div id="scrollUp...

Zip code Functions for VBA

Haven't posted anything to my blog in a while... so here it goes. I figured that I would contribute some of my code (albeit pretty horrible code) for those who use VBA. I personally don't care much for VBA, but I use it a lot to do some pretty neat stuff in Excel. Anyway... these VBA functions utilize Microsoft's XMLHTTP Object to get some valuable geographic/zip code information. I have provided a few VBA functions. Some of these functions are definitely hacks, as they assume that the USPS website's structure will remain the same. Although, in my opinion, since USPS.com is run by the US government, it probably won't change any time soon. :) Function GetCityState(zipcode As String) This function connects to the USPS.com website to get the city and state abbreviation for the zip code provided. Function GetZipcode(address As String, city As String, stateAbbr As String) As String This function connects the USPS.com website and tries to get the zip code, given ...

Reasons Why 2010 is Going to be Sweet

Reasons Why 2010 is Going to be Sweet I have NO PLANS for this year -- that means I have no idea what's going to happen!  NONE!  I have nothing to lose, and everything to gain!  This is awesome! School is out for at least 8 months!  Hello, free evenings! I'm currently only working 3 days a week at GOJO!  Hello, free weekdays! Alabama is going to win another National Championship!  Yeah, I said it! I might be going to graduate school.  This means I'll at least be working toward a masters or doctorate.  One of my dreams is to be a college professor, and this would be one more step to get there! I'm going to start another business.  I'd tell you what it is, but it's secret squirrel stuff.  This time around, I'll have more time to put effort into it. I have a great family and wonderful friends to help me out!  You guys rock! There are other reasons, but... ehh... I gotta go get ready for the OSU game.  I have people coming over, and I don't want my pla...