Main menu

Post navigation

I often use my bookmarks bar in Google Chrome heavily at work and wanted to add separators. Unfortunately for me, Chrome has no native support for separators. Other browsers, such as Firefox, use separators, so why can’t Chrome? Well, I’m not getting into those details, there’s other discussions on the web for that.

I’m here to show a nice compromise. Through my research, I’ve found people who have actually setup websites with a separator favicon which you then must rename to a blank name after adding their website to your bookmarks bar. This worked well for a compromise, at least until the pages were taken down for whatever reason.

I took this idea, but made a slight twist. I’m not hosting the page, you are. In fact, the URL, which really is a URI since it actually doesn’t go anywhere, is the page itself. I managed to get it to 758 bytes, however, it can get smaller with modification. I can do this using the data URI scheme. This data URI scheme, unlike your typical HTTP URL scheme which tells your browser where the data is, actually contains the data itself.

That’s really all there is to it. It has some advantages over a website:

You do not need an internet connection at all to start using it.

You don’t need to rename it to a blank name.

It contains a link of itself to easily add more separators to your bookmarks bar.

Because it is a self-contained data URI and has no association with me, this page, or anything, it is completely untrackable.

What does it actually contain? It contains a very simple HTML document comprised of some JavaScript to print out a link of itself along with its size in bytes and of course a favicon of a separator—which, by the way, is a data URI in itself. The data URI used for the favicon is a simple 16×16 PNG image that I tried to get as compact as I could. You can see all this after loading it and viewing to source of the page.

I hope someone finds this as useful as I have.

By the way, I’ve released this data URI under the public domain so you may freely do as you wish with it. I did this to keep the size small by avoiding copyright and license information contained the data URI. That said, I would appreciate proper credit if you post this method elsewhere. Also, if you make a modification of this (perhaps a smaller one?), I encourage you to share it in the comments!

It seems that there are times I walk away from my blog for extended periods of time. Well, I do want to blog more, but I’m nut not much of a good writer. I logged back in and had so many updates to do. I used to keep on top of updates, but in recent months various life stuffs got in my way of my usual endeavors. I will once again attempt this thing called blogging. It just like handstands but it’s something I actually can do!

So I know this isn’t much of a useful post, but perhaps you may be interested to know I will getting back to my development work on my Challonge WordPress plugin. I have some unreleased changes I worked on long ago, I hope it all comes back like riding a bike. Yeah, I did make the code easier to work with in my last release. Anyway, fun stuff there.

In other news, I final—wait… *loading rant…*

Let me give some history first. So way back in December 2010, I launched my website, SolveMyCube. So since then for nearly 4 years, I was hosting the Cube Explorer server used to power the cube solutions on the site on a not-so-powerful Linux machine in my house. Since Cube Explorer is a Windows program, I ran it in wine. It worked okay. It would in a few days time, just up n crash on me. I tried writing scripts to get around this problem, it kinda worked, but ultimately failed. I had to constantly keep an eye on it to make sure it was running. Sometimes I simply forgot about it and a few individuals have gone far enough to email me about it.

So now back to my news… I moved to an AWS Windows server in November of last year. This solved all of my previously mentioned problems! I was happy. All was good until… Yeah… about mid-April. It crashed. So I just recreated the instance and that seemed to work… for the next 3 days! And this continued as I procrastinated. Then in June I investigated the issue. It turns out Cube Explorer just disappears after 72 hours. I still don’t know exactly why, but I wrote a simple batch script to restart it when it disappears. Now it has been running non-stop since then and I am very happy about that!

Lastly, I’ll just mention I recently (by that I mean more than a few months ago) received my long awaited M3D printer. I even have a dedicated cam page for it although as of this writing the printer is not operational but I should be able to get it fixed up real soon. I hope to make more posts about 3D printing.

Upcoming Update Information

In 2038, 32-bit systems and 32-bit code has a problem. It’s well documented online, so if you do not know much about it, check it out on Wikipedia then come back and continue reading here. Even if you are running MySQL on a 64-bit machine, MySQL is not—at least not fully.

Ideally you would want to use the scripting language running your application to do the conversion. For example, place your date string from your result and run it through strtotime() or the DateTime class in PHP. But let’s assume that you are unable to do that for whatever crazy reason and you need to have the date and time as an Unix timestamp in your query results. What do you do?

Assuming we still use MySQL in 2038 and the problem isn’t fixed by then or you are working with future dates that may go into or past 2038 before we get there, there is a way around it. If you use:

This morning, I noticed an influx of followers on my Google+. Last time I had an influx like this was when Eren McKay shared a circle with me in it. This time she shared my blog. Thank you Eren!

Well, since I’m writing, I might as well update on things since my last post.

Work

So I actually lost my job at Team Detroit in early May. I’m not going to get into details but I supposedly lost it because they canceled the project I was almost done with. I enjoyed it there as you may have heard from my last entry.

In late May, I started work at Mango Languages. Mango is language learning that is easy. If you have any interest in learning a new language, you can do it with Mango. You can use Mango free at your library too if they carry it; if they don’t ask them to. Anyway, I know this sounds like a plug for Mango, which I guess it is, but it’s my blog so my thoughts are here.

It has been a long time since my last post. I guess I am not a writer. I believe that can change. I haven’t given up and I’m certain I never will. I’m more focused on other things, like work for one. Which brings me to the first thing to talk about…

Work

Since the beginning of this year, I’ve really applied myself more to looking for a job. In February, I eventually found myself cornered by 3 companies showing strong interest. It was one of the more tougher decisions in my life, but it was definitely a good one to have. Mid-month, I went in for an interview with my third choice out of the group. When I left that interview, they were placed as my number one choice with no hesitation.

The next morning, I missed the call from my recruiter. I listened to his voicemail and started going crazy, like every muscle in my body was ecstatic and excited. I found out I was hired. I guess I aced the interview. Got the contract signed and on the last week of February, I started working for this wonderful advertising agency that is unlike any other. They support creativity and passion much they same way I do. This advertising agency is none other than Team Detroit.

Team Detroit’s biggest client is Ford. That is why I am now working with an excellent technology team at Team Detroit who work on the Ford and Lincoln websites. I’m currently a front-end developer there.

“Find a job you love, and you will never have to work a day in your life.” – Confucius

I believe I have found a job I love.

Play

All I really wanted to say here was that I am looking forward to 2 games that are coming out this year.

The first game is the action-packed Borderlands 2. I enjoyed the first one, now the second one has to be mine. I can’t wait to play it!

The second game is an action-packed MMORPG called Firefall. I see this game a mix of Halo, Unreal Tournament, and Borderlands. To top it off, it is free-to-play!

Oh yeah, one more thing. I have a private SMP Minecraft server. If you are interested in joining my Minecraft adventures, just let me know. Server details may be found at 64b.me.

My mind is a hyperactive one. My mind can race though seemingly hundreds of different ideas in a matter of minutes. It drives me nuts, especially when I’m trying to sleep or those occasions I really need to keep my focus on the task at hand. Well, because this post is about my mind, it will be a bit random and may not follow any one topic. Don’t worry, it doesn’t always make sense to me either.

I always notice on a movie or TV show when the computer screen is totally fake. The actor may type whatever gibberish on the keyboard and it will still do what it is asked to do. It seems only the shows and movies geared towards geeks actually pay attention to this. The movie the springs to my mind is The Matrix, the commands they used actually existed and the interfaces were believable instead of the overdressed interfaces you would find on CSI.

Probably due to the fact that I found interest in programming a long time ago, I think logically. I guess I’m kinda like Spock, but with a better sense of humor. My mind enjoys puzzles and certain challenges. That’s probably why I now have a strong interest in Rubik’s Cubes.

If a challenge gets between me and an interest, I do what I can to overcome it. A good example of this is when I wanted to know how wave files were put together. I knew it shouldn’t be so hard since wave files are as raw as you can get for audio. When I managed to make a PHP script generate waveforms in wave format, that was my first real experience working with binary data. Because of that, I’ve learned not only the building blocks of wave files, but I learned a lot about binary data. I later made my own binary file format.

When you need a simple debugging function and print_r() is just not enough, you need a good wrapper function. You need print_pre().

Most print_pre() functions out there just wrap the print_r() output with the <pre> tag. Useful, but not that useful. This print_pre() function has evolved over the time I have used it. I have used it across multiple jobs. Where it is now is good, anything added to it would be for specialized cases.

This print_pre() function does a bit more than just wrap the print_r() with <pre> tags. Sometimes you may not be able to view any output easily, so it may output to a file if you so desire. It can be used in place of any print_r() as it may be used exactly the same. Another cool feature is word wrapping, which basically does away with the <pre> tag and wraps it in a <p><tt> combo.

The second parameter, return, works just like the return parameter on print_r() except when a non-empty string is passed. If a string is passed to the return parameter, it will be treated as a file path to save the output to and will continue to return the output. The last parameter, wrap, is rather self explanatory; it will allow long lines to break and the text will not be preformatted if set to TRUE.

Everybody likes examples, so here are a few for you:

// Let us assume print_pre() and $obj were defined before this point
print_pre($obj);
// the output is simply printed
$string = print_pre($obj,true);
// $string contains the output
echo print_pre($obj,'debug.htm',true);
// the output allows wrapping, is saved to debug.htm and then printed

And that is the print_pre() function. Ok, my print_pre() function. Enjoy!