Time for another music vid! :D
I was cleaning up some deprecated and antiquated script files after refactoring them into a new one. Then I did something dumb.
rm objectname* which included my new script I had worked on for about 4 hours. There is no undo for
rm in the command line. This is not the first time this has happened to me. The lesson here, according to many linux msg boreds, is to learn not to do that or quit. I figured there has to be a way to backup deleted files.
If you have root access I suggest you install trash-cl, but if you are on a shared hosting account like I am this might be of help to you.
I decided to create a command called
tr which is short for trash. I created a directory for the trash
mkdir ~/.trash and in .bash_profile I added this code –
if [ "$CWD" == ".trash" ]
rm -fr ~/.trash/*
mv -i $1 ~/.trash/
After saving your update you can
source ~/.bash_profile and see if it’s working without reconnecting with the server. You can
tr files just like you would
rm them, except they are actually moved to the .trash directory. If you want to empty the .trash then
cd ~/.trash and run
tr. All gone! Maybe in a future version I’ll add recursive
They’ll tell you this is a bad idea; that it creates a bad habit; that you should respect the power of
rm and pay better attention to what you’re doing. That’s recockulous. Accidents happen. Especially with a fist full similarly named files.
Now here is a related video! :D
Between 17 professional programmers on IRC late one night, I stumbled across not only this problem, but the solution to it as well. The tricky part is that it’s a recursive process. You have to pipe to hell and back!?!? Maybe . . .
this gets you the number of lines in all php files
cat **/*.php | wc -l
this one lists all the files and their line counts
wc -l `find . -name \*.php`
Sweet! Battle of the Bits is over 30,000 lines of code! Did I do that?
props to jangler and wollymammoth
Published last November, ’10 PRINT CHR$(205.5+RND(1)); : GOTO 10′ (yes, that is the entire official title) is an interesting traipse through all things related to running this one line program on a Commodore 64. Watch what it does when you RUN it –
Somewhere in the mid 80′s, I discovered those two slash characters could generate a maze like screen when I started manually entering them continuously. I had my own version of this program memorized, typing it in on occasion. It was three lines and not one, more often on the VIC20 instead, but the same program nonetheless.
The book’s website has a free PDF version for download. I didn’t exactly read the whole thing, but at least perused each page. Being someone who grew up on Commodore machines when they were still on the market, this book might be much more interesting to non-advanced users or younger generations curious about 8bit cpmuting. There’s a lot of interesting history, variations, and notes on randomness. But at times, it seems to read rather theoretical instead of definitive.
Chapter 55 discusses creating a port of this program to the Atari 2600 (or VCS) and I would have loved to see more assembly language on the subject. Perhaps reading it in a purely technical matter would be much more useful (and briefer) for me. I am probably not the ideal audience here. I’m not concerned with generality when it comes to 8bit computers. I want raw, applicable codes.
page 27 – Mentioned as a ‘quirk’, several character graphics repeated in the character ROM is actually an efficient design. By default, most Commodore computers are in ‘unshifted mode’ meaning there are no lower case characters available which makes room for more graphical characters. When ‘shifted mode’ is enabled the computer references the 2nd half of the character ROM. Then on page 185, they mention that POKE 53272,23 switches the C64 to lower case text mode. It’s not a ‘quirk’. This thing is published by MIT? Are these 10 authors computer scientists? …and I won’t even get into the difference between PRINT CHR$() and directly writing to screen RAM with a POKE.
page 195 – Microsoft accepted the $25k deal for their BASIC instead of $3/unit royalty thinking that Commodore would hire them to update when they developed new computers. Jack Tramiel, founder of Commodore, saved some pennies by never doing so, keeping the BASIC ROM down to 8kb. The C64 could have had a whole new gambit of BASIC functions covering access to the SID and VIC-II chips responsible for sound and video respectively. Both of those chips are much more powerful and difficult to program with BASIC POKE statements than their predecessor, the VIC chip, which handled both. CBM BASIC’s updates were done internally at Commodore, correcting memory pointers so it would work on the architectures over a few generations of machines. (source; it also claims BASIC was sold for $10k)
I liked all the pictures! :D
I was perusing a bar’s cocktail menu and saw a drink named Laura Palmer. The ingredients include Maker’s Mark whiskey, fresh sour mix, orange bitters and a cherry. Interesting combo, I would definitely give it a try. The cherry is more of a callback to Audrey Horn and that tie a cherry stem into a knot in your mouth trick than Laura Palmer. Oh well.
Ok, but is this drink really a thing? So I snooped around. I found someone describing a “citrusy/vodka” drink. Perhaps they meant this : equal parts tequila, triple sec, vodka with pineapple juice and lemon. I would try that also.
And then there is another camp on the Laura Palmer drink and that’s an extension of the Arnold Palmer which is a virgin drink made of equal parts ice tea and lemonade. All these recipes call for a dark liquor like spiced rum or Jagermeister. But these type of drinks have yet another name : the Schwarzenegger or the Californian Arnold Palmer. Obscure drinks named after household words, names and celebrities are likely to vary greatly. The Schwarzenegger can also be dark rum, brandy and a dash of lime juice. And to really round it out, here’s the Arnie Palmer : a shot of vodka, fill with lemonade, splash in some ice tea.
I tried to find a video of Laura Palmer and Donna Hayward doing a shot at the bar with them two studs, whats-his-name and Buck. I remember it being a dark liquid, but am not sure. I did, however, find this awesome Sesame Street parody of Twin Peaks though!!
Regardless which route you go should you have a Twin Peaks party, you might not want to try this drink –
Today, in my inbox, I found this wonderful infographic by Chloe Carter. Yes, it has the ‘Offical B-Knox Seal’ of approval! I always thought Mario had to be more popular than Mickey Mouse!!!
Created by: MBAOnline.com
It never occurred to me, but tis it is a brilliant idea to flip and extrude the world’s favorite fractal into a new dimension. This new incarnation is known as a mandelbulb. There seems to be a single tool people are using to explore this wonder of spatial modeling : MandelBulber and guessing by the manual, you could waste a few nights away exploring the terrain.
Here are some images I found online –
But the best images are on the Mandelbubler website in the Cream of the Crop Gallery.
I didn’t credit anyone’s work because I am lazy. Sorry, internets.
Ok, it’s not so ‘wtf’ as all that. Lucas is tired and the prequel trilogy was, well, it is what it is. We have no idea what’s in store for episode vii in 2015, or the rest of the next trilogy for that matter. But, if I read it right, Lucas’s sole role will be that of creative consultant. Not writer, director, or even producer. Can the Disney seal of quality assure us all that new Star Wars video productions will be better?
There are countless things that I am curious about, but there are no straight answers. The only thing that’s obvious is Lucas is stepping down to the tune of $4 billion in cash and Disney stock. Disney keeps freaking me out. I didn’t even know they own Marvel Movies already! Can we expect Jedi in the next Avengers film?
There’s some kind of live action Star Wars television getting started. But what I’d really like to see is Maniac Mansion and Day of the Tentacle turned into movies! That’s right, Lucas Films includes all kinds of subsidiaries including Lucas Arts, the creators of some classic home computer video games. Maybe they could do something with the Monkey Island series too. Wait, that’s called Pirates of the Caribbean. :P
Yeah, I’m going through a phase. I’m rediscovering what I grew up believing to be wretched cheese. Rancid buttcheese if you will. I’m talking about 80′s studio production practices especially when it’s mostly electronic instruments gated with chincy reverb saturated ad nauseam. Yes.
I’ve been watching some VHS tapes whilst cooking and devouring breakfast lately. Thought I’d share some fun tracks that I forgot about (or didn’t).
Critters – End Credits Music
Kind of cute, kind of long, but, hey, it’s the credits for an 80′s sci-fi horror dark comedy mishmash of awesome.
My Science Project – End Credits Music
This one has the honor of being synthpop with a direct correlation between the movies title and the lyrics of the chorus. Plus epicly sleazy bonus moments of Vinnie clowning around the school.
The Terminator – Tunnel Chase Theme
Every time I watch this scene I feel like I have not been listening to the background score until then. This track is hilarious with its fidgety bassline and giant orchestral stabs.
I first found zombo.com somewhen around 2002. It was actually launched in 1999 as a mockery over website frontend flash loaders. Rather mind blowing that this single screen site has been sitting there, entertaining people, for the last 13 years. Recently, an html5 version popped up just for iPortable users because Apple products don’t support flash.
And so, while enjoying zombocom the other day, I started to wonder what version of flash was available in 1999. I could look up the developmental history of flash, but that still doesn’t tell me exactly which version is being used by the infinitely possible zombocom. At the very least, I knew it was a Macromedia version from before the time when Adobe had acquisitioned them. So let’s do this!
This gets us the html source code for the website. The flash file in questions is inrozxa.swf so . . .
Well, that gets us mostly garbage. But you’ll notice the first few characters are FWS?x_? which has SWF in it backwards. Let’s read up on the SWF specifications! OK! First 3 bytes are ‘FWS’ so that’s in order. The 4th byte is the version number, but why is that a question mark? Because it’s an unsigned single byte integer, not a character silly! My terminal is replacing a low-value control character with the question mark. So how do we find the value of this buggar?
curl zombo.com/inrozxa.swf | od -t u1 -N 4
gets us : 70 87 83 4
What I did was load the flash file from zombo.com and then piped it’s data into a command called od which is an octal, decimal, hex, and ASCII dumper. I tuned it to display only the first 4 single bytes in unsigned integer form. So, from the data above, can you guess which version of flash zombo.com is running on?!?
Macromedia Flash v4 FTW!!
Now read this XKCD strip!
We can all rest easy tonight!! :D