So you need to export a list of credit card numbers and send it off someone, but don’t want all the digits shown. Sometimes it’s for post-processing, QA, or to solve a client dispute with an order. Whatever the case may be, here’s how to mask numbers in MySQL:
Masks everything but the first and last 4 digits:
Or if you want just the last 4 digits and everything else masked:
Replace table_name as appropriate. To find out more on these functions I’ve used, check the mysql docs on String Functions
How awesome is that?
I’ve been a Skype user for over 5 years now. The service and call quality have always been great for single and conference style calls. One thing I’ve noticed about myself though is that I breathe into the headset at odd times, making everyone else feel like there’s serial killer or an angry giant on the other end. Skype solves these uncomfortable sounds for everyone else with the mute button. The downside is that there’s no shortcut for this. To mute you have to use the mouse, which is slower for me and louder when I click. My keyboard on the other hand is quick and really quiet.
Enter keyboard shortcuts. From System Preference pane, there’s a keyboard shortcuts panel you can add application shortcuts for any menu item. The only thing you need is the name of the menu item. In my case the menu item is Mute and UnMute, Skype just changes the menu item’s name depending on the state of the audio for the call.
Once you add the shortcut in, it’ll show up in the menubar.
So now you can continue breathing loud, stuffing your mouth, continue listening to CNN, or whatever it is that might annoy people on the other end of the line.
When I first moved out to Charlotte, I didn’t have much experience working in a corporate environment, and I went along with many of bad practices the company had. Around the same time I picked up The Pragmatic Programmer by Andy Hunt and tried to use the tips in the book. Sometimes I used the tips at the wrong time or misinterpreted principles, but for the most part it helped bring out many of the social and communicative aspects of being a programmer that I wasn’t very good at. Being able to detect a bad situation before things turn ugly can be a lifesaver. It also helped with preventing me for constantly working 50+ hrs a week and not benefitting from it.
I’ve started messing around with Rails 2.3.1 (aka RC2) and seeing how it works with Ruby 1.9. Aside from having to install all my gems for the new version of Ruby, the mysql bindings needed to be installed too. Here’s how I got it working:
This week the railsenvy guys released their very first screencast. They’ve got weekly podcast, delivering news on the ruby/rails community. It’s pretty good. If you like banter and sound clips, you’ll enjoy it.
Their first screencast is titled Advanced Active Record, covering the following:
So internet is fully working at the office. I’d say that it is a little faster than before.
A must have app for shell fans. The default terminal for OS X is decent, but lacks tabs, bookmarks, and multiple profiles. iTerm includes all these missing features. I’ve been running iTerm since version .71 and finally upgraded to .95 today. It looks like a few bugs I’ve been waiting for to be fixed, i.e. better wrapping, have been. Checks it out.
They’re usually not as good as the original, but I like these ones.
A nice, divisible number. 11.
Update: KCRW has their own album of rare covers out as well
So they’ve released PHP 4.4.6. Why? Do that many people still use 4? I suppose the only case where this would happen would be with IT people trying to steer away from the witchcraft that is OO and believe maintenance upgrades somehow supercede future additions to the language. (Comic book guy voice) Please to explain.
And if you’re going to tell me 4 does have OO support, it blows.
I’ve always had a thing for music tracks backing cartoons. It probably started sometime when I went to Disneyland when I was little. I visited an easily forgotten shop going down Main street. Inside and around the maroon velvet curtain played old disney clips. My guess would be they were from the depression era. I was too young to know the word nostalgia, even now I wouldn’t use it to describe the feeling my ears were hearing, but there was something distinctive about the music being played in the background. Everything from Mickey whisteling, the patting of the horse’s hooves, to clicking of the projector seemed to work into the music perfectly.
It snowed in Charlotte this week. Pics up on flick r. Music Be l o w.
Green text. Black background. Blink. Blink.
There’s nothing scarier than the blank page when writing. The fear of staring at an empty canvas without a shred of intuition as where or how to begin. I used to write on a daily basis about anything. Places I went, random thoughts throughout the day. Somehow I’ve become the couch potato of thought expression.
Lying sideways on the bed, I decide to write. Words being to form. Gotta get the sleepies out first. Stretch that creative muscle. A comma here, a clever word there. Combine two unrelated sentences into a single one. Oh yes, that’ll do. Blocks of green start to fill the once blank screen. Confidence ensues. I like cake.
But then you become tired and lose focus. Magic words no longer run through your fingertips. You read over what you’ve put down so far.
Cake? Rubbish. Delete.
Well that got us nowhere.
Although I don’t have much to say, I did start reading Rosenberg’s Dreaming in Code and must say it’s a pretty good so far. It’s not a technical book like something from O’Reilly or Apress, rather a look at a start-up from a nontechnical person’s point of view. From what I’ve read so far, me likie. I’ve never read a book that’s so eloquently woven a company and the process of programming together. I’m jealous.
So I was reading through a couple of articles on Raganwald’s blog, stumbling from link to link like I usually do, then something happened. Somehow I came across Java Developer’s Journal. I took a snap of the site and thought I’d post it here for all readers (mainly me) to see.
This site is just horrible. Adverts are everywhere. There’s even video advertisements playing right off the bat. They’re just as bad as those punch the monkey flash ads. There would be no way you could actually read an article from this magazine online. It’s like this gigantic disorganized mess of intarweb templated by a marketing monkey.
Thought I’d say more? Yeah, me too. I need to get back into this writing thing.
Reading, studying, working, and more. We’re alive, oh yes we are.
A demo is now available
Movies are getting expensive to watch in the theater. The last family trip set me back more than 50 bucks, not including soda and popcorn. So to counteract the high price we started buying DVDs. It’s significantly cheaper than going to the theater. For around $15 you can watch the same movie on your couch without breaking the back and have as many people that you’ve got floor space for. Now we buy about 1 DVD every other week.
Back when I lived close to relatives in San Diego, we borrowed DVDs from one another. Only trouble was that we never borrowed any and everyone else would borrow ours. Not a problem at first, but after a while the movies would forget to make their way back home. To help them find their way back, in my spare time I’ve came up with Movie Collector. It’s a small web app that’ll help you catalog your movie collection and let you know whom the movie is currently with. You can check out a longer description.