Wednesday, May 25th, 2011 08:16 pm
afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
OMG. I finally got my hands on XCode. It only took me a month and a half!

Look just to let you know how hard it was, I:

  • Started at the beginning of April. My first post where I mentioned trying to obtain XCode was made on April 15

  • Spent two to three weeks trying to download it to my laptop. Each attempt failed after about a week, because my erratic internet would cause the download to time out

  • Managed to massage the download using a download manager until one day I finally had 4.something gigs, but weirdly enough, the file was too big! The .dmg wouldn't open either.

    I had to log back in a couple of times, so I wonder if the 403 error page from Apple got appended to my download somehow?

  • Tried to download it to my server, but I ran into a links issue (I think) which caused the download to consistently fail after some 140MB

  • Was lucky enough to have [personal profile] exor674 volunteer to burn and send me a CD overseas ♥ Unfortunately, it looks like it took a battering in transit, because I couldn't open the file once it got to me

  • Was lucky enough again to have [personal profile] exor674 volunteer to help download it again (!) and let me grab it via her server which, I mean, handled resumes like a champ even when my internet went down (again and again and again...)

And now I have xcode <3 And it took less than two months...

Thank you so so much [personal profile] exor674 you have been super awesome and patient with me and my connection throughout all this <333
afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
I accidentally wiped out my entire dev folder -- we have a bootstrap script, so setting up the repos again is easy, but my unsubmitted patches were another matter.

Unluckily, my dev environment is in a virtual machine, and I excluded that virtual machine from my Time Machine backup (in hind sight, not the smartest decision ever).

Worse still, it may not have been much help in this case because my older sister borrowed my portable hard drive and hadn't returned it, so I haven't been able to back up for ages. A backup plan is good and fine, but a backup plan you didn't actually run is less so!

BUT. Luckily, I occasionally push my MQs (mercurial queues -- where my patches are stored) to my public webserver, so that I can test my code in an environment that's set up closer to production.

The last time I did so was a month ago. And I didn't lose a month's worth of work, because almost everything is short-term and had either already been submitted to zilla for review, or was committed as soon as it was coded. I judge I only lost a couple patches, most of them involving only debug and exploratory work, rather than actual behavior-modifying code.

That left long-term projects (redesigns, etc). BUT and I still cannot believe how lucky this is because seriously if there ever was an afternoon where it would be okay for me to delete all my work locally, this was it, I had just transferred over a copy of my update page redesign work to my public server because I'd been talking over things with [personal profile] foxfirefey and wanted to show my progress to her.

So I lost an afternoon's worth of work on the update page, and I lost a few small things in misc projects, but it could have been so much worse.

This all has led me to re-examine my back-up strategy.
  • my public server is backed up by my webhost for a small fee. I have my personal website on both my laptop and the public server. I need to check how much other things I have on my server which I can back up locally as well

  • my phone and tablet are both backed up to my laptop (I'll need to make sure I sync more often though >_>)

  • my laptop is backed up, but only to one portable hard drive. I am planning to buy a newer non-portable external hard drive (my brother found one my Western Digital: 2TB, USB 3, 6.5k pesos), and Il'l be backing up to both.

  • my virtual machines images are still not backed up, but most of what is in there either comes with the OS or is just testing data / sessions

  • instead of storing my dev folder in the virtual machine, where it can't be backed up, and accessing it via sshfs from my mac for editing, I have turned it the other way around. Now I have my dev folder on my mac, where it will be backed up, and I have mounted it as a shared folder in the virtual machine. My server runs a tiny bit slower now, alas, but it's still faster than if I had to contend with a network bottleneck, and I can live with that for the added security of being able to back up

  • perhaps I should back up a few essential but non-sensitive files to Dropbox?

In entirely more pleasant news, I have finished a shawl for my maternal grandmother, and am now looking at making a vest for my paternal grandfather. I'm not sure what makes a good vest pattern though; I have never done one, and I'm overwhelmed by the options on Ravelry!

(If I could narrow it down to all vests that open in the middle so you can put them on easily, rather than pulling them over your head, that would be a good start)

Also I am sending a friend of mine a hat! :DD :DD :DD

I have been working diligently, and I have finally cut down my projects to just three in progress: a pair of gloves where the second glove, barely started, is much looser in gauge than the first which is stumping me; a hat I ran out of yarn for, so I'm waiting for new ones from my LYS; the Grounded scarf which is perfect for mindless comfort knitting, so I'm saving it up for when I need something like that. Oh, and a half-finished top which I started when I was new to knitting and which is finished up to just below my breasts. I think I'll undo everything I have; I don't have the rest of the pattern because the person who was helping me is no longer at my LYS, and the tension is very uneven besides. I am only holding on to it for nostalgia *_*

Ooh and another project will be added to that list, as soon as I figure out a patten for my grandpa's vest.

I think that my knitting projects are multiplying. (help)


Sunday, February 13th, 2011 01:33 am
afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
Looks like I'm getting a patch into Mercurial :)

Ta, patch is in stable
afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
I run my dev environment (ubuntu) in a VM on my laptop, because that makes things a lot easier for me. Unfortunately

cmd+alt+fn + f1 through f6 = virtual terminal mode

(I don't need the full gnome mode, and the terminal I get to by logging in via the GUI login is weird. It seems to be bigger than my actual window size and all output is way past the lower edge of my screen, so when I type, I can't see what I'm typing, and after I run a command, I have to hit enter approximately half a gajillion times before I can find my output.)

apt-get install console-data
dpkg-reconfigure console-data

(installing and configuring console-data has let me set the terminal keyboard to dvorak, rather than qwerty. It's not a big deal; I usually just ssh into my dev environment using the Terminal application, but it's been a minor annoyance, that now is fixed yay :D)

GM Scripts move

Sunday, November 2nd, 2008 11:04 pm
afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
I've moved over my scripts to my site (after months of putting it off. Thank you, [livejournal.com profile] ciaran_h for hosting them this past year <3).

Old site: http://afuna.theblob.org/greasemonkey/
(redirects to)
New site: http://afunamatata.com/greasemonkey/

I also spent some time cleaning up naming conventions and namespaces. These changes break all old direct links to scripts, and may prevent many scripts from being recognized as the same script if you have to reinstall for any reason (which means duplicate scripts in the list, or preferences not carrying over).

But this is the last time I'm doing something like this, and it won't cause any problems for any scripts newly installed or written from this point forward. (And should not cause problems for the majority of existing scripts, either).

The best part about reorganizing is that I've managed to consolidate new scripts and script updates which had previously been scattered across three different sites! And some of these scripts weren't linked to from anywhere else, so it was all a mess.

It feels good to have them all neatly referred to from one location. This page will likely remain more updated than my userscripts.org account :-)

I've announced most of my scripts before, but I think LJ Search Defaults was only done through PM, and the autocomplete for the taglister hadn't gone public before. Some others I brought up in IRC, but might not have brought up in an entry or added to the old site.

Anyway, take a look if you're interested! It's all red and white now, too: here be scripts

All changes can be tracked with http://www.afunamatata.com:8000/atom-log/, though that includes the website updates as well...it's possible to track individual scripts by going to (note ending "?"), which I should mention, but I'm too lazy to add a link beside each script at the moment:

afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
Not the inside-inside, Perl guts, but trying to update all (DW) layout layers, to get all the updated features!

Long-term goal (actually, medium-term, because once the site goes live, everything needs to be stable, so I won't be able to do any drastic changes) is to turn this layout/feature chart entirely green. I know it's not possible; I can at least try what is reasonable.

One The hard thing about developing with S2 "officially" is that the quickest (only?) way to get feedback on your changes is to apply the layout to your journal, use the S2 compiler (layeredit.bml), apply changes, check journal, rinse repeat. However, then you have to copy the updated layer to bin/upgrading/s2layers. I've found that last step error-prone: tedious to pick out the changes bit by bit and transfer them manually. If I try to replace the entire layer in one go, I find that I have a hard time copy-pasting more than a screenful in vi (hm, have I ever tried just truncating the file and then pasting everything into a blank file? I don't think I have. Maybe I should do have tried that before trying to work around it).

So, anyway! Perl script! You give it the name of the layout. It reads the updated version which is currently "live" (on your dev site need to set the base URL; localhost works fine reads from ljconfig.pl). It then updates the static file in bin/upgrading/s2layers. After that, just need to do cvsreport.pl or hg diff or svn diff or commit or whatever. I've stuck in my ~/bin, so I can run it from anywhere, which is pretty convenient:


(This assumes that $LJHOME is set properly, and live versus cvs directories are in their normal LJ-setup locations, though this is really more for DW, since it overwrites bin/upgrading in DW-free)

Sample in action )

At some point, I may find it useful to modify it so that it accepts and upgrades multiple layouts (and themes??), but too much trouble to do so now, since I'm not touching themes at all.

And hopefully this will make development that much easier :) I was dreading keeping my live layout versus my diff-able layout in sync, but I am looking forward to coding this weekend now.

[livejournal.com profile] exor674 just came up with a much prettier version <3 http://pastebin.com/f2fc673b3

I'm appropriating it for my own use.

Slightly tweaked version here: http://afunamatata.com/scripts/dreamwidth/s2sync!

(Basically, sanity check to make sure it's a layout layer, and also put the output directory into a variable, so that people who want to stick it straight into live instead of under cvs/ can change just the one line)

It now accepts either layer id (as a number), or layout name or redist_uniq, so either of these will work:
$ s2sync 333
$ s2sync bob/layout
$ s2sync bob

Also, output slightly changed:

dh-afuna@li-166:~/dw/cvs/dw-free$ s2sync 336
Can only handle layout layers at /dreamhack/8080-afuna/bin/s2sync line 33.
dh-afuna@li-166:~/dw/cvs/dw-free$ s2sync 333
bob/layout written to /dreamhack/8080-afuna/dw/cvs/dw-free/bin/upgrading/s2layers/bob/layout.s2
afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
Damn. PHP also uses @$. First thing I thought when I saw it was, "Oh neat, it's dereferencing an array reference." Then I realized a) the variable on the LHS wasn't an array, and b) I was in the wrong language.

(It's used for error control instead, which is also neat in its own way, I guess.)
afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
Abby, I'm making this for you (though anyone else can join in if they want). Post new script suggestions, ideas for improving current scripts, and bug reports here. Take a look at my current Greasemonkey scripts my current Greasemonkey scripts, and see if you think of anything!

(Poor man's tracker, ahaha)
afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
Google recently published an API for Greasemonkey scripts. I haven't had a chance to test it yet, or to even look closely, but if it's possible to use it to easily access and edit content in a message, that would be perfect.

(And even if it isn't, just the concept excites pleases me very much.)

Yes, it is possible, because I've just managed to add in a userpic input field for LJ comment notifications. It took me longer to figure out how to get the script to load in Greasemonkey, than it took to figure out the logic to add in the input textbox. I should have scrolled down -- there's a sample script on the API page which explains that you have to add an onload event listener.

Still not done, as I'm too lazy to do the three items on the todo list for the script:

// TODO: make it a dropdown (Can use this and then store it, I suppose)
// TODO: check that it *is* a comment notification ;-0
// need to add something for when a message is expanded, if it's possible via the API

But I now have a fair grasp of the way around the API. Want to play with it so badly, but I need to sleep because I promised myself I would get that student's license by tomorrow.
afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
In case anyone wants to comment on the script but doesn't feel comfortable doing so on us.o, here is a good place. I'm assuming that anyone who wants to use that script has an LJ account, since the script itself is made to work with LJ!


Because it seems fitting, here's a script (not written by me!) which restores the appearance and formatting of the old update.bml page.

Also, I've finally posted the script to add a tagslist to update.bml. There's an easter egg in there of a sorts -- didn't bother to remove my uglification code, but it can't be activated unless you know the exact steps.

Ah, the stupid thing is that my script is not compatible with the first one, so unless someone (else) is willing to figure out how to fix that, you'll have to choose one or the other.

The information below is outdated; most updated info is in the script itself and probably also in the extended description over at us.o.
Rough docu for my script. This text is also found within the script itself )
afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
I've been lurking around [livejournal.com profile] news/[livejournal.com profile] lj_design/[livejournal.com profile] lj_releases, hoping for any news that the userpic has been dragged back down to the bottom by sheer force of gravity, if nothing else. I even made a couple of comments saying that having the userpic at the top seriously disrupts my workflow (I tried to stop myself, honestly I did).

Then I realized that I didn't need to wait for the powers that be to change their minds; I could work on my own solution. So in between studying for my polsci long test and studying for my theo quiz, I tried my hand at modifying update.bml and I came up what has to be the world's ugliest update.bml page ever. And it only really works for me because I don't think that anyone else wants to lose their music and location fields, or to have their mood icon preview and userpic preview side by side.

world's ugliest update.bml page EVER )

But see, I don't care! AHAHAHA.

I have a list of tags! I can change my icon without having to scroll up! Everything that I need is right where I need it, and life is good.

Welcome to my world, my personally tweaked update.bml. Bless your ugly little Greasemonkied face heart.

I could move the music and location fields to the right instead of removing them entirely, but right now that's more trouble than it's worth, considering that I don't ever use them. For me, they're icing on the pudding -- that is to say, don't like, don't use, don't need.

Oh and I still feel guilty over the screenscraping involved in fetching those tags so still not making the (tag-related) code public until I've added even a tiny measure against overdoing that. Unless I don't need to. Gah! Help!