Just for a record.
Git Bundle
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.
Wednesday, March 26, 2008
Healthy snowboarding brand
After an "Event to build entrepreneurial software in 48 hours over a weekend", I got into a mindset to come up with a new brand a little bit.
That led me to come up with a way of snowboarding in a healthy athletic way.
Often times, many snowboarders are rude and aggressive and do stuff like smoking and drinking excessively.
But if you take snowboarding itself, it's a good sport requires whole body muscles. It has variety of movements - free riding, free styling in snow park, etc. It's challenging, which gives you positive attitude overcoming fear. It's outdoor, often breathing fresh air in the mountains. And on the top of the ski hills, you can see magnificent views, which refreshes your mind.
So I would package all these good features together and brand it as a healthy snowboarding. The image of that brand is like working out in the gym. You eat well with nutritious food and in the daily life, work out and tone up the muscles, in order to give you the best snowboarding performance. A friendly attitude toward other people has the high value. And you progressively improve various snowboarding skills, including free style moves.
That led me to come up with a way of snowboarding in a healthy athletic way.
Often times, many snowboarders are rude and aggressive and do stuff like smoking and drinking excessively.
But if you take snowboarding itself, it's a good sport requires whole body muscles. It has variety of movements - free riding, free styling in snow park, etc. It's challenging, which gives you positive attitude overcoming fear. It's outdoor, often breathing fresh air in the mountains. And on the top of the ski hills, you can see magnificent views, which refreshes your mind.
So I would package all these good features together and brand it as a healthy snowboarding. The image of that brand is like working out in the gym. You eat well with nutritious food and in the daily life, work out and tone up the muscles, in order to give you the best snowboarding performance. A friendly attitude toward other people has the high value. And you progressively improve various snowboarding skills, including free style moves.
Possibility of hydrogen production for hydrogen vehicle
After I wrote a blog entry, "Wind-powered generator on the top of the ski hills - Éoliennes sur le sommet des centres de ski", I was reminded that I live in a place with abundant electricity by hydroelectric energy production.
Then I thought of hydrogen vehicles. As far as I remember Iceland is the only country that can produce hydrogen from water by electrolysis using clean natural energy source, enough to support almost all the vehicles in the country. Maybe we can be next. With the combination with the electricity by wind-powered generator, maybe we have enough electricity needed to produce hydrogen.
Then I thought of hydrogen vehicles. As far as I remember Iceland is the only country that can produce hydrogen from water by electrolysis using clean natural energy source, enough to support almost all the vehicles in the country. Maybe we can be next. With the combination with the electricity by wind-powered generator, maybe we have enough electricity needed to produce hydrogen.
Thursday, March 20, 2008
REST for various scenarios
The purpose of the article is different but I read it in such a way to learn more about REST.
"Addressing Doubts about REST"
Also the comments are interesting.
And one of them "Resource transformations" is what I'm concerned with most now.
"Addressing Doubts about REST"
Also the comments are interesting.
And one of them "Resource transformations" is what I'm concerned with most now.
Wednesday, March 05, 2008
How to set up to access LDAP from Ruby on Rails
Note: This is for Mac OS X 10.5 Leopard. For other system, change the directory path appropriately.
1. Install OpenLDAP.
1-1. Install Berkeley DB.
(OpenLDAP requires this.)
1-1-1. Download the source. db-4.5.20.tar.gz
(OpenLDAP only works with the version up to 4.5.
Don't download 4.6.)
("Berkeley DB 4.5.20.tar.gz, with AES encryption(8.9M)"
in
http://www.oracle.com/technology/software
/products/berkeley-db/db/index.html)
1-1-2. Unpack the tar.gz file. And build it.
$ cd build_unix
$ ../dist/make
1-1-3. Install it.
$ sudo make install
1-2. Install OpenLDAP
1-2-1. Set the environment variables.
(See the message with "configure --help")
$ export CPPFLAGS="-I/usr/local/include"
$ export LDFLAGS="-L/usr/local/lib"
$ export LDFLAGS="-L/usr/local/BerkeleyDB.4.5/lib/"
$ export CPPFLAGS="-I/usr/local/BerkeleyDB.4.5/include/"
1-2-2. Build it.
$ make depend
$ sudo make
(make has to be executed as root
otherwise a permission error occurs.)
1-2-3. Install it.
$ sudo make install
1-2-4. See doc/guide/admin/guide.html for how to use it.
Especially, "2. A Quick-Start Guide".
e.g How to start it.
$ su root -c /usr/local/libexec/slapd
2. Install ruby-activeldap Rails Plugin.
(http://code.google.com/p/ruby-activeldap/)
$ script/plugin install \
http://ruby-activeldap.googlecode.com \
/svn/trunk/rails/plugin/active_ldap
3. Install activeldap Ruby Gem.
(ruby-activeldap Rails Plugin only generates
scaffold model to access this gem.)
$ sudo gem install activeldap
4. Install Ruby/LDAP.
(activeldap is a wrapper for this.)
4-1. Download the source. ruby-ldap-0.9.7.tar.gz
(http://sourceforge.net/projects/ruby-ldap/)
4-2. Unpack the tar.gz file. And build it.
(See README file under the unpacked directory.)
$ ruby extconf.rb --with-openldap2
$ make
4-3. Install it.
$ sudo make install
(It's installed under /Library/Ruby/Site/1.8)
Event to build entrepreneurial software in 48 hours over a weekend
Over the last weekend, I participated in an event to build software product in two days and present it to investors at the end.
My goal of participating the event was to work on Ruby on Rails development and to get familiar with local start-up scene because they are the ones who are using Ruby on Rails most.
Our team lead was very professional in skills, knowledge and the manner he conducted business throughout the project. I was able to enjoy the development fully.
During the event, series of experts in business, entrepreneurship, and technology visited each team and gave us advices. It was very interesting to see how the project was being shaped as a result of this interaction and how the direction changed along the way.
The presentations by investors and accounting professional, etc. at the beginning of the event were very informative also. And I was able to meet various technical people during the event.
My goal was more than fulfilled.
My goal of participating the event was to work on Ruby on Rails development and to get familiar with local start-up scene because they are the ones who are using Ruby on Rails most.
Our team lead was very professional in skills, knowledge and the manner he conducted business throughout the project. I was able to enjoy the development fully.
During the event, series of experts in business, entrepreneurship, and technology visited each team and gave us advices. It was very interesting to see how the project was being shaped as a result of this interaction and how the direction changed along the way.
The presentations by investors and accounting professional, etc. at the beginning of the event were very informative also. And I was able to meet various technical people during the event.
My goal was more than fulfilled.
Friday, February 29, 2008
Sunday, February 24, 2008
RSpec Stories resources
I just put it in here because I refer to it often.
RSpec Stories resources.
By the way, one comment in David Chelimsky's blog entry in there has a link to a Story Editor using Prototype.
RSpec Stories resources.
By the way, one comment in David Chelimsky's blog entry in there has a link to a Story Editor using Prototype.
Friday, February 22, 2008
Éoliennes sur le sommet des centres de ski
Since I'm learning French, I try to write a blog entry in French as well.
This is about the idea of Wind-powered generator on the top of the ski hills, which I wrote on February 5th. Please correct it if you are familiar with French. My French is not good yet:
J'ai une idée de mettre des vent générateurs sur le sommet des centres de ski parce que souvent il vente très fort là. L'électrcité générée est utilizé pour l'ascenseurs.
(Corrigez les erreurs, SVP. Ça ne fait pas longtemps que j'apprends français.)
Mon ami a corrigé les fautes (Merci!):
J'ai eu une idée d'installer des éoliennes sur le somment des centres de ski car il vente très fort a ces endroits. L'électricité générée serait utilisées pour les remonte pente.
This is about the idea of Wind-powered generator on the top of the ski hills, which I wrote on February 5th. Please correct it if you are familiar with French. My French is not good yet:
J'ai une idée de mettre des vent générateurs sur le sommet des centres de ski parce que souvent il vente très fort là. L'électrcité générée est utilizé pour l'ascenseurs.
(Corrigez les erreurs, SVP. Ça ne fait pas longtemps que j'apprends français.)
Mon ami a corrigé les fautes (Merci!):
J'ai eu une idée d'installer des éoliennes sur le somment des centres de ski car il vente très fort a ces endroits. L'électricité générée serait utilisées pour les remonte pente.
Friday, February 15, 2008
RSpec Stories
I like RSpec's new feature, RSpec Stories.
In the past, I saw Acceptance Test Cases written in plain text and the approach worked very well.
By the way, RSpec Stories is in English. And of course, all the programming languages use English for their keywords as far as I know. But I'm learning French now. And French speaking customers writing Stories in English doesn't seem to work well. And developers translating French to English introduces one more layer of indirection, which we want to avoid. I wonder if there is a solution to this problem. Maybe we can make a translator. It will be simple because it contains only RSpec stories keywords.
In the past, I saw Acceptance Test Cases written in plain text and the approach worked very well.
By the way, RSpec Stories is in English. And of course, all the programming languages use English for their keywords as far as I know. But I'm learning French now. And French speaking customers writing Stories in English doesn't seem to work well. And developers translating French to English introduces one more layer of indirection, which we want to avoid. I wonder if there is a solution to this problem. Maybe we can make a translator. It will be simple because it contains only RSpec stories keywords.
Monday, February 11, 2008
Experiment on Evolution
I have attended very interesting lecture at a local university.
I wish I had enough time to write down the verbs the speaker used to describe what three key figures in the lecture did.
But using my words instead, it was about - Darwin provoked the idea, Dallinger attempted to verify it experimentally, and D'Herelle established the way to experiment it.
Of course, not to mention, that uses life form whose reproduction cycle is very short so that you can observe its evolution.
D'Herelle is the start of Evolutionary medicine.
Evolutionary medicine is very interesting. Bacteriophage therapy makes sense though I acknowledge the points the speaker mentioned - it's alive so you don't necessarily know what would happen after the treatment is completed.
I wish I had enough time to write down the verbs the speaker used to describe what three key figures in the lecture did.
But using my words instead, it was about - Darwin provoked the idea, Dallinger attempted to verify it experimentally, and D'Herelle established the way to experiment it.
Of course, not to mention, that uses life form whose reproduction cycle is very short so that you can observe its evolution.
D'Herelle is the start of Evolutionary medicine.
Evolutionary medicine is very interesting. Bacteriophage therapy makes sense though I acknowledge the points the speaker mentioned - it's alive so you don't necessarily know what would happen after the treatment is completed.
Thursday, February 07, 2008
RSpec Rails screencast
"Story Runner top to bottom screencast"
It's very good and at the same time entertaining to follow as well.
It's very good and at the same time entertaining to follow as well.
Tuesday, February 05, 2008
Wind-powered generator on the top of the ski hills
Many times at the top of the ski hills and mountains, especially in the high mountains, wind blows very hard.
I have come up with the idea of putting a wind-powered generator on the top of a ski hill. It provides electricity for the lifts. And when the lifts are not used, the generated electricity can be put back to the power grid.
I have come up with the idea of putting a wind-powered generator on the top of a ski hill. It provides electricity for the lifts. And when the lifts are not used, the generated electricity can be put back to the power grid.
Friday, February 01, 2008
The Psychology of Risks
This is an article in "Communications of the ACM" magazine - January 2008 Volume 51, Number 1.
I just quote.
"The big difference seems to be this: In their personal lives, people tend to consciously and deliberately take risks - though often unaware of possibly serious consequences. When dealing with computer technology, people tend to take risks unconsciously and in some cases unwillingly."
I just quote.
"The big difference seems to be this: In their personal lives, people tend to consciously and deliberately take risks - though often unaware of possibly serious consequences. When dealing with computer technology, people tend to take risks unconsciously and in some cases unwillingly."
Tuesday, January 29, 2008
Kent Beck on Implementation Patterns
"Kent Beck on Implementation Patterns"
I want to be in the environment where people understand what Kent says in this interview, where I can talk about it and where we can thrive for better together.
I want to be in the environment where people understand what Kent says in this interview, where I can talk about it and where we can thrive for better together.
Sunday, January 27, 2008
I like Spec::Rails from a different perspective as well
I like Behaviour-Driven Development very much. And that's my primary reason why I like RSpec.
I have another perspective as well about why I like Spec::Rails (RSpec for Rails). The specifications of Views are completely isolated from the Controllers and vice versa. This makes isolating and finding a problem much easier.
Also with the built-in Mock framework, Controller specifications and View specifications become more like Unit Tests (or Unit Specifications, I should say).
With stories to verify the interactions between two components acting as integration test/acceptance test, this approach is much closer to an effective software development dealing with the reality of software development such as frequent changes.
I have another perspective as well about why I like Spec::Rails (RSpec for Rails). The specifications of Views are completely isolated from the Controllers and vice versa. This makes isolating and finding a problem much easier.
Also with the built-in Mock framework, Controller specifications and View specifications become more like Unit Tests (or Unit Specifications, I should say).
With stories to verify the interactions between two components acting as integration test/acceptance test, this approach is much closer to an effective software development dealing with the reality of software development such as frequent changes.
Saturday, January 19, 2008
Bio-diesel hybrid car
I was listening to a radio and it was saying that electric cars were coming out.
I always thought that the next car I would buy is a hybrid car. But after hearing it, I felt like getting electric car instead when it comes out.
Also I have been wondering if they can produce hybrid car using bio-diesel. That is much cleaner than gasoline hybrid car. The source of fuel is clean because it's a plant. And the fuel itself is cleaner.
I want to work on contributing for cleaner energy source.
I always thought that the next car I would buy is a hybrid car. But after hearing it, I felt like getting electric car instead when it comes out.
Also I have been wondering if they can produce hybrid car using bio-diesel. That is much cleaner than gasoline hybrid car. The source of fuel is clean because it's a plant. And the fuel itself is cleaner.
I want to work on contributing for cleaner energy source.
Subscribe to:
Posts (Atom)