Ebay shut off my internet

June 13th, 2009

severe

So, a friend of mine fell asleep in my room last week, leaving me alone and bored - so I took a picture of him and decided to sell him on eBay. Of course, eBay removed the listing the next day just as one would expect - this didn’t matter because the joke was already over by then as he had woken up.

Normally I’d have a link to the eBay listing here, but that’s what this entire post is about. I saved a copy using Firefox’s save feature, and threw it up on my webserver, which is hosted (along with this blag) in my basement on my home internet connection. My ISP lets me do this for a fee. Apparently eBay doesn’t like it when you host copies of listings elsewhere - they apparently called my ISP and had them shut my internet off until I removed the listing. That’s right….  this and this is all I would see when I went to any website.

I called the number listed on the page and eventually, after removing the listing mirror, they turned my internet back on.

This is a generally bad thing because it shows what power a corporation and a threatening letter or phone call can have over an individuals content. While what I did may be against eBay’s terms of service (In fact, they own everything you write in a listing), there is little in place to prevent this kind of thing from being used to limit peoples freedoms (and eBay’s terms of service are harsh).

British cops identify 200 schoolchildren as potential terrorists

March 28th, 2009

Take a look at this.

So, this program started 18 months ago…

At 9 months into the program it picked out 10 terrorists.

Now, 18 months into the program, it has picked out 200 terrorists.

This sounds like exponential growth…

So… start with …y=Ae^{kt}

Plug in 9 for t and 10 for y, jumble around for A and now we have …y=\frac{10}{e^{9k}}e^{kt}

Now we can insert 200 and 18, simplfy a bit and come up with…

y = \frac{1}{2}e^{\frac{ln20}{9}t}

Where y is the number of suspected terrorists, and t is the number of months since the program began.

Over here it says the population is estimated at 60 million, and 1/5th are children under 16 - so 12 million children. Solving for t when y is 12 million comes up with 51 months, or 33 months from now…or December 2011

Oh no!

P.S: wp-latex is great.

RIP: A remix Manifesto

March 25th, 2009

opensourcecinema.org, with the help of Kaltura, has released RiP: A Remix Manifesto under CC BY-NC-SA.  The problem is, I couldn’t find a place to download it - and even the method of finding the videos in /tmp did not work on this player for some reason (It almost seemed like they were making an effort to make these videos hard to download, quite odd considering the nature of the content). In fact, the only way you could remix the videos was by using a *flash-based* video editor. I hate being forced to use flash, and I particularly hate watching FLV videos in tiny little flash boxes when the actual video would play much better in mplayer (or, in the case of RIP, even a bigger flash player would work - the little box was smaller than the resolution of the FLV file!).

Anyway, I still managed to find the links to download the FLVs on the site (I ended up using wireshark), so I posted them all to archive.org to download and be automatically transcoded.

http://www.archive.org/details/RipRemixManifesto

:)

My Magic Map

March 14th, 2009

mapgic1A while ago, during the election, I thought it would be cool to make a magic map - just like CNN.  I actually *did* make one, in about three days, and then used it a bit and completely forgot about it.  Today I remembered it existed so I thought I’d clean it up a bit and then publish it!

The map is closer to SNL’s version of the map than the original CNN version - the states can be dragged around, they bounce off walls and don’t show any kind of actual political data.

I got the data for the states by running the SVG of the United States (and Iraq for the Iraq-spawning abilities) from Wikipedia through a bunch of regexes and then fixing it by hand - the states are pretty accurate and can be scaled nicely with the scale tool :)

The map has several modes.  You can drag the states around, draw new states, nuke areas, make states bigger, delete existing or drawn states, change a state from red to blue or blue to red, draw notes over the map, and spawn an Iraq out of nowhere. It’s quite fun - I even got to use it once with a projector and special mouse-pen-thing at school.

The map is written in python and uses pygame, you can grab it from my shiny new SVN repository!

Just download it with

svn co http://svn.tonybox.net/svn/magicmap/ magicmap

Go into the folder and run “python MagicMap.py” and enjoy!

A quarter made out of solid gold

February 25th, 2009

Sometimes random thoughts fill my head… in this case, I wondered what those gold-colored 1-dollar coins were made out of .. then I wondered how much it would cost if it were made out of solid gold.

Well…. how about a quarter… how much would a quarter made out of solid gold cost..

According to Wikipedia, a quarter is 91.67% copper, and 8.33% nickel - and it’s mass is 5.670g

For the copper part of it:

5.670g * 0.9167 = 5.1977g

Divided by the density of copper…

5.1977g / 8.96g/cm^3 = 0.5801cm^3

And the same thing for the nickel part of it….

5.670g * 0.0833 = 0.772g
0.772g / 8.908g/cm^3 = 0.08667cm^3

Together that makes 0.6667 cubic centimeters

The density of gold is 19.3 grams per cubic centimeter… so..

0.6667cm^3 * 19.3g/cm^3 = 12.86g

And 12.86 grams is 0.4539 ounces.
According to xe.com, at this time 0.4539 ounces of gold would cost $432.189.
That is an expensive quarter.

High school is almost over

February 8th, 2009

High school is almost over

[]

I’ve been playing around and trying to learn javascript, I made a countdown - pretty cool.

This is my first real attempt at javascript. I dunno why I never tried before, all this web2.0ey stuff is pushing me, I’ve always stuck to server side scripting like PHP.

Javascript’s syntax is really nothing special, this should be easy.

Making gnome resize alt-rightclick correctly

February 1st, 2009

I’m so used to fluxbox - specifically, I’m accustomed to the way it handles resizing windows. I like my windows to act as if I’d grabbed the bottom right handle when I press alt-rightclick. Metacity, gnome’s window manager, doesn’t let me configure this - all it does is make me use alt-middleclick and grab the nearest window handle. I might have been able to adjust to this if it let me change the button. On my netbook, the mouse buttons are located to the right and left of the touchpad - doing alt-middleclick-resize requires both of my hands to be in crazy positions like some sort of miniature game of twister (and I don’t like that). A while ago, someone wrote a patch to make it use alt-rightclick - but that was old and doesn’t work anymore.

So, after a quick look at his patch, I made my own - it makes it start resize with alt-rightclick and always grab the bottom right corner of the window!

--- src/core/display.c.orig	2009-02-01 11:36:57.000000000 -0800
+++ src/core/display.c	2009-02-01 11:39:26.000000000 -0800
@@ -1669,46 +1669,14 @@
               if (!unmodified)
                 begin_move = TRUE;
             }
-          else if (!unmodified && event->xbutton.button == 2)
+          else if (!unmodified && event->xbutton.button == 3)
             {
               if (window->has_resize_func)
                 {
-                  gboolean north, south;
-                  gboolean west, east;
-                  int root_x, root_y;
-                  MetaGrabOp op;
-
-                  meta_window_get_position (window, &root_x, &root_y);
-
-                  west = event->xbutton.x_root <  (root_x + 1 * window->rect.width  / 3);
-                  east = event->xbutton.x_root >  (root_x + 2 * window->rect.width  / 3);
-                  north = event->xbutton.y_root < (root_y + 1 * window->rect.height / 3);
-                  south = event->xbutton.y_root > (root_y + 2 * window->rect.height / 3);
-
-                  if (north && west)
-                    op = META_GRAB_OP_RESIZING_NW;
-                  else if (north && east)
-                    op = META_GRAB_OP_RESIZING_NE;
-                  else if (south && west)
-                    op = META_GRAB_OP_RESIZING_SW;
-                  else if (south && east)
-                    op = META_GRAB_OP_RESIZING_SE;
-                  else if (north)
-                    op = META_GRAB_OP_RESIZING_N;
-                  else if (west)
-                    op = META_GRAB_OP_RESIZING_W;
-                  else if (east)
-                    op = META_GRAB_OP_RESIZING_E;
-                  else if (south)
-                    op = META_GRAB_OP_RESIZING_S;
-                  else /* Middle region is no-op to avoid user triggering wrong action */
-                    op = META_GRAB_OP_NONE;
-
-                  if (op != META_GRAB_OP_NONE)
-                    meta_display_begin_grab_op (display,
+                  meta_display_begin_grab_op (display,
                                                 window->screen,
                                                 window,
-                                                op,
+                                                META_GRAB_OP_RESIZING_SE,
                                                 TRUE,
                                                 FALSE,
                                                 event->xbutton.button,

You can grab the patch here or save it from above.

If you want to use alt+rightclick and still have it grab the nearest handle, the patch is even simplier:

--- src/core/display.c.orig	2009-02-01 11:36:57.000000000 -0800
+++ src/core/display.c	2009-02-01 14:08:42.000000000 -0800
@@ -1669,7 +1669,7 @@
               if (!unmodified)
                 begin_move = TRUE;
             }
-          else if (!unmodified && event->xbutton.button == 2)
+          else if (!unmodified && event->xbutton.button == 3)
             {
               if (window->has_resize_func)
                 {

There it is, nice and simple. Now I can use gnome!

EDIT: It seems that this bug was fixed on the same day I posted this! Yay!

Easily saving flash videos

January 28th, 2009

I hate flash. It’s too slow to go full screen with videos on my computer (On linux, at least), it’s proprietary, and it tends to do stupid things to my content.

But so many things on the internet are presented in the form of flash embedded videos! I’d much rather use mplayer to watch videos. With sites like youtube, there are plenty of sites to download the original flv file from the site - but that doesnt work for everything.

The solution is really simple, actually. Flash conveniently keeps all the videos it is playing in /tmp named Flash[randomness]. So all you have to do is wait for the video to be completely loaded, and “cp /tmp/Flash* .”, check what’s what, rename them, and play them all you want.

See, easy!

Getting moTwit to work with identi.ca

January 27th, 2009

This is why closed source software sucks.

The only program I could find to microblog easily from my PalmOS phone was moTwit (there’s really not too many PalmOS developers left). The problem is I don’t use twitter, I use identi.ca.

If moTwit were open source instead of just freeware, this would be a very very simple modification - identi.ca even has a twitter compatable-ish API. But it’s not.

Or can I…. I have a hex editor!

Since identi.ca/api is longer than just twitter.com, I can’t put it directly in overwriting the string - Luckily, ‘tonybox.net’, my domain, is the exact same length - which makes this very easy. So all I had to do was search for ‘twitter.com’ to find the string (It was at 0×1402E), and overwrite it with tonybox.net or even something like this.

Now the requests go to my server - and to tell apache what to do with them is simple:

RewriteEngine On
RewriteRule /statuses/.* /identi.php

And then, the script that forwards to identi.ca’s server and gets around the apparent API bug where identi.ca’s server needs POST while moTwit trys to send it in the URL (/statuses/update.xml?status=blah versus /statuses/update.xml with the status in the postdata).

<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://identi.ca/api/statuses/update.xml");
curl_setopt($ch, CURLOPT_POSTFIELDS, "status=".urlencode($_GET['status']));
curl_setopt($ch, CURLOPT_USERPWD, $_SERVER['PHP_AUTH_USER'].":".$_SERVER['PHP_AUTH_PW']);
curl_exec($ch);
?>

And that’s it, now I can microblog to identi.ca from my phone easily. It’s hackish, but it works.

Playing with SynCE and OpenSync

November 26th, 2008

I have a windows mobile phone, it is okay I guess. Recently, it decided its ringtone was corrupt and that when I got a call it would just sit there and make no attempt to alert me (and that almost got me stranded at the mall). I had to do a hard reset of the phone - and I lost all of my contacts.

Setting up SynCE was fairly easy, compared to the last time I tried to do it (I think that also ended in a hard reset…..) , and then setting up opensync was quite easy as well.

SynCE Is what is used to communicate between the phone and the computer, and OpenSync is whats used to communicate between SynCE and whatever else there is.

Installing SynCE is easy, I’m on debian sid so I just had to install all of the packages from the Debian repos

http://www.synce.org/moin/SynceInstallation

Just run oddcm

$ sudo odccm -f -l 6

And plug in your phone, then wait a bit and hope networkmanager diddn’t break your internet.

http://www.synce.org/moin/StopNetworkManagerInterfering

I harvested everyones data (via php script =) and put it into Evolution..

I tried to sync up between Evolution and my phone, and it worked, except not all of the information made it into my contact book (No addresses!), so then I tried again with KAddressBook (as a fluxbox user, I do not feel tied to stick with JUST GTK or Qt programs =), and this worked - so I will only cover what I did with KAddressBook

Install opensync-plugins-synce, multisync-tools, and opensync-plugins-kdepim

Next, run sync-engine (this is synce-sync-engine on debian), then create a partnership with

$ synce-create-partnership "Linux desktop" "Contacts,Calendar"

Finally, create the synce group, add the members, and sync

$ msynctool --addgroup synce-kde
$ msynctool --addmember synce-kde synce-opensync-plugin
$ msynctool --addmember synce-kde synce-kdepim

And sync up!

$msynctool --sync synce-kde

And now my contacts are finally on my phone!

Get OGG Eliminate DRM! Creative Commons License