RSS feed
Posted by danopia on 2010-01-03 03:52:28 UTC
Looks like the big date of 2010 will be 10/10/10, but not for the same reason as 01/01/01 was big. It's also not the same thing as Feb 13 2009 (1234567890 epoche-time for you computer illiterates, if I even have any). 10/10/10, minus the slashes, is a binary string. Convert it to decimal and you get 42. We all know what this is; but not what it's the explicit answer to. Go read The Hitchhiker's Guide to the Galaxy if you are lost. Anyway, not only are all the numbers in 10/10/10 the same, but it's the answer.
But what is the question?
No comments yet, be the first to comment!
Posted by danopia on 2009-11-11 18:31:54 UTC
Guess what I found today! It's my Verizon "Personal Web Space" site. It's such epic failure........
[/post]
No comments yet, be the first to comment!
Posted by danopia on 2009-11-01 16:39:00 UTC

Ruby on Sails is a project that I started about two weeks ago (10/19/2009). It is a homebrew Google Wave provider. The short history of the project has had many setbacks, including IRB dropping characters when I paste in packets, me having to write a custom Ruby ProtoBuffer parser, and a few rewrites of old code that already was old and badly designed (in a week-old project that was written from scratch!).
Some highlights of the project:
- The communication between the provider and any "clients" (aka servers that interact directly with clients, such as the Rails app) is done with DRb. Sails doesn't contain more than 10 lines of code concerned with connections to the provider and sending data out.
- It has a reusable ProtoBuffer class that can be used by any Ruby project needing to parse/encode Google ProtoBuffers. (This code will probably be packaged into a gem when I get the time.)
- The package includes a little telnet server that just dumps the list of waves to the terminal, along with the complete history. Although this is probably broken right now due to my switch to a new Playback Class last night for history, it shows how easy it is to interact with a Sails server.
- Federation! Yes, that's right, it's federated. Not without its bugs, though. As of this post, it could successfully receive deltas from FedOne, ask for the full history of a wave, show the wave in a WebUI, and send signed deltas back the remote FedOne to apply. It also successfully hosted a wave that remote FedOnes could work with, but this broke recently and even a rollback of my Sails repo didn't fix it. I heard that it's an issue with the latest FedOne mercurial commits.
- Short, or at least shorter than FedOne. The main file is 865 lines (including blanks/comments) as of this post; the code that interacts with XMPP is <400 lines; all the logic from the WebUI is 75 lines. The little Telnet server is 50 lines, 15 of which actually involve printing the wave list to the console.
- Accounts: This is why it uses the Authlogic gem and SQLite. When you log in, though, the WebUI lists EVERY wave, not just yours. This is on purpose. It would be a lot more boring otherwise.
- YAML configuration file, which can even store wave "fixtures" that are parsed into the provider on startup.
- Not written by Google. This project is done by a single high-schooler in his off-time between homework. It shows that you really don't need a few hundred people to write a provider.
Also, as far as I can tell, this is the only non-Google-written server that has semi-working federation. Pygowave isn't federated yet, which is why I can say that. If some other federated third-party server exists, feel free to cite it in a comment. I'd like to play with it.
Finally, you can check my instance of Sails out at http://wave.danopia.net:3000/ (provided it's up ;) and my GitHub project is at http://github.com/danopia/ruby-on-sails. If you are testing federation, please note that the server is currently configged to use @wave.danopia.net. It would be interesting to see what happens when one adds an @danopia.net to their wave, unless it just accepts it without any errors.
13 comments
Posted by danopia on 2009-10-21 21:21:06 UTC
This is the first of several posts about Google Wave providers. Here I'll just show you how to get FedOne up and federated, then later on I'll blog about the protocol, its quirks, and my experiances writing a custom server.
OVERVIEW
Generally speaking, you're going to set up a system where:
- Openfire is an XMPP (Jabber) service, which is used for different servers communicating with each other (federation).
- The Google Wave Federation Prototype Server (FedOne) provides the meaty wave features.
- The GWFP Client provides a very rough (i.e., shitty) user interface to this.
The XMPP service must see the world and be addressable via, e.g., "domain.test". The GWFP-Server must see the XMPP service and the world and be addressable via "wave.domain.test". The GWFP-Client must see the GWFP-Server.
Then you can wave to people and have them wave to you using "name@domain.test".
The XMPP server to server protocol likes port 5269 (by RFC standard), the GWFP-Server is set up to talk to the XMPP service as a component on port 5275 (by default), and the GWFP-Client can communicate with the GWFP-Server on 9876 (by default).
STEP BY STEP
First, follow the instructions Google provided.
There, you will install openfire, then download and build GWFP. This source code can be retrieved using mercurial:
hg clone https://wave-protocol.googlecode.com/hg/ wave-protocol
For federation, you should create certificates using something like this, giving your domain name as "Common Name":
openssl genrsa 1024 | openssl pkcs8 -topk8 -nocrypt -out killerswan.key
openssl req -new -x509 -nodes -sha1 -days 365 -key killerswan.key -out killerswan.cert
(stolen from KillerSwan without permission)
No comments yet, be the first to comment!
Posted by danopia on 2009-10-05 00:48:22 UTC
I've recently been bored enough to toy with my school's PowerSchool online grading system. I have heard a lot about the RubyGem mechanize so I decided it would be worth it to take it out for a spin with PowerSchool.
My first obstacle was that the login screen writes the form fields with JavaScript. How S-M-R-T. Luckily, I was able to work around this pretty easily without too much stress. Once I did that, I noticed that there is some special JavaScript code in the login page to hash passwords with an HMAC implementation of MD5. After a quick google, I found a RubyGem called "ruby-hmac" that handles this very nicely.
Now that I could log in, I had to handle parsing grades. WWW::Mechanize made this easy enough to do, so after a little bit I had a script that dumped my grades to the command line. Yay. I also added a line to click the Logout link on the main page so that the session ended cleanly.
After that, I had my grades in a .txt file. So what? I decided that they weren't going to be useful unless I did something with them. The most obvious application (at least, imo) was to make something that notified me via email when something changed. Although the easy way out was to just pass an old version of the .txt to `diff` with the new one, that just wasn't good enough for me. So, after a lot of file parsing and Array/Hash abuse later (Array#& and Array#- and Array#select, oh my!), I had some simple-ish code that built a string describing all the differences between two grade "tree"s. Now I had to figure out the best way to stick it on a crontab. I realized that I should probably scaffold up a section on my site (which you probably are on while reading this) to let users add their own accounts to check and emails to notify. Then I could hackishly make a URL that pulled all the new grade trees and built and sent emails, and have a clever crontab entry hit that URL with `wget` every hour. Once I had that, ActionMailer was the obvious choice to send emails.
After I managed completing the data dance and debugged it, I loaded up my site in my iTouch's safari browser, since it might look a little better than PowerSchool. Haha, yea right! My fixed-width layout looked horrible. After some quick googling and Rails hacking, I made a special iphone.html.erb layout view that would be used whenever an iPhone was visiting my site. I'm still working on it, but it's starting to look pretty good.
So, if you want to try out my PowerSchool grade notifier, go ahead and check it out! Tell your friends, if any! (I claim no responsibility if you abuse it and get banned by your school.)
If you don't use the PowerSchool system run by Buena Regional School District, you'll need to fill in the full link to your login page. Look at the default link for an idea of what yours should look like. You may also want to try the built-in email notifier; Buena's doesn't work.
Sorry for the lack of code in this post. I am using a laptop and haven't posted my code anywhere. I will try to paste in some code later, and perhaps set up a git repo for my PowerSchool library.
Happy Hacking with your school's grading system! I know I had a nice bit of fun.
No comments yet, be the first to comment!
Posted by danopia on 2009-09-04 01:55:44 UTC
School starts next Wednesday. That's bad.
I'll try to survive it though.
I have a bunch of projects going on right now.... a lot of stuff I have to finish in less than a week.
- This site still needs a lot of work
- Combat Corps v2.0 (phpBB3)
- The Friend Factor.com
- My town's site
- on_urt, on_fire Ruby libs (on_urt can actually connect now! that's about it atm though)
- xfire support for bitlbee
- Dragunn has a site he wants some help with
- Tweak a bunch of my projects that aren't listed here
- Finish setting up and tweaking gmail
- XWiki (documentation of the XFire protocol)
So yea. A lot of stuff I have to do. In less than a week. Sure, I'll be able to work on stuff after school starts, but not a lot at all.
In a sidenote, I might be getting an Acer netbook for $400 (on sale, $100 off at BJ's) between now and Christmas. If I do, I'll be able to do more work..... possibly even bringing it on the bus for the extra 25 minutes that I would get per day. Netbooks are nice and small so they'd be easier to bring than a laptop (which I don't even have anyway). That would be nice, and it comes with Vista so it should be able to handle UrT, at least once I put Easy Peasy or similar on it.
That's it for now. More later, I guess. Maybe. If I'm bored. Meh.
1 comments
Posted by Ben on 2009-08-24 01:06:24 UTC
I just got back from florida last week. We went to Disney and then stayed a week at New Smyrna Beach, the chark attack capitol of the world! None of got eaten or bitten by sharks though, I was hoping to see an attack and did'nt get that either.... bummer man.
Where abouts are you?
5 comments
Posted by danopia on 2009-08-23 10:21:59 UTC
So here I am, sitting on a twin-bed at Bryan's Spanish Cove (which does NOT have free wifi after all), trying to get this laptop to handle Urban Terror. Which it can't. Armagetron would probably work though.
Anyway, I'm in Florida for the next week or so. Just in case you were wondering where I went.
We had a 45-minute-wait connection in Washington D.C. and were very worried about making that flight. We managed it, but apparantly not our luggage...... they said it was supposed to come 2 hours after us. We asked for it to be delivered ASAP. That was at 7 PM yesterday, it's now 6:30 AM today.
Hopefully we get the bag, otherwise my mom literally won't have anything to wear.
No comments yet, be the first to comment!
Posted by danopia on 2009-08-20 05:10:25 UTC
I'm sure that anyone who poked around my site noticed the massive spam comments. I didn't notice myself until Rails started using RAM cache and everything started locking up when you loaded the 10k+ comments. Today I decided to start using ReCAPTCHA to reduce the spam massively..... however, ReCAPTCHA didn't advertise a Ruby library (I found it after mine almost works) so I ended up porting the PHP one. Well, 200 lines of ugly PHP became 50 lines of pretty Ruby.
I finally have a CAPTCHA set up and now my site should be more stable/spam free!
First, I have to delete all the spam piece-by-piece. Any volunteers?
3 comments
Posted by danopia on 2009-06-18 05:25:36 UTC
I was going through my papers to burn them today (
) when I foudn this poem that I supposedly wrote for an assignment. Please don't laugh out loud. (Oh and I need to style <blockquote> and <hr>)
Once a month, my life goes on pause;
Believe it or not, for a very good cause.
We load up our stuff, and head to a site.
It's ok if it's rough, but running water would be al'right.
We collect wood and light a fire;
By this time, we begin to tire.
We pitch our tents and go to sleep,
But some of us have a tradition that we keep.
With the scent of the trees on the cool forect breeze,
We pick out constellations from the stars as we please;
For the stars are bright, out in hte middle of nowhere;
And we drift off to the natual lullaby that comes from everywhere.
Copyright 2009 Daniel Danopia 
Hmm. I need to burn this one later too. Anyway, cya next time, and don't forget to comment!
No comments yet, be the first to comment!
Posted by danopia on 2009-06-17 01:01:38 UTC
So, finally, school is out for the summer. That means that I can devote more time to EighthBit, the new Buena Borough web site, Combat Corps, my web site, and other misc. projects. However, my dad will probably have me out working the land all day with him, so I still won't be online all the time.
Anyway.
SCHOOL'S OUT!
No comments yet, be the first to comment!
Posted by danopia on 2009-06-11 18:33:05 UTC
Before I say much, I must warn you that my blog's style apparantly causes the main part to go half-off the screen on this (outdated) IE version, so I can only see half my post. Sorry about any typos and the such. Anyway, I was thinking about the most common 2012 "end of the world theory", EMPs (electro-magentic pulses) from the sun. It was said in freenode/#botters that you can put computers in metal cages (faraday cages?) that would protect them from EMPs. The main issue is that now the computer we are talking about can't communicate - any wire going outside of hte cage would pick up radiation from those EMPs and fry the circuitry.
My first (and prefered) proposal is to use fiber optics. Then you can just shine the light through one of the holes in the metal mesh that protects the equipment. Of course, this would require everthing to be on fiber optics by 2012, which most likely won't happen. You also could have special machines (with large circuits to make them less suspeciple (spelling? I can't even see it) to EMPs, and they would just sit on each end of a copper wire and relay data to light beams that would again shine into the mesh to be read internally.
Since EMPs are electromagnetic, they shouldn't be able to affect light, right? Meaning fiber optics could be the answer
It's not like the EMPs will find the fiber optic cables and send huge amounts of light down them, ruining hte computers on both sides.
Please coment with your own speculations. Meanwhile, I'll either go to a machine with Firefox or fix the bug in the CSS. Stupid MSIE. (Actually, I think that it's Windows Internet Explorer now - at least, that's what the updater called it)
16 comments
Posted by danopia on 2009-05-23 02:00:20 UTC
Par-tay! In the comments! (That means to comment on this post to test it.)
5 comments
Posted by danopia on 2009-05-23 01:58:07 UTC
This is a test post!
I think it is working.
No comments yet, be the first to comment!