90’s Flowchart
April 29th 2007
Yeah it’s a little old, but I remembered it and wanted to post. I have the power.

April 29th 2007
Yeah it’s a little old, but I remembered it and wanted to post. I have the power.

April 29th 2007
I’ve been running around trying to find how to make self signed SSL certificates, since for some reason apache2 on Ubuntu Feisty is missing the apache2-ssl-cert executable, and some other junk.
Anyway, this is how you do it:
openssl req -new -x509 -days 365 -nodes -out out.pem -keyout out.pem
Replace the days argument with something you want, and replace the out.pem with something you want too. Make sure you the out and keyout are the same. The x509 argument might be changeable to other things, but I don’t know…this just works and I’m tired so I’ll look into it later.
April 28th 2007
A solid list of rad Guitar Hero II ownage. Mostly custom songs but also some original songs that are simply destroyed by people.
Embody the Invisible – In Flames
Thunderhorse – Dethklok (100%)
Last but not least, Through the Fire and the Flames – DragonForce (there are many other vids of this one, but I like this one the best for some reason)
April 27th 2007
I’m pretty sure Borland’s C++ Builder is the worst product ever. Let’s start with the IDE itself.
It’s slow. Getting around the IDE, if you try to use tooltips and code completion, it takes a good 5 seconds before anything shows up. And since they didn’t put the tooltip activity in a separate thread (I haven’t seen source code, but it’s pretty obvious), the IDE is frozen and you get the hourglass while it’s looking for something to display. Super. Not only does it take forever to get a tooltip, but the default timeout is too short, so scrolling through code results in this happening numerous times. Luckily this can be turned off. Too bad, because hovering over variables to get the type, and having good code completion is a nice benefit of quality IDEs.
This brings me to my next point: even when you do hover over a variable, nothing spectacular happens. If you let it sit long enough to popup a tooltip, it just shows you the variable name and the file you’re in. Super. Because that’s exactly what I wanted to know.
Moving on. The IDE itself and the package manager seem to treat header files as second rate code. In the project, all you see are the C++ source files (*.cpp). If you include a header file in the source file (for example, include foo.h in foo.cpp), yeah you can right click somewhere and select some option relating to switching to the header files (if you’re in the source file), or the source file (if you’re in the header). Okay not too bad, but how about just editing other header files, like a debug.h header or something? You might have that header in an include directory not in the project root. But oh no, you can’t just tell it to open that header, because despite the fact that the compiler can be told to look in multiple directories for includes, apparently the IDE can’t. And if it can be configured, it shouldn’t have to be. Dumb. I should be able to at least have a nice way to just open a header file that I have in my project. Like, maybe if the stupid project manager listed header files too. But no that would be too easy.
The compiler:
Is slow. Very slow.
The text editor:
Okay WTF is up with it just moving the cursor anywhere. Granted some people like this option, but if I’m at the end of a long line, and I press down to move to the line below me, and it’s much shorter, I want the cursor at the end of the text, not immediately below my position. I can’t even figure out what to call this feature to be able to disable it in the options somewhere, if it can be disabled. sigh Also, when I press Home, I enjoy when the cursor goes to the start of the text, then if I want, I can press Home again, and move the start of the line. That’s how basically all the other IDE text editors I’ve used work. It’s great. But not Borland. They probably just used some generic text box control. sigh again And tabs are confusing too. I can’t get it to do anything I want with tabs. POS.
I hate Borland. I’ll be so happy when I don’t have to use it.
April 27th 2007
This little tool will be my best friend come Fragapalooza. My roommate and I are preparing to download so much stuff from people it won’t even resemble humor. This program enumerates all the network machines and displays their shares all nice so you can quickly browse to folders that look interesting (read: pr0n). Money in the bank!
LanDiscovery download and review – local network browser from SnapFiles
April 25th 2007
If, like me, you participate in some sort of grid computing project, it’s interesting to see your progress. I take part in Einstein@Home, and I wanted to display my stats in my sidebar. I’ll give you two ways to accomplish this. First way is the quick way, which involves including the jQuery Javascript library, and a second which involves writing your own Javascript. The second option results in a smaller file, but the jQuery file is already pretty small. It’s up to you. I started with my own script, then moved to jQuery when I realized it could do what was needed in about one line, and I was already including/using jQuery.
For both options, create a php file somewhere on your server. I used my blog root directory, so the url is http://www.darkhelmetlive.com/blog/einstein.php
Call it whatever you want, I used einstein.php since I’m getting Einstein@Home stats. Anyway, paste this in:
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 32 33 34 35 36 37 38 39 | <?php echo get_einstein_stat_info(); function get_einstein_team($url) { $content = file_get_contents($url); $xml = new SimpleXMLElement($content); return $xml->name; } function get_einstein_stat_info() { try { $authkey = "auth-key-goes-here"; $url = "http://einstein.phys.uwm.edu/"; $content = file_get_contents($url . "show_user.php?auth=$authkey&format=xml"); $xml = new SimpleXMLElement($content); $username = $xml->name; $credit = number_format($xml->total_credit, 3); $team = get_einstein_team($url . "team_lookup.php?team_id=$xml->teamid"); $link = $url . "show_user.php?userid=$xml->id"; $html = "<ul>\n"; $html .= "<li><a href=\"$link\" target=\"_blank\"><b>Username:</b> $username</a></li>\n"; $html .= "<li><a href=\"$link\" target=\"_blank\"><b>Team:</b> $team</a></li>\n"; $html .= "<li><a href=\"$link\" target=\"_blank\"><b>Total Credit:</b> $credit</a></li>\n"; $html .= "</ul>"; return $html; } catch (Exception $e) { return "<ul><li><a>Error getting stats</a></li></ul>\n"; } } ?> |
Replace the ‘auth-key-goes-here’ with your actual auth key, which can be had from the Einstein@Home user account pages (somewhere in there). Also, I should add that I found the E@H XML stuff somewhere, but now I can’t find the page anywhere, so this is what works. You can do more, but I don’t know how
Anyway, this php script returns the unordered list and list items to sit in the sidebar.
Now add something like this to the sidebar.php script of your theme:
1 2 3 4 5 6 7 8 | <li id="Einstein">
<h2>Einstein@Home</h2>
<div id="einstein-sb">
<ul>
<li><a>Loading stats...</a></li>
</ul>
</div>
</li> |
You need the div tags for the script to be able to insert the returned HTML from the other php script.
That’s the basic stuff, now off to the option specific parts
Option 1
Add two script includes to your header.php file in your theme.
1 2 | <script src="<?php echo get_option('siteurl') . "/wp-includes/js/jquery.js"; ?>" type="text/javascript"></script>
<script src="<?php echo get_option('siteurl') . "/wp-includes/js/einstein.js"; ?>" type="text/javascript"></script> |
Adapt this to your needs of course. I did it this was to allow the code to move around. Now you can just copy and paste instead of changing the root url. Make sure you actually download jQuery and drop it into your ‘wp-includes/js’ directory. Create the einstein.js file in the ‘wp-includes/js’ directory as well. Make it look like this:
1 2 3 | $(document).ready(function(){ jQuery('#einstein-sb').load(window.location.protocol + "//" + window.location.host + "/blog/einstein.php"); }); |
Replace ‘einstein-sb’ with whatever id you gave the div in the previous section, and replace the ”/blog/einstein.php” with the path to your php script you pasted out.
This will then, when the document is ready, make a jQuery call. It will load the url (the php script), and put the contents (the returned html code) in the innerHTML of the div, so it appears to the user. If the php has a problem, it sticks in the error message. The nice thing about this is it works asynchronously. Originally I had the php directly in the sidebar.php file. Bad idea. When the E@H servers are slow, your page loads like a dog. This works better.
Option 2
You can write your own JS file to do the job the jQuery does, but seriously folks. One line, c’mon! How easy is that.
This is what I had:
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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | var theElement = "einstein-sb"; var req = false; getEinsteinInfo(); function loadXMLDoc(url, method, async) { try { if (window.XMLHttpRequest) { req = new XMLHttpRequest(); req.onreadystatechange = processReqChange; req.open(method, url, async); req.send(null); } else if (window.ActiveXObject) { req = new ActiveXObject("Microsoft.XMLHTTP"); if (req) { req.onreadystatechange = processReqChange; req.open(method, url, async); req.send(); } } } catch(e) { req = false; } } function getEinsteinInfo() { var url = window.location.protocol + "//" + window.location.host + "/blog/einstein.php"; loadXMLDoc(url, "GET", true); } function processReqChange() { if (req && req.readyState == 4 && req.status == 200 && document.getElementById) { try { var element = document.getElementById(theElement); element.innerHTML = req.responseText; } catch(e) { } } } |
Basically it does the same thing, but it’s smaller, since it doesn’t have all the other stuff from jQuery which you might not use.
You must include that code in the header file as well, in the same manner as the jQuery file in Option 1 (again I had just included wp-includes/js/einstein.js, and put all that code in there)
That should keep you busy for a while. Have fun!