Skip to content

Instantly share code, notes, and snippets.

<?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);
@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;
@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 / 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,
<?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 / CSS3 Button with Graidient.css
Created May 26, 2011 20:54
CSS3 Button with Background image and transparent gradient
.button.mesh {
font-size: 18px;
line-height: 18px;
font-family: "BPreplayBold",Helvetica,Arial,sans-serif;
text-shadow: 0 1px 1px #ffffff;
letter-spacing: 0;
color: #333333;
height: auto;
margin: 0 10px 0 0;
padding: 7px 15px 10px 15px;
@iansoper
iansoper / favicon.html
Created June 22, 2011 13:54
HTML Favicon Link usage
<!-- Example taken from SimpleNote http://simplenoteapp.com/ -->
<link rel="icon" type="image/png" sizes="16x16" href="/favicon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/Simplenote-32px.png" />
<link rel="icon" type="image/png" sizes="64x64" href="/Simplenote-64px.png" />
<link rel="icon" type="image/png" sizes="256x256" href="/Simplenote-256px.png" />
<link rel="icon" type="image/png" sizes="512x512" href="/Simplenote-512px.png" />
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
@iansoper
iansoper / project-skeleton.sh
Created August 31, 2011 02:34
Make a Project Skeleton Folders with Bash Script
mkdir -p ./_Project/{Supplied,Design,Documents,Proofs,Finals,-siteroot{html/{css,js,images},wp}}/
@iansoper
iansoper / dabblet.css
Created January 5, 2012 16:07 — forked from bastianallgeier/dabblet.css
PE to use SVG as CSS background image with fallback for IE8/7/6
/**
* PE to use SVG as CSS background image with fallback for IE8/7/6
*
* Using SVG as CSS background image to display
* resolution-independent logos or icons is pretty
* awesome but does completely fail on IE8/7/6
*
* The trick:
* All three IE versions don't support rgba color values.
* By defining a rgba background color together with the
@iansoper
iansoper / dabblet.css
Created January 24, 2012 18:17
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height:100%;