2007-01-01から1年間の記事一覧

Merb on Joyent Accelerator (part 1)

The Accelerator including almost everything by default - Ruby, gems etc. Adding the Merb framework was without any problems. Some tips: Pre-requirements: $ sudo gem install mongrel json json_pure erubis mime-types rspec hpricot mocha \ rub…

Joyent Facebook Developer Accelerator

Got my own Joyent Facebook Developer Accelerator . Will try to put some Merb application on it. To read: Merb and Data Mapper Merb & Datamapper: Getting Rolling Tutorial on developing a Facebook platform application with Ruby On Rails Usin…

Joyent Facebook Developer Accelerator

Got my Joyent Facebook Developer Accelerator. Will try to put some Merb application on it. To read: Merb and Data Mapper Merb & Datamapper: Getting Rolling Tutorial on developing a Facebook platform application with Ruby On Rails Using Rub…

Optimizing HTTP server performance on Linux

via DebianHelpDisabling the TCP options reduces the overhead of each TCP packet and might help to get the last few percent of performance out of the server. Be aware that disabling these options most likely decreases performance for high-l…

Create DVD from command line

original article (nixCraft)Tools: mencoder, ffmpeg, dvdauthor ### combine multiply sources $ cat file1.avi file2.avi > ccmovie.avi $ mencoder -o out.avi -noidx -oac copy -ovc copy ccmovie.avi ### set aspect ratio, ntsc $ ffmpeg -i out.avi …

Network upgrade for Ubuntu servers

The new server upgrade system: 1. Install update-manager-core: $ sudo apt-get install update-manager-core 2. Launch the upgrade tool: $ sudo do-release-upgradeLike usual, there is no step 3 ;)

Dump MySQL Database using ssh

via nixCraft mysqldump -u USER -p'PASS' DB-NAME | ssh user@example.com "dd of=/mysql/$(date '%d-%m-%y')"

Rails 2.0 Preview Release

Tried the new Rails version. After $ rails rls20PR && cd rls20PR $ rake rails:freeze:edge TAG=rel_2-0-0_PR $ rake rails:updatefor every rake task i've got: rake aborted! no such file to load -- active_resourceThe problem: edge_rails requir…

Jaiku using NginX

I've got today: 504 Gateway Time-out nginx/0.5.30when trying to access Jaiku. The error itself is not so rare, but the fact they using NginX and not for example apache is interesting.

Speedup Ruby on Linux

Origin: discussion on comp.lang.rubyIt appears that when compiled with --enable-pthread ruby will call sigprocmask MANY MANY more times than without. You can verify this with strace -c: $ strace -c ruby -e '1.upto(100000) {|i| i.to_s}' % t…

New OpenVZ for Linux 2.6.22 includes live migration

...The team behind the OpenVZ project will announce today (11-Sep-2007) the availability of its operating system virtualization software for the latest stable release of the Linux kernel. OpenVZ for Linux 2.6.22 now supports user ID namesp…

NginX, PHP, FastCGI

I added PHP to bbox512 nginx .1. PreparationFor Debian/Ubuntu it needed FastCGI: # apt-get install libfcgi02. RTFM Init-script for php-cgi in external FASTCGI Mode Nginx, PHP and a PHP FastCGI daemon init script bye Redskin, zdravstvujte R…

Evented Mongrel and bbox2 blog

On bbox2 i installed swiftiply gem . This changed the mongrel_rails command to use evented mongrel – mongrel, patched to use eventmachine tcp stack instead of the original pure ruby one. In /etc/init.d/mongrel_cluster i’m starting all mong…

18th Ruby/Rails meeting in Hirakata

On 11-August-2007 there was a Ruby/Rails meeting in Hirakata. For the first time Osaka meeting is so far from Osaka. About 1.5 hour with train. It was soooooo hot walking from the station to the university :( I put some notes about the eve…

Junebug Wiki on BrightBox

I installed JuneBug wiki on bbox . There was some bugs in the installation documentation so will put small notes here. The installation process is for Ubuntu Dapper box on BrightBox beta hosting. Adjust for your own situation: # Ubuntu/Deb…

BrightBox Hosting

Thanks to Jeremy Jarvis i received a Brightbox beta account . I’m tring to blog about my experience on http://blog.bbox.selfip.net/ . Not sure how long I can keep that accounts, so maybe the blog will become unavailable soon. Still there w…

Erlang for everyday use (3)

FeedbackNone.UpdatesSince my previous post I found a little bug in the CEAN installation. Or maybe it's just not very well documented thing: After the installation the path to the control socket is pointing by default to /usr/local/var: =E…

Erlang for everyday use (2)

Common CrapAfter the first article there was more then 1500 hits. And interesting, maybe about 80% of them coming from RubyCorner ! Feedback: near to zero – just several comments on the blog and on reddit . Nothing to improve? Nothing to a…

Erlang for everyday use (1)

After the last Osaka Erlang meeting, decided to start a column of articles for Erlang everyday use. Recently there is a big interest in Erlang, but the beginning is always difficult. Some push during the first steps usually helps. OK, on t…

nginx-0.5.24, server executable upgrade "on the fly"

There is a new version of the nginx web server - nginx-0.5.24. Too many upgrades recently :( From the changelog: Bugfix: a part of response body may be passed uncompressed if gzip was used; bug appeared in 0.5.23. I have a small ugly shell…

New improved int2roma() and roma2int() functions

Second approximation of the conversion between old roman and integer digits. Added some error checks and released the roma2int() functionality %% convert between integer and old roman %% usage: %% convert:int2roma(555) -> "DLV" %% convert:…

Osaka Erlang Meeting #1

03-Jun-2007, Toyonaka, HotarugaikeOsaka Erlang Meeting #11. RTFMMost of the time was just reading the japanese translation of the “Programming Erlang” book. 53 pages full of japanese ;) Pretty difficult task. All people divided in 2 groups…

An Erlang Course Exercises

Like I mentioned in one of my Jaiku posts it will be good to have a page with answers for the Erlang Course Exercises . Still nobody around with such a page, so I started to put my answers in the Mercurial repository . Some of the exercise…

Erlang gen_tcp:listen options

{active, Boolean} ...If the active option is true, which is the default, everything received from the socket will be sent as messages to the receiving process. If the active option is set to false (passive mode), the process must explicitl…

Even Simpler Queue Service (ESQS)

Like a part of my Erlang study, I decided to code a pure-man queues management service, similar to Amazon SQS – Even Simpler Queue Service (or Erlang SQS you decide ;) ). For now it’s just one file qserver.erl , but i hope to make it bette…

Rubygems on Debian "one-click installer"

Before I mentioned Rails on Debian "one-click installer". Seems there is also a way to install ruby gems with apt-get on debian-like systems. It's in japanese, so just a short translation: Add to your /etc/apt/sources.list: deb http://back…

Change to REST URLs for Rails 2.0

...No longer will we have to use RESTful URLs such as article/1;edit. We're going back to the more normal-looking article/1/edit ...

obfuscation.erl

Luke Gorrie’s comment to ‘Erlang: parallel-map and parallel-foreach’ articleParallel map brainfsck implementation in Erlang: %% Map function F over list L in parallel. parmap(F, L) -> Parent = self(), [ receive {Pid, Result} -> Result end …

Concurrent program template

Something always to start with: -module(ctemplate). -compile(export_all). start() -> spawn(fun() -> loop([]) end). rpc(Pid, Query) -> Pid ! {self(), Query}, receive {Pid, Reply} -> Reply end. loop(X) -> receive Any -> io:format("Received:~…

Programming Erlang Book

Lean how to write truly concurrent programs―programs that run on dozens or even hundreds of local and remote processors. See how to write high reliability applications―even in the face of network and hardware failure―using the Erlang progr…