Friday, October 5. 2007Need to proxy but SSH's dynamic switch not working?
ssh -D 7777 user@sshserver.com Simple right? however, I couldn't get the proxy working. I kept on getting errors in lynx like Proxy request sent, awaiting response... No data received.and Connection refusedSame with wget, though the errors where different. Let me tell you, I tried everything! I did all the stuff suggested when googling around like messing with /etc/ssh/sshd_config settings like AllowTcpForwarding and others. Moreover, I have three different servers to test on.
Save yourself the headache and set up Apache as the proxy. First edit httpd.conf as such:
Listen 7777 # Of course mod_proxy needs to be enable -- it is with most distros ProxyRequests On ProxyVia On <Proxy *:7777> Order deny,allow Deny from all Allow from localhost </Proxy> Next, do a /etc/init.d/httpd graceful.
Then, on your local machine do this:
# -C is to compress the data thru the tunnel
ssh user@sshserver.com -C -L 7777:localhost:7777
I spent three hours trying to get ssh -D working; Apache proxy with ssh -L took 5 minutes. Thursday, May 17. 2007Who is bashing whom?
JD is up to his hypocrisy again. "do something to fix the awful problems of browser disparity"
We wrote an RIA in XHTML/CSS/Javascript using the Prototype library and it even works in Konqueror ( which, by the way, there is no way to get flash working -- in Konqueror ). John, how many times have you used ( or eluded to in subtle way ) that false argument? Cross browser application development is not rocket science! The proof is in the pudding -- how else do you explained the explosion of these type of (cross browser) web applications. Although, cross browser compatibility is more important than in years past you can still just target IE if you are in a small vertical market. Flash as presentation run-time ( Volkswagen website,YouTube ) needs to run on all modern OS's( because VW wants to reach as many as possible -- marketing wise ); however, applications are different. Consider that Adobe doesn't make a Linux version of Photoshop. Textmate only runs on OSX. It is tolerated that applications that do something valuable aren't available everywhere. "and molasses-like evolution" Webkit and Gecko are evolving fast and IE 8 is already in the works. Moreover, as a developer I like that the (X)HTML/CSS/JS environment is more sane than the MS ( .NET 1,1.2,2,3 ) and Adobe ( AS, AS1,AS2,AS3,Flex 1,2,3,Flash MX,8,9,CS3 ) circus that they want you to play. I live in San Diego and I like to go to the Beach(there is my bias)! Granted that molasses-like needs to be further defined; however, I hold that this is not true ( even by today's standard of software development ). Friday, May 4. 2007iSilo plug-in for Linux usersHere is the situation: You want to move to Linux as your full time desktop but you can't live without the iSiloX plugin for IE. Sure, you can install a virtual PC with VirtualBox or VMWare; however, that is such a pain you never end up iSilo'ing anything. Also, do you waste an hour every month Googling around to see if anyone made a iSilo plugin for Firefox yet?
Does this describe you?
Saturday, January 27. 2007Show the entire line with the linux/unix ps command
Problem:
One thing that always drove me crazy was not being able to get the full listing from the ps command. For example when doing ps -elf it will cut off the command column. Even dumping it to file is no help, as the command column will get cut off if it goes beyond the 80 char width. Solution: Use the width switch: ps -elf --width 500 | grep java.*encode -o switch is handy too ps -u apache --width 1000 -o "%p|%a" | grep java.*# the -u switch only shows processes with the user of apache Here is are a list of other column descriptors that can be used with the -o switch %C pcpu %CPU %G group GROUP %P ppid PPID %U user USER %a args COMMAND %c comm COMMAND %g rgroup RGROUP %n nice NI %p pid PID %r pgid PGID %t etime ELAPSED %u ruser RUSER %x time TIME %y tty TTY %z vsz VSZ Monday, July 3. 2006Homesite and Ruby on Rails -- finally!
RHTML, Ruby, and RXML in Homesite 4.5 and above! Got to love it. Wednesday, June 7. 2006Suse 10.1, Apache 2.2, Rails, Mongrel, and TypoDo yourself a favor and go with Mongrel over mod_fcgid -- which is the preferred method when using Apache 2.x and fastcgi -- when installing Rails and Apache 2.2. Note: I need Apache installed on port 80 because I have PHP apps running there.
Note: This post pertains to a default Suse 10.1 install with C/C++ and Kernel Development checked. Also, Apache2 prefork was installed on setup. Apache2-devel was installed after setup. Mysql and Ruby packages where not installed on setup or after. Mysql is a binary install at /usr/local/mysql and admin username and password are set.
Presto, and no fastcgi or scgi! Saturday, June 3. 2006Installing APC on Suse 10.1 Apache 2.2 PHP 5Before I get to the solution here is a quick note on devel packages I needed to install before I could do this php compile. ./configure --with-mysql=/usr/local/mysql --with-zlib --with-apxs2=/usr/sbin/apxs2 --enable-ftp --with-pdo-mysql=/usr/local/mysql --enable-mbstring --prefix=/usr/local/php --with-gd --with-mysqli=/usr/local/mysql/bin/mysql_config --with-curl --with-openssl libidn-devel libapr1-devel libapr-util1-devel readline-devel apache2-devel libxml2-devel openssl-devel curl-devel It is strange that a lot of these devel packages are not available through the default YaST setup(for Software Management). I mean apache2-devel is an essential package to developers. Don't make it so difficult for me to install such a package.
Anyway, because when installing APC it looks for apxs and not apxs2, doing a pecl install apc will not work. However, the following little hack will do the trick: which apxs2my result was /usr/sbin/apxs2ln -s /usr/sbin/apxs2 /usr/bin/apxscd /usr/local/php/bin./pecl install apcAfter this there is plenty of info out there to finish the configuration. Thursday, May 25. 2006Suse 10.1 and Linksys WPC11 v.4 FunI just installed Suse 10.1 on a Toshisha Tecra 8200 with a Linksys WPC11 v.4. Suse recognized it; however, it is the wrong driver. Here is how to get 10.1 and this wireless card working. Note: I had a default install with Kernel and C/C++ development checked.
Monday, March 20. 2006Useful Prototype.js extensions
Object.extend(Array.prototype, {
implode: function() {
return (this.constructor == Array) ? this.flatten().join().replace(/,/g,'') : this;
}
});
This extension is useful in conjunction with the collect method. For example
temp_ar = [ 'hello','jim','Bob','Stevens' ];
gather = temp_ar.collect(function(value,key){
xml = '<item>' + value + '</item>';
return xml;
});
alert( gather.implode() );
// output: string "<item>hello</item><item>jim</item><item>Bob</item><item>Stevens</item>"
Wednesday, March 1. 2006Problem connecting to the internet after the Virtual PC install of Suse 10 on Windows XP.
Actually, the problem was with resolving host names.
Solution:edit /etc/resolv.conf and put in there your DNS server for your internet connection.ie: nameserver 198.6.1.1
I know it sounds kind of obvious but I thought for sure that this information would have been passed via DHCP. Therefore, I was looking in other areas for the problem and I ended up wasting more time then I would have liked. Tuesday, January 10. 2006XML gymnastics -- Made easyI have used quite a few XML writing classes. Builder for Ruby is the best one. I helped a friend set up a podcast and Builder -- which is built into Ruby on Rails -- made it a breeze. I am going to post the creation code because creating some of the nodes involved some heavy trial and error. The documentation is a bit sparse.
xml.instruct! :xml, :version=>"1.0", :encoding=>"UTF-8"
xml.rss "version"=>"2.0" do
xml.channel do
xml.title 'Unchained Radio Podcast'
xml.link 'http://podcast.unchainedradio.com'
xml.pubDate pub_date Time.now
xml.language "en-us"
xml.ttl "40"
xml.generator 'Ruby on Rails'
xml.description 'Rocking your World View.'
xml.image do
xml.url 'http://podcast.unchainedradio.com/images/logo2.jpg'
xml.title 'Unchained Radio'
xml.width 396
xml.height 64
end
xml.itunes :author, 'Gene Cook, Jr.'
xml.itunes :subtitle, 'Rocking your World View'
xml.itunes :summary, 'Rocking your World View'
xml.itunes :keywords, 'religion atheism reformed '
xml.itunes :explicit, 'clean'
xml.itunes :image,:href=>'http://podcast.unchainedradio.com/images/logo2.jpg'
xml.itunes:owner do
xml.itunes :name, 'Gene Cook, Jr.'
xml.itunes:emai, ''
end
xml.itunes :category,:text=>'Religion' do
xml.itunes :category,:text=>'News'
end
for entry in @podcasts
xml.item do
mp3 = "http://podcast.unchainedradio.com/podcast/#{entry.file}"
xml.title entry.title
xml.link mp3
xml.dc :creator , 'Gene Cook, Jr.'
xml.category 'Uncategorized'
xml.guid mp3
content = entry.description
xml.description content
xml.duration entry.duration
xml.pubDate pub_date(entry.last_updated_at)
xml.enclosure :url=>mp3,:type=>'audio/mpeg'
xml.itunes :author,'Gene Cook, Jr.'
xml.itunes :subtitle,entry.title
xml.itunes :summary, content
xml.itunes :explicit,'No'
xml.itunes :duration,entry.duration
end
end
end
end
Pretty nice, eh?? Go here to see the output. Putting RadRails on JRockit
** UPDATE **
New Sun JVM seems a bit faster than JRockit. Here are my settings for launching RadRails with Sun JVM. "C:\Program Files\radrails-0.5.2.1-win32\radrails\radrails.exe" -vm "C:\Program Files\Java\jre1.6.0\bin\javaw.exe" -vmargs -Xms328m -Xmx328m
NOTE: ** END UPDATE **Want a faster experience on RadRails?This blog entry pertains to Windows XP Try running RadRails with the lastest JRockit JVM.
Here are my start parameters for my desktop shorcut(in the target area).
Depending on your system memory -- mess with the -Xms256m and the -Xmx256m settings. I have 512meg on my laptop. I think you will see only a slightly faster load time, however, once launched in an environment of many launched applications you will experience a snappier RadRails. Please put comments on your environment and what your experience is so this can be a repository for running RadRails on JRockit. Don't forget JRockit is available for Mac and Linux users too. Thursday, December 22. 2005Automatic ssh tunnels Part 4UPDATEssh.class.rb
require 'net/ssh'
class SSHTunnel
def initialize(host,user,pass,tunnels)
Net::SSH.start(host,:password=>pass,:username=>user,:port=>22) do |session|
tmp = ''
tunnels.each do |k,l|
local = l[:local]
tmp += "#{k}:#{local} "
session.forward.local( local, 'localhost', l[:remote] )
end
puts "Tunnels #{tmp} OPEN to #{host}"
shell = session.shell.open
shell.ping "-i 30 localhost"
session.loop
end
end
end
ssh.tunnel.rb require 'c: END UPDATEOk, I have finally found the best way to do Automatic tunnels through SSH. Use the Net::SSH in Ruby. Here is quick guide to get you up and running. 1.Have Ruby version 1.82 running on your machine. 2.Get Net::SSH thru Ruby gems gem install net-ssh 3. Quick Script
require 'net/ssh'
ssh = Net::SSH.start('ur.sshserver.com',:password=>'passwd',:username=>'userid')
ssh do |session|
session.forward.local(25,'localhost',25)
shell = session.shell.open
#Keep tunnel open
shell.ping "-i 30 localhost"
session.loop
end
More here. Wednesday, November 23. 2005Debugging IE Web applications that use behaviors(.htc files)When localing debugging a Web application that uses behaviors(htc files) you need to delete the IE cache before testing each change in the htc file. Here is an example: C:\Documents and Settings\Christian\Local Settings>del /s myselectbox* Notice the directory.
(Page 1 of 4, totaling 47 entries)
» next page
|
My emailprefix[zarski]suffix[gmail.com]
QuicksearchTop Exitswww.tatanka.com.br (11)
podcast.unchainedradio.com (10) developer.apple.com (6) download.java.net (6) isilox.com (6) radrails.org (6) download2.bea.com (5) forms.ngjensen.com (4) rubyonrails.org (4) webfx.eae.net (4) Syndicate This BlogBlog AdministrationPowered by |
Comments