Tuesday, December 4, 2012

libstdc++ dies running driveclient

Received this error trying to start up driveclient for a rackspace cloud backup.
Dec  4 15:57:07 system kernel: driveclient[12763] general protection ip:7fa8bd8b5590 sp:7fff41ec2450 error:0 in libstdc++.so.6.0.13[7fa8bd849000+e8000]
Installed were: libstdc++.x86_64 4.4.6-4.el6 @anaconda-CentOS-201207061011.x86_64/6.3 driveclient.x86_64 1.04.005581-0 @drivesrvr
stat("/etc/issue", {st_mode=S_IFREG|0644, st_size=1882, ...}) = 0
stat("/etc/issue", {st_mode=S_IFREG|0644, st_size=1882, ...}) = 0
open("/etc/issue", O_RDONLY)            = 3
read(3, " _  ____                     ___"..., 8191) = 1882
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
I am not sure if my /etc/issue was too large or there bad characters or something else wrong with this file, but removing it fixes the problem.

Friday, October 19, 2012

Burned by Checkout by Amazon Code Update

I was using Amazon's sample php library for doing inline Checkout By Amazon, and after submitting a Contract Charge was now getting an unreadable XML document (in fact it was blank, Curl returns a http status code of 0 and nothing else on the failure unless you turn on debugging). After drilling down into code for quite a while I discovered Curl was failing on verifying the host of the SSL connection. So if you happen to have transplanted the code into your app, make sure Curl can find the ca-bundle.crt file that is in the root of the newly provided code. I changed CheckoutByAmazon/Service/Client.php to reference the bundle by a more predictable path in my own app. I wish there had been a changelog in the new code...

Saturday, September 15, 2012

Optimize a PDF with large images that do not need to be reprinted exactly.

gs -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -sOutputFile=<newfile.pdf> <infile.pdf>

Tuesday, September 4, 2012

Pink Lightning Spotify Icon

This icon which resembles a pink lightning bolt on a rectangle or torn paper signifies that this track is local on your computer, but the file has DRM, so Spotify is playing a matching track from its libary instead.

Thursday, August 23, 2012

Cloudfuse on CentOS6

A cloudfuse binary for mounting cloudfiles from cent/rhel 6 x86_64. There seems to be a problem with the system 7.19 library of libcurl. This statically links libcurl-7.18.2 into the binary to avoid system conflicts.

Original project is located at: https://github.com/redbo. md5sum on this is: 4bed2eeb1343b0d6a58b1e11377455c4

Here is my version: Cloudfuse Module

Tuesday, August 21, 2012

Export Order Email Addresses From Magento w/Ruby

You need to setup a web services user beforehand for this to work. Install the Savon gem, and get your endpoint url and credentials. This uses the SOAP v2 interface on Magento.
requre  'rubygems'
require 'savon'
client = Savon::Client.new "https://<Your Endpoint>"

res = client.request :login do 
 soap.body = {:username => '<your soap user>', :apiKey => '<your key>'}
end
session = res[:login_response][:login_return]
res2 = client.request :salesOrderList do
 soap.body = {:session=>session}
end
b = res2[:sales_order_list_response][:result][:item]
b.each do |ord|
 puts ord[:order_id] + ":" + ord[:customer_email]
end