Facebook!

Instead of sleeping, I wrote a new story. Here’s an older, experimental one:

Friend: feels highly unmotivated – no inspiration right now.

Me:

I know just what you need! How does a juvenile sea dragon sound?

The salesman came from behind: facing the wall, there was no way out without breaking several generally held social contracts. Escape would have to wait until he made a mistake.

Such a pet will highly motivate you! If you don’t feed it, it will eat YOU! Ha! Ha! Is that not hilarious?

Maybe such an egregious man was not bound by the contracts, and striding off would be a possibility. Or not. Better not find out. If only she were here

Eh? Juvenile sea dragon not good enough for you? Well, adult sea dragon wont be good, too violent. Gotta get em young!!!!

So young. Excited, able, fascinated. the world seemed to slow its spin, and nothing was impossible Knowing is one thing: experiencing is another. It was so long ago when she left, when, looking at the calendar tells only a year of passage. Damn hounds.

Gia’t man-eatun sea slugs?? Dem shore can make yer busy!!!!1 Deyal sukers ur brains straight out if you dunt keep bobbin!!1!

So this is what it comes down to A hollow shell Trying to keep secrets closed and keep the weapons out of the wrong hands. the hounds are closing in though and nothing will keep them back when they find this city Maybe she got off easy.

YUPPERS!!!! WEZ SHURE GOTTEM! KILLUR CHIHUAHUAS!1 YESH SHUR REE!% WE GOSH DURN LUVS!!! DEM 2 DEZ!$2 HAR HAR HAR KEEP UR 0N UR TOS!!!!!!!!11

spark of inspiration to fight to protect she would have done it but inspiration runs thin and drips drips drips from the eaves and the hounds come maybe it is not so bad they will wash the world and make it new and make it new where she died just before safety but now no one is safe why did none of the agents know she was the only operator

OMGWZTFFF IGUSNUTIN%%LIK3#DISMANS SHERATA!!!NGABEA!UTSHOR3 3333N0UMMYUPHAYITZ R HOUNDZUPUPOMGWTFBBQWAI WUTIZDATOMGWHATAR
e

Good times. Even though I wrote this a few days ago, I can now not read the last paragraph. I do know everything ends in vaporized tears, though.

Sleepy Friday #2: Stuff, stuff, failure

So, quick status report before I sleep. I haven’t been getting enough sleep, so I’m kind of wiped out right now.  My day went like this: school, talk to professor, eat, school, work on next iteration of coilgun, break an ott light, eat greasy food, go to a concert, made a smoothie, and tried to hack a quickie robot before realizing that I am an idiot and have no place on this earth. So.

School was fine: day on which nothing is due, which is good. Talking to a professor, I now have a smaller chance of being rejected outright by USC. Next iteration of the coilgun will have multiple stages, and we almost have it all set up, but the charging system we’re using seems to have broken over winter break. However, we got the arduino-controlled firing system working, and have a separate 328 chip on a breadboard acting as our arduino, since we fried our last one. Great fun. There were more than a few instances in which I had an LED plugged in the wrong way, so I had no idea it was working.

After we found out that we were hungry as heck and needed to eat, my fellow hacker left, and since I couldn’t figure out how the ott stand was screwing with wall power, I just plugged the bulb directly into the wall. Of course that was a bad idea, and now everyone should know that while the stand doesn’t screw with the voltage, it almost definitely tamps down the current available, probably through the inductor-looking thing. Fortunately, it did not blow up, which was my realistic worst-case scenario fear. It does have a crack in it, and who knows what’s in the lamp, so I might wake up tomorrow morning as some horribly mutated thing. If that happens, I recommend ceasing all attempts to hack such lamps; don’t worry about me, I’ll have done it FOR SCIENCE. Right.

Since that lamp is gone, I’ll probably have to mash up a system of LEDs to aleviate my current lighting situation. Maybe. LEDs can be not so great for lighting, so I guess I’ll try it and see how it turns out.

Friday cafeteria food has a theme of greasiness, which is unfortunate. I’m already pretty unhealthy, which I will have to rectify. Talked to fellow humans, and saw a pianist play some pieces I have not heard before. He was pretty good, but not quick kick-ass.

After the concert, I tried to stick together a very simple robot. It’s a differential drive, that derives obstacle avoidance through 2 dpst switches that switch the polarity of the motor when switched. It’s pretty simple in theory, and should’ve been simple in practice, but I have no working robot that can scuttle around and keep me happy. After 1.5 hours of working on that, I decided to switch to my pre-amp, but I looked at the schematics, the bottom of my perf-board, and now I’m here to tell you all that I need more solder. I’ll have to find if there’s a radioshack nearby.

Basically, nothing got done. Some groundwork got laid, but I have nothing to show. Yet. I’m not sure what I’m going to do next week. Yet.

Upgraded WordPress, Facebook Attack!

At long last, I’ve upgraded wordpress: it was surprisingly painless, since I’d finally figured out how to smooth the process. Well, I’m going to be upgrading much more often now.

Also, I’ve taken to writing stories on-the-fly for various posts on Facebook. I’m thinking about posting them here for posterity, so here’s the first one.

Friend status update: can’t concentrate! 🙁

Me: having to exact revenge does wonders for focus. of course, it might not cause you to focus on what you want, but that’s a small detail

Friend: what?

Me: Your entire extended family dies in a series of accidents at the optometrist’s office: you later learn that a cabal of optometrists has decided your family would play a key role in alleviating the need for optometrists, by eventually expressing genes that could be used to engineer 20/20 eyesight in everyone, thus putting them out of business (Iknow, I’m not good at bio bs). After learning this, a gang of optometrists burst in with overpowered lasik machines and try to kill you too. You immediately go into hiding, building a new identity, tirelessly working to become a martial artist and study that which you hate, optometry, in order to infiltrate the ranks of the optometrists and destroy them from within. You get a degree in optometry in half a year. You slowly move from office to office, an intern at first, then an accepted optometrist, but only during the day: at night, you study and prepare for the final showdown, fighting disgraced optometrists to test yourself. You don’t need sleep; the desire for revenge is too strong within you. You befriend an intern, but he accidentally finds about your pogrom, and you have to lasik him in the back. The police are closing in, but the cabal finally convenes… for the final time. You lock the door behind you, and run: the police are close behind, but they are no match for a properly planned escape route and corrective eye surgeries timed to fail catastrophically at this exact moment. Eventually, you are alone on a roof, sirens fading into the distance, watching the sun rise… what do you do now?

Tomorrow may or may not be productive: I’ll try and get *something* done while celebrating a good friend’s birthday. ?

Fun Friday #1: EZLO Upgrades!

So, I’ve decided that every friday will be devoted to ignoring homework as much as humanly possible, and instead working on one of my side projects. So, today, I fixed the showing older document function (technically, actually made it publicly available), fixed the image handling so that it works with the dual LaTeX engines, and just did some plain ol’ code refactoring for the image handling. You’ll also notice that there’s a new reload function that will reload your images for you, so you don’t have to reload the page to get the newest images uploaded by someone else.

A quick note: once you’ve inserted an image, changing the engine will not change the file extension for image code that is already inserted. Well, if I just lop off the file extension, it still works: plus, the image code should clean up after itself, and pdftex/vanilla latex are probably smart enough to look for the right extension (eps/png) so it should be all good, even if it doesn’t clean up well. Note to future users/self when documenting: vanilla latex will use the eps format will use lossy compression: pdftex images will use png. Just a caveat there…

Also, there is an annoying tendency for the mysql server to run off and consume 100% cpu on a single core system. It’s happened several times, and I can’t get into mysql to figure out what’s going on. Also, chrome (at least edge) doesn’t seem to like editarea, since it screws with the overlay. I’ll have to figure that out sometime: maybe later. It is, after all, 1am, and I need to sleep.

EZLO Update

I’ve done some work on EZLO! The first time in at least a month! Even though I haven’t exposed the functionality, you *can* access your old stuff now. Also, I gave the login page a facelift and exposed the link to the quickstart. Now for outstanding issues:

  • Diffs *need* to work. If more than one person (myself) uses this at a time, bandwidth could become a problem. Also, diffs would allow multiple people to work on a doc at a time.
  • Images need to be overhauled to handle multiple engines. Also, the thumbnails are cute, but not functional. I should probably combo thumbs with names, so that people also have an incentive to rename to something meaningful.

Smaller issues that I want to overhaul eventually:

  • Overhaul the visual style of the site.
  • Overhaul the templating system, make insertions votes, allow ajax search.
  • Support for Bibtex.
  • Custom keybindings.

Okay, so enough dreaming: time to do homework.

Printing Envelopes with Cups and the P1006 [Redacted]

Although it’s not technically a hack, I put some good minutes and iterations into making this work, so here’s a system I cobbled together one late night, when the rent was due and my handwriting bad.

Doing envelopes is not especially straightforward under Linux (as of yet). Open office does have an envelope wizard, but one has to play with the page/printer settings until it prints in the right direction, and then it prints down the middle of the page. Oh, and the HP P1006 does not take a single envelope: it won’t see a full page, and will refuse to print.

To get the printer to take an envelope, you have to combo it with another, full sheet of paper. Merely laying the envelope on the sheet has mixed results: it definitely works, but the envelope tends to move and the addresses come out strangely. Tape may work, but I’m not sure how much abuse the printer will take (I’m guessing a whole lot, but don’t fix what ain’t broke? (Which is actually a bad sentiment: I’m guessing real scientists would look to break things)).

To work around the fact that it seemed nothing could print an envelope correctly, I finally went back to the CLI, and found a new command: lp. This guy prints stuff from the command line, with arguments that control where it prints and how it positions the printing document. Read the man pages for more: the final command I ended up with this

#!/bin/sh
lp -d HP_LaserJet_P1006 -o position=right -o landscape -o com10 $1

Which reminds me, I really need to grab a code formatter for wordpress. Tally ho!

Anyways, save that into a file, chmod it so you can execute it, and pass it the name of the PDF. You can make a envelope PDF with open office just fine.

Hope this helped any poor souls out there.

EDIT: I stand corrected: Openoffice will print in the right orientation, you just have to browse around in the options tab next that is discretely hidden in the envelope wizard. I also found that you do not need a sheet of paper to act as a sabot for the printer. *facepalm*

Quickie LED Light Hack

This is a very quick and easy hack to convert an LED light that runs off batteries to mains (wall) power.

Standard warning: following these instructions may kill/maim/turn into flowers everyone your know and hold dear. Be smart.

Usually, LED lights run off batteries, because… well, let’s expand the acronym. LED stands for light-emitting diode, a diode being a circuit element that usually only lets current through in one direction. Hence, it stands to reason that trying to put an alternating voltage across it will result in subpar performance, since half the time the current is trying to go “the wrong way”, and it won’t light up very brightly*. Also, making a diode rated for 120V is probably a pain: regular 1N4001’s rate to 50V.

However, batteries are a very poor power source for a stationary light. Since the light has to put out an appreciable amount of light for long period of time (versus, say, a flashlight), the batteries wear out quickly (and I don’t get why regular alkaline batteries are so prevalent. Rechargeable batteries have not been shown to be detrimental to the environment to me, and taking the position of the armchair environmentalist, it seems that even if you could squeeze only 10 charges out of it, it would displace 10 batteries otherwise destined for the landfill, and grabs energy from the wall at at least 80% efficiency (depending on your charger). The only problem I would see with this is running out of Li (unless we’re talking strictly NiMH), but we just need to get working fusion, and we could probably synth our own Li. Of course, this would be incredibly ‘inefficient’ as a process to produce Li). Hence, the motivation for this particular mod.

To get DC from the wall, the easiest solution is grabbing a wall-wart (essentially an AC->DC converter in a plug) and sticking it in place of the batteries. Find yourself a wall-wart that outputs about the same voltage as all the batteries combined; mine used 3 AA batteries, for a total of 4.5V, so I used this 5V wall-wart from BG Micro http://www.bgmicro.com/index.asp?PageAction=VIEWPROD&ProdID=12944 (or something like it).

So, most of these wall-warts output their DC voltage through some obtuse connector: in my case, I got ‘lucky’ and got a barrel type connector, where the outside of the connector was ground (0V) and the inside at 5V. To get at the 5V, I used a mangled paper clip. Note that you could also snip the wire, strip it, and figure out which one is 5V with a meter.

Now for linking the DC power into the light: in this case, I had to snip some more of the paper clip to get it to fit into the battery slot, and add some aluminum foil to connect the negative terminal with ground. If you snipped the wire, you could solder the wire to the battery terminals, or otherwise manhandle the two to stay together.

A modded plug, using electric tape to secure the foil.

A modded plug, using electric tape to secure the foil.

If you have multiple battery slots like me, bridge it with wire, again soldering or manhandling it into place. I have not tried this yet, but sticking a resistor in place of a wire might lower the voltage across the LEDs, and make more apparent such things as a “half intensity” mode.

Wires marked in red for visibility.

Wires marked in red for visibility.

Put the plug into place:

What it says.

What it says.

Then, we cover everything up/partition with electrical tape to lessen chances of death by 5V:

Electrical tape is pretty cool.

Electrical tape is pretty cool.

At this point, if the wart is plugged in, the light should turn on.

Tape should be used to secure the plug.

Tape should be used to secure the plug.

Tada! If I have time/motivation, I may do a more DIY method for the same result.

Tangent: Future Electronics packs their stuff much more efficiently than Newark.

* There are non-directional LEDs, but they tend to be a bit more expensive than your run-of-the-mill polar LED.

Also, sorry about blurry pics: still learning to shoot well with SLR.

Happy New Years!

Good things: I’m done (kind of, depending on whether I’ll apply tweaks to the final or before) with the animatric for anim3, I hacked a light (more on this, perhaps tomorrow), and I found another webcomic (dresdencodak.com, filled with all sorts of cool art, interesting stories, and thinking material. It’s a wonder I hadn’t found it sooner. However, the update rate is horrendous, although I suppose he has to do other things for a living scratch that, he does it for a living. Also, I’ll have to remedy the ‘cute girls as avatar’ syndrome that seems to overrun every webcomic I see, someday). I also may have a lead on that mystery component in the ott light stand, and parts are arriving. Yay!

Food for thought: having stayed out for New Years (playing Mario Kart and guitar hero, in addition to hanging out), I started driving home at around 2:30 AM. It was a pretty miserable night: not only did I have to watch out for drunks, the heavens decided to piss all over the place. It’s amazing I only passed on accident. I wonder what people think when they pass an accident, how close my thoughts are to the norm. Anyways, I’m pretty tired, so I’ll close here.

Windows 7 – Now with more verts!

For posterity, I will now record my actions that resulted in the installation of Windows 7 to my hard drive. Listen closely, for it is a sad, sad tale.

Maybe not so sad: the XP install I had was showing it’s age as boots took minutes and things were just generally slow. And since Windows 7 was discounted to 30-ish dollars for students, I figured I might as well get a modern OS and refresh everything in one kick (I figured trying to wrangle a copy of Windows from MSNDNAA through my university would be a pain, and more trouble than it was worth. Probably should’ve found out).

So, here’s the first hurdle: it was quite unclear what I was buying. There is an option to ship some disks out to you in addition to the access to download the update, and the site was not making it clear whether or not I was getting an iso, and upgrade executable, or both. If there was no iso, then having the disks would be extremely handy. If there was an iso, then the disks would be a redundant waste of money. To be safe, I got the disks, and discovered a few seconds later that they did give you an iso. It’s not *that* big a deal, but it still irks me that they need to assume their users are idiots so that you ultimately don’t know what you’re getting (probably should’ve googled it, but… yeah, probably should have. Feel free to heap shame on me for failing to do so).

So, anyways, I shuffle some data off the windows partition (although not all of it, so I lost some music. I think), wipe, and try installing. Hangs on expanding files (0%). Hmm… One night down, burn it slower, and install it successfully. Then I find out I shouldn’t have wiped my windows partition, since it’s only an upgrade key, and it needs to install over an old windows. Bust out the xp disc, reinstall, then install windows 7, key works, and the birds are singing. Now it’s time to stick grub back into the MBR (master boot record) so I can dual boot Windows and Ubuntu again.

Ominous drum roll…

So I boot up my Ubuntu live disc, and fire up gparted. And it appears that my Ubuntu partition has disappeared. Strange. Since I burned the second Windows disc from Ubuntu, the XP or Windows 7 installation must have done *something* to the partition scheme. Looking up how to recover damaged partition tables, I installed testdisk, learned how to use it, and took a look around. Apparently, the partition was there in the partition table, but it had somehow become a primary partition (when it was originally a logical) and hence dropped off the face of the earth as far as gparted was concerned.

Since I was using a full complement of partitions, I knocked off my swap (having 4Gb is good for something other than huge fluid sims) and put the lost partition on as a primary. Then I `cp -R`’d all the contents to my /home partition, and then rebuilt the extended partition. Since I also had to shuffle my data around, it took a while, until I finally got my partition scheme back the way I liked it. So, I `cp -R`’d the contents of the Ubuntu partition back, installed grub to the MBR, and rebooted.

Since grub didn’t have a menu.lst to go off of, I learned very quickly how to boot from grub with

set root=(hdX,0)
linux /vmlinuz root=/dev/sdaY
initrd /initrd.img
boot

It gets old after doing it 2 times.

The boot failed: it turned out that sudo was owned by someone else. Fixed that with a livecd, tried to boot again. After the 3rd or 4th boot, it dawned on me that everything was owned by root. That happens when you do `sudo cp -R /media/ubuntu-partition /media/somewhere-else`. So, I gave up, figured I’d screwed myself, and reinstalled Ubuntu. Verily, I tell thee that having a separate /home was a very good idea. You should do it too.

So, I learned somethings, and I’m much less restrained with partition editors than I used to be. Now it’s time to actually finish something so that I have other stuff to write about.

Windows 7

So, I installed Windows 7 this morning. Or was it yesterday night? Or yesterday morning? At any rate, one thing led to another and I finally got here, where I have a working windows 7 and kind of working ubuntu. Unfortunately, I learned about cp -aR too late, and now I have a whole installation of ubuntu that has screwed up permissions. It is almost not worth the effort I put into trying to save it. Maybe it isn’t, since I’ll probably have permissions issues biting me in the ass more frequently than usual.

Live and learn.

Oh, and I have some progress on the head and bow. Head has a hacky approach, and the bow may or may not look good. Haven’t taken a look yet. At any rate, I’m going to sleep. I may write up my adventures later. Maybe.

Also! http://samandfuzzy.com/ is my new drug. And we’re going to see Avatar tomorrow, so I can finally have an opinion on the matter.