Counting items with mysql and regex in the group by statement

Yesterday I needed to do a little report for the boss but the data that I needed to group together wasn’t exactly the same. I hit up the “Goog” for ways to use regular expressions in a count query, but that is kinda tricky to find so this is what I was able to come up with….

So let’s say you had a table where you were attaching the landing url a site visiting is entering your website on, and you wanted to track that landing url the whole way to the end of some web based procedure. Of course certain urls will be different but some could be common for the purpose of counting them together on a report. In a practical example, lets say you are doing pay-per-click traffic with Google and Yahoo. Both of these providers use unique ids in the url to help distinguish between multiple clicks from the same person (so you end up with many urls that are different but mean the same thing). And of course you were a good little developer when you decided to send Google traffic to /google/ and Yahoo to /yahoo/!
Continue reading ‘Counting items with mysql and regex in the group by statement’

  • StumbleUpon
  • Sphinn
  • Slashdot
  • Reddit
  • Mixx
  • Google
  • SphereIt
  • Technorati
  • del.icio.us
  • LinkedIn
  • TwitThis

And we are back.

So it has been quite some time since I posted on here.  It has been rough lately. Not sure what kind of funk I’ve been in… but actively trying to get out of it. Hoping getting back in tune with the tubes will help. (Twitter is probably the biggest reason not to post on here…damn you Twitter)

While I have been gone I have been doing some work with CakePHP, FAI - fully automatic linux installations, VirtualBox & VMware, Magento, etc. So I have been keeping pretty busy.

I also found a nice little hardware project that has just come into my radar. http://www.brewtroller.com/ This is something that I have been wanting to work on in my *cough* free time. However my vision would be to use a host computer for all the logic and user control, and the controller board used for simple I/O. Anyone interested in this, drop a comment and let me know.

  • StumbleUpon
  • Sphinn
  • Slashdot
  • Reddit
  • Mixx
  • Google
  • SphereIt
  • Technorati
  • del.icio.us
  • LinkedIn
  • TwitThis

Happy Holidays from ProspectMX



The company I work for has decided to do a charity benefit of $10,000 in services to the organization that answers the question on their site or blog: “How can internet marketing benefit your organization?” For further details visit the post charity internet marketing

  • StumbleUpon
  • Sphinn
  • Slashdot
  • Reddit
  • Mixx
  • Google
  • SphereIt
  • Technorati
  • del.icio.us
  • LinkedIn
  • TwitThis

How To Setup Yubikey SSH On Fedora

Here is a short ten minute video tutorial and howto directions. This is how to setup Yubikey authentication on Red Hat Fedora with PAM authentication. You can configure SSH to restrict access to your Linux box so that only Yubikeys you authorize can gain access. Therefore restricting access to anyone who does not.


# build libyubikey
wget http://yubico-c.googlecode.com/files/libyubikey-1.1.tar.gz
tar -zxf libyubikey-1.1.tar.gz
cd libyubikey-1.1
./configure
make
make install
cd ../

# build pam yubikey
wget http://yubico-pam.googlecode.com/files/pam_yubico-1.8.tar.gz
tar -zxf pam_yubico-1.8.tar.gz
cd pam_yubico-1.8
./configure
make
make install
cp libs/pam_yubico.so /lib/security/

# Setup keyfile
mkdir /root/.yubico/
vi /root/.yubico/authorized_yubikeys
root:{12char key}

# SSHD Config
PasswordAuthentication yes
ChallengeResponseAuthentication yes
UsePAM yes

# Pam module
vi /etc/pam.d/sshd
auth sufficient pam_yubico.so id=16 debug

  • StumbleUpon
  • Sphinn
  • Slashdot
  • Reddit
  • Mixx
  • Google
  • SphereIt
  • Technorati
  • del.icio.us
  • LinkedIn
  • TwitThis

The Opening of the Yubikey

Greetings! Finally got the first impromptu video up on the inter-webs. This is just a rough video of me opening my package from Yubico. I talk a little bit about what the device is and then plug it into my computer for the first time.
Also, I attempt to gain access to Yubico’s restricted user forum. Enjoy!



  • StumbleUpon
  • Sphinn
  • Slashdot
  • Reddit
  • Mixx
  • Google
  • SphereIt
  • Technorati
  • del.icio.us
  • LinkedIn
  • TwitThis

The YubiKey Has Arrived

Just a quick note out that I just received my Yubico Yubikeys! I normally tear into packages like presents on Christmas morning, but I am trying to restrain myself. I have decided to do a video blog-casting series, detailing the entire life-cycle of my experiences with the YubiKey. So hopefully video shooting goes well. It is already 10pm, so we’ll seen how quickly I can wrap this up.

  • StumbleUpon
  • Sphinn
  • Slashdot
  • Reddit
  • Mixx
  • Google
  • SphereIt
  • Technorati
  • del.icio.us
  • LinkedIn
  • TwitThis

Just Ordered Yubico YubiKey

One of the great things I learned about at CPOSC this past Sunday was the Yubico YubiKey. I had not heard of this little device, granted I had heard of the RSA SecurID. (If you are wondering what a SecurID is, it is a portable device that allows you to add an extra layer of authentication and security to a computer system or interface.) It was interesting that I had just had a conversation with a colleague about the want to find an alternative to the RSA commercial solution. So I was at the conference and the one speaker mentions the Yubikey, and invites interested parties in joining him for a demo of the little devices over lunch. I was so amazed that I just ordered two devices. I will blog more as I learn more about them and what I do with them.

Have you had any experience with any secure token based authentication systems? Please drop a comment and let us know.

  • StumbleUpon
  • Sphinn
  • Slashdot
  • Reddit
  • Mixx
  • Google
  • SphereIt
  • Technorati
  • del.icio.us
  • LinkedIn
  • TwitThis

I hooked up my blog to twitter

Hey tweeple!

I am now a twitter fanatic. I avoided systems like this in the past, but recently have found great uses for it. So now I too, am a twitter-holic. So shout out to the tweeple!


@galaxiecruzin

  • StumbleUpon
  • Sphinn
  • Slashdot
  • Reddit
  • Mixx
  • Google
  • SphereIt
  • Technorati
  • del.icio.us
  • LinkedIn
  • TwitThis

Pic Programmer Schematics

Here are a few schematics that I have collected. Thought I would share these out there on the net. They all have pros and cons. You can read more about my specific experience with each one over here on the robot kits page.

Willem Pic Programmer Schematics

Tait Pic Programmer Schematics

JDM Pic Programmer Schematics

Classic Pic Programmer Schematics

  • StumbleUpon
  • Sphinn
  • Slashdot
  • Reddit
  • Mixx
  • Google
  • SphereIt
  • Technorati
  • del.icio.us
  • LinkedIn
  • TwitThis

Lancaster Linux User Group

Attention LUGers and LUGer-wannabes: I am helping reintroduce the Lancaster Linux User Group. With the rising cost of fuel, driving to the CPLUG meetings doesn’t fit everyone’s budget or busy schedule. So anyone who is interested, please visit the blog and post a comment stating your level of interest. I have spoken to several people already and feel that we could begin to form a great group in no time. BTW, we will plan on scheduling our meetings on a different day that the CPLUG does so that we do not create a conflict with their meetings.

  • StumbleUpon
  • Sphinn
  • Slashdot
  • Reddit
  • Mixx
  • Google
  • SphereIt
  • Technorati
  • del.icio.us
  • LinkedIn
  • TwitThis