Caltech Day 1a

2 #

My account of Caltech\'s Pre-Day 1 written by a tablet.

Click the above thumbnail to read more!

Tags:

Back at Caltech and Busy

2 #

I’m back at Caltech right now and finally managed to get on the internet again (Caltech didn’t give out any ethernet cables and there is no wireless connectivity in the place I’m temporarly staying at) by “borrowing” an ethernet cable from a computer lab. I am really borrowing and not stealing since I left a note there saying that I’ll return this spare (it was on the floor) cable tomorrow with my name and location on it. I’d like to post about how things are going and respond to all of the cool comments people left, but the activities are going on here all the time leaving me with no free time. Seriously, this is about my second time on the internet since I’ve arrived and the 4th time I’ve used a computer here. So right now, I’m going to go take a shower, brush my teeth, and see if I can get some sleep. Tomorrow and Friday are both packed so I’ll see if I can slip in a few things to say here and there. I actually have something ironic to tell you (because things of the ironic sort always seem to happen to me and that’s the irony of that) so I’m eager to post some more.

Tags:

I’m Alive!

4 #

Finally, I’m able to get a hold of a wireless internet connection (I found out that my firewall was blocking Windows from finding wireless access points). So, yeah, I’m alive at Caltech at the moment. I’ll post more things if I can tonight. Otherwise, I’m leaving for Lake Arrowhead Resort tomorrow for an orientation (2.5 days).

Tags:

Leaving for Caltech

6 #

Well, it’s that time for me. I am leaving for Caltech tomorrow. I have lots of things to say, but not a lot of time to say it (since I need to pack today and get stuff ready). I’ll try to post something in a few days.

Tags:

How to foil the FBI

2 #

Wow was all I could say after reading this text file that describes the methods that the FBI uses to “hack” your computer and spy on you. The text file also details how to counter FBI surveillance. Considering that this was written in 1998, this is pretty scary.

Naruto Chapter 275

0 #

Awesome! That’s all I’ve got to say without giving spoilers after reading the latest Naruto chapter 275. Kakashi’s awesome!

Backup (File) to Email

3 #

Around last year, I started backing up the SQL databases on my accounts weekly just so if anything happened, I would have a recent copy. This has served me pretty well a few times (ie. saved my a__). However, the backup files soon started to clutter up server space so I had to delete them from time to time.

Now, this is all fine and all except that I’m lazy, and I want an archive of all my backup files. Okay, okay, the other reason is that I want to fill up a Gmail account at least once in my lifetime. So why not? Let’s send the backup files to Gmail!

So I wrote two scripts: A filesplitter that took the backup files and split them into a specified size (10MB attachment is the limit for Gmail) and a PHP emailer script that encoded the attachment in base64 and generated the correct MIME type emails. It’s easy to send mail with PHP using the mail() function, but it’s a lot more difficult trying to send attachments.

I combined this with my original shell script (.sh) that was linked to a crontab that made backups of my databases every week.

It’s working pretty well right now so I thought other people might be interested in the source:

Download (3KB): BackupToEmail_1.0.zip. Written in PHP and 1 shell (SH) script.

Purpose
The included three files work together to back up a database every so often (specified by a crontab), tar and gzips the .sql dump, and sends the tgz to a email address for backup. If the tgz file is too large, a file splitter is employed to keep the file within attachment size limits.

Usage

  1. Place all files in a specified directory (ie. /home/yourname/www/backup)
  2. Chmod that directory 777.
  3. Chmod backup.sh 777 (give it executing permissions +x).
  4. Edit backup.sh to reflect the database you wish to backup.
  5. Edit backupToEmail.php to reflect the email address you wish to send the files to. A gmail account is a good choice since it has over 2GB of storage Also change the from address to reflect the domain you are sending emails from.
  6. Set a crontab to execute backup.sh every period of time. This can beweekly, monthly, or even daily. You can do this in cpanel is you haveaccess to one or issue the command ‘crontab -e’ at command line and addto the crontab file something like:

    0 3 * * 0 /home/yourname/www/backup/backup.sh

    For the above example, that is set to execute at 3AM every week.

No support is offered for this script. Use at your own risk!

Credits: PHP Manual

License: GPL

Organizing Papers / Folders

8 #

I was recently organizing a huge amount of papers I’ve collected from school and other activities. I already had them in file folders—that was a trick I learned last year to keep things organized (like on a computer :)). However, I ended up with a huge stash of file folders that was holding a corner of a room hostage. So I attempted to sort out the important/non-important folders from the stash so I can haul a bunch to archive in the basement and put the important ones in my room. This is a snapshot of my 75% point:

What the floor looked like when I was organizing my stash of papers.

Finally using GAIM

2 #

Finally decided to switch from my 2 year outdated Trillian to Gaim. It was mostly the filesize bloat that kept me from adopting it although I did try out Gaim during its early stages and didn’t like it. It’s all good now :). The alias feature is nice since I ocassionally forget people.

George Wang on Trang To

5 #

Credits to Eugene for sending this email to me. Credits to George Wang, the author.

(14:33:23) paradoxialmaniac: Admiral, Admiral Piett sent you a copy of a public memo i wrote
(14:33:29) paradoxialmaniac: please post it onto your blog area

[What George Wang wrote should go here.]

But you know what? Christina’s right. This is absurd. Why should I post derogatory messages about other people on my blog? Why would I want to spread other people’s propaganda? I’m my own person, baka!

Tags: