“Der Computer wird zum Teil der Persönlichkeit.”, coole jungs
spiegel|online: “Vorbeugendes Schnüffeln ist tabu – es muss Gefahr für Leib und Leben bestehen, bevor der Staat Festplatten ausspähen darf….: Der Computer wird zum Teil der Persönlichkeit.”

genau! coole jungs, so geht das. damit waere das dann mal geklaert. nur schade das schaeuble jetzt nicht mehre meine backups macht.
Technorati Tags: security, terror, orwell
disable DIGEST-MP5 to xmpp4r connect with your openfire jabber server
in my typical love and hate relationship with opensource (aka open sore) i stumbled over SASL induced configuration pains again today. To cut a long story short, just disable DIGEST-MD5 sasl out on the openfire jabber server and immediatly xmpp4r works like a charm for me.
How to disable digest md5 on Openfire? Not so easy to find out and in a beautiful amateuristic way lots of the advice you find is actually plain wrong.
Put this into your openfire.xml:
<sasl><mechs>PLAIN</mechs></sasl>
<!-- but put it inside the <jive>...</jive> tags somewhere -->
, because when you know the name of the right openfire property, and are able to read(in openfire.xml): This file stores bootstrap properties needed by Openfire.
Property names must be in the format: "prop.name.is.blah=value"
That will be stored as:
<prop>
<name>
<is>
<blah>value</blah>
</is>
</name>
</prop>,then you easily know that <sasl><mechanisms>….</mechanisms></sasl> is bogus.you usually find your openfire.xml at
${OPENFIRE_HOME}/conf/openfire.xml. and you must restart the the server afterwards, like /etc/init.d/openfire restart.there is another option, like making the xmpp4r implementation don’t even try to use the digest-md5 mechanism which the openfire server offers. Just disabling DIGEST-Md5 acceptance at
/opt/local/lib/ruby/gems/1.8/gems/xmpp4r-0.3.2/lib/xmpp4r/client.rb:108 in Jabber::Client.auth does work, but i will try to get it implemented a littel more selective before posting a xmpp4r fix here. Who knows, there even might be two SASL DIGEST-MD5 implementations on this planet which actually do match? i doubt it, an even then, i don’t care. vote for alt.source.sasl-must-die-die-die andhave fun
Technorati Tags: xmpp, xmpp4r, openfire, jabber, sasl, digest-md5
Web-Scale Computing is changing the economics of doing business online.
the title was actually quoted from the the Amazon Web Services Blog. That post reports on a new option of running a version of the Wowza Flash Streaming Video server as a virtualized AMI instance from insides the Amazon EC2 cloud.
What this all means? You get a real cheap way to build you’re own streaming network. For private videos YouTube will to the trick of serving your private holiday videos to the fans and you don’t have to bother for neither price nor capacities. But with such a thing as a Wowza server on EC2 you can now build your very own YouTube on demand. And it’s running on small pockets too. For only 5$ a month you get the right to do so and beyond that you pay per-hour and bandwith.
But even besides the economics, Wowza brings more to the party. It is a real good piece of software it seems. I worked with it just end of last years and all operations where smooth. Before Wowza choosing a streaming server sometimes to me felt more like “die Wahl zwischen Pest und Cholera”(or Hobson’s choice as i learned). I worked with Wowza last year and it was breeze of fresh air. I think i read somewhere it was written by some old SGI dudes. Ah, good old times, but that is another story(Personal Iris anyone?)
Adobe, the original? Expensive, old-school. heavy. not sexy. Red5 Open Source? Good luck i wish. I never had. Quicktime? Don’t know about QTSS but the DSS variant of it failed on me badly whenever i needed it and on top of that it uses PERL! to serve its admin HTML pages, uha, shudder.
Some fellows became even so desperate as to start recoding things from scratch and try writting an RTMP* server in Erlang. As i said elsewhere, Erlang, power- and beautiful concepts, but such an ugly language. Again, good luck i wish. If someone might want to spent a couple of month on trying to combine Erlang concepts and ruby language on writing a scalable stand-in replacement for the proprietary FLash streaming video server solutions than please give me call. Would be a nice project.
Technorati Tags: wowza, ec2, aws, flash, streaming
googlecharts 1.0.0 gem (includes URI bugfix) released
Matt Aimonetti released a 1.0.0 version of his googlecharts gem which includes my URI bugfix i blogged about earlier. Me haven’t had so many opensource contributions yet, feels good though.
Technorati Tags: googlecharts
googlecharts gem URI::InvalidURIError fixed
Yesterday i was wondering who is right about the URI and as it turns out the culprit is the googlecharts gem. The RFC defines ‘UNWISE’ characters, the ruby URI implementation seem to correctly fail on them and the Google API defines the just the URI, not how it has to be encoded/escaped.
I posted the scary URI regex from the ruby open-uri package which fails to grasp the Google Charts URIs. Debugging such thing is no fun so i went for a quick fix instead and actually could find it in the googlecharts gem. Just replace:
jstize(@@url + query_params.join('&')) from ...ruby/gems/1.8/gems/googlecharts-0.2.0/lib/gchart.rb with:
unwise = []#%w({ } | \ ^ [ ] `)
query_params.each do |p|
unwise.each { |c| p.gsub!(c, "%#{c[0].to_s(16).upcase}") }
end
jstize(@@url + query_params.join('&'))this escapes the ‘|’ (pipe) characters which were causing the exception, like this one:
/opt/local/lib/ruby/1.8/uri/common.rb:436:in `split': bad URI(is not URI?): http://chart.apis.google.com/chart?chdl=requests(cached)|requests&chd=s:Fb9JJfgZ,Fb9KJfgq&cht=lc&chs=300x200 (URI::InvalidURIError)
Technorati Tags: ruby, googlecharts, google, gem, fix
ruby google charts api wrapper, RFC2396 and ruby open-uri woes
UPDATE:found a simple fix/hack for the googlecharts gem
Uhh!, this for sure is one of the more scary regular expressions you normally encounter. Its URI::REGEXP::PATTERN::ABS_URI from uri/common.rb:137. Looks complete, doesn’t it? And still it fails to grasp my seemingly valid Google Charts URL which is: http://chart.apis.google.com/chart?chdl=requests(cached)|requests&chd=s:Fb9JJfgZ,Fb9KJfgq&cht=lc&chs=300x200
It’s the googlecharts gem which creates this URL here(not me!), but than bails out when trying to download an image from it.
/opt/local/lib/ruby/1.8/uri/common.rb:436:in `split': bad URI(is not URI?):...Now, who is right? Google? The URI RFC2396? The googlecharts gem? Debugging such things are the less thrilling moments in life. Besides that, even when bailing out on this one, the googlecharts gem feels good. It offers efortless chart creation and basic cases are already covered, the advanced stuff will follow i think. Go check it out when in search for an easy charting solution. Googlecharts gem felt better to me than the gchartrb which is another wrapper for the same service, but your milage may vary.
have fun
Technorati Tags: ruby, googlecharts, api
dirty hack: remove xing.com iframe ads with greasmonkey
ok, after this very short twitteruption this afternoon of the premium xings i sat down tonight at home and thought, hmm? getting rid of advertising on xing.com isn’t really worth a premium membership. A short look onto the pagesource with firebug revealed the pretty simple html schema.
so even me personally was able to sketch a simplistic greasemonkey script to erase ad iframes from the xing page like follows:
UPDATE: fixed the script and updated pastie link(thx henrik)
eeeeasy, download from pastie download (old) (no guarantees, you know, script might eat your backups and such)
For those who don’t know, Greasemonkey is a firefox extension to add custom javascript to any website. And this means, you can do whatever you want with the content. There are greasemonkey scripts which are adding links to the amazon site linking to sites with better prices for example. not fair, but thats life. in the web20 world.
have fun
p.s.: they paypal/aws/whatever payment sponsor button to fork 1 euro from your saved premium account money i will code next week – hope to welcome you back on payday.
Technorati Tags: xing, greasemonkey, adbuster, twitter
‘||’ unequal ‘or’
some simple ruby code:
a = nil || 23
b = nil or 23
puts "#{a==b}"
prints: false. Please explain! I mean explain in the sense of why not how it happens. Is it meaningful to put ‘||’ and ‘or’ on a different level in the precedence hierarchy?
UPDATE: i checked a couple of times before i posted but still can’t reproduce it a day later. don’t know what was different yesterday, Jruby? confused, … i seem that puts "#{a == b}" prints true. today.
Get yourself organized with GTD, from the shell
Get yourself organized with GTD, from the shell
promoting GTD might be surprising from me because it’s kind of contradicting myself. I have great doubts in any tool claiming to solve the problem for you, but this time it might be different. Peter Copper drove my attention to EarGTD of Gregory Brown.
EarGTD is a console application for David Allen’s GTD method. It is a good example for a Ruby outside of Rails application which still uses the ORM powers of ActiveRecord.
The commandline is where i spend lots my productive time and having a framework for database driven applications could be boost. Actually i already made myself a google console app(g-module alpha gem), example:
$ google :count earGTD
158 results for ["eargtd"]
$ google :lucky earGTD
gives you google result on the commandline.
Adding ActiveResource/database access to my console apps is a big help for me. “In the Beginning was the Command Line” and i start seeing a pattern here that i like.
Extending GTD
I will now go using EarGTD to find out how it works for me but there are 3 things would like to add i find time to do so:
1. keeping removed tasks in the database and add a done flag to them. This could make gtd a good tools for automated reports.
2. make a distributed group version where a bunch of people works on the same dataset. This coule make it a good sync tool for a group of coders.
3. to project and context add a person attribute, but that is actually only a sub-feature of the previous point.
4. must have: twitter connection!
install notes
Me beeing to lazy to gem’ify it just added:
require "fileutils"
FileUtils.cd(File.dirname(FILE))
$:.unshift "."
to the earGTP script itself and made an
alias gtd=~/EarGTD/earGTD
so i now can call it form anywhere. e nu?
gtd + "write better posts [blog] <writing>"
cheers
interpolate hex color vectors in one line of ruby
which color lies halfway inbetween #ff00ff and #00ff00 you ask?
One line of ruby code can interolate two color vectors like they are usually found inside css files, like: body{background: #ff00ff; color: #00ff00}.
%w{ff00ff 00ff00}.map{|a|a.scan(/../).map{|b|b.hex}}.inject{|c,d|(0...c.size).each{|i|c[i]+=d[i]};c}.map{|e|"%02x"%(e>>1)}.join
@UPDATE:
#121 character solution by schmidt(http://www.nach-vorne.de)%w{ff00ff 00ff00}.map{|a|a.scan(/../).map{|b|b.hex}}.inject{|c,d|c.size.times{|i|c[i]+=d[i]};c}.map{|e|"%0x"%(e>>1)}.join
Answer -> 0x7f7f7f
. sure, there must be a shorter version. Can you show it to me?next step: color animations and gradients and HSR colorspace conversions mayby.
have fun
Technorati Tags: ruby, coding, puzzle, css, hex, color, interpolation