Anybody else notice that pictures are sometimes...just wrong?
ping!
Programming gone awry
Thoughts and tutorials on programming
Wednesday, September 23, 2009
Pictures wrong sometimes?
Benefits of Firefox
The benefits of firefox:
the adblock plus plugin [plus myriad other plugins]
Reasonably speedy, well supported.
Drawbacks:
It takes up more RAM than Chrome (i.e. slower for older machines), renders, for me, slightly slower than Safari/Chrome [in windows, at least].
Written only to be able to say I was the first to sidewiki FF :)
Beautiful
Google Earth is a beautiful thing--the stand alone app is smoother than the google maps web version.
[written just to be able to say I wrote the first sidewiki for google earth]
Wednesday, August 05, 2009
how to compile ruby with increased garbage size
Monday, August 03, 2009
how to proxy to a port when your firewall blocks that port [using mod_proxy instead]
For me, it was getting some external server to forward all requests on to that port.
I realize you can use ssh -Rport:host:port as well (through some other server), however ssh tunnelling was at times interrupted and didn't have a retry or restart, it seemed, at least that I knew of.
Anyway the final forward was:
1) create new subdomain that will forward it on.
2) edit apache's conf [apache.conf in my example] to forward things on
Order deny,allow
Allow from all
ServerName audio-mp3.ibiblio.org.8000.doachristianturndaily.info
ProxyPass / http://audio-mp3.ibiblio.org:8000/
3) install forwarders:
sudo a2enmod proxy
sudo a2enmod proxy_http
4) restart apache
5) enjoy the tunes [in my case].
Saturday, August 01, 2009
how to setup a remote git repository using ssh
$ ssh myserver.com
Welcome to myserver.com!
$ mkdir /var/git/myapp.git && cd /var/git/myapp.git
$ git --bare init
Initialized empty Git repository in /var/git/myapp.git
$ exit
Bye!
Add the remote repository to your existing local git repo and push:
$ cd ~/Sites
$ mkdir myapp
$ git init
$ git remote add origin ssh://myserver.com/var/git/myapp.git
$ touch README
$ git add README
$ git commit -m "initial commit"
$ git push origin master
Thursday, July 23, 2009
How to compile using visual studio for ruby
========================
The most obvious criticism of this plan is that it will lead to mixing of microsoft runtime c libraries. From my experience this works as long as extension developers follow the rules described here:
http://msdn.microsoft.com/en-
To be more concrete, this boils down to two simple rules:
* If you call ALLOC or ALLOC_N, use xfree and not free
* Don't call sprintf or printf in an extension, instead use rb_f_sprintf/rb_vsprintf/rb_
If an extension violate these two rules then its obvious, a segmentation fault happens. Thus these bugs are easy to find and easy to fix.
Since VC6 is thankfully no longer available, supporting msvc absolutely, positively requires mixing c runtime libraries and therefore extension writers must follow these two simple rules.
Tuesday, June 23, 2009
rdocs for all gems from rubyforge
Why?
Because it's convenient to have all rdocs installed in a single known place to be able to browse/search them. Because it's a central repository, too, it eliminates the need to install local rdocs for gems, which (when you turn it off) means you install local gems *much* more quickly. It makes me happy every time I do a "gem install" :)
It also eliminates the need for running a local gem server.
These gems' rdocs are all in the hanna theme, which provides for method search and an easy on the eyes layout. Though darkfish is also quite pretty, it isn't as easy to read because of font contrast.
Check it out!
http://allgems.faithpromotingstories.org/gems
core docs: http://coredocs.faithpromotingstories.org/
Feedback welcome.
Note also that they're using a temporarily subdomain url. If anybody is interested and could help me with a subdomain of a more ruby related url that would be cool. I hate to fork over that $10 a year for another domain you know me :)
Enjoy.
=r
Thursday, June 18, 2009
How to save MUCH RAM when running rails (linode/slicehost) and mod_rails passenger
1: Install a 32-bit OS
Ruby uses twice as much RAM if you're in 64-bit than in 32-bit [and most other things do, too]. Use 32-bit! [linode has options to do this easily].
PassengerMaxInstancesPerApp 1
total mem, RSS, ... name
117m 49m 3156 S 0 13.8 0:00.93 ruby # spawner 49M
171m 89m 2240 S 0 24.7 0:00.61 ruby # instance 89m
fix:
use
this results in [slower startup times and]
RAM, RSS...process nameSavings: (assuming you only want one process per rails app): 49m (on 64-bit).
143m 72m 3480 S 0 20.1 0:01.69 ruby
Enjoy!
Other potential tricks:
use nginx instead of apache--faster, much better RAM usage. Potential savings:
refs:
http://groups.google.com/group/phusion-passenger/browse_thread/thread/df1fc1073dbef38
[1] http://www.ruby-forum.com/topic/170608#new
[2] http://blog.evanweaver.com/articles/2009/04/09/ruby-gc-tuning/
[3] http://articles.slicehost.com/2007/9/11/ubuntu-feisty-mysql-and-ror
Contributors
Blog Archive
-
►
2007
(14)
-
►
June
(12)
- ruby err
- ruby-debug ctrl-c
- .bashrc doesn't work
- how to install rmagick to a custom directory (gem)...
- how to convert you putty key to linux
- more install errs
- installing rubygems as non root
- parameters in django templates
- how to host static files in a django app for devel...
- Django static files, using fcgi
- django strange error
- D&C thought
-
►
June
(12)