| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Jan | ||||||
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
| 29 | 30 | 31 | ||||
Shopping
Tech
ESN Conversion
2010-01-13 by Jeremy.
Today, our Sprint Liaison passed a spreadsheet with 100+ decimal ESN numbers matched to our phone numbers. Our cards report ESN numbers in Hex. Turns out there’s a smidgen of knowledge needed to switching between the two.
Then you get something like this.
perl -nE 'say hex( substr($_, 0, 2) ) . hex( substr($_, 2) );'
perl -nE 'say uc(sprintf("%x%x", substr($_, 0, 3), substr($_, 3 ) ));'
Happy Coding.
Posted in Mobile, ESN, Perl | Print | No Comments »
Lojack my macbook
2009-01-25 by Jeremy.
I just got a macbook. The first Macintosh I have owned since my LC III. I decided that I wanted to track where I have been and roughly how long I was online at each place. If for some reason I misplace my mac, I would love to have a way to track it’s last online location. Nothing Fancy.
So I thought up a simple solution to my dilema. Query a web site I have log access to. I used wget to query my homepage, with a little bash magic to generate a useful query string. The “local” time, and IP address of my macbook.
With a little log sifting and a charting module, I can show all kinds of neat statistics.
Posted in Bash, Apple | Print | No Comments »
Taking a Screen Shot in .NET
2008-02-20 by Jeremy.
:-D
Hello to whoever is reading this. I hope your having a good day.
The other day I was thinking about writing a screen shot program for that windowed operating system. And being the bored semi-productive person that I am; I set out to make it a reality. My next thought(not literally) was .NET must have a built in function for this. :-D Lucky for me they did. The function is CopyFromScreen(int SourceX, int SourceY, int DestX, int DestY, size SquareSize) .
Here is a link to Microsoft’s information about the function.
Sadly my journey to that information took 2 hours. Partly because I didn’t know exactly what I was searching for. I started by looking for “capture screen shot using .NET”. This brought up a lot of links, and some even had solutions. To bad for me that I didn’t like them(lol at saving time).
- The majority of the solutions suggested using a keyboard event to send a print screen key press to the system. Then copy the contents of the system clipboard into the program. This feels like rapid development to me. Or maybe a quick hack to be fixed later. :-S
- Another Solution I saw said to do a complicated device initiate and copy function.
- There apearntly is another way. My coworker informed me of it, but I have forgotten what he said(me - sleep = forgetful).
I mentioned that the first solution seemed too much like a hack. Also if I only want portions of the screen I would have to do image editing and/or other stuff. Seeing as I don’t do much winshield programming let alone .NET I searched until I found the way I thought was proper. At some point in the future I will post my program up on my site, … and … maybe the code.
Posted in .Net Code | Print | 1 Comment »