first time watching andy do work… what can i say? the kid can play. his fielding skills are great, good arm, and good bat contact — hopefully he gets his all star nomination! Read more »
so i shot this whole set with the fotasy 35mm lens attached to my trusty nex-3… being a novice, it can get tricky to focus on things — i’m so damn slow with it… but if you get it right, the results look awesome. dramatic is the word
great game for matty’s padres! 6-5 w (come from behind victory). great fundamental baseball and only three kids cried!
— Joey Hernandez (@gorirrajoe) May 12, 2012
matt’s pitching line: 2ip, 1er, 4k’s, 2bb, 1h. batting: 2/2, 1r, 1sb – absolutely crushed the first hit
— Joey Hernandez (@gorirrajoe) May 12, 2012
video
this is the first time i took video with the lens… i dunno if i’d do it again — i dunno, what do you think?
here are a bunch of frequently used code snippets i’ve used with many of my projects
* i really should know these by now… but what are ya gonna do?
linking to the homepage
<a href="<?php echo get_option('home'); ?>">...</a>
image references
<img src="<?php bloginfo('stylesheet_directory'); ?>/images/FILE_NAME.jpg"
alt="<?php bloginfo('name'); ?>" title="<?php bloginfo('name'); ?>" />
dynamic widgets
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('WIDGET_NAME') ) : ?>
<?php endif; ?>
then, in functions.php, add this:
register_sidebar(array('name'=>'WIDGET_NAME',
'before_widget' => '',
'after_widget' => '',
'before_title' => '<h3>',
'after_title' => '</h3>',
));
custom fields – mentioned before on my site, but just to have ’em all together
<?php $VARIABLE_NAME=get_post_meta($post->ID, "CUSTOM_FIELD_NAME", true);
if (get_post_meta($post->ID, "CUSTOM_FIELD_NAME", true)) {
echo ("<img src=\"FULL_PATH_TO/$VARIABLE_NAME\" />");
} ?>
copyright
© <?php echo date('Y'); ?> - <?php bloginfo('name'); ?>
again, thanks to sam the cooking guy
ingredients
- 1-two pound london broil
- 4 cloves garlic, chopped fine
- kosher salt and pepper
- 1 sourdough baguette
- ⅔ cup horseradish sauce
- 4 oz arugula leaves (or spring mix lettuce)
- olive oil
been watching some sam the cooking guy lately… i think i can tackle these…
bacon-wrapped scallops
ingredients
- 1 lb sea scallops, defrosted
- 12 slices of pre-cooked bacon
- 1/4 cup teriyaki sauce
- 2 skewers
- 1 tbsp toasted sesame seeds
on the topic of “figuring things out wrt coding” — i was working on converting a site to wordpress and was trying to figure out how to get a home page movie to appear ONLY on the home page (easily).
so i looked around and found out there was a wordpress function called “is_front_page()”
so, along with a nifty fade in/fade out script, i created this in the header.php file:
<?php
if ( is_front_page() ) {
echo "
<div class=\"hpmovie\">
<div id=\"xlide\">
<img src=\"wp-content/themes/[THEMENAME]/images/5.jpg\"
alt=\"\" />
<img src=\"wp-content/themes/[THEMENAME]/images/11.jpg\"
alt=\"\" />
...
</div>
</div>
";
}
?>
so basically, if it’s the home page, it’ll write stuff to the page… boom
so this won’t make sense to any of you, but i was pretty proud of myself when i made this. i used various xsl elements to basically have the page pull data from an xml document:
xsl
...
<xsl:variable name="readmore">
<xsl:choose>
<xsl:when test="@readmore != ''">
<xsl:value-of select="@readmore" />
</xsl:when>
<xsl:otherwise>
See all <xsl:value-of select="@title" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<div style="font-size:8pt;">
<a href="{@url}"><xsl:value-of select="$readmore" /></a>
</div>
...
this is a sample of the xml that it pulls:
<page id="..." title="Newsletters" url="newsletters.asp" thumbnail="include/media/images/products-newsletters.gif" description="blah blah blah">
so since there isn’t a title attribute to this node, it’ll default to the title. on the page, it’ll say “See all Newsletters”
i made it myself! yay
as i write the title of this tutorial, i can tell it might get long and/or complicated… i’ll try my best… here we go
FIRST, you’ll need the tools — download virtual pc (especially if you run windows vista) and then grab an image here — i would suggest getting the IE6 image, since that version of IE is the “worst” of them all
Read more »
i feel that i should add a few notes as an addendum to my previous post — call it the “companion pack,” if you will
- after you modify the “default” folder in the “wp-content\themes” directory, make a copy of it and rename it to something… anything…
- i found this out the hard way. wordpress just recently did a string of updates (currently 2.8.2) and every time i’d do an update, my site would revert back to the default layout
- luckily i had all my files locally so i was able to re-upload to the default folder
- it only took me 3 upgrades to figure out that i had to rename the folder so that wordpress wouldn’t overwrite my work