TIL about Bash sockets

A couple of days ago, I needed to write a one line bash script which would send data over to a Graphite or Statsd. This could easily be solved with netcat: echo "some.valuable.metric 1 `date +%s`" | nc graphite.server.com 2003 What about portability? Netcat isn’t installed on every machine. The search for an alternative method to send metrics lead me to Bash sockets. With a Bash socket, you can send the in this manner: [Read More]

Prime numbers from 0 to n

Programming challenges, like the ones found on Project Euler, provide a opportunity to learn algorithms and practice optimizing code. Problem 10 requires that you “Find the sum of all the primes below two million.” I decided this was the perfect problem to tackle on a train ride home. The summation portion of the problem is trivial. The fun part was finding all of the primes in a particular range of numbers. [Read More]

2010 Recap

We are almost a month into the new year and here I am writing about last year. Well, 2010 was a bittersweet year. It was a year that contained many blessings and some tragedies. I have found myself in a state where the tragedies have tried to overshadowed the blessings. Being a first time home owner is an empowering feeling. Wondering how your family in Haiti is doing after a horrific earthquake is conjures up feelings that I can’t even begin to describe. [Read More]

Summer School on Multicore Programming

One of my goals for this summer is to learn a bit more about multicore programming. I learned that the University of Illinois had a summer school program where you recieve an in depth introduction into many diffrent implementations of multicore programming methedologies. The course covered the following: POSIX Threads Parallelism in Java OpenMP TBB OpenCL Cuda I had a great time with the program and look forward to implementing what I have learned into a couple of projects I am working on. [Read More]

My desktop is how old?

I feel as if I am in the minority of the general tech population when I state that I do not favor coding/gaming/fixing on my laptop over my desktop. I despise having a single monitor to work with. Having to rub a little rubber nub or touch a pad in order to move my cursor around is less than optimal. That fact that I am a “big dude” consistently hunched over a tiny laptop does not help at all. [Read More]

Last Month or So

For those who are asking, yes, I am still alive. I have dropped out of the view of many of my friends and family. Apparently this past semester has taken a bit out of me at school. I have been relaxing and recouping. Not to worry though, I am getting my swagger back. I should be reaching out to everybody really soon.

So You Want To Learn Emacs

Every proffessor in school preaches the merits of learning Emacs. They tell you how much faster you will code without having the need to touch the mouse. They preach how you would no longer need to select diffrent ide’s for each language you write in. Emacs can easily be extended and modified to your specific needs through the use of Lisp (a language everybody should learn). Heck, they even mention that you can check your email and connect to irc through emacs. [Read More]

Open Source Mentoring: Drizzle

I’ve decided to become involved in an open source project. My current interest (and day job) revolve around digital asset management systems and workflows. Give me a large amount of data to manipulate and I will show you a happy man. Drizzle seems like an obvious choice for my interests. I have always wanted to poke around the innards of a database system. I really enjoy coding in c++ (some call me crazy). [Read More]

Check for a Running Process on a Windows Machine

This is a quick and dirty method to check for a running process on a windows machine using Ruby. require 'win32ole' require 'net/smtp' require 'yaml' def send_email(message) begin msg = <<END_OF_MESSAGE From: #{$from_alias} <#{$from}> To: #{$to_alias} <#{$to}> Subject: #{$subject} #{message} END_OF_MESSAGE Net::SMTP.start('smtp.company.com') do |smtp| smtp.send_message msg, $from, $to end rescue => error puts "Exception: #{error}" end end $from_alias = "Email Alias" $from = "processWatcher@company.com" $subject = "Process Error" $to_alias = "Email Alias" $to = "alerts@company. [Read More]

Sending Email via MsSql

Microsoft’s Sql Server always required an odd if not cumbersome configuration in order for emails to be sent by Sql Server itself. An extremely lightweight method of sending emails through mssql is using xp_smtp_sendmail. Xpsmtp adds an extended stored procedure with allows you to easily send emails from Sql Server.