Roger's woze

December 31, 2007

how to have your computer tell you when internet works again

Filed under: Uncategorized — rogerdpack @ 11:53 pm

This works on windows<pre>loop do a = system(“ping 192.168.0.1″) if a   print “\a”*1000   break endend </pre> 

December 29, 2007

bug report

Filed under: Uncategorized — rogerdpack @ 10:35 pm

GgGgGgGgGgGgGgeventmachine/svn/version_0/lib/rubyeventmachine.so: 5: Access is denied.   – eventmachine/svn/version_0/lib/rubyeventmachine.so (LoadError)may mean ‘that guy is compiled on linux, not win32!’ 

eventmachine oddities

Filed under: Uncategorized — rogerdpack @ 9:01 am

so if you get ‘frozen Threadgroup’ in mac os x, or if you get ‘hangs’ when you run backticks, it is because Ruby stinks with threads and IO.  Run single threaded and it should work–unless you have tons and tons of ports open, in which case somehow lots of weirdness occurs.  Like lots of port unbinds.

December 28, 2007

how to run acts_as_ferret in windows

Filed under: Uncategorized — rogerdpack @ 9:09 pm

Still haven’t figured it out totally.  Seems that at least aaf 0.4.3 needs fork, so even reverting backgroundrb (painfully) to its oldest version

svn checkout svn+ssh://developername@rubyforge.org/var/svn/backgroundrb

doesn’t solve the problem.  Might as well live with stubs!

December 27, 2007

wireshark on leopard

Filed under: Uncategorized — rogerdpack @ 10:39 pm

If you get xterm Xt error: Can’t open display: :0:~ Roger$export DISPLAY=:0.0that may mean ‘run an x application before starting macports stuffs, then run macports stuffs’ (with an updated macports…etc…etc.) 

December 26, 2007

how to get ports to work with leopard

Filed under: Uncategorized — rogerdpack @ 3:13 am

as specified in the port description page, you need to create ~/.profile file  

export PATH=/opt/local/bin:/opt/local/sbin:$PATH
export DISPLAY=:0.0

Then after installing macports directly, you can run
. ~/.profile
on the command line and then run sudo port “whatever”
and it will work now.
And also executables installed by mac port will work as expected, only after running that
. ~/.profile
in each terminal.

December 22, 2007

ruby mingw win32

Filed under: Uncategorized — rogerdpack @ 11:37 pm

So…I tried out Ruby with mingw and it is indeed faster! Significantly faster.  It is like ‘Wow ruby actually works!’

This distro has old version of rubygems, which isn’t quite as compatible, but works as a demo:

http://doachristianturndaily.info/ruby_distro

faster mongrel?

Filed under: Uncategorized — rogerdpack @ 7:35 pm

I’ve seen reports of ‘fcgi’ running quicker than mongrel behind nginx. The reporters make the presumption that it is because of unix sockets. So then I wonder if changing evented mongrel to use unix sockets would speed it up (easier to do that than changing mongrel itself, I’d imagine). And perhaps re-using connections would help, as well.

December 21, 2007

os x gethostbyname

Filed under: Uncategorized — rogerdpack @ 7:38 am

So if you wanna use os x to get your host’s ipv4 address, instead of using Socket.gethostbynameuseSocket.getaddrinfo(Socket.gethostname, 0, Socket::AF_UNSPEC, Socket::SOCK_STREAM, nil, Socket::AI_CANONNAME)I think  

December 11, 2007

ruby stuffs

Filed under: Uncategorized — rogerdpack @ 2:43 am

test_get_sockname.rb:20: syntax error, unexpected kAND, expecting ‘)’     assert(peername and !peername.blank?)
means “replace your and with &&’s!” NoMethodError: undefined method `assert’ for #<#<Class:0x489e78>:0x489d10> means ‘wrap your asserts with parentheses

Older Posts »

Powered by WordPress