Skip to content

Instantly share code, notes, and snippets.

<?php
$numposts = 2;
function rss_date( $timestamp = null ) {
$timestamp = ($timestamp==null) ? time() : $timestamp;
echo date(DATE_RSS, $timestamp);
}
function rss_text_limit($string, $length, $replacer = '...') {
@iansoper
iansoper / CodaLight.scpt
Created December 15, 2010 15:35
Open your web development project in TextMate + Transmit + Terminal (kinda like Coda)
-- Coda Light
--
-- By Henrik Nyh <http://henrik.nyh.se>, 2007-04-26
-- His original script: http://henrik.nyh.se/2007/04/coda-light-applescript
--
-- Changes for Transmit 4 and AppleScript 2 by Ian Soper <http://iansoper.com>, 2010-12-15
--
-- An AppleScript to start working on a web development project by
-- * opening the project in TextMate,
-- * opening related URLs in the default browser,
@iansoper
iansoper / custom.css
Created December 9, 2010 20:27
Custom HTML Template for Notational Velocity Alt
* {
text-rendering: optimizeLegibility;
}
body {
background: rgb(240,240,240);
/* background: rgba(255, 248, 237, 1);*/
padding: 1em;
/* width: auto;*/
}
@iansoper
iansoper / After-Selector-Shadow.css
Created October 4, 2010 15:13
CSS3 - Using :after psuedo selector to create a shadow on an element.
/*
Used :after psuedo selector to create a shadow on an element. I did this instead of just box-shadow on the element , because I wanted the shadow slightly more narrow than the element.
Depending on your styles, the shadow will look something like this: http://cl.ly/2fua
*/
.bottom {
background: rgb(254, 243, 216) url(../images/background.png) top left repeat;
<?php
add_theme_support( 'post-thumbnails' );
// add_theme_support( 'post-thumbnails', array( 'post' ) ); // Add it for posts
// add_theme_support( 'post-thumbnails', array( 'page' ) ); // Add it for pages
set_post_thumbnail_size( 50, 50, true ); // 50 pixels wide by 50 pixels tall, hard crop mode
add_image_size( 'large-featured-thumbnail', 340, 220, true ); // Permalink thumbnail size
add_image_size( 'small-featured-thumbnail', 280, 130, true ); // Permalink thumbnail size
add_image_size( 'small-film-still', 230, 150, true);
add_image_size( 'archive-thumbnail', 100, 100, true);