Walking home last night i felt the earth move… under my feet. Jumping on twitter when i got home I saw a bunch of #icelandearthquake reports.
I took this snapshot of the Icelandic quake report/weather website showing the location, (4.7) located near the blue lagoon spa.

Now here is the weird thing, exaclty one year ago was the big 6+ earthquake here… below is the snapshot of that quake. Kooky coincidence.

ben iceland
A few weeks ago I was at my neighborhood fishmonger asking about the various things in the case. They have pieces of the fish I have never seen before, various bellies, jaws, intestines. Yummy.
Anyway he suggested I try these cod cheeks, which are sort of a delicacy. In my experience you really can’t go wrong when you follow the advice of the fishmonger.
And he was right, breaded.. fried… with lemon and tobasco on the side. Yum
The raw product:

Ready to munch:

ben food, iceland
Even after a full year living here I am still not used to going to bed when the sun is up. I took these photos around 11:30pm last night. I feel like an 8 year old going to bed when the sun is streaming into my bedroom! And of course the sun comes right back up around 3:30 am.
Here is the full sun rise/set for june for reykjavik. I love how length of day blanks out around the solstice… cause the sun is always up!



ben iceland
I think around May 15th I hit my one year anniversary living in Iceland. I do not get homesick but I do find myself missing certain things I really took for granted back in the US.
So here is my list of random stuff I miss by living in Iceland:
- Fresh Vegetables
- Fresh Fruit
- Vegetables other than potatoes/onions/carrots/tomatoes
- Bacon Egg & Cheese Sandwiches
- Temperatures Over 60
- Nightime in the Summer & Daytime in the Winter
- Kraft Macaroni & Cheese
- If it’s sunday morning… it’s meet the press
- People over the age of 12 in customer service
- Over 40gb a month of Internet
- Cheap Alcohol
- Bialys
I think that covers it.
ben food, iceland, random
Here is the followup to the CSS minification.. JS minification. How exciting! YUI Compressor can do a lot with your js, including obfuscation. For me i just want it to minify – put all on one line.
Below is my ANT task.
<!-- ============ -->
<!-- JS Minification -->
<!-- ============ -->
<target name="js.minify">
<apply executable="java" parallel="false" dest="${temp.dir}/htdocs/front/resources/js/">
<fileset dir="${temp.dir}/htdocs/front/resources/js/"
includes="*.js autocomplete/ item/ test/">
<exclude name="*jquery*" />
</fileset>
<arg line="-jar"/>
<arg path="lib/yuicompressor-2.4.2.jar"/>
<arg line="--nomunge --preserve-semi"/>
<srcfile />
<arg line="-o"/>
<mapper type="glob" from="*.js" to="*-min.js"/>
<targetfile />
</apply>
<!-- Replace Existing JS-->
<move todir="${temp.dir}/htdocs/front/resources/js/" overwrite="true">
<fileset dir="${temp.dir}/htdocs/front/resources/js/"
includes="*.js autocomplete/ item/ test/">
<exclude name="*jquery*"/>
</fileset>
<mapper type="glob" from="*-min.js" to="*.js"/>
</move>
</target>
This is very similar to the approach taken with CSS minification with a few important changes. Obviously the options we pass in are different. We specify JS minification with nomunge (minify but do not obfuscaste). Details of the options are spelled out here in the documentation: http://www.julienlecomte.net/yuicompressor/README.
One of the gothcas is to not compress anything that is already compressed like JQuery or anything similar.
This can be controlled when you define the fileset. Notice I specify the root directory – then the subdirectories I want included, I also say look at everything that is *.js.
To exclude jQuery or anything similar use the exclude command and enter a pattern. In my example any jquery files have jquery somewhere in the name.
ben tech
A few days ago one of our programmers asked minimizing our CSS/JS . I figured this was a good exercise as I would want to integrate this into our ANT build process.
Why integrate into ANT?
Because having developers worry about formatting/unformatting CSS/JS is just a pain in the ass and not good for anybody.
By doing this in ANT the developer does not have to worry about anything…at all. Whenever a build is made to QA or Production.. whooosh everything gets minimized.
To do this I am making use of the YUICompressor library. It’s very well documented.. which helps. For more details you may also read this blog http://www.julienlecomte.net/blog/index.php?s=YUI+Compressor.
CSS Minification
The overall strategy for CSS minification is to tell YUI where our css files are and to minimize all of em.
For CSS our code starts out like this:
body {
margin:0 0 0 0;
font-size:10px;
}
After minimizing it looks like this:
body{margin:0 0 0 0;font-size:10px;}
You can do a lot more complicated stuff but for us this is all we need. Here is what the ANT task looks like
<target name="css.minify">
<apply executable="java"
parallel="false"
dest="${temp.dir}/htdocs/front/resources/css/">
<fileset dir="${temp.dir}/htdocs/front/resources/css/"
includes="*.css"/>
<arg line="-jar"/>
<arg path="lib/yuicompressor-2.4.2.jar"/>
<arg line="--line-break 0"/>
<srcfile />
<arg line="-o"/>
<mapper type="glob" from="*.css" to="*-min.css"/>
<targetfile />
</apply>
<!-- Replace Existing CSS -->
<move todir="${temp.dir}/htdocs/front/resources/css/" overwrite="true">
<fileset dir="${temp.dir}/htdocs/front/resources/css/" />
<mapper type="glob" from="*-min.css" to="*.css"/>
</move>
</target>
So basically we tell ant where the source files are and where it should store the processed files. A neat trick is to specify a folder and look for all .css files as I have done.
We use the executable command to run the yuicompressor jar as if it was on the command line. And we basically say “remove all line breaks”.
Now the only thing i dont like is that I name the processed files -min.css then do a seperate move to rename them and over write the old files.
It looks like there is a mapper that should do this in place, but I was unable to get this to work.
I’ll post the JS minification in a followup.
ben startup, tech
I had this irritating problem running ANT with SVN on my Mac lately. The ANT files worked fine under ubuntu but under OS X I got this pesky error:
Problem: failed to create task or type svn
Cause: The name is undefined.
The line causing the problem is here
<typedef resource="org/tigris/subversion/svnant/svnantlib.xml"
classpathref="project.classpath" />
Running the task again with the -debug flag yeided this tidbit
Could not load definitions from resource
org/apache/tools/ant/antlib.xml.
It could not be found.
I resolved this problem by uprgrading SVN on my machine to 1.5.5 and downloading the latest SVN ANT Jars 1.2.2 from http://subclipse.tigris.org/svnant.html
ben tech
I have some random iceland fish photos on my phone, time to share! Click for a larger image.

Taken on the bike path where I run, there are wooden frames scattered about where fish are dried.

Take out lunch from Ostabudin – a cheese shop near where I work. They have fantastic fish-of-the-day lunches.

Smoked haddock from my neighborhood fish monger. A bargain at 750ISK for this slab! He suggested cooking in cream… which i did!
ben food, iceland
Recent Comments