A few weeks ago, on December 22, 2011 actually, I released a new filter for adding Perl support to Doxygen. This filter supports Doxygen style comments, POD style comments, and can perform some basic analysis of a Perl module and is called Doxygen::Filter::Perl. You can download this filter from CPAN or from Sourceforge at: http://perldoxygen.sourceforge.net/. For windows users or first time Doxygen users, please see the discussion thread on the Sourceforge project page. For those familiar with Doxygen, the documentation on CPAN should suffice.
Somewhere between order, disorder, and chaos exists the life in which we live. My views of time and space and everything else therein reflects my never ending war with Entropy.
Sunday, January 8, 2012
Tuesday, December 6, 2011
How do I su to root on OSX
So you are tired of typing sudo before ever command and you would like root shell running bash. In OSX like Ubuntu the password for root is locked and you can not “su” or “sux” to root. The way you get around this is to first “sudo bash” to get a root bash shell and then “passwd” to set the root password. Make sure you set a really strong password for root if you are going to go this route. And if you allow inbound SSH, you should probably change the sshd_config to not allow root to SSH in. Make users SSH as a non-privileged user first and then su to root.
Once you have this done you will probably want to set the shell that root uses by default. Unfortunately you can not just edit /etc/passwd like in Linux. OSX uses OpenDirectory to store all of this. What I had to do is reboot/logout and then log back in as root. You can then use the actual GUI tools (System Preferences -> Users and Groups -> Control-Click the root user in the list and select advanced options) to change the shell for the root user.
Monday, December 5, 2011
Taking a screen shot with Mac OSX
With OSX Lion, screens shots can be done a few ways:
Take screen shot of complete desktop and save to desktop
Take screen shot of a specific window or selection. With this option, if you press space after the key combo below instead of dragging your mouse while pressing the mouse button, it will select the entire window/object that the mouse is currently over. After selecting the entire window with the space bar, you will still need to press the mouse button/left mouse button to take the picture.
Take screen shot of complete desktop and save to desktop
- Command-Shift-3: Save to desktop
- Command-Control-Shift-3: Save to clipboard
Take screen shot of a specific window or selection. With this option, if you press space after the key combo below instead of dragging your mouse while pressing the mouse button, it will select the entire window/object that the mouse is currently over. After selecting the entire window with the space bar, you will still need to press the mouse button/left mouse button to take the picture.
- Command-Shift-4: Save to desktop
- Command-Control-Shift-4: Save to clipboard
How to make the Mac terminal less painful
So coming from the Linux world, I love my terminal/shell and find it so much easier and faster to do so many things. The problem is, the Mac OSX default settings are really quite painful if you are used to a GNOME or KDE terminal. Here is some pointers to help you out. In the Terminal -> Preferences you can change all of the color and window size settings. You can also specify which terminal theme is to be used by default. One setting that I high recommend you set is the "Use option as meta key" in the Keyboard sub-menu of the Preferences. This will make the Apple Option key work like you would expect.
Another thing I like to do is add/edit the ~/.bash_profile file. This is my .bashrc file from Linux that I have changed to work on OSX.
Another thing I like to do is add/edit the ~/.bash_profile file. This is my .bashrc file from Linux that I have changed to work on OSX.
# ----------------------------------------
# Prompt
# ----------------------------------------
# \[ Start a sequence of non-printing characters
# \] Ends the non-printing characters sequence
# \e An ASCII escape character, older systems use \033 (octal)
# ]0; xterm new icon name and title (icon name is for AfterStep
# Window Maker)
# ]1; xterm new icon name only
# ]2; xterm escape sequence for the title
# \a End xterm escape sequence
# \h Hostname
# \w Current directory
# \u Username
# Foreground Colors
# Black = 30, Red = 31, Green = 32, Yellow\Orange = 33, Blue = 34
# Magenta = 35, Cyan = 36, Light Gray\Black = 37, Default = 39
# Background Colors
# Black = 40, Red = 41, Green = 42, Yellow\Orange = 43, Blue = 44
# Magenta = 45, Cyan = 46, Light Gray\Black = 47, Default = 49
TIME_COLOR="\[\e[0;34m\]"
USERNAME_COLOR="$COLOR_DEFAULT"
COLOR_END="\[\e[m\]"
# ----------------------------------------
# Check to see if we are root. If so
# change background color to red
# ----------------------------------------
if [ $UID == 0 ]; then
USERNAME_COLOR="\[\e[0;37;41m\]"
fi
# ----------------------------------------
# Check to see if we have a fancy Xterm if
# not do not display title and window bar
# changes.
# ----------------------------------------
case "$TERM" in
xterm*)
PS1="\[\e]2;\u@\h:\w\a\]\n[$TIME_COLOR\t$COLOR_END] \h\n[$USERNAME_COLORu$COLOR_END]:\w-> "
;;
dumb*)
PS1='\h[\u]:\w-> '
;;
*)
PS1="\n[$TIME_COLOR\t$COLOR_END] \h\n[$USERNAME_COLOR\u$COLOR_END]:\w-> "
;;
esac
export PS1
# enable color support of ls and also add handy aliases
if [ "$TERM" != "dumb" ]; then
alias ls='ls -G'
alias ll='ls -l -a'
# export CLICOLOR=1
# export LSCOLORS=ExFxCxDxBxegedabagacad
fi
export PATH=/usr/local/bin:/opt/local/bin:/opt/local/sbin:$PATH
Where can I find my LInux software on my Mac
So you have made the switch from Linux to Mac OSX and you realize that owning a Mac is not just about cool software it is about some of the greatest hardware you will ever use. Things like back-lit keyboards, soft flat keys, and the general touch and feel is not something you can find in the PC world. Oh and the high-res glossy screen is wonderful. Yes, Apple is a furniture company and yes OSX is a prison, but it is the NICEST prison you will ever be in. Another point of full disclosure, I am not an Apple fan boy and I am not pro Apple (as noted that I used Linux as day to day OS for 6 years), I am just anti-Windows.
One of the first questions you will ask yourself after you convert to OSX is where are all of the neat programs and tools we were used to in the Linux world. I never realized how many of them I used on a daily basis and how many of them I took for granted. What I have found is:
1) Not all Linux tools are available natively on OSX
2) There is no native apt-get like solution for OSX
3) Not all tools have a native OSX binary versions that you can download
4) You have to have xcode installed in order to get gcc and glibc to even try building the code form source
5) A lot of source code will not easily compile on OSX and if it does, you find yourself in dependency hell really fast
There are a few solutions that help ease a lot of this pain for us. One is called Homebrew (http://mxcl.github.com/homebrew/) and another is Mac Ports (http://www.macports.org/). I prefer Homebrew as it tries to use the native system as much as possible. Mac Ports is more of a Linux subsystem drop in, in the /opt/local directory. Once you have these packages installed, they will work a lot like apt-get or other package management solutions we are used to in Linux. Example:
> brew search minicom
> brew install minicom
The thing to keep in mind is that Homebrew uses /usr/local and Mac Ports use /opt/local by default. If you use Mac Ports and try to compile something that needs a library you installed by Mac Ports you need to make sure you tell ./configure where to find it. Example:
> ./configure -I /opt/local/includes -L/opt/local/libs
Homebrew and Mac Ports will really help ease a lot of the initial pain as you go looking for your favorite tools.
One of the first questions you will ask yourself after you convert to OSX is where are all of the neat programs and tools we were used to in the Linux world. I never realized how many of them I used on a daily basis and how many of them I took for granted. What I have found is:
1) Not all Linux tools are available natively on OSX
2) There is no native apt-get like solution for OSX
3) Not all tools have a native OSX binary versions that you can download
4) You have to have xcode installed in order to get gcc and glibc to even try building the code form source
5) A lot of source code will not easily compile on OSX and if it does, you find yourself in dependency hell really fast
There are a few solutions that help ease a lot of this pain for us. One is called Homebrew (http://mxcl.github.com/homebrew/) and another is Mac Ports (http://www.macports.org/). I prefer Homebrew as it tries to use the native system as much as possible. Mac Ports is more of a Linux subsystem drop in, in the /opt/local directory. Once you have these packages installed, they will work a lot like apt-get or other package management solutions we are used to in Linux. Example:
> brew search minicom
> brew install minicom
The thing to keep in mind is that Homebrew uses /usr/local and Mac Ports use /opt/local by default. If you use Mac Ports and try to compile something that needs a library you installed by Mac Ports you need to make sure you tell ./configure where to find it. Example:
> ./configure -I /opt/local/includes -L/opt/local/libs
Homebrew and Mac Ports will really help ease a lot of the initial pain as you go looking for your favorite tools.
Converting to Mac OSX from Linux
I recently made the day to day switch from Linux to Mac OSX running Lion. For the most part this transition has been painless, although there is just enough different for a Linux user to scratch his head and say "huh, Apple what were you thinking?". Now for completeness and full disclosure, I made the change from MS Windows to Linux over 6 years ago and only use Windows when I have to and only via VMWare Workstation (http://www.vmware.com), so these posts are not about how to do things from a Windows world because I have not lived in that world for a very long time and I will never go back. It is like once you drive a German car, it is really hard to drive anything else.
I hope you will find these random posts helpful if you are migrating from Linux to Mac OSX.
I hope you will find these random posts helpful if you are migrating from Linux to Mac OSX.
Saturday, March 5, 2011
Puff Pastry
![]() |
| Finished product - cheese |
That day changed me and opened my eyes, nose, taste buds, and pallet to a new way of looking at food. Before that point I had mostly viewed food as just something you ate to keep you from being hungry, not something that should be enjoyed. This little shop taught me to start enjoying food in new ways. Food should be good, good for you, but it should also look and smell wonderful and have excellent texture.
![]() |
| Finished product - jam |
So how does puff pastry fit in to all of this? Well puff pastry dough is a light and flaky dough that can be used for both pastries as well as main dishes. This dough gives a depth of complexity to the flavors and pallet that can not be easily replaced. On top of this, you can do amazing dough art with puff pastry. So why do more people not cook with it? On the surface it appears to be difficult and complex to make, however, neither is true. The key to puff pastry is technique and a little bit of patience, plain and simple.
You can do a lot of neat artsy things with puff pastry to make your creations beautiful. This first post is to work through the basics of the dough and I will be building some simple puff pastry turnovers, nothing ornate just simple wonderful things to eat.
Now before we get started there are a few key things to always remember. Heat in the form of room temperature or from friction/viscosity (from working with the dough) is EVIL. Do not get impatient, this will take several short blocks of time and can be spread over the course of a day or two days. Follow the technique outlined below; if you try to improvise it will fail. If at all possible work your dough on a marble slab as it will help keep the dough cooler. When working with the dough and butter, you want to minimize the amount of time it is out of the refrigerator therefore move quick and do not let the dough sit idle.
![]() |
| Ascorbic Acid powder |
Ingredients – Dough
- 180 ml of cold water
- 300 grams of sifted all-purpose white flour
- 4 grams of salt
- 1/8 teaspoon of ascorbic acid powder
- 170 grams (~1 and ½ sticks) of cold not frozen unsalted butter
- Sugar-in-the-raw and cinnamon
Ingredients – Egg Wash
- 1 egg beaten (umbilical cord removed)
- 10 ml of cold water
Directions
![]() |
| Dough out of food processor |
![]() |
| Dough ball |
- Remove the dough and place on a lightly floured stab of marble and knead by hand until you can form a nice round ball. Wrap the ball in plastic wrap and place in the back of your refrigerator for 30 minutes
![]() |
| Butter sliced |
- Place the butter in the back of the refrigerator for 30 minutes or until nice and firm.
- Take dough ball out of the refrigerator and roll out a cross with a “mound” in the middle.
- Place the butter on top of the mound and then fold up the sides of the dough to cover.
![]() |
| Dough cross with mound |
![]() |
| Butter all wrapped up |
![]() |
| Wrapping butter |
- With your rolling pin, push down and roll to form a nice rectangle. Fold this in thirds, turn the dough 90 degrees, and push down and roll once again in to a nice rectangle. Fold it back together in thirds, wrap in plastic and put in the back of your refrigerator for at least one hour.
![]() |
| Rolled and ready to be folded |
![]() |
| Dough folded - first turn |
- After you are finished with all of your turns, cool the dough one last time for an hour. Then cut in half, put half back in the refrigerator (wrapped in plastic as always) and then roll out the remaining dough so you can cut it in to the desired shapes, in our case large squares.
- Wet the inside edges of each square with a little bit of water, this will help it stick together once you put the pieces on top of each other. Place your desired filling in the middle and cover. (If you do not plan on using a filling that just use one square, do not double them up without a filling). Use a fork to press and seal the seam and carefully spear the top with the fork to provide a vent.
![]() |
| Sealed |
![]() |
| Cut and filled |
- Bake at 375 degrees for 30 minutes.
Subscribe to:
Posts (Atom)












