Clear ques of Postfix
Friday, August 28th, 2009Problem
You want to delete all the messages in sending ques of Postfix.
Solution
$ sudo postsuper -d ALL
| NiceCabbage Blog |
| Life, Design, Web Application |
You want to delete all the messages in sending ques of Postfix.
$ sudo postsuper -d ALL
You want to show texts in a vertical orientation on Flash Player 10.
From Flash Player 10, you can use Flash Text Engine(aka, FTE), included in flash.text.engine.*. To show (and edit) text contents in Flash, you can do much much more than good and old TextField class.
“vertical orientation” is one of the great features FTE offers to us. I made a easy-to-use wrapper class for this feature. Check the code below.
And, here is a sample usage of “VText” class.
package { import com.hoora.view.VText; import flash.events.Event; import flash.display.MovieClip; public class Main extends MovieClip { public function Main() { addChild(new VText("Hello, 日本語!English words are shown like this. 日本語は縦書きに表示されます。", 80, 180, 0x005596)); } } }
And the result is,
Click on the image to play the SWF. Note that you need to have flash player 10 installed on your machine to see the swf.
‘locate’ and ‘updatedb’ commands are the best commands to search files on Linux. However, you dont have them installed on your Linux.
Use these commands. On Debian,
sudo apt-get install locate
, and on CentOS,
sudo yum install mlocate
On Ruby on Rails, you see the NameError of “undefined local variable or method `root_url’ for #<YourController>”.
You need to set map.root in config/routes.rb, such as
mpa.root :controller => :welcome
You don’t want to install rubygems under your home direcotry(~/.gem/ruby/1.x/) when you just forgot to “sudo” and don’t have right permissions to write to system directories.
First, You need to install rubygems newer than 1.3.2. To check the version, type as
gem -v
1.3.1To update your gems itself, type as
sudo gem update --system
Next, you need to edit your ~/.gemrc file. Add
gem: --no-user-install
at the bottom of the file.
Now, if you forgot to “sudo” when installing new rubygems, gem will simply fail with permission erros, like
tomoya@hongkong% gem install sequel ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions into the /opt/local/lib/ruby/gems/1.8 directory.
On Fedora11 installed via Vmware, sudo does not respond for thirty or fourty secs.
The cause is that sudo is looking up your hostname to DNS, and waiting until TIMEOUT event is fired. You can fix this problem by just adding your hostname to /etc/hosts
su - nano /etc/hosts 127.0.0.1 localhost localhost.localdomain <yourhost> <yourhost>.localdomain localhost4 localhost4.localdomain