This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does — either from the creator's website or your own thoughts.
— Erik
mixin prettyDate(uglyDate) | |
daysAgo = ((((new Date() - uglyDate) / 1000) / 60) / 60) / 24 | |
hours = uglyDate.getHours() | |
minutes = uglyDate.getMinutes() | |
ampm = hours >= 12 ? 'pm' : 'am' | |
hours = hours % 12 | |
hours = hours ? hours : 12 | |
minutes = minutes < 10 ? '0'+minutes : minutes | |
strTime = hours + ':' + minutes + ' ' + ampm |
<?php | |
/* | |
Plugin Name: WP_Rewrite endpoints demo | |
Description: A plugin giving example usage of the WP_Rewrite endpoint API | |
Plugin URI: http://make.wordpress.org/plugins/2012/06/07/rewrite-endpoints-api/ | |
Author: Jon Cave | |
Author URI: http://joncave.co.uk/ | |
*/ | |
function makeplugins_endpoints_add_endpoint() { |
@include keyframes(appear-and-roundify) { | |
0% { opacity: 0; @include border-radius(2px); } | |
100% { opacity: 1; @include border-radius(10px); } | |
} |
/** | |
* Add the field to the checkout | |
**/ | |
add_action('woocommerce_after_order_notes', 'my_custom_checkout_field'); | |
function my_custom_checkout_field( $checkout ) { | |
echo '<div id="my_custom_checkout_field"><h3>'.__('My Field').'</h3>'; | |
/** |
require "win32ole" | |
itunes = WIN32OLE.new('iTunes.Application') | |
library = itunes.LibraryPlaylist | |
tracks = library.Tracks | |
c = 1 | |
while (c < tracks.count ) | |
if (tracks[c].Location == "" && tracks[c].BitRate > 0) | |
#puts tracks[c].Location + " " + tracks[c].Artist + " : " + tracks[c].Name | |
tracks[c].delete | |
else |
<?php | |
h::html( | |
h::head( | |
h::title('Hi!') | |
), | |
h::body( | |
h::h1('Hello')->id('oi'), | |
h::ul( |