Skip to content

Instantly share code, notes, and snippets.

View funkatron's full-sized avatar

Ed Finkler funkatron

View GitHub Profile
@funkatron
funkatron / split_ee_jekyll_output.php
Created March 17, 2011 15:20
A simple php CLI script to split an export dump from EE into jekyll files
<?php
$file_str = file_get_contents('./ee_posts.txt');
$split = explode("<!-- end of post -->", $file_str);
foreach($split as $post_str) {
$post_str = trim($post_str);
if ($post_str) {
@funkatron
funkatron / export_jekyll.html
Created March 17, 2011 15:22
EE template to export into a Jekyll-compatible format
{exp:weblog:entries weblog="default_site" limit="9999" rdf="off"}
---
layout: post
author: {author}
title: "{title}"
url_title: {url_title}
permalink: {url_title}.html
tags: "{Keywords}"
published: true
category:
@funkatron
funkatron / comments.html
Created March 17, 2011 15:23
EE embed template used by jekyll exporter. You'll need to enable PHP parsing on INPUT to use this
<?php
global $IN;
$IN->QSTR = '{embed:the_entry_id}'
?>
<div id="comments" data-entry-id="{embed:the_entry_id}" data-url-title="{embed:the_url_title}">
<ul>
{exp:comment:entries weblog="default_site" sort="asc"}
@funkatron
funkatron / posts_jekyll.txt
Created March 21, 2011 20:50
An EE template used to export posts for use in Jekyll
{exp:weblog:entries weblog="default_site" limit="9999" rdf="off"}
---
layout: post
author: {author}
title: "{title}"
url_title: {url_title}
tags: "{Keywords}"
published: true
categories:
{categories}- {category_name}
@funkatron
funkatron / comments.html
Created March 21, 2011 20:52
An EE template used to export post comments for use in a Jekyll blog
<?php
// for this to work, PHP must be enabled ON INPUT for the template
global $IN;
$IN->QSTR = '{embed:the_entry_id}'
?>
<div class="comments" data-entry-id="{embed:the_entry_id}" data-url-title="{embed:the_url_title}">
<ul>
{exp:comment:entries weblog="default_site" sort="asc"}
@funkatron
funkatron / spaz_api_methods.txt
Created March 29, 2011 03:45
Simple docs for Spaz Web APIs
# https://github.com/funkatron/Spaz-Web-APIs
#
# Avatar methods
#
# basic structure
# http://api.getspaz.com/avatar/:service/:username.:format
# :service is currently "identi.ca" or "twitter.com"
# :username is the username
# :format is "json", "xml" or "js" (jsonp. sorta). JSON is default
#
@funkatron
funkatron / rebuild.sh
Created April 2, 2011 19:24
a script to build and deploy my Jekyll site
#!/bin/bash
cd /local/path/funkatron_jekyll/
# generate items.html file
php _bin/build_items.php > ./items.html
# generate css from less
lessc css/site.less css/site.css
# run jekyll and rsync to remote site
@funkatron
funkatron / .htaccess
Created April 2, 2011 19:46
Redirects used on funkatron.com from old EECMS urls to new Jekyll urls
RewriteEngine on
RewriteRule ^site/comments/(.+)/$ /posts/$1.html [R=301,L]
RewriteRule ^site/comments/(.+)$ /posts/$1.html [R=301,L]
RewriteRule /rss_2.0/?$ /posts.rss
RewriteRule /atom/?$ /posts.xml
RewriteCond %{HTTP_USER_AGENT} !FeedBurner
RewriteRule posts.rss?$ http://feeds.feedburner.com/funkablog [R,L]
@funkatron
funkatron / spaz_embedly_previews.js
Created April 4, 2011 02:15
Stick this in your user.js file. Only tested in current Titanium code
jQuery(document).ready(function() {
/**
* remove this default filter from these timelines -- we'll use embedly below
*/
Spaz.TimelineFilters.friends.removeFilter('getImageURLs');
Spaz.TimelineFilters.search.removeFilter('getImageURLs');
Spaz.TimelineFilters['public'].removeFilter('getImageURLs');
@funkatron
funkatron / build_titanium_desktop.sh
Created April 7, 2011 05:12
how to build titanium desktop SDK 1.2.0
scons dist
unzip build/osx/dist/sdk-1.2.0.zip -d /Library/Application Support/Titanium