Richard's Diary

Saturday, November 29, 2008

Input Sources I read a little of Capistrano to get a feel of what deployment was like. It seems like one can define rake tasks to do shell operations. Summary of input resources:
  1. I am now able to run SOAP with Rails after requiring soap4r early on in environment.rb. That placed the library higher in the chain of load paths. Instead of at the end of the gem chain, it is now ahead of all the other gems.
  2. I experimented a little with FasterCSV and it seems to be easy to use
  3. I experimented a little with REXML and it seems to be easy to use
I need to decide where to host feeds. I should have a directory per partner for security. Further subdirectories should not be necessary to avoid name conflicts.There just needs to be 1 backup of such a directory.

Tuesday, November 25, 2008

Google (Performics) Network TC No date
https://www.connectcommerce.com/secure/aff_agreement_text.html?agid=20000000000000001

Portions excerpted from above

TODO
  1. Look into Advertiser/Network contracts to see what protections Networks are getting from Advertisers since most of them are not making Affiliates third party beneficiaries
Concerns
  1. Each click out needs to verify in realtime that Advertiser relationship still exists because after termination, continuing to send traffic is prohibited.
  2. Section 4, "All such records, including data, statistical information or other traffic analysis, produced or provided by either party in connection with the performance of this Agreement shall be the sole property of Performics."
  3. "Without limiting the foregoing, Affiliate shall not, without written permission from Marketer, (i) use any of Marketer´s brand names, keywords or derivations of either of the above for any purpose; or (ii) purchase any URL containing any of Marketer´s brand names, keywords or derivations of either of the above."
  4. CJ withheld payment from all Publishers if Advertiser did not fully remit Fees? Most favored publisher clause?
  5. Contract may be changed at any time with no prior notice by posting on web site
Governed by the laws of Illinois

Notes
  1. Wow, "Section 6b, Performics agrees to indemnify, defend and hold harmless Affiliate (and its respective officers, directors, employees, shareholders and agents) from and against any and all liability claims, losses, damages, injuries or expenses (including reasonable attorneys´ fees) directly or indirectly arising from or relating to any breach of this Agreement or any applicable law or regulation by Performics."
  2. "Performics currently uses and plans to continue to use data that it collects in an aggregate manner (i.e. that information which is gathered as a group of demographic data, and is not personally or company identifiable)."
  3. Performics contract is far more practical in general; it grants affiliate license to use Offers on Distribution Medium
Adwords API TC 8/10/2006
https://adwords.google.com/select/TCNetApiUS.html

TODO
  1. Google Website Optimizer
  2. http://code.google.com/apis/coupons/ - this could be interesting but could not find any production examples
  3. http://www.google.com/friendconnect/
Concerns
  1. One sided indemnification, with no control
  2. Google can seek injunctive relief "without the necessity of proving actual damages."
Notes
  1. universality of process - eg court jurisdiction is similar to access control to computational resources such as firewall holes and postgresql connections
Adwords TC 8/22/2006
https://adwords.google.com/select/tsandcsfinder?country=US

TODO
  1. https://adwords.google.com/select/guidelines.html
  2. http://www.google.com/intl/en/permissions/guidelines.html
  3. http://www.google.com/tm_complaint.html
Concerns
  1. Google may modify Targets and Creative.
    1. Ad can run and incur liability.
    2. Moreover, advertiser is deemed to have approved changes after a 72 hour Modification period has passed
    3. " Google may send Customer an email notifying Customer it has 72 hours ("Modification Period") to modify keywords and settings as posted."
  2. Google may modify Terms at any time with no notice.
  3. "Indemnification. Customer shall indemnify and defend Google, its Partners, agents, affiliates, and licensors from any third party claim or liability (collectively, "Liabilities"), arising out of Use, Customer's Program use, Targets, Creative and Services and breach of the Agreement. Partners shall be deemed third party beneficiaries of the above Partner indemnity."
    1. Google's Partners can sue Google or other Partners and advertiser would have to indemnify.
    2. No indemnification from Google for its Use after cancellation, which is simply defined as "shortly".
    3. Should advertiser have to indemnify Google from third party claims for "Services"?
  4. Advertiser information such as Targets and Creative are not protected as confidential by Google.
Governed by California law

Notes
  1. Refunds are advertising credits for Google Properties only (to protect Publisher's booked revenues)
  2. Advertiser subjects themselves to personal jurisdiction of courts mentioned by Google

Sunday, November 23, 2008

Incorporating Mailed incorporation application. Will recycle the New York incorporation kit since not much is state specific after filing the articles.

Need to file 2 things electronically once I hear back from state:
Stock issuance - https://web2.corp.ca.gov/loenapp/setuphome.jsp
Information update - https://businessfilings.sos.ca.gov/

Wednesday, November 19, 2008

HDTV on Laptop I have long wanted to watch TV on a computer. I first bought a Hauppauge tuner card maybe 6 years ago? Well, when DV became the standard last year, I decided to give it another shot and bought another card. It requires some serious RAM so I wasn't finally able to view TV comfortably until I got my new laptop. But now it is awesome!! No snow, sharp and oh so smooth!

Windows Vista Home Premium, like most versions of Vista, comes in 32bit despite the hardware being 64bit. So I downloaded the driver and app below to get it to work
  1. http://207.210.85.226/~artectv/driver/Digital_TV_Stick/T14AR/Driver/DrvPackagex32.zip
  2. http://207.210.85.226/~artectv/driver/Digital_TV_Stick/T14AR/2.0.3.1/T14AR_AP_Only.exe
PostgreSQL
  1. postgres user is already created on linux (because postgres was already installed) so to change default password do "passwd postgres"
    1. had postgres not been installed, on fedora "yum install postgresql-server"
  2. to install database cluster and start server, starting as root user
    mkdir /usr/local/pgsql/data
    chown postgres /usr/local/pgsql/data
    su postgres
    initdb -D /usr/local/pgsql/data
    cd /usr/local/pgsql/data
    postgres -D /usr/local/pgsql/data >logfile 2>&1 &
    from instructions /usr/share/doc/packages/postgresql/html/install-short.html
  3. set postgres database user password per http://sqlrelay.sourceforge.net/sqlrelay/gettingstarted/postgresql.html because the default is nil and you can't log in as that. If successful, it will print ALTER ROLE
    psql -c "ALTER USER postgres WITH PASSWORD 'newpassword'" -d template1
  4. modify pg_hba.conf to require password for each connection. change from trust to password. not only is it a security issue, it won't drive you crazy when developing because you'll be forced to specify which database you want to connect to with what user/permissions
    /usr/share/doc/packages/postgresql/html/auth-pg-hba-conf.html
  5. pg_ctl -D . reload
    #to reload the pg conf files for the current database directory we're in so that step 4 takes effect immediately
  6. CREATE ROLE username PASSWORD 'string' LOGIN CREATEDB CREATEROLE; according to /usr/share/doc/packages/postgresql/html/role-attributes.html
  7. psql -U username -d template1 to test newly created login and to issue
    CREATE ROLE pickyricky PASSWORD 'string' LOGIN CREATEDB;
  8. create databases using rails if 2.0. Otherwise,
    psql -U pickyricky -d template1
    CREATE DATABASE pickyricky_production;
    CREATE DATABASE pickyricky_test;
    CREATE DATABASE pickyricky_development;
  9. start restricting users to databases in pg_hba.conf
How to start,stop,restart server
http://www.postgresql.org/docs/8.3/static/app-pg-ctl.html

Tuesday, November 18, 2008

Subversion Installed Subversive, then needed to install a SVN Connector. I first tried JavaHL but that required some binary which I was not inclined to build. So I installed SVNkit. In hindsight, I might give subclipse a try next time despite the fact that Subversive is officially endorsed.
  1. create repo using svnadmin create /home/user/repos
  2. initial import svn import sourcepath file:///destinationpathinrepo -m "initial import"
  3. initial checkout using eclipse. note that the repo window shows path and root/path.
  4. thinking that there might be duplicates, because prior to step 2 i did a lot of initial import testing via eclipse, i committed a few changes. then when i retried step 3, both path and root/path were showing the same revision number.
  5. when making the first commit per eclipse session, subversive wants you to provide authentication to some gobbledy gook string or the remote location and won't commit unless you choose one of them. choosing either one is fine, i just didn't provide a user name or password and it seemed to commit fine.
i looked into dumping a repository and that is fine if you want to keep the change history. Since I have no real history that I want to keep because everything is so buggy, it makes more sense to do an initial import of a complete zip from my old laptop.

Sunday, November 16, 2008

Big Sigh of Relief I mistakenly updated my old laptop yesterday and freaked out this morning when the wireless was not working and Eclipse didn't seem to have my perspective and project. I got a little overconfident thinking that a Linux update wouldn't break things. Well I spent all day today fixing my wireless, which is the subject of the previous post.

I feel good about the progress I've made because I remember when first setting up my laptop for Linux took 2 quarters and I've gotten it down to a week now. Granted I was working during the day and I didn't have another laptop which was connected to the net so I could read and experiment at the same time.

Gonna go out, get some fresh air and see some friends!
Linux wireless
  1. find out what chipset you have (http://pciids.sourceforge.net/)
    1. on linux lspci -vvnnm (lsusb shows usb devices)
    2. on windows device manager shows pci information and inf file
  2. Decide on strategy
    1. Old laptop - Madwifi seemed really complicated with the 2 pieces that fused together to form the API to HAL
    2. New laptop - 4315 was not yet supported by the firmware cutter
    3. ndiswrapper was the only process which worked for both and seemed easy enough since this time I didn't need to recompile ndiswrapper. But since both laptops had Vista I was unable to leverage the native windows driver
  3. get driver
    1. get same 32 or 64 bit XP (Vista drivers do not work with ndiswrapper) driver (inf and sys file)
    2. su and place in /tmp/driver and cd to that directory
    3. ndiswrapper -i driver.inf (it must be a directory that root can read/write to; ie it won't work with a path to windows partition)
      1. CHECK ls -al /etc/ndiswrapper/* should show something
      2. ndiswrapper -l (ndiswrapper will display something like this:
        <driver-name>: driver installed
        device (xxxx:xxxx) present (alternate driver: <native-driver-name>)
  4. With the driver installed, you must tell your system about it so it can load it
    1. modprobe ndiswrapper to load the driver
    2. ndiswrapper -m
    3. CHECK iwconfig
      1. tail -f /var/log/messages or checking the message logs (with dmesg).
new computer
05:00.0
class 0200 ethernet controller
14E4:4315 REV_01
105B:E003
Broadcom Corporation BCM4310 USB Controller 802.11b/g
Foxconn International, Inc. Device
http://help.ubuntu.com/community/WifiDocs/Driver/bcm43xx/Feisty_No-Fluff

old computer
05:01.0
class 0200 ethernet controller
168c:001a
168c:2052
atheros ar2413 802.11bg NIC (aka 5005g)
compex wireless 802.11 b/g minipc adapter, rev a1 WLM54G ftp://lizzi555.dyndns.org/Download/WLAN/Atheros/

didn't get to use
hwinfo is helpful


12/20/08 UPDATE
For some reason, the ndiswrapper stopped working so I decided to give madwifi a try and it works now. This seems much easier in retrospect.
  1. install madwifi and madwifi kernel module
  2. add ath_pci to /etc/sysconfig/kernel in MODULES_LOADED_ON_BOOT section
Backup Laptop Spent the last few days setting up my new laptop which would function as a backup to my current development production laptop. Once it fully works, I intend to migrate to it. I documented the steps needed to bring that laptop up to production but haven't completed all the steps yet.

  1. Installed OpenSUSE 11 64bit with 2.6.25 kernel
  2. install make via yast
  3. install gcc via yast
  4. install postgres client/server/docs and source (because source will be needed for postgres ruby gem)
  5. ruby 1.8.6 was already installed (make sure rdoc is installed)
  6. install java 1.6 dev edition via yast
  7. Version control - since rubygems and other core infrastructure gems outside of rails (like postgres, soap4r, etc.) are unlikely to flake and need customization, they can be outside of source control
  8. Sudo - it is better to preface a command with sudo, because it is a matter of an intentional command being executed and logged vs. unfettered access that is susceptible to typos and unintended consequences, I decided not to change
    1. a core linux directory's permissions /usr/lib, /usr/local
    1. a core directory's user or group owner.
  9. rubygems was installed to default location after downloading tar, untarring and sudo ruby setup.rb
    1. unpacking adwords4r gem to vendor/gems and adding the library to the rails load path, makes the app use the vendored version
  10. sudo gem install rails
  11. sudo gem install mongrel
  12. sudo gem install soap4r, postgres, ferret,rcov (I wasn't able to see rake tasks until all gems were installed and rcov was missing. how did rake know there was rcov? presumably because of vendor/plugins directory?)
  13. install eclipse by downloading tar and untarring and just running binary
  14. install aptana studio by adding repository in eclipse
    1. install radrails by adding feature
    2. configure ruby interpreter, add SVN menubar, add views to perspective
  15. THE UPDATE TO YUI FROM APTANA is WHERE ECLIPSE DIED
  16. until such time as there is a good git eclipse plugin, use subversion
    1. install subversive client
    2. install svn connector by adding remote repo SVN Connector http://www.polarion.org/projects/subversive/download/eclipse/2.0/update-site/
    3. install subversion via yast since there aren't free, trustworthy, svn hosts for non-open source projects

Tuesday, November 4, 2008

DNS I created a custom url for my blog and it took forever. It consumed 3 days but I guess it was worth it because I got to experience at the level of DNS records the complexities of the Internet. In short, here are the key things I learned:

© 2010 Picky Ricky, Inc. originalblog