Showing posts with label technobabble. Show all posts
Showing posts with label technobabble. Show all posts

Monday, January 26, 2009

I Made the Amazon EC2 Cloud Rain

Sometimes, elastic ain't so elastic.

I got (2) $50 AMEX Gift Cards for my Birthday, which are like feces that can only be exchanged for exactly ${FECES} worth of merchandise (not one dollar more!).

Sure enough, I decide to buy a couple games for my PS3, because it's lonely and nothing I want costs ~$50.00.

I have a credit on my Amazon account for $119.45 (two Christmas returns and three gift certs). After carefully reading Amazon's allowable methods of payment:

Which cards can you use on Amazon.com? We accept the following cards as payment for your orders:

* Visa (including the Amazon.com Visa Card)
* MasterCard/EuroCard
* Discover Network
* American Express
* Diner's Club (U.S. billing addresses only)
* JCB
* Visa or MasterCard check cards or ATM cards
* Visa, MasterCard, or American Express gift cards
* Amazon Credit Account

You can use debit, check, and gift cards issued by the companies above in addition to their standard credit cards. For example, if you're paying with a Visa Check Card please select Visa from the drop-down menu on the order form when indicating the card type. Similarly, if you're paying with a EuroCard or MasterMoney Card, select MasterCard.

If you are using a Visa, MasterCard, or American Express gift card, please note the following restrictions:

* Pre-paid gift cards can't be combined with credit cards on a single order.
* Pre-paid gift cards can't be used to sign up for Amazon Prime membership.
* Amex Gift Cards can't be used to purchase Amazon.com gift cards.


It says I can use an AMEX Gift Card (PayPal says no, but they lie), it says I cannot tender a second credit card with a pre-paid gift card, and I cannot use an AMEX Gift card to buy an Amazon.com gift card.

Knowing the rules, I try to buy a $59.99 game with a $50.00 gift card, assuming the $9.99 can come off the $119.45 Amazon owes me (!). Sure enough, it tries to put the whole amount on the card and closes out the transaction. Five minutes later, I get the "Your Order Has Blown Up" email. I try to explain to Customer Service three times by email (with my good friends Pranvi, Rhett, and Ooshmani) that I read and followed the rules and the payment system exploded. Frustrated, I used the "Call Me now" option, and Caucasian Brian from Seattle called me back.

Over the next 28 minutes, I discovered:
  • There is a bug in the system that Amazon's Customer Service Folk used, that does not show them the proper gift card balance (my $119.45 showed as $0)

  • My CS rep was very knowledgeable, but I taught him that you can't use Amex GCs to buy Amazon.com GCs (when he recommended that could fix this situation

  • Amazon employees cannot, in fact, fix this on their side. They have an extra option on their screen (gift cards), but that doesn't work either. I know this b/c I bought a $15.00 gc while we were on the phone, he tried to apply it, and it wouldn't work. I was able to add it to my account, bringing me up to $134.45

  • Though the pimply douche who makes $7.00/hr at Best Buy can tender two credit cards, the Internet(s) have no such capability. As I told Caucasian Brian: I've only been an Amazon customer since 1999, why should they enhance their checkout process? It's only been 10 years -- they'll catch up to cash registers eventually.

  • In the end, the only way to fix this was to reduce the price until it went through.

I think bug-finding and brow-beating a human-Amazon-employee were far more rewarding that the $10 off my video game. I did fill out a survey and gave him excellent marks, but only because he laughed at my jokes.

Wednesday, January 07, 2009

New Office

I've had an office since 2000, and I haven't shared an office since 2001. I thought it would be an adjustment, but it wasn't at all. As it turns out, what's on my desk mattered more to me that where I sit. Since I'm a contractor here, I was free to buy my own keyboard, monitor, and bring my laptop to work (for the record: latop to work +5, child to work -5).

I've been in a cube since I started working here last November. At that time, all the feds all got offices and the contractors got cubes. Six months later, half the offices were empty and all the cubes were full, so they decided contractors can share an office.

Someone who worked in the office will be remote for at least the next six months, so his office opened up. My boss suggested I should move in, so I did.



I had more room to spread out in my cube, but here I can pretend I moved from suburbia to a high-rise Tokyo. My two external hard drives (USB 2.0 and Firewire 400), laptop and speakers, french press and electric tea kettle, and panda-slave are tucked in the cabinet over the desk. I've run the cable for the monitor up, and the USB connection for the wireless keyboard down through the conduit in the corner (gray triangle).

Fine use of space if you ask me.

Friday, November 14, 2008

gforge hero

We use gforge for our software projects: tracking bugs and feature requests, storing documentation, and a bunch of other silly shit. Gforge is, in my opinion, somewhere between Jira (high end) and Bugzilla (low end) in the usability spectrum for this type of software. Likewise, beef bullion is somewhere between prime rib and feces in my choices for dinner tonight.

On November 6th, like a good project manager, I was cleaning up the enhancement tracker by removing choices from drop downs that aren't valid anymore (we renamed our 2.0.3 release 2.1, so 2.0.4 will now become 2.2), and accidentally deleted the entire enhancement request tracker. The error message doesn't tell you what you're doing (the cranky gforge admin didn't even blame me or say I fucked up), and I'm the fourth person to do this in as many years.

Our RFE tracker is 300+ items, collected over 4+ years, and includes notes, history, status, and all kinds of other information. This was a huge deal. Our system team, unwilling to restore a backup (which would punish everyone by obliterating their work for that day), restored a backup to our QA instance and told me to retype everything from there. I asked for access to the database and said I'd write the fix myself. I'm sure they were like 'whatever...project manager'.

My solution: archive tables and triggers on the 13 tables that hold tracker information (which I reverse engineered though my local backup/restore). Not only could I recover my shit this way, but the next fuckup won't be typing for days for a bad keystroke.

Unlike me -- who has used Oracle, SQL Server, Sybase, DB2, Informix, and MySQL -- gforge uses postgres. That meant I had to teach myself how to code for postgres (which, being based on Ingres, is 80% Oracle and 20% schizophrenic milk man). I could write 5 pages of the sillyness that is postgres (look: I'm Ada-like, but everything is a function, and triggers can't contain the trigger code, they must call a function that returns type trigger). Criminy.

I finally had a good backup and local copy of the db 11-NOV, had the archive table and trigger code written and debugged 12-NOV, and finished all the functions to restore and test by 13-NOV. I tested everything today, and all my codes without a single correction (and my test cases are tight as hell).

Now we just need to "delete" the data from QA, backup/restore the archive tables to production, and use my code to turn hamburger back into cow. I'm no expect, but I think I win.

-----------------------------------------------------------------
-- Table: 1.) deleted_artifact_history
-----------------------------------------------------------------
--DROP TABLE deleted_artifact_history;
CREATE TABLE deleted_artifact_history(
like artifact_history
)
WITH OIDS;
ALTER TABLE deleted_artifact_history OWNER TO postgres;
GRANT ALL ON TABLE deleted_artifact_history TO postgres;
ALTER TABLE deleted_artifact_history ADD PRIMARY KEY (id);

-- Function: fn_deleted_artifact_history
CREATE OR REPLACE FUNCTION fn_deleted_artifact_history()
RETURNS trigger AS
$BODY$
BEGIN
INSERT INTO deleted_artifact_history SELECT OLD.*;
RETURN OLD;
END;
$BODY$
LANGUAGE 'plpgsql';

-- Trigger: deleted_artifact_history on artifact_history
--DROP TRIGGER deleted_artifact_history ON artifact_history;
CREATE TRIGGER deleted_artifact_history
BEFORE DELETE
ON artifact_history
FOR EACH ROW
EXECUTE PROCEDURE fn_deleted_artifact_history();
-----------------------------------------------------------------
-- Table: 2.) deleted_artifact_file
-----------------------------------------------------------------
--DROP TABLE deleted_artifact_file;
CREATE TABLE deleted_artifact_file(
like artifact_file
)
WITH OIDS;
ALTER TABLE deleted_artifact_file OWNER TO postgres;
GRANT ALL ON TABLE deleted_artifact_file TO postgres;
ALTER TABLE deleted_artifact_file ADD PRIMARY KEY (id);

-- Function: fn_deleted_artifact_file
CREATE OR REPLACE FUNCTION fn_deleted_artifact_file()
RETURNS trigger AS
$BODY$
BEGIN
INSERT INTO deleted_artifact_file SELECT OLD.*;
RETURN OLD;
END;
$BODY$
LANGUAGE 'plpgsql';

-- Trigger: deleted_artifact_file on artifact_file
--DROP TRIGGER deleted_artifact_file ON artifact_file;
CREATE TRIGGER deleted_artifact_file
BEFORE DELETE
ON artifact_file
FOR EACH ROW
EXECUTE PROCEDURE fn_deleted_artifact_file();
-----------------------------------------------------------------
-- Table: 3.) deleted_artifact_group_list
-----------------------------------------------------------------
--DROP TABLE deleted_artifact_group_list;
CREATE TABLE deleted_artifact_group_list(
like artifact_group_list
)
WITH OIDS;
ALTER TABLE deleted_artifact_group_list OWNER TO postgres;
GRANT ALL ON TABLE deleted_artifact_group_list TO postgres;
ALTER TABLE deleted_artifact_group_list ADD PRIMARY KEY (group_artifact_id);

-- Function: fn_deleted_artifact_group_list
CREATE OR REPLACE FUNCTION fn_deleted_artifact_group_list()
RETURNS trigger AS
$BODY$
BEGIN
INSERT INTO deleted_artifact_group_list SELECT OLD.*;
RETURN OLD;
END;
$BODY$
LANGUAGE 'plpgsql';

-- Trigger: deleted_artifact_group_list on artifact_group_list
--DROP TRIGGER deleted_artifact_group_list ON artifact_group_list;
CREATE TRIGGER deleted_artifact_group_list
BEFORE DELETE
ON artifact_group_list
FOR EACH ROW
EXECUTE PROCEDURE fn_deleted_artifact_group_list();
-----------------------------------------------------------------
-- Table: 4.) deleted_artifact_extra_field_data
-----------------------------------------------------------------
--DROP TABLE deleted_artifact_extra_field_data;
CREATE TABLE deleted_artifact_extra_field_data(
like artifact_extra_field_data
)
WITH OIDS;
ALTER TABLE deleted_artifact_extra_field_data OWNER TO postgres;
GRANT ALL ON TABLE deleted_artifact_extra_field_data TO postgres;
ALTER TABLE deleted_artifact_extra_field_data ADD PRIMARY KEY (data_id);

-- Function: fn_deleted_artifact_extra_field_data
CREATE OR REPLACE FUNCTION fn_deleted_artifact_extra_field_data()
RETURNS trigger AS
$BODY$
BEGIN
INSERT INTO deleted_artifact_extra_field_data SELECT OLD.*;
RETURN OLD;
END;
$BODY$
LANGUAGE 'plpgsql';

-- Trigger: deleted_artifact_extra_field_data on artifact_extra_field_data
--DROP TRIGGER deleted_artifact_extra_field_data ON artifact_extra_field_data;
CREATE TRIGGER deleted_artifact_extra_field_data
BEFORE DELETE
ON artifact_extra_field_data
FOR EACH ROW
EXECUTE PROCEDURE fn_deleted_artifact_extra_field_data();
-----------------------------------------------------------------
-- Table: 5.) deleted_artifact_extra_field_list
-----------------------------------------------------------------
--DROP TABLE deleted_artifact_extra_field_list;
CREATE TABLE deleted_artifact_extra_field_list(
like artifact_extra_field_list
)
WITH OIDS;
ALTER TABLE deleted_artifact_extra_field_list OWNER TO postgres;
GRANT ALL ON TABLE deleted_artifact_extra_field_list TO postgres;
ALTER TABLE deleted_artifact_extra_field_list ADD PRIMARY KEY (extra_field_id);

-- Function: fn_deleted_artifact_extra_field_list
CREATE OR REPLACE FUNCTION fn_deleted_artifact_extra_field_list()
RETURNS trigger AS
$BODY$
BEGIN
INSERT INTO deleted_artifact_extra_field_list SELECT OLD.*;
RETURN OLD;
END;
$BODY$
LANGUAGE 'plpgsql';

-- Trigger: deleted_artifact_extra_field_list on artifact_extra_field_list
--DROP TRIGGER deleted_artifact_extra_field_list ON artifact_extra_field_list;
CREATE TRIGGER deleted_artifact_extra_field_list
BEFORE DELETE
ON artifact_extra_field_list
FOR EACH ROW
EXECUTE PROCEDURE fn_deleted_artifact_extra_field_list();
-----------------------------------------------------------------
-- Table: 6.) deleted_artifact_perm
-----------------------------------------------------------------
--DROP TABLE deleted_artifact_perm;
CREATE TABLE deleted_artifact_perm(
like artifact_perm
)
WITH OIDS;
ALTER TABLE deleted_artifact_perm OWNER TO postgres;
GRANT ALL ON TABLE deleted_artifact_perm TO postgres;
ALTER TABLE deleted_artifact_perm ADD PRIMARY KEY (id);

-- Function: fn_deleted_artifact_perm
CREATE OR REPLACE FUNCTION fn_deleted_artifact_perm()
RETURNS trigger AS
$BODY$
BEGIN
INSERT INTO deleted_artifact_perm SELECT OLD.*;
RETURN OLD;
END;
$BODY$
LANGUAGE 'plpgsql';

-- Trigger: deleted_artifact_perm on artifact_perm
--DROP TRIGGER deleted_artifact_perm ON artifact_perm;
CREATE TRIGGER deleted_artifact_perm
BEFORE DELETE
ON artifact_perm
FOR EACH ROW
EXECUTE PROCEDURE fn_deleted_artifact_perm();
-----------------------------------------------------------------
-- Table: 7.) deleted_artifact_type_monitor
-----------------------------------------------------------------
--DROP TABLE deleted_artifact_type_monitor;
CREATE TABLE deleted_artifact_type_monitor(
like artifact_type_monitor
)
WITH OIDS;
ALTER TABLE deleted_artifact_type_monitor OWNER TO postgres;
GRANT ALL ON TABLE deleted_artifact_type_monitor TO postgres;
ALTER TABLE deleted_artifact_type_monitor ADD PRIMARY KEY (group_artifact_id,user_id);

-- Function: fn_deleted_artifact
CREATE OR REPLACE FUNCTION fn_deleted_artifact_type_monitor()
RETURNS trigger AS
$BODY$
BEGIN
INSERT INTO deleted_artifact_type_monitor SELECT OLD.*;
RETURN OLD;
END;
$BODY$
LANGUAGE 'plpgsql';

-- Trigger: deleted_artifact_type_monitor on artifact_type_monitor
--DROP TRIGGER deleted_artifact_type_monitor ON artifact_type_monitor;
CREATE TRIGGER deleted_artifact_type_monitor
BEFORE DELETE
ON artifact_type_monitor
FOR EACH ROW
EXECUTE PROCEDURE fn_deleted_artifact_type_monitor();
-----------------------------------------------------------------
-- Table: 8.) deleted_artifact_query
-----------------------------------------------------------------
--DROP TABLE deleted_artifact_query;
CREATE TABLE deleted_artifact_query(
like artifact_query
)
WITH OIDS;
ALTER TABLE deleted_artifact_query OWNER TO postgres;
GRANT ALL ON TABLE deleted_artifact_query TO postgres;
ALTER TABLE deleted_artifact_query ADD PRIMARY KEY (artifact_query_id);

-- Function: fn_deleted_artifact_query
CREATE OR REPLACE FUNCTION fn_deleted_artifact_query()
RETURNS trigger AS
$BODY$
BEGIN
INSERT INTO deleted_artifact_query SELECT OLD.*;
RETURN OLD;
END;
$BODY$
LANGUAGE 'plpgsql';

-- Trigger: deleted_artifact_query on artifact_query
--DROP TRIGGER deleted_artifact_query ON artifact_query;
CREATE TRIGGER deleted_artifact_query
BEFORE DELETE
ON artifact_query
FOR EACH ROW
EXECUTE PROCEDURE fn_deleted_artifact_query();
-----------------------------------------------------------------
-- Table: 9.) deleted_artifact_query_fields
-----------------------------------------------------------------
--DROP TABLE deleted_artifact_query_fields;
CREATE TABLE deleted_artifact_query_fields(
like artifact_query_fields
)
WITH OIDS;
ALTER TABLE deleted_artifact_query_fields OWNER TO postgres;
GRANT ALL ON TABLE deleted_artifact_query_fields TO postgres;
ALTER TABLE deleted_artifact_query_fields ADD PRIMARY KEY (artifact_query_id, query_field_type, query_field_id);

-- Function: fn_deleted_artifact_query_fields
CREATE OR REPLACE FUNCTION fn_deleted_artifact_query_fields()
RETURNS trigger AS
$BODY$
BEGIN
INSERT INTO deleted_artifact_query_fields SELECT OLD.*;
RETURN OLD;
END;
$BODY$
LANGUAGE 'plpgsql';

-- Trigger: deleted_artifact_query_fields on artifact_query_fields
--DROP TRIGGER deleted_artifact_query_fields ON artifact_query_fields;
CREATE TRIGGER deleted_artifact_query_fields
BEFORE DELETE
ON artifact_query_fields
FOR EACH ROW
EXECUTE PROCEDURE fn_deleted_artifact_query_fields();
-----------------------------------------------------------------
-- Table: 10.) deleted_artifact_monitor
-----------------------------------------------------------------
--DROP TABLE deleted_artifact_monitor;
CREATE TABLE deleted_artifact_monitor(
like artifact_monitor
)
WITH OIDS;
ALTER TABLE deleted_artifact_monitor OWNER TO postgres;
GRANT ALL ON TABLE deleted_artifact_monitor TO postgres;
ALTER TABLE deleted_artifact_monitor ADD PRIMARY KEY (artifact_id, user_id);

-- Function: fn_deleted_artifact_monitor
CREATE OR REPLACE FUNCTION fn_deleted_artifact_monitor()
RETURNS trigger AS
$BODY$
BEGIN
INSERT INTO deleted_artifact_monitor SELECT OLD.*;
RETURN OLD;
END;
$BODY$
LANGUAGE 'plpgsql';

-- Trigger: deleted_artifact_monitor on artifact_monitor
--DROP TRIGGER deleted_artifact_monitor ON artifact_monitor;
CREATE TRIGGER deleted_artifact_monitor
BEFORE DELETE
ON artifact_monitor
FOR EACH ROW
EXECUTE PROCEDURE fn_deleted_artifact_monitor();
-----------------------------------------------------------------
-- Table: 11.) deleted_artifact_message
-----------------------------------------------------------------
--DROP TABLE deleted_artifact_message;
CREATE TABLE deleted_artifact_message(
like artifact_message
)
WITH OIDS;
ALTER TABLE deleted_artifact_message OWNER TO postgres;
GRANT ALL ON TABLE deleted_artifact_message TO postgres;
ALTER TABLE deleted_artifact_message ADD PRIMARY KEY (id);

-- Function: fn_deleted_artifact_message
CREATE OR REPLACE FUNCTION fn_deleted_artifact_message()
RETURNS trigger AS
$BODY$
BEGIN
INSERT INTO deleted_artifact_message SELECT OLD.*;
RETURN OLD;
END;
$BODY$
LANGUAGE 'plpgsql';

-- Trigger: deleted_artifact_message on artifact_message
--DROP TRIGGER deleted_artifact_message ON artifact_message;
CREATE TRIGGER deleted_artifact_message
BEFORE DELETE
ON artifact_message
FOR EACH ROW
EXECUTE PROCEDURE fn_deleted_artifact_message();
-----------------------------------------------------------------
-- Table: 12.) deleted_artifact_counts_agg
-----------------------------------------------------------------
--DROP TABLE deleted_artifact_counts_agg;
CREATE TABLE deleted_artifact_counts_agg(
like artifact_counts_agg
)
WITH OIDS;
ALTER TABLE deleted_artifact_counts_agg OWNER TO postgres;
GRANT ALL ON TABLE deleted_artifact_counts_agg TO postgres;
ALTER TABLE deleted_artifact_counts_agg ADD PRIMARY KEY (group_artifact_id);

-- Function: fn_deleted_artifact_counts_agg
CREATE OR REPLACE FUNCTION fn_deleted_artifact_counts_agg()
RETURNS trigger AS
$BODY$
BEGIN
INSERT INTO deleted_artifact_counts_agg SELECT OLD.*;
RETURN OLD;
END;
$BODY$
LANGUAGE 'plpgsql';

-- Trigger: deleted_artifact_counts_agg on artifact_counts_agg
--DROP TRIGGER deleted_artifact_counts_agg ON artifact_counts_agg;
CREATE TRIGGER deleted_artifact_counts_agg
BEFORE DELETE
ON artifact_counts_agg
FOR EACH ROW
EXECUTE PROCEDURE fn_deleted_artifact_counts_agg();
-----------------------------------------------------------------
-- Table: 13.) deleted_artifact
-----------------------------------------------------------------
--DROP TABLE deleted_artifact;
CREATE TABLE deleted_artifact(
like artifact
)
WITH OIDS;
ALTER TABLE deleted_artifact OWNER TO postgres;
GRANT ALL ON TABLE deleted_artifact TO postgres;
ALTER TABLE deleted_artifact ADD PRIMARY KEY (artifact_id);

-- Trigger: deleted_artifact_update_last_modified_date on deleted_artifact
--DROP TRIGGER deleted_artifact_update_last_modified_date ON deleted_artifact;
CREATE TRIGGER deleted_artifact_update_last_modified_date
BEFORE INSERT OR UPDATE
ON deleted_artifact
FOR EACH ROW
EXECUTE PROCEDURE update_last_modified_date();

-- Function: fn_deleted_artifact
CREATE OR REPLACE FUNCTION fn_deleted_artifact()
RETURNS trigger AS
$BODY$
BEGIN
INSERT INTO deleted_artifact SELECT OLD.*;
RETURN OLD;
END;
$BODY$
LANGUAGE 'plpgsql';

-- Trigger: deleted_artifact on artifact
--DROP TRIGGER deleted_artifact ON artifact;
CREATE TRIGGER deleted_artifact
BEFORE DELETE
ON artifact
FOR EACH ROW
EXECUTE PROCEDURE fn_deleted_artifact();

and..
-----------------------------------------------------------------
-- Test Case: I. Archive Deleted Records
-- Precondition 1) Deleted tables have 0 records
-- 2) Artifact tables have N records
-- Postcondition 1) Deleted tables have N records
-- 2) Artifact tables reduced by N records
-- Execution 1) In isolation (from SQL prompt)
-- 2) Through gforge GUI
-----------------------------------------------------------------
-----------------------------------------------------------------
-- Test Case: II. Restore Deleted Records
-- Precondition: 1) Deleted tables have X records
-- 2) Artifact tables have Y records
-- Postcondition 1) Deleted tables have 0 records
-- 2) Artifact tables = X + Y records
-- Execution 1) In isolation (from SQL prompt)
-- 2) Through gforge GUI
-----------------------------------------------------------------
CREATE TABLE testRecordCount (
run_type varchar,
artifact integer NOT NULL,
d_artifact integer NOT NULL,
a_history integer NOT NULL,
d_a_history integer NOT NULL,
a_file integer NOT NULL,
d_a_file integer NOT NULL,
a_extra_field_data integer NOT NULL,
d_a_extra_field_data integer NOT NULL,
a_group_list integer NOT NULL,
d_a_group_list integer NOT NULL,
a_perm integer NOT NULL,
d_a_perm integer NOT NULL,
a_type_monitor integer NOT NULL,
d_a_type_monitor integer NOT NULL,
a_query integer NOT NULL,
d_a_query integer NOT NULL,
a_query_fields integer NOT NULL,
d_a_query_fields integer NOT NULL,
a_monitor integer NOT NULL,
d_a_monitor integer NOT NULL,
a_message integer NOT NULL,
d_a_message integer NOT NULL,
a_counts_agg integer NOT NULL,
d_a_counts_agg integer NOT NULL,
run_date date NOT NULL DEFAULT now()
);

CREATE OR REPLACE FUNCTION populateTestRecordCount (notes varchar, tracker_id int)
RETURNS VOID AS $$
DECLARE
v_artifact int;
v_d_artifact int;
v_a_history int;
v_d_a_history int;
v_a_file int;
v_d_a_file int;
v_a_extra_field_data int;
v_d_a_extra_field_data int;
v_a_group_list int;
v_d_a_group_list int;
v_a_perm int;
v_d_a_perm int;
v_a_type_monitor int;
v_d_a_type_monitor int;
v_a_query int;
v_d_a_query int;
v_a_query_fields int;
v_d_a_query_fields int;
v_a_monitor int;
v_d_a_monitor int;
v_a_message int;
v_d_a_message int;
v_a_counts_agg int;
v_d_a_counts_agg int;
BEGIN
-----------------------------------------------------------------
-- Artifact Tables
-----------------------------------------------------------------
select into v_artifact count(*) from artifact; --where group_artifact_id=tracker_id;
select into v_a_history count(*) from artifact_history;
--where artifact_id in (select artifact_id from artifact where group_artifact_id=tracker_id);
select into v_a_file count(*) from artifact_file;
--where artifact_id in (select artifact_id from artifact where group_artifact_id=tracker_id);
select into v_a_extra_field_data count(*) from artifact_extra_field_data;
--where artifact_id in (select artifact_id from artifact where group_artifact_id=tracker_id);
select into v_a_group_list count(*) from artifact_group_list; --where group_artifact_id=tracker_id;
select into v_a_perm count(*) from artifact_perm; --where group_artifact_id=tracker_id;
select into v_a_type_monitor count(*) from artifact_type_monitor; --where group_artifact_id=tracker_id;
select into v_a_query count(*) from artifact_query; --where group_artifact_id=tracker_id;
select into v_a_query_fields count(*) from artifact_query_fields;
--where artifact_query_id in (select artifact_query_id from artifact_query where group_artifact_id=tracker_id);
select into v_a_monitor count (*) from artifact_monitor;
select into v_a_message count (*) from artifact_message;
select into v_a_counts_agg count (*) from artifact_counts_agg;
-----------------------------------------------------------------
-- Deleted Tables
-----------------------------------------------------------------
select into v_d_artifact count(*) from deleted_artifact where group_artifact_id=tracker_id;
select into v_d_a_history count(*) from deleted_artifact_history where artifact_id in (
select artifact_id from deleted_artifact where group_artifact_id=tracker_id
);
select into v_d_a_file count(*) from deleted_artifact_file where artifact_id in (
select artifact_id from deleted_artifact where group_artifact_id=tracker_id
);
select into v_d_a_extra_field_data count(*) from deleted_artifact_extra_field_data where artifact_id in (
select artifact_id from deleted_artifact where group_artifact_id=tracker_id
);
select into v_d_a_group_list count(*) from deleted_artifact_group_list where group_artifact_id=tracker_id;
select into v_d_a_perm count(*) from deleted_artifact_perm where group_artifact_id=tracker_id;
select into v_d_a_type_monitor count(*) from deleted_artifact_type_monitor where group_artifact_id=tracker_id;
select into v_d_a_query count(*) from deleted_artifact_query where group_artifact_id=tracker_id;
select into v_d_a_query_fields count(*) from deleted_artifact_query_fields where artifact_query_id in (
select artifact_query_id from deleted_artifact_query where group_artifact_id=tracker_id
);
select into v_d_a_monitor count (*) from deleted_artifact_monitor;
select into v_d_a_message count (*) from deleted_artifact_message;
select into v_d_a_counts_agg count (*) from deleted_artifact_counts_agg;
-----------------------------------------------------------------
-- Populate Test Table with Counts
-----------------------------------------------------------------
INSERT INTO testRecordCount (
run_type, artifact, d_artifact, a_history, d_a_history,
a_file, d_a_file, a_extra_field_data, d_a_extra_field_data,
a_group_list, d_a_group_list, a_perm, d_a_perm,
a_type_monitor, d_a_type_monitor, a_query, d_a_query,
a_query_fields, d_a_query_fields, a_monitor, d_a_monitor,
a_message, d_a_message, a_counts_agg, d_a_counts_agg
) VALUES (
notes, v_artifact, v_d_artifact, v_a_history, v_d_a_history,
v_a_file, v_d_a_file, v_a_extra_field_data, v_d_a_extra_field_data,
v_a_group_list, v_d_a_group_list, v_a_perm, v_d_a_perm,
v_a_type_monitor, v_d_a_type_monitor, v_a_query, v_d_a_query,
v_a_query_fields, v_d_a_query_fields, v_a_monitor, v_d_a_monitor,
v_a_message, v_d_a_message, v_a_counts_agg, v_d_a_counts_agg
);
END;
$$ LANGUAGE 'plpgsql';

-----------------------------------------------------------------
-- Test Deleting Records
-----------------------------------------------------------------
CREATE OR REPLACE FUNCTION testRecordDelete (tracker_id int)
RETURNS VOID AS $$
BEGIN
-----------------------------------------------------------------
-- artifact_history, file, and extra_field_data have fk's to artifact
-----------------------------------------------------------------
delete from artifact_history where artifact_id in (
select artifact_id from artifact where group_artifact_id=tracker_id
);
delete from artifact_file where artifact_id in (
select artifact_id from artifact where group_artifact_id=tracker_id
);
delete from artifact_extra_field_data where artifact_id in (
select artifact_id from artifact where group_artifact_id=tracker_id
);
delete from artifact_monitor where artifact_id in (
select artifact_id from artifact where group_artifact_id=tracker_id
);
delete from artifact_message where artifact_id in (
select artifact_id from artifact where group_artifact_id=tracker_id
);
delete from artifact where group_artifact_id=tracker_id;
-----------------------------------------------------------------
-- group_list, perm, type_monitor, counts_agg are straight forward
-----------------------------------------------------------------
delete from artifact_perm where group_artifact_id=tracker_id;
delete from artifact_group_list where group_artifact_id=tracker_id;
delete from artifact_type_monitor where group_artifact_id=tracker_id;
delete from artifact_counts_agg where group_artifact_id=tracker_id;
-----------------------------------------------------------------
-- query_history needs query to turn hamburger back into cow
-----------------------------------------------------------------
delete from artifact_query_fields where artifact_query_id in (
select artifact_query_id from artifact_query where group_artifact_id=tracker_id
);
delete from artifact_query where group_artifact_id=tracker_id;
END;
$$ LANGUAGE 'plpgsql';

-----------------------------------------------------------------
-- Restore Records
-----------------------------------------------------------------
CREATE OR REPLACE FUNCTION RecordRestore (tracker_id int)
RETURNS VOID AS $$
BEGIN
-----------------------------------------------------------------
-- artifact_group_list (disable trigger before restore)
-----------------------------------------------------------------
alter table artifact_group_list disable trigger artifactgrouplist_insert_trig;
insert into artifact_group_list select * from deleted_artifact_group_list where group_artifact_id=tracker_id;
alter table artifact_group_list enable trigger artifactgrouplist_insert_trig;
delete from deleted_artifact_group_list where group_artifact_id=tracker_id;
-----------------------------------------------------------------
-- artifact_query & artifact_query_fields
-----------------------------------------------------------------
insert into artifact_query select * from deleted_artifact_query where group_artifact_id=tracker_id;
insert into artifact_query_fields select * from deleted_artifact_query_fields where artifact_query_id in (
select artifact_query_id from deleted_artifact_query where group_artifact_id=tracker_id
);
delete from deleted_artifact_query_fields where artifact_query_id in (
select artifact_query_id from deleted_artifact_query where group_artifact_id=tracker_id
);
delete from deleted_artifact_query where group_artifact_id=tracker_id;
-----------------------------------------------------------------
-- artifact_perm & artifact_type_monitor
-----------------------------------------------------------------
insert into artifact_counts_agg select * from deleted_artifact_counts_agg where group_artifact_id=tracker_id;
insert into artifact_perm select * from deleted_artifact_perm where group_artifact_id=tracker_id;
insert into artifact_type_monitor select * from deleted_artifact_type_monitor where group_artifact_id=tracker_id;
delete from deleted_artifact_counts_agg where group_artifact_id=tracker_id;
delete from deleted_artifact_perm where group_artifact_id=tracker_id;
delete from deleted_artifact_type_monitor where group_artifact_id=tracker_id;
-----------------------------------------------------------------
-- fish desired records out of deleted_artifact, restore, clean up
-----------------------------------------------------------------
insert into artifact select * from deleted_artifact where group_artifact_id=tracker_id;
insert into artifact_history select * from deleted_artifact_history where artifact_id in (
select artifact_id from deleted_artifact where group_artifact_id=tracker_id
);
insert into artifact_file select * from deleted_artifact_file where artifact_id in (
select artifact_id from deleted_artifact where group_artifact_id=tracker_id
);
insert into artifact_extra_field_data select * from deleted_artifact_extra_field_data where artifact_id in (
select artifact_id from deleted_artifact where group_artifact_id=tracker_id
);
insert into artifact_monitor select * from deleted_artifact_monitor where artifact_id in (
select artifact_id from deleted_artifact where group_artifact_id=tracker_id
);
insert into artifact_message select * from deleted_artifact_message where artifact_id in (
select artifact_id from deleted_artifact where group_artifact_id=tracker_id
);
delete from deleted_artifact_message where artifact_id in (
select artifact_id from deleted_artifact where group_artifact_id=tracker_id
);
delete from deleted_artifact_monitor where artifact_id in (
select artifact_id from deleted_artifact where group_artifact_id=tracker_id
);
delete from deleted_artifact_extra_field_data where artifact_id in (
select artifact_id from deleted_artifact where group_artifact_id=tracker_id
);
delete from deleted_artifact_file where artifact_id in (
select artifact_id from deleted_artifact where group_artifact_id=tracker_id
);
delete from deleted_artifact_history where artifact_id in (
select artifact_id from deleted_artifact where group_artifact_id=tracker_id
);
delete from deleted_artifact where group_artifact_id=tracker_id;
END;
$$ LANGUAGE 'plpgsql';

Monday, August 11, 2008

A Tale of two (ssh) iPhone Apps: pTerm vs Touch Term

As far as I can tell, there are only (2) ssh apps for the iPhone right now: Touch Term ($2.99) and pTerm ($4.99). Since I don't know anyone who has tried either, I decided to download both and kick the tires.

Besides basic terminal support, I want an ssh client that allows you to configure ssh tunnels. Since Safari on the iPhone supports proxies, there's no reason ssh shouldn't be able to listen on a port and redirect to a remote host (-D) so I can tunnel my http traffic when I'm someplace sketchy (or someplace I don't want to be snooped, like work).

First, Touch Term:



Touch Term requires you to specify your username and password in the connect screen, which (1) makes me paranoid that my user and password are being shipped back to the author, and (2) makes you setup multiple connect profiles for multiple users on the same box.

Touch Term eats the initial ssh connect dialog, so you don't get to initially accept the host as known or not. I was not able to test with either client what happens if the host signature changes (man in the middle attack).

Touch Term also does not support ssh tunnels. It does let you hide the keyboard, and does support horizontal and vertical, but does not support multi-touch to zoom in and out.

As for pTerm:



pTerm requires you to setup a connection first, but asks for username and password at login. The initial connect dialog tells you that the host is unknown, and do you want to accept the key.

pTerm does not let you hide the keyboard: you get about 1" viewable, or 6 lines. You can use multi-touch to pinch/pull/scroll, but whatever text you have can only be viewed in that 1" area. It also supports both horizontal and vertical viewing.

pTerm does not support ssh tunnels, but I did submit a feature request. Since it's based on putty, I hope that feature can be ported pretty quickly.


Both apps have their strengths and weaknesses, but neither supports everything I'm looking for. I'll have to wait and see what the next few updates bring, or just roll my own.

Sunday, August 10, 2008

iPhone 3g, new TV

I became upgrade eligible on Thursday, so Saturday morning at 7:30am I lined up at the Apple store. After a minor issue removing my AT&T discount, I was able to get my 16GB Obama (as opposed to McCain) iPhone.

After I got home, I took my new TV out of the box, and hooked everything up. The new TV stand and furniture come next week. I had to run out and get an HDMI cable for the PS3, but everything is hooked up and working.

I download the iTunes remote app for my iPhone, hooked my laptop to the XBR, then used the iPhone to watch an episode of Aqua Teen Hunger Force I bought on the iTunes store.

As much as I love the new phone, Playstation (and thus, Blue ray) + new TV = amazing. 1080i and 120hz is spectacular.

Wednesday, June 18, 2008

Firefox 3

The new version of Firefox was released today, and I already found a bug. Please take a moment to login to Mozilla's Bugzilla (or create an account) and vote for it to be fixed.

My three-day streak of technology destruction continues.

Tuesday, June 17, 2008

Software Update -> Sad Mac

I couldn't understand why software update kept trying to download EFI Firmware 1.51 for the past three months:
MacBook Pro EFI Firmware Update 1.5.1
This update fixes several issues to improve the stability of MacBook Pro computers.

After the firmware is successfully applied to your Mac, your Boot ROM Version will be:

MBP21.00A5.B08 or MBP31.0070.B07

You can confirm the version of the Boot ROM installed on your computer using System Profiler.

Whatever the fuck that means. It turns out I never followed the post install steps.

Sick of being nagged, I followed the post-install step (hold power button until loud beep), and promptly turned my $2300 MacBook Pro into a brick.

There is a technote on restoring your firmware, which includes the greatest kabuki dance of all time:

Restoring firmware with a Firmware Restoration CD

To restore your computer's firmware, you must first create a CD using the disk image named "FirmwareRestorationCD.dmg" by following these steps:
1. Open Disk Utility (located at /Applications/Utilities).
2. Click the Burn icon or select the "Burn…" menu item from the Images menu.
3. Navigate to where FirmwareRestorationCD.dmg is located, and click the Burn button.
4. Insert a blank recordable CD.
5. Click the Burn button to create the Firmware Restoration CD. The files are burned to the disc.

Next, use the Firmware Restoration CD to restore your Firmware:
6. Make sure that the computer you are trying to restore is plugged into an AC outlet.
7. Turn on the computer and continue holding the Power button. The sleep LED will blink rapidly, then slowly, then rapidly (3 quick blinks, 3 slow blinks, 3 quick blinks).

On Macs that don't have a sleep LED, tones are used instead. Hold down the power button until you hear 3 long tones, then 3 short tones, then 3 long tones.

On Macs that use a tray-load optical drive, the tray will open to allow the Restoration CD to be inserted.

8. Insert the Firmware Restoration CD while the lights are blinking or tones sounding, then release the Power button. A long tone is played once the recovery process has started.
A progress bar appears beneath an Apple logo on a gray screen. The progress bar indicates the firmware is being updated. Do not disconnect power, shut down, or restart the computer during the update or you will need to start the restoration process again beginning with step 6.

The computer will restart automatically after the firmware is updated.


Three fast, three slow, three fast...doh! Still busted.

A trip to the Apple Store later, my Genius tells me the logic board needs to be replaced (a.k.a. no laptop until Friday). Having killed two consumer electronics in two days, I wasn't sure what to do without a computer for three days.

So after much consternation, opinion shopping my friends and family, and a trip to Microcenter, I went back to the Apple Store and bought a Mac mini (which is like a laptop, only without a screen or battery or keyboard). My educational discount saved me a big $20, and I upgraded the ram to 2GB with the leftovers from my MacBook Pro.

Let's see what I break tomorrow.

Monday, June 16, 2008

Your call cannot be completed as dialed

35 days ago, my Sony w810i jumped in a puddle. In the smoothest insurance claim in the history of cell phones, I received a new Sony w580i as a replacement just two days later.

The phone worked flawlessly for 33 days, then froze today while I was writing a text message.

So I will be leaving work early today to go to the mysterious AT&T depot, where it will either be replaced by a working w580i, or Foldger's crystals.

Friday, May 30, 2008

Why I Read People So Well

I used to browse through Usenet posting and read this kind of nonsense:



I hope someone can help me. I hope I'm not the only one who has to do something like this. I don't want to go and I'm sure someone understands this fear. My family still tries to demands that I am the skeleton in the closet and they are presently trying to control an uncontrollable individual only since Nov. 15, 2002. They forced me to sign for them to be guardians over me but since June 2004 I took them to court and proved I'm not the names they call me in public. I've worked through the anger and retailation into loving myself and them too, but I have to keep my distance or they start again. They are demanding I come because it is for the family. I have made a "family" out of nonrelatives that allow me to be me and that where I want to be, yet I can't take anymore abuse from them. What do I do? If I go how do I escape if it gets too much?


Wow...that's a supersized crazy, and I ordered a small.

Wednesday, May 28, 2008

Software Update



I downloaded the new Mac OS update today. Let's see how my MBP feels about it.

General

* Fixes a font issue that could result in Helvetica Narrow being used in applications instead of Helvetica.
* Addresses an issue with stuttering video and audio playback in certain USB devices.
* Resolves stability issues with Word of the Day, iTunes Artwork, and Slideshow screen savers.
* Fixes an issue in which certain attached hard drives may not show up in the Finder.
* Addresses an issue with .Mac syncing of Dashboard widgets over multiple Macs that use different screen resolutions.
* Includes additional RAW image support for several cameras.
* Improves the accuracy of the Software Update progress bar indicator.
* Addresses an issue in which Finder may not be available if the computer name is blank in Sharing preferences.
* Improves Active Directory binding and login.
* Eliminates a delay when logging in as an Active Directory user in a .local domain.
* Improves Spotlight searches on a AFP file server volumes.
* Clients can now change their password at the login window when bound to a Mac OS X 10.4 Open Directory server.
* Improves Safari reliability when connecting to the Internet through a Microsoft ISA proxy.

AirPort

* Improves 802.1X behavior and reliability.
* Improves reliability when using Time Capsule.

Spaces

* Resolves an issue in which switching to a different space and returning back to the original space may reorder the application windows with a different active window.
* Resolves an issue in which activating an application from the Dock switches to a different space, even if there is a window for that application in the current space.
* Fixes an issue in which Command-Tab may incorrectly switch to a new space.
* Addresses reliability issues with Spaces when syncing preferences over .Mac.

Time Machine

* Includes fixes for Time Machine compatibility with Time Capsule.
* Resolves certain issues when backing up a portable Mac that is on battery power.
* Addresses compatibility issues with Aperture 2.
* Addresses reliability issues when performing a full restore from a Time Machine backup.
* Fixes an issue in which certain function keys may be disabled after using Time Machine.
* Fixes a possible alert message that incorrectly states a backup volume does not have enough space.
* Updates Time Machine to reliably restore attachments and messages in Mail.


Thank the Baby Jeebus that the Software Update Progress Bar is now more accurate!

Tuesday, April 08, 2008

NAVTEQ: We lose, you win

Thank you for your recent Map Report. We have completed our investigation of your Map Report.

For the NAVTEQ tracking number: 00570CU8IJ2VDVJZ
Submitted on : 27, Dec 2007 11:54:58
Problem Description:
Montrose Road has been moved, construction still in progress.
http://www.nbc4.com/traffic/14879081/detail.html
http://www.montgomerycountymd.gov/content/dpwt/capital/dcd/htm/MontroseDetour.pdf


Our Resolution Outcome is: Database Updated - Navigable Geometry
Details: The new, open segment of Montrose Parkway has been added to the NAVTEQ database. Please see PVID 750115166. This information was field verified.

For more details, proceed to your Map Report at http://mapreporter.navteq.com

NAVTEQ delivers regularly scheduled map updates to our business partners which include database enhancements. The commercial release dates for these products will vary depending on each business partner’s product plans. If your Map Report did not result in a database change, please note that we track these items and evaluate them with our business partners on a regular basis to enhance navigation system performance.

Having the latest map in your system makes a difference to system performance with the latest roads, addresses and Points of Interest. If you are interested in an updated map for your navigation system, please contact your system provider or check our online store at http://store.navteq.com.

We welcome your feedback on the NAVTEQ Map. Thank you for helping to keep the NAVTEQ Map the most accurate and highest quality in the business.

Regards,
The NAVTEQ Map Reporter Team


Now I just need to wait until my stupid GPS gets this update.

Monday, February 18, 2008

Microsoft: Who Uses Visual Studio 2008?

While installing the newest version of Visual Studio, Microsoft shows you the kind of people who are using their tools to build a better life...well for nobody.

First, this former librarian, who needs to trade her horse-toothed grille for some botox:



Next, this tranny simulcrum:



And finally, this West Hollywood meth addict:



With as much money as Microsoft has, they could have bought a copy of Photoshop (or all of Adobe if they didn't want to use someone else's product) to retouch these pictures.

Then again, I guess the smudge tool can only do so much.

Friday, January 04, 2008

Apple Redeems Itself??

Back in November, I ranted about the lack of support for 4GB of ram in the MacBook Pro.

Never the less, my VMWare appliances were hungry for whatever additional ram I could feed them. For Christmas, my MBP got 4GB of ram, and guess what?





Now let's put it through the paces...

Thursday, January 03, 2008

Where you at? ::chirp::

An hour ago, I packed my lunch for tomorrow:



and then this happened:



so I chirped back in time to tell my 5th grade self not to kiss Erin Whiting.

Wednesday, November 21, 2007

Congratulations! You Have Found the Secret Message

Did you know Apple has a page to submit feedback on any product they fucking make??

I decided I have an issue with Time Machine:

Monday, November 19, 2007

Apples Moves to the Top of my Shit List

Before I started the new job, I made this ridiculous spreadsheet to decide what new laptop I would be buying:



In reality, I wanted a new MacBook Pro, and I wanted to try and justify the at least 100% price premium between a Dell and a Mac.

I finally settled on the 2.2ghz welfare MBP for $1866 (with the education pricing, thanks so much) and ordered it. On November 1st, iWhore John sent me a couple Mac rumors sights that indicated that the MBP had moved to Santa Rosa architecture. I called Apple, and because it was ordered on October 30th and not October 31st -- even though it had not shipped -- my order wasn't transitioned automatically.

So I canceled it.

It turned out that the Santa Rosa chipset/bus speed change was for the MacBook, not the MBP. The mention of the MBP had to do with the addition of the 2.6ghz clock speed.

Well fuck: I need a laptop, and I just canceled the one I ordered...for no good reason.

I added Apple Care to my online order, and I think every Mac owner should have it (I loved my G4 Powerbook: $2500, 13 months old, busted keyboard, flickering screen, flaky motherboard), but you can buy it in month 11 for the same price and extend the warranty 2 more years: why give Apple your money a year early?

I knew I wanted 4GB of RAM, and my understanding was that the 2.2ghz MBP came with 2 x 1GB of RAM while the 2.4ghz and 2.6ghz came with 1 X 2GB of RAM. That said, if I wanted to upgrade the 2.2ghz to 4GB, I'd have to throw out the 2GB it came with and buy a 4GB kit, but if I bought the 2.4ghz or 2.6ghz I only needed to buy an additional 2GB stick.

When you consider the $239 Apple Care deferment, and the $100 ram savings for not throwing any out, it's probably worth $433 more to get the 2.4ghz model. On 11/3 I walked into the Apple Store, and not 20 minutes later I walked out with my 2.4ghz MacBook Pro.

I've been working with VMWare Fusion a lot, so I decided just 17 days later (Apple's return policy plus 3 days) that it's time for me to order more RAM. I jumped into System Profiler:



And immediately had an aneurism.

...

2 DIMMs? Could I have possibly misread the website?




Yup, I did. But wait...it gets better, for I could not make this up:

The MacBook Pro (15-inch Core 2 Duo) and MacBook Pro (17-inch Core 2 Duo) notebooks have two SDRAM slots in the bottom of the computer, and they come with at least 1 GB DDR2 SDRAM installed into the bottom slot.

Although these notebooks will accept up to a 2 GB SO-DIMM in each of the two memory slots, the MacBook Pro will only support 3 GB total memory. If you want to maximize the amount of SDRAM in your computer, install a 2 GB SO-DIMM in one slot and a 1GB SO-DIMM in the other.




I suspect this is a joke, since I saw today that Dell is selling the Vostro (the other laptop I considered) for $399.

As much as I like my new MBP, I don't love it SIX Dell Vostro laptops worth.

Monday, November 12, 2007

Your Traffic Chopper Just Crashed


I happen to have a home Internet(s) connection with a static IP address, and I prefer to keep nosy sysadmins from seeing what websites I visit. I have squid setup to proxy all of my HTTP and HTTPS traffic in my web browsers through home.

First, we tell our local machine to listen on a particular port, and forward any requests it gets to our machine at home:

ssh -L 9000:127.0.0.1:9000 -p 22 username@homecomputer.com


If you're on Windows, this can also be done with PuTTY.

Squid has to be setup on the box at home and setup to forward requests out to the Internet(s).

Then we setup our browser to use the proxy:



And voila! I mean unless, like me, you've been doing this for 5 years.

I started a new job today, and when I sent out an IM, I got this reply inside their IM window:

IM Administrator: You are required to register your IM screen names at [URL]. For questions call the Help Desk at 800-555-1212

Crappy Crapperton! I guess this means we should change our squid.conf to allow popular IM clients.

Add port 1863 to SSL list:
acl SSL_ports port 443 563 1863

Then add the following:
# Permit AOL Instant Messenger to connect to oscar.aol.com
acl AIM_ports port 5190 9898
acl AIM_domains dstdomain .oscar.aol.com .blue.aol.com
acl AIM_domains dstdomain .messaging.aol.com .aim.com
acl AIM_hosts dstdomain login.oscar.aol.com login.glogin.messaging.aol.com toc.oscar.aol.com
acl AIM_nets dst 64.12.0.0/255.255.0.0
acl AIM_methods method CONNECT
#
http_access allow AIM_methods AIM_ports AIM_nets
http_access allow AIM_methods AIM_ports AIM_hosts
http_access allow AIM_methods AIM_ports AIM_domains

# Permit Yahoo Messenger
acl YIM_ports port 5050
acl YIM_domains dstdomain .yahoo.com
acl YIM_hosts dstdomain scs.msg.yahoo.com
acl YIM_methods method CONNECT
#
http_access allow YIM_methods YIM_ports YIM_hosts
http_access allow YIM_methods YIM_ports YIM_domains

# Permit Google Talk
acl GTALK_ports port 5222
acl GTALK_domains dstdomain .google.com
acl GTALK_hosts dstdomain talk.google.com
acl GTALK_methods method CONNECT
#
http_access allow GTALK_methods GTALK_ports GTALK_hosts
http_access allow GTALK_methods GTALK_ports GTALK_domains

# Permit MSN
acl MSN_ports port 1863 443 1503
acl MSN_domains dstdomain .microsoft.com .hotmail.com .live.com .msft.net .msn.com .passport.com
acl MSN_hosts dstdomain messenger.hotmail.com
acl MSN_nets dst 207.46.111.0/255.255.255.0
acl MSN_methods method CONNECT
#
http_access allow MSN_methods MSN_ports MSN_hosts
http_access allow MSN_methods MSN_ports MSN_domains
http_access allow MSN_methods MSN_ports MSN_nets

# Only allow cachemgr access from localhost
http_access allow manager localhost
http_access deny manager
# Deny requests to unknown ports
http_access deny !Safe_ports !AIM_ports !YIM_ports !GTALK_ports !MSN_ports
# Deny CONNECT to other than SSL ports
http_access deny CONNECT !SSL_ports


and then change our IM client settings to proxy through our machine at home:



=)

Monday, November 05, 2007

The Great Email Migration of 2007


My first domain purchase was back in 1999: my last name .ORG. Over the past several years, I purchased .NET and .COM as they became available.

Since 1999, (with the exception of a couple outages George helped me out with), I've hosted my own email. Any time I've changed jobs, I've taken a copy of my email archives with me.

I decided it was time to consolidate all my email under one roof: Google Apps for domains. I moved .COM and .NET over and then began the arduous task of migrating all of my email.

  • Dozens Unix mbox files (some native, some from Thunderbird, some that were migrated once-upon a time from CCMail to Groupwise and then pulled into mbox using IMAP)
  • 1 GMail account (which had BCC's of the Unix mbox files AND forwarded copies of half the email from my current job)
  • 4 Outlook .PST files totaling over 3GB

My Outlook archives were in nice folder hierarchies, so I had to: flatten the folder structure out, use IMAP to drag and drop everything to my mail server at home, and then use the migration tool to suck it in.

The tool labels your messages with the IMAP folder (or folder hierarchy) it came from, and I decided that I wanted the labels to be clean (not: Kaitain\AAAS\Technology Services\Personal Email).



The folders also couldn't have spaces in them, so I used several shell scripts to format:

#!/usr/local/bin/bash
# replace spaces with underscores
for file in *\ *
do
short=`echo $file|sed 's/ /_/g'`
mv "$file" "$short"
done

and to merge all the files into one:

for file in *_*;do cat $file >> Kaitain;rm "$file";done

I don't know how much time I spent flatting my email, but it can't compare to all the time I ever spent organizing all my email.

In the end, can you really quantify the interactions of one person with others?



Apparently you can. GMail extracted 142,119 emails, which threaded into 59,913 conversations since 1999. The total extraction and loading took about three days.



All this takes up over 4000MB of storage. The oldest emails go back to here:



Only about 25 emails were not migrated (either viruses or the attachments were too large), and maybe 5-8 emails that came over "ok" were fucked up and I deleted them. Losing only 32/142,119 is amazing!

Monday, September 17, 2007

Fuck you, iPhone; I know this is your fault!


It appears that Apple changed the sort order in iTunes for version 7.3 and above:

iTunes 7.3: Changes in music sort order

Starting with iTunes version 7.3, the following sort order is implemented:
General ordering

* Letters & Unicode characters (except for digits)
* Digits
* Other

Ignore leading definite and indefinite articles

* "The Beatles" sorts as "Beatles"
* "A Night in Tunisia" sorts as "Night in Tunisia"

Note: In English these are "A ", "An ", and "The " and includes the localized or international equivalents.
Ignore leading symbols and punctuation

* "#41"sorts as "41"
* " ' Til I Collapse " sorts as "Til I Collapse"

Sort digits numerically

The songs "1 foo", "2 foo", "10 foo" will sort as
"1 foo", "2 foo", "10 foo" and not as
"1 foo", "10 foo", "2 foo"
Ignore leading white space when sorting

Any spaces entered at the beginning of the title will be ignored when sorting.
Sort ignoring case

For example with iTunes 7.2 and older versions, the song playlist sorts in the following order:

* .38 Special
* 'Til Tuesday
* "Weird Al" Yankovic
* 4 Non Blondes
* The 5th Dimension
* 311
* Oingo Boingo
* ZZ Top
* つしまみれ

With iTunes 7.3 and newer versions, the song playlist sorts in the following order:

* Oingo Boingo
* 'Til Tuesday
* "Weird Al" Yankovic
* ZZ Top
* 4 Non Blondes
* The 5th Dimension
* .38 Special
* 311
* つしまみれ

Note: If you sort a playlist and sync it to an iPod, the sort order from iTunes will be retained.

If you want to override the default sort rules for a given artist or song, follow these steps:

1. Get Info on a song and click the Sorting tab.
2. Enter the text in the appropriate sorting field. If you want "The Beatles" to sort by "The Beatles" instead of "Beatles" you would enter "The Beatles" in the Sort Artist Field.
3. Click OK.
4. To apply that change to all of the songs by "The Beatles", right-click (or Control-click) the song that you just changed and choose Apply Sort Field > [relevant field] (using the example above, Same Artist).


I'm glad somebody asked me if I wanted to change the fucking sort order. I've only been using iTunes since 2003 -- it's not like I'm used to a certain behavior.

Fucking savages.

Thursday, September 13, 2007

My Programz are _The Popular_

I'm taking this "E-Commerce/eBidness/iWasteTime" class, since it's the only 400-level MIS class being offered this Fall. The class is taught using ASP.NET 2.0: I've never programmed in it before, but I've done web programming in PHP, Perl, and ColdFusion, and I've done development in Visual Basic (ASP.NET lets you write the actual code in either VB or C#).

Same difference.

Mason is not all that Microsoft technology friendly, so our professor made us get ASP.NET hosting accounts to publish our homework to. He recommended this site called Somee, which is free.

I setup my account a few weeks ago and published my homework there. The first assignment is due tonight, and this afternoon I got this email:

Date: Thu, 13 Sep 2007 12:50:50 -0500
From: Support@somee.com
Subject: Your web site has been deleted!

Your site was deleted by our automated verification system. Reason: CPU overuse.

Somee International
http://somee.com


><

Somehow I doubt that my ASP.NET-based wage calculator was the top item on Digg today.