It was interesting.
"Embrace Uncertainty"
Monday, December 29, 2008
Wednesday, December 24, 2008
Monday, November 17, 2008
Malcolm Gladwell's articles
Someone gave me the links to interesting articles by Malcolm Gladwell.
All of them were very interesting.
But I list them in the order of the one that made me feel like putting on this blog the most to the one the least.
Million-Dollar Murray (Why problems like homelessness may be easier to solve than to manage.)
What we can learn from spaghetti sauce
The Uses of Adversity
The reason why I wanted to put the first one in this blog was the last section about air pollution. That gave me a new perspective and made me realize that by retrospective, in the past, I have observed a similar phenomenon.
The part of the second article, actually a talk, "people don't know what they want" is related to how we develop software in Agile way. It is based on a notion that the users don't know what they want. So we build software incrementally, showing it to the users as we go and deciding what to do next based on their reactions. That's all I wanted to say in this blog. The main theme of the talk is much beyond that, however, and that will heavily influence the way I view things from now on.
The third one gave me a new important perspective as well. I'm glad that I read it. But most probably it would have stayed as a bookmark instead of putting it in this blog if I didn't get its link with the other two.
All of them were very interesting.
But I list them in the order of the one that made me feel like putting on this blog the most to the one the least.
Million-Dollar Murray (Why problems like homelessness may be easier to solve than to manage.)
What we can learn from spaghetti sauce
The Uses of Adversity
The reason why I wanted to put the first one in this blog was the last section about air pollution. That gave me a new perspective and made me realize that by retrospective, in the past, I have observed a similar phenomenon.
The part of the second article, actually a talk, "people don't know what they want" is related to how we develop software in Agile way. It is based on a notion that the users don't know what they want. So we build software incrementally, showing it to the users as we go and deciding what to do next based on their reactions. That's all I wanted to say in this blog. The main theme of the talk is much beyond that, however, and that will heavily influence the way I view things from now on.
The third one gave me a new important perspective as well. I'm glad that I read it. But most probably it would have stayed as a bookmark instead of putting it in this blog if I didn't get its link with the other two.
Wednesday, November 05, 2008
Reflection on my life, of the result of the presidential election in United States
I felt the enthusiasm of the people while I was following the presidential election in United States last night.
I view Barack Obama as a human and his being a black person doesn't come to my mind. And following the election yesterday and listening to his speech after he became the next president of the United States, I felt that the people chose a person with a positive choice, not a compromise of choosing a person less evil than the other.
Despite of these facts, while I was in the bed afterward, I was reminded of my high school English class.
It was in a small city in a rather rural area of Japan and the majority of the people there spend their entire lives never seeing any foreigner and only speaking their dialect even only speaking the standard Japanese only occasionally. While I was a student very aware of human rights and social issues, those issues rarely came to people's mind.
One day, in one of the English classes, the teacher played a tape of Martin Luther Kings Jr.'s speech, "I have a dream". And he had a sincere conscience.
I am very graceful that he played the speech.
I view Barack Obama as a human and his being a black person doesn't come to my mind. And following the election yesterday and listening to his speech after he became the next president of the United States, I felt that the people chose a person with a positive choice, not a compromise of choosing a person less evil than the other.
Despite of these facts, while I was in the bed afterward, I was reminded of my high school English class.
It was in a small city in a rather rural area of Japan and the majority of the people there spend their entire lives never seeing any foreigner and only speaking their dialect even only speaking the standard Japanese only occasionally. While I was a student very aware of human rights and social issues, those issues rarely came to people's mind.
One day, in one of the English classes, the teacher played a tape of Martin Luther Kings Jr.'s speech, "I have a dream". And he had a sincere conscience.
I am very graceful that he played the speech.
Sunday, November 02, 2008
Quick note about Workling
I have found that when using Starling, setting "Workling::Remote.dispatcher = Workling::Remote::Runners::StarlingRunner.new" in environment.rb is not necessary because Workling checks the existence of Starling before any other gems or plugins such as Spawn.
I've found this by looking at the code vendor/plugins/workling/lib/workling.rb, self.default_runner, which was a point of failure at one execution.
self.default_runner takes care of setting it automatically.
The problem was that when it is set in environment.rb or even only in environments/development.rb, "rake spec" fails reading the setting for development environment in config/starling.yml. (Even when I explicitly set ENV["RAILS_ENV"] = "test".)
If another background process gem or plugin is used such as Spawn while Starling gem is still installed, Starling is still picked up. I think we can specify Spawn in environment.rb.
Or it would be ideal if only one background process gem/plugin installed out of Starling, Spawn, and Backgroundjob.
I've found this by looking at the code vendor/plugins/workling/lib/workling.rb, self.default_runner, which was a point of failure at one execution.
self.default_runner takes care of setting it automatically.
The problem was that when it is set in environment.rb or even only in environments/development.rb, "rake spec" fails reading the setting for development environment in config/starling.yml. (Even when I explicitly set ENV["RAILS_ENV"] = "test".)
If another background process gem or plugin is used such as Spawn while Starling gem is still installed, Starling is still picked up. I think we can specify Spawn in environment.rb.
Or it would be ideal if only one background process gem/plugin installed out of Starling, Spawn, and Backgroundjob.
Wednesday, October 15, 2008
Election
I just write this quickly.
I have always been a supporter of proportional representation (I think that's what's called in English. I'm writing this quickly so I'm not verifying it because I'm extremely busy these days.).
By that way, the seats for the legislative (such as parliament) are allocated based on the percentage of the votes each party gets.
First of all, every vote counts.
Second, these days in much modern society, geographic location doesn't say much. People living in geographically distant places share the same opinion and concerns. People living in the same location don't share anything in common. That's common. Majority of the people live where they live because they found an apartment or a house there. Could have been just any other place. In a few kilometers apart, in one electoral district, the party you voted for wins and in another district, another party wins. Is there anything different between two districts? Not really.
If keeping representative from each district is important, at least have two houses in the parliament. One consists of the members of parliament elected from electoral districts and the other consists of the members of parliament elected by proportional representation.
I know many countries have been using proportional representation for a long time. So writing this blog entry doesn't mean to criticize anything anywhere. I'm just writing this to say that I'm supporting proportional representation. Also specifying any country doesn't go well with my blog's underlying philosophy of keeping it geographically neutral. (My blog is only for expressing my opinions or informing what I found.)
I will try to find a time in the future to elaborate this more, using more correct words. But I think the readers can get an idea by replacing words appropriately such as "member of parliament" to "senator", etc. Right now, I just wrote it very quickly because I don't have a time.
I have always been a supporter of proportional representation (I think that's what's called in English. I'm writing this quickly so I'm not verifying it because I'm extremely busy these days.).
By that way, the seats for the legislative (such as parliament) are allocated based on the percentage of the votes each party gets.
First of all, every vote counts.
Second, these days in much modern society, geographic location doesn't say much. People living in geographically distant places share the same opinion and concerns. People living in the same location don't share anything in common. That's common. Majority of the people live where they live because they found an apartment or a house there. Could have been just any other place. In a few kilometers apart, in one electoral district, the party you voted for wins and in another district, another party wins. Is there anything different between two districts? Not really.
If keeping representative from each district is important, at least have two houses in the parliament. One consists of the members of parliament elected from electoral districts and the other consists of the members of parliament elected by proportional representation.
I know many countries have been using proportional representation for a long time. So writing this blog entry doesn't mean to criticize anything anywhere. I'm just writing this to say that I'm supporting proportional representation. Also specifying any country doesn't go well with my blog's underlying philosophy of keeping it geographically neutral. (My blog is only for expressing my opinions or informing what I found.)
I will try to find a time in the future to elaborate this more, using more correct words. But I think the readers can get an idea by replacing words appropriately such as "member of parliament" to "senator", etc. Right now, I just wrote it very quickly because I don't have a time.
Tuesday, October 07, 2008
Basics of fundamentals
It is pathetic that I have to even write this in my blog.
And I have been certainly assuming that any reader of this blog understands this.
What I wrote in the past reflects it.
Here, I write it using simplest possible words.
--- Explanation that explains most what is observed is what is accepted.
-> There is an observed behaviour or phenomenon or artifact that exists. In order to explain it - why it happens or why it exists -, there is a theory. The theory that explains the behaviour or the phenomenon or the artifact best is what is widely accepted to be true. There is a verification process to back it up, often using statistics.
-> The main reason why there are many people who don't believe in religion is that what religion says conflict with what is observed. Simply being ignorant with what is observed or the facts doesn't justify that what a religion says is correct.
--- Separation of public affairs and religion.
-> It is essential and fundamental that politics and education are separate from religion. Any one religion shouldn't control or influence politics and education. It is essential in order to keep the civilization functional for all the human beings.
-> By knowing why and how a certain religion spread in a certain part of the world in the course of human history, we know that there is no reason why one religion should be allowed to control other people.
--- Basic human rights.
-> Nobody has a right to be over anybody else based on his/her belief. Every human being is equal and believing a certain religion doesn't give a person to be superior to other people.
-> Nobody should be discriminated based on his/her belief.
In addition to the above, I write some more regarding what I observed today at a public language school today.
--- Religion is created by human being as a part of its history.
-> Over the course of human activities in different regions of the world, a certain beliefs emerged with an influence from the environment where the people in the region were surrounded.
--- Religion was often spread for political reasons and what it says was often created because of the political reason as a part of human history.
--- It is not true that all the religions have a god.
--- It is not true that all the religions believe in the same god.
-> Many religions have multiple gods and the idea of the unique god is actually a minority. The reason why that idea is so well-known is that the group of people who believed in it conquered other parts of the world with force, military power, discrimination, and manipulations. For example, The majority of North and South America were conquered by military power and it was injustice. And early 20th century, the majority of the world was colonies of European countries. Simply conquering other countries doesn't justify that the god of conqueror's religion is same as the ones of other religions.
-> Many religions don't accept a notion that all the religions believe in the same god. It's simply a cultural insult. The culture is influenced by the environment where the people live in and there is no justification that a person in one culture says that his/her culture is better than the other.
At the end, I just write some of my opinions.
--- Believing in a religion doesn't make a person morally better.
-> It only gives an illusion to the person that he/she is superior.
After writing this, I still think that it's pathetic and sad that I have to even write this. I thought that these days, everybody understood human rights and democracy and that everybody understood basic human history.
And I have been certainly assuming that any reader of this blog understands this.
What I wrote in the past reflects it.
Here, I write it using simplest possible words.
--- Explanation that explains most what is observed is what is accepted.
-> There is an observed behaviour or phenomenon or artifact that exists. In order to explain it - why it happens or why it exists -, there is a theory. The theory that explains the behaviour or the phenomenon or the artifact best is what is widely accepted to be true. There is a verification process to back it up, often using statistics.
-> The main reason why there are many people who don't believe in religion is that what religion says conflict with what is observed. Simply being ignorant with what is observed or the facts doesn't justify that what a religion says is correct.
--- Separation of public affairs and religion.
-> It is essential and fundamental that politics and education are separate from religion. Any one religion shouldn't control or influence politics and education. It is essential in order to keep the civilization functional for all the human beings.
-> By knowing why and how a certain religion spread in a certain part of the world in the course of human history, we know that there is no reason why one religion should be allowed to control other people.
--- Basic human rights.
-> Nobody has a right to be over anybody else based on his/her belief. Every human being is equal and believing a certain religion doesn't give a person to be superior to other people.
-> Nobody should be discriminated based on his/her belief.
In addition to the above, I write some more regarding what I observed today at a public language school today.
--- Religion is created by human being as a part of its history.
-> Over the course of human activities in different regions of the world, a certain beliefs emerged with an influence from the environment where the people in the region were surrounded.
--- Religion was often spread for political reasons and what it says was often created because of the political reason as a part of human history.
--- It is not true that all the religions have a god.
--- It is not true that all the religions believe in the same god.
-> Many religions have multiple gods and the idea of the unique god is actually a minority. The reason why that idea is so well-known is that the group of people who believed in it conquered other parts of the world with force, military power, discrimination, and manipulations. For example, The majority of North and South America were conquered by military power and it was injustice. And early 20th century, the majority of the world was colonies of European countries. Simply conquering other countries doesn't justify that the god of conqueror's religion is same as the ones of other religions.
-> Many religions don't accept a notion that all the religions believe in the same god. It's simply a cultural insult. The culture is influenced by the environment where the people live in and there is no justification that a person in one culture says that his/her culture is better than the other.
At the end, I just write some of my opinions.
--- Believing in a religion doesn't make a person morally better.
-> It only gives an illusion to the person that he/she is superior.
After writing this, I still think that it's pathetic and sad that I have to even write this. I thought that these days, everybody understood human rights and democracy and that everybody understood basic human history.
Thursday, September 04, 2008
Awareness of recycling
Yesterday, I had a chance to bring awareness of recycling without causing other people defensive.
But I missed the chance.
I regret it very much.
At a language course I'm taking, the teacher asked me what I never do as a part of an exercise to explain it in the language we are learning.
I could have said that I never throw metal cans in the garbage because it's important to recycle them.
I have been noticing that many students there are throwing them in the garbage can instead of in the box for recycling metal cans, probably because majority of the students are immigrants and they are not aware of the importance of recycling.
That bothers me a lot.
One day, I mentioned to one student that there is a box for recycling metal cans. She was very upset taking it as an accusation.
Because the box for recycling them is not located in that floor and it's only on the first floor, I made a proposal to the school to put one in each floor at least to make it easier for the students to recycle metal cans.
The school seems to be doing the best to recycle materials as much as they can.
With the constrain that the company working for them who collects papers collects only papers in the recycling bin in each class room enforcing us to put only papers in the recycling box and that the company working for them who collects metal cans only collects them from the box in downstairs, I noticed that a cleaning person picks metal cans from the garbage cans and separate them for recycling.
I appreciate the cleaning person's work very much.
At the same time, what I concern most is that those students recycle in other part of their lives outside the school settings. If they continue to throw recycling materials in the garbage, it is a huge amount of recycling materials thrown away, which is not good for environment.
So I want them to have an awareness of the importance of recycling.
And yesterday presented me a good chance to initiate to achieve it.
I hope there will be another chance.
But I missed the chance.
I regret it very much.
At a language course I'm taking, the teacher asked me what I never do as a part of an exercise to explain it in the language we are learning.
I could have said that I never throw metal cans in the garbage because it's important to recycle them.
I have been noticing that many students there are throwing them in the garbage can instead of in the box for recycling metal cans, probably because majority of the students are immigrants and they are not aware of the importance of recycling.
That bothers me a lot.
One day, I mentioned to one student that there is a box for recycling metal cans. She was very upset taking it as an accusation.
Because the box for recycling them is not located in that floor and it's only on the first floor, I made a proposal to the school to put one in each floor at least to make it easier for the students to recycle metal cans.
The school seems to be doing the best to recycle materials as much as they can.
With the constrain that the company working for them who collects papers collects only papers in the recycling bin in each class room enforcing us to put only papers in the recycling box and that the company working for them who collects metal cans only collects them from the box in downstairs, I noticed that a cleaning person picks metal cans from the garbage cans and separate them for recycling.
I appreciate the cleaning person's work very much.
At the same time, what I concern most is that those students recycle in other part of their lives outside the school settings. If they continue to throw recycling materials in the garbage, it is a huge amount of recycling materials thrown away, which is not good for environment.
So I want them to have an awareness of the importance of recycling.
And yesterday presented me a good chance to initiate to achieve it.
I hope there will be another chance.
Sunday, July 13, 2008
Setting up GIT public repository
I found setting up GIT public repository by copying the Rail application to the origin server doesn't allow tags to be pushed.
This lists the steps I took to set up GIT public repository that allows tags (or all GIT objects, I think) to be pushed.
1. Create bare GIT repository from the Rails app I want to create a repository for.
$ git clone --bare rails_app rails_app.git
2. Make the repository to be sharable by GIT daemon just in case I want to do so.
$ touch rails_app.git/git-daemon-export-ok
3. Tar it and scp to the server where I want to have the public repository, which becomes the origin server.
$ tar cvfjp rails_app.git.tar.bz2 rails_app.git
$ scp rails_app.git.tar.bz2@:~
4. In the origin server, add a new user called "git".
$ sudo adduser git
5. Change the shell for "git" to git-shell.
$ sudo vim /etc/passwd
git:x:1001:1001:,,,:/home/git:/usr/bin/git-shell
6. In the origin server, create git directory under /var.
$ sudo mkdir git
$ cd git
7. Untar the tar file.
$ sudo tar xvfjp ~/rails_app.git.tar.bz2
8. Change the owner of "git" directory to "git".
$ cd ..
$ sudo chown -R git:git git
This lists the steps I took to set up GIT public repository that allows tags (or all GIT objects, I think) to be pushed.
1. Create bare GIT repository from the Rails app I want to create a repository for.
$ git clone --bare rails_app rails_app.git
2. Make the repository to be sharable by GIT daemon just in case I want to do so.
$ touch rails_app.git/git-daemon-export-ok
3. Tar it and scp to the server where I want to have the public repository, which becomes the origin server.
$ tar cvfjp rails_app.git.tar.bz2 rails_app.git
$ scp rails_app.git.tar.bz2
4. In the origin server, add a new user called "git".
$ sudo adduser git
5. Change the shell for "git" to git-shell.
$ sudo vim /etc/passwd
git:x:1001:1001:,,,:/home/git:/usr/bin/git-shell
6. In the origin server, create git directory under /var.
$ sudo mkdir git
$ cd git
7. Untar the tar file.
$ sudo tar xvfjp ~/rails_app.git.tar.bz2
8. Change the owner of "git" directory to "git".
$ cd ..
$ sudo chown -R git:git git
Tuesday, June 24, 2008
Installing RMagick Ruby gem
Just for a record (because I forgot how when I had to do it again on another server):
* On Ubuntu Hardy:
1. Install ImageMagick.
$ sudo aptitude install libmagick9-dev
$ sudo aptitude install imagemagick
2. Install RMagick gem.
$ sudo gem install rmagick
* On Mac OS X Leopard (with MacPort):
1. Install ImageMagick.
$ sudo port install ImageMagick
2. Install RMagick gem.
$ sudo gem install rmagick
Sunday, June 22, 2008
RubyGems 1.2.0 is released
Just yesterday.
(Announce: RubyGems Release 1.2.0)
Get it by:
wget http://rubyforge.org/frs/download.php/38646/rubygems-1.2.0.tgz
(Announce: RubyGems Release 1.2.0)
Get it by:
wget http://rubyforge.org/frs/download.php/38646/rubygems-1.2.0.tgz
Sunday, June 01, 2008
The Wisdom of Crowds
There was an occasion that I mentioned "The Wisdom of Crowds" responding to the other person during a conversation today. I promised him to send a link to it. And this is what I found instead of just sending him a description in a bookstore site.
"The Wisdom of Crowds"
"The Wisdom of Crowds"
Sunday, May 18, 2008
"Skinny Controller, Fat Model" best practice
My first impression about reading about it ("Skinny Controller, Fat Model") was that it is a basic of Object-Oriented Programming. If you are familiar with Object-Oriented Programming practices such as small method, refactoring, Design Patterns, your code naturally becomes what this article is proposing. Especially, my impression is that if you are doing Test/Behaviour-Driven Development, it is even difficult NOT to become as proposed.
What I liked about "Skinny Controller, Fat Model" is that it is explaining the best practice from the different perspective and with the simpler expression. You can reach the same code either following the basic Object-Oriented Programming practices or following "Skinny Controller, Fat Model".
What I liked about "Skinny Controller, Fat Model" is that it is explaining the best practice from the different perspective and with the simpler expression. You can reach the same code either following the basic Object-Oriented Programming practices or following "Skinny Controller, Fat Model".
Ultrasphinx setup part2
Regarding what I wrote about test database in section "4. Build index" in my previous post "Ultrasphinx setup", RSpec code would become like below.
I put this under spec/models accessing database. But for controller spec under spec/controllers, I mocked Ultrasphinx::Search so that the controller spec is not accessing database.
(Note: The line with "system(..)" is one line.
It is shown to be multiple lines because of the space.)
I put this under spec/models accessing database. But for controller spec under spec/controllers, I mocked Ultrasphinx::Search so that the controller spec is not accessing database.
(Note: The line with "system(..)" is one line.
It is shown to be multiple lines because of the space.)
require File.dirname(__FILE__) + '/../spec_helper'
describe "Ultrasphinx sample" do
fixtures :overviews
before(:each) do
system("cd #{RAILS_ROOT};
rake ultrasphinx:index RAILS_ENV=\"test\"")
system("cd #{RAILS_ROOT};
rake ultrasphinx:daemon:start RAILS_ENV=\"test\"
&> /dev/null")
end
after(:each) do
system("cd #{RAILS_ROOT};
rake ultrasphinx:daemon:stop RAILS_ENV=\"test\"
&> /dev/null")
end
it "should find text with 'test'" do
@search = Ultrasphinx::Search.new(:query => "test")
@search.run
@search.results.size.should == 2
end
end
Thursday, May 15, 2008
Ultrasphinx setup
It was more straightforward to figure it out than other things I have done in the past. But I just write the whole thing I did to set up Ultrasphinx.
1. Sphinx installation
$ wget http://www.sphinxsearch.com/downloads/sphinx-0.9.8-rc2.tar.gz
$ tar xvfzp sphinx-0.9.8-rc2.tar.gz
$ cd sphinx-0.9.8-rc2/
$ ./configure --prefix=/usr/local
$ make
$ sudo make install
2. Install Chronic
(Chronic is a natural language date/time parser written
in pure Ruby.)
$ sudo gem install chronic
3. Install Ultrasphinx plugin
$ cd RAILS_ROOT
$ svn export svn://rubyforge.org/var/svn/fauna/ultrasphinx
/trunk/vendor/plugins/ultrasphinx
(if GIT or other version control system is used.)
(Or if Subversion is used,
$ script/plugin install -x svn://rubyforge.org/var/svn/fauna/ultrasphinx
/trunk/vendor/plugins/ultrasphinx)
$ cp RAILS_ROOT/examples/default.base RAILS_ROOT/config/ultrasphinx/
Add is_indexed to the model: e.g.
$ rake ultrasphinx:configure <= Generates development.conf
($ rake ultrasphinx:configure RAILS_ENV="test" <= Generates test.conf)
$ sudo ln -s /usr/local/mysql/lib /usr/local/mysql/lib/mysql
(Because "rake ultrasphinx:index" has an incorrect path "/usr/local/mysql/lib/mysql".
Otherwise, "rake ultrasphinx:index" fails.)
$ rake ultrasphinx:index <= For development database
($ rake ultrasphinx:index RAILS_ENV="test" <= For test database)
(Of course, in the Test::Unit or RSpec, test database is cleaned up every time so this has to be put inside Test or Spec.
i.e.
system("cd #{RAILS_ROOT}; rake ultrasphinx:index RAILS_ENV=\"test\"") )
5. Start/Stop daemon
$ rake ultrasphinx:daemon:start <= For development database
($ rake ultrasphinx:daemon:start RAILS_ENV="test" <= For test database)
- How to stop Ultrasphinx
$ rake ultrasphinx:daemon:stop
1. Sphinx installation
$ wget http://www.sphinxsearch.com/downloads/sphinx-0.9.8-rc2.tar.gz
$ tar xvfzp sphinx-0.9.8-rc2.tar.gz
$ cd sphinx-0.9.8-rc2/
$ ./configure --prefix=/usr/local
$ make
$ sudo make install
2. Install Chronic
(Chronic is a natural language date/time parser written
in pure Ruby.)
$ sudo gem install chronic
3. Install Ultrasphinx plugin
$ cd RAILS_ROOT
$ svn export svn://rubyforge.org/var/svn/fauna/ultrasphinx
/trunk/vendor/plugins/ultrasphinx
(if GIT or other version control system is used.)
(Or if Subversion is used,
$ script/plugin install -x svn://rubyforge.org/var/svn/fauna/ultrasphinx
/trunk/vendor/plugins/ultrasphinx)
$ cp RAILS_ROOT/examples/default.base RAILS_ROOT/config/ultrasphinx/
Add is_indexed to the model: e.g.
4. Build index
class Overview
is_indexed :fields => [ 'title', 'description' ]
end
$ rake ultrasphinx:configure <= Generates development.conf
($ rake ultrasphinx:configure RAILS_ENV="test" <= Generates test.conf)
$ sudo ln -s /usr/local/mysql/lib /usr/local/mysql/lib/mysql
(Because "rake ultrasphinx:index" has an incorrect path "/usr/local/mysql/lib/mysql".
Otherwise, "rake ultrasphinx:index" fails.)
$ rake ultrasphinx:index <= For development database
($ rake ultrasphinx:index RAILS_ENV="test" <= For test database)
(Of course, in the Test::Unit or RSpec, test database is cleaned up every time so this has to be put inside Test or Spec.
i.e.
system("cd #{RAILS_ROOT}; rake ultrasphinx:index RAILS_ENV=\"test\"") )
5. Start/Stop daemon
$ rake ultrasphinx:daemon:start <= For development database
($ rake ultrasphinx:daemon:start RAILS_ENV="test" <= For test database)
- How to stop Ultrasphinx
$ rake ultrasphinx:daemon:stop
Saturday, May 03, 2008
Friday, April 18, 2008
Tuesday, April 15, 2008
Nginx and Ruby on Rails ssl_requirement
ssl_requirement plugin was causing infinitive loop.
It was because request.ssl? was always returning false in ensure_proper_protocol method inside SslRequirement.
Actually, request.ssl? method is checking the value of X-FORWARDED_PROTO.
So it turned out that you have to set X-FORWARDED_PROTO in Nginx's configuation file.
i.e.
It was because request.ssl? was always returning false in ensure_proper_protocol method inside SslRequirement.
Actually, request.ssl? method is checking the value of X-FORWARDED_PROTO.
So it turned out that you have to set X-FORWARDED_PROTO in Nginx's configuation file.
i.e.
server {
location / {
proxy_set_header X-FORWARDED_PROTO https;
}
}
Thursday, April 10, 2008
Growth hormone release in pulsatile pattern
I've just learned that the effect of growth hormone is bigger with the existence of the periods when it is not released. In that case the hormone release has a pattern of pulse.
Also I learned that it is more intertwined with other hormones than I had known before. But it makes sense.
Human body or any mammal's body is amazing in how it's functioning. On the way back home, I was looking at other people on the bus and thought that at each moment, inside their body, hormones and other chemicals are highly balanced. Of course, it has been one of the reasons why I respect each individual human and creature. I was reminded of that feeling strongly again today. I just wish all the individuals can achieve the best they can achieve.
Also I learned that it is more intertwined with other hormones than I had known before. But it makes sense.
Human body or any mammal's body is amazing in how it's functioning. On the way back home, I was looking at other people on the bus and thought that at each moment, inside their body, hormones and other chemicals are highly balanced. Of course, it has been one of the reasons why I respect each individual human and creature. I was reminded of that feeling strongly again today. I just wish all the individuals can achieve the best they can achieve.
Sunday, March 30, 2008
Great Team Basketball
In NCAA Men's basketball tournament, Davidson University played great team basketball games. I just loved the way they played basketball.
Subscribe to:
Posts (Atom)