[toothpaste for dinner]
[my chingoo lisa]
[east end brewing]
[aaron's bike adventures]
Below are the 10 most recent journal entries recorded in the "unixd0rk" journal:
[<< Previous 10 entries]
Ubuntu Rescue Remix + Clamscan |
associative arrays in C|
i've been programming in PHP for around 15 years. i suppose that might make me a bit of a PHP guru. unfortunately, during my hiatus from true compiled languages, my C and C++ coding had gotten a bit rusty. i had definitely done some recent coding in C to modify my personal version of the open source DJ mixing software mixxx
, but only a small hack to change the way that the fader position was mapped to the output volume for two music tracks.
i'm working on a project that compares N files of about 40,000 rows to each other and does some analysis and stores it in a database table. the PHP version was obviously slow. i was able to create logic that reduced the comparison of 3 files to about 3 hours on a moderately old system 7-8 years old with maybe 8 cores. speedup was only going to be possible by rewriting in a non-realtime-compiled language.
i discovered the libdbi
libraries and started down a road paved with errors about illegal type conversions since typed languages haven't been on my mind for a while.
as i got started i realized that there was one problem. i NEEDED associative arrays.
in PHP, associative arrays allow you to set up arrays like this:
...allowing you to reference each element by an index (here, 0 or 1) and the strings "fname" or "lname".
as one might guess, this is an excellent programmatic way of dealing with large sets of data like those returned from a database query or imported from a CSV file where you want to associate a bunch of rows that you would like to reference with an integer index storing column names and values.
after doing a little bit of research and some wild-goose chasing, i found a good solution to the lack of this specific functionality being included by default in C.
now i just have to finish writing these database wrapper functions to simplify the coding for my project a little. :)
awesome hack for stupid soundmax hd drivers...|
portsentry + iptables + blocking TOR exit nodes|
while troubleshooting my home network trying to figure out what was screwing routing up i polished my firewall rules up a bit.
it turns out that i think i was maxxing out my cheap switches, and that everything seems to work fine if i swap some cables around. also, it turns out that my root partition was full so after i deleted some junk things were working a lot more smoothly.
what i ended up doing was configuring portsentry to set up generic port listeners on a bunch of ports and set up my firewall so that the outside world can access those. next, i created a chain in iptables called PORTSENTRY and append a RETURN rule. portsentry inserts the DROP rule for each host with a "-I" switch, so that the RETURN rule can remain.
while testing firewall rules, i noticed that every time i restarted iptables i lost my PORTSENTRY chain rules and that using iptables-save would require me to remove all but the PORTSENTRY related rules or else my old (probably broken) firewall configuration would be resurrected each time i did an iptables-restore. luckily, portsentry logs the entire iptables DROP command in /var/log/messages and is even nice enough to put it in quotes:( code follows...Collapse )
stuff i did recently...|
even though i've been pretty sick since last friday night, i've accomplished a few things:
- trials bike -
i managed to bend my non-drive side crank the other day after flopping awkwardly off of a 2-1/2" wall trying to do a 180. pretty much the bike's weight from the drop bent it. they are XC cranks... on sunday i installed some truvativ hussefelt downhill-worthy ones. they seem to weigh about the same. not sure yet, but i can swear i can feel that they are stiffer after a few gap hops to rear wheel on the curb which i maybe shouldn't have done because i worked up a sweat while i was still feverish.
- laptop computer music -
after getting tired of xmms and jack sounding like a bunch of choppy crippity-crap even after yum updates and compiling the newest version of qjackctl that would work on my centos 5.2 OS i decided to spearhead a quest to make playing mp3's through jack less annoying. i might have been able to just get a lightweight media player working easily, but i have always liked the xmms project (since about 1998?) and was excited to hear that xmms2 existed now and seemed like it only had a few system dependencies (sqlite) and might be worth trying to compile.
got the DrNo build of xmms2 and quickly found that i had to upgrade sqlite to a version that was higher than any of my current rpm repositories. i just crammed version 184.108.40.206 on there without uninstalling the original rpm and will worry about it later. next had to get mpg123-devel (thru yum) and also got wavpack-devel. i'll worry about other formats in a little bit once i get everything the way i want it.
i also decided that i wanted to use the xmms2 gui client "clone" of the original xmms, promoe. after a stumbling block that was fixed by using gmake-qt4 instead of qmake to configure the build i got it built. still not sure how to access it, but...
next i had to download an init script that someone wrote for xmms2d that had an invalid "-d" flag in the start command which i replaced with a "--yes-run-as-root" flag.
finally, i had to download and install the newest alsa-plugins package so that xmms2d had a way to talk to jack-audio-connection-kit.
right now, i've got everything config'd so that i can use the xmms2 command line to control the playlist. the best part: no audio skips! next i'll figure out this promoe thing and it'll be like back in the old days, except i might be able to scratch with terminatorX or use puredata over top of whatever i'm playing. :)
Tea Party - The party of "White Privilege Doesn't Exist"|
the tea party is racist because the whole concept was constructed by corporations to "get out the stupid vote". get some people who have spent their whole lives thinking that "black people" are taking over "their" sports teams and "mexican illegals" are convincing US corporations to offshore manufacturing jobs to believe some even more ludicrous shit.
yeah, your president is a "socialist", RIGHT. trust me. I'M A FUCKING SOCIALIST and no democrat alive is a SOCIALIST. both dems and republicans work for the same people: the richest of the richest CEOs. this tea party crap is nothing but a smokescreen for the collapse of the republican party, which had to find new ways of convincing moral conservatives and religious fundamentalists that jesus would want the rich to get tax cuts...http://www.redroom.com/blog/tim-wise/imagine-protest-insurgency-and-workings-white-privilege
"Imagine that hundreds of black protesters were to descend upon Washington DC and Northern Virginia, just a few miles from the Capitol and White House, armed with AK-47s, assorted handguns, and ammunition. And imagine that some of these protesters--the black protesters--spoke of the need for political revolution, and possibly even armed conflict in the event that laws they didn’t like were enforced by the government. Would these protesters--these black protesters with guns--be seen as brave defenders of the Second Amendment, or would they be viewed by most whites as a danger to the republic? What if they were Arab-Americans? Because, after all, that's what happened recently when white gun enthusiasts descended upon the nation's capital, arms in hand, and verbally announced their readiness to make war on the country's political leaders if the need arose."
what does tea party LEADER Mark Williams have to say?
he published a fictitious letter describing how much better off "coloreds" would be if they had just avoided that whole anti-segregation thing and "went along" with what white america had planned for them!http://politicalcorrection.org/blog/201007150012
"Dear Mr. Lincoln
We Colored People have taken a vote and decided that we don't cotton to that whole emancipation thing. Freedom means having to work for real, think for ourselves, and take consequences along with the rewards. That is just far too much to ask of us Colored People and we demand that it stop!
In fact we held a big meeting and took a vote in Kansas City this week. We voted to condemn a political revival of that old abolitionist spirit called the 'tea party movement'.
The tea party position to "end the bailouts" for example is just silly. Bailouts are just big money welfare and isn't that what we want all Coloreds to strive for? What kind of racist would want to end big money welfare? What they need to do is start handing the bail outs directly to us coloreds! Of course, the National Association for the Advancement of Colored People is the only responsible party that should be granted the right to disperse the funds.
And the ridiculous idea of "reduce[ing] the size and intrusiveness of government." What kind of massa would ever not want to control my life? As Coloreds we must have somebody care for us otherwise we would be on our own, have to think for ourselves and make decisions!
The racist tea parties also demand that the government "stop the out of control spending." Again, they directly target Colored People. That means we Colored People would have to compete for jobs like everybody else and that is just not right.
Perhaps the most racist point of all in the tea parties is their demand that government "stop raising our taxes." That is outrageous! How will we Colored People ever get a wide screen TV in every room if non-coloreds get to keep what they earn? Totally racist! The tea party expects coloreds to be productive members of society?
Mr. Lincoln, you were the greatest racist ever. We had a great gig. Three squares, room and board, all our decisions made by the massa in the house. Please repeal the 13th and 14th Amendments and let us get back to where we belong.
Precious Ben Jealous, Tom's Nephew National Association for the Advancement of Colored People Head Colored Person"
so... the tea party isn't racist? ...and you're going to eliminate racism from your organization that is at least half-racists. goodbye tea party... it was nice having you to laugh at for a while there!
Tags: racist, tea party
bartpe mcafee command line scanner error 4294967295|
so, i ran into problems getting mcafee command line scanner working in my bartPE builds a while back. i recently installed a clean bartpe environment and started over from scratch. i noticed immediately that problems i was having with spybotSD went away, but mcafee was still broken somehow.
poking around the interwebs i found this:https://kc.mcafee.com/corporate/index?page=content&id=KB68671
"On April 1, 2010, scan.exe in the daily SuperDAT was replaced with a small stub file of the same name.
With the End Of Life for the V1 DATs on March 31, 2010, the Command Line Scanner (scan.exe) has been removed from the daily SuperDAT packages (sdatxxxx.exe and xdatxxxx.exe). For compatibility reasons, a stub file named scan.exe will remain in the SuperDAT packages. However, this is is not an actual executable file."
this matched up with the time that things started breaking for me.
the fix is to take the files scan.exe, scan.dat, license.dat, messages.dat, names.dat, mcscan32.dll from an older working version of the command line scanner and drop them into your new folder.
putting this here in the hopes that someone else doesn't have to slog through a bunch of people's "are you sure you're doing it right?" responses.
Tags: antivirus, bartpe, error, fix, mcafee, scan.exe, superdat
Bike Polo Mallets|
temporary break from facebook...|
some stuff i wanted to note more permanently than a facebook update allows:
i brewed some beer:
batch 13 (12 gals)
20# canadian pale ale malt
4# vienna malt
5 oz simcoe hops
batch 14 (17 gals)
20# canadian pale ale malt
6# vienna malt
(12 gallon batch)
2oz cascades or northern brewer (forgot)
2oz sorachi ace
12 gallon batch split between safale 04 and safeale 05
other 5 gallons:
2oz cascades or northern brewer (forgot)
safeale 04 yeast
Friends Only From Here on Out...|
...because some people just can't help but let their jealousy/hatred/pride from compelling them to do hypocritical things that make them look like dumb motherfucking malcontents.
[<< Previous 10 entries]