Skip to content

Instantly share code, notes, and snippets.

View oddevan's full-sized avatar

Evan Hildreth oddevan

View GitHub Profile
@ideabucket
ideabucket / README.md
Last active December 30, 2022 15:53
BBEdit text filter to replace Markup → Tidy → Reflow XML

As of BBEdit 13.1, the HTML Tidy built-ins are back and you should use those instead. This gist is so old it refers to "OS X", c’mon!

If for some reason you are using this, note @ryanfrancesconi’s comment about the correct place to put the file when using sandboxed versions of BBEdit.

@norio-nomura
norio-nomura / How I stream from iPad to Twitch and Ustream.md
Last active November 20, 2020 18:18
How I stream from iPad to Twitch and Ustream.

How I stream from iPad to Twitch and Ustream.

I'm broadcasting my iPad game playing on Twitch.tv and Ustream.tv.

I'm using following hardwares.

  • Playing Game: iPad 3 w/ iOS 7.1.2
  • Broadcasting to Twitch: MacBook Air Mid 2011 w/ OS X 10.9

I'm using following softwares on Mac.

@tylerhall
tylerhall / jekyll-import.php
Created March 21, 2014 00:02
Import a Jekyll posts directory into WordPress
<?PHP
require '/path/to/markdown-extra.php';
$db = mysql_connect('localhost', 'root', 'password') or die(mysql_error());
mysql_select_db('tylerio', $db) or die(mysql_error());
$files = scandir('posts');
array_shift($files); // .
array_shift($files); // ..
@CBeloch
CBeloch / wp-rss-images.php
Created June 10, 2013 06:12
Fix for the following Wordpress plugin: http://wordpress.org/plugins/wp-rss-images/
if($enclosure){ // this is Line 78
list($width, $height, $type, $attr) = getimagesize($url);
echo '<enclosure url="' . $image_url . '" length="' . $filesize . '" type="'.image_type_to_mime_type($type).'" />';
}
if($media){
list($width, $height, $type, $attr) = getimagesize($url);
echo '<media:content url="'.$image_url.'" width="'.$width.'" height="'.$height.'" medium="image" type="'.image_type_to_mime_type($type).'" />';
}
@bradt
bradt / wp-image-crop-position.php
Created November 29, 2011 20:56
WordPress: Set an image's crop position and rotates images based on EXIF information if necessary
<?php
/* Example Usage:
* bt_add_image_size( 'product-screenshot', 300, 300, array( 'left', 'top' ) );
* bt_add_image_size( 'product-feature', 460, 345, array( 'center', 'top' ) );
*/
add_filter( 'intermediate_image_sizes_advanced', 'bt_intermediate_image_sizes_advanced' );
add_filter( 'wp_generate_attachment_metadata', 'bt_generate_attachment_metadata', 10, 2 );
/**
@ssokolow
ssokolow / README.markdown
Created August 13, 2010 06:09
Wordpress WXR to Jekyll exporter

Having decided to move my blog to Jekyll, I went looking for solutions. AzizLight's class proved the simplest, but fell short of what I wanted.

This version has been modified to be runnable as a command-line script (help available via -h) and, aside from category permalink continuity (which I'm working on), produces a ready-to-use _posts directory for your Jekyll blog.

Full details on the changes are available in the git commit log.