Skip to content

Instantly share code, notes, and snippets.

View letunglam's full-sized avatar
💭
I may be slow to respond.

Le Tung Lam letunglam

💭
I may be slow to respond.
View GitHub Profile
#!/usr/bin/env bash
set -e
[ $EUID -ne 0 ] && echo "run as root" >&2 && exit 1
##########################################################
# You should not need to update anything below this line #
##########################################################

S3 Website "Index Document"

index.html:

<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
{
"keywords": [
{
"keyword": "people",
"_id": "53591b2d22fcb7c436190f78"
},
{
"_id": "53579dc61210ded423aca0e8",
"keyword": "grass"
},
[
{
"keyword": "people",
"page_num": 1,
"rate": 11,
"_id": "535914586ec4e0ae2cc3a071",
"__v": 0,
"modification_date": "2014-04-24T13:40:39.910Z",
"content": [
{
{
"keyword": "grass",
"rate": 2,
"modification_date": {
"$date": "2014-04-02T00:00:00.000Z"
},
"page_num": 1,
"_id": {
"$oid": "53579dc61210ded423aca0e8"
},
{
keyword:'grass',
content:[
{
'title':'Stars on the Prairie',
'author':'j-dub1980(THANK YOU FOR 100k+ Views)',
'author_url':'http://www.flickr.com/people/48048313@N02',
'url':'http://farm3.staticflickr.com/2833/8775379214_2d0f059260_m.jpg',
'resolution':'1048x1575',
'download':'http://farm3.staticflickr.com/2833/8775379214_08395ba3b7_o_d.jpg',
[ { created_at: 'Fri Apr 18 13:11:13 +0000 2014',
id: 457144318286118900,
id_str: '457144318286118912',
text: 'I didn\'t know you can create custom vibration alerts on your iPhone but apparently you can: http://t.co/9YDP54yPP9',
source: '<a href="http://bufferapp.com" rel="nofollow">Buffer</a>',
truncated: false,
in_reply_to_status_id: null,
in_reply_to_status_id_str: null,
in_reply_to_user_id: null,
in_reply_to_user_id_str: null,
# Add this config
$ heroku config:add LD_LIBRARY_PATH=/app/php/ext:/app/apache/lib
# Login to Heroku CLI
$ heroku run bash
# The second argument here is the path to your script
~ $ ~/php/bin/php -f ~/www/index.php

So yesterday brought the sad news that Google Reader is being killed off. C’est la vie it seems, given it was a Google product. In my search for an alternative I rediscovered Fever and decided to see if I could run it up for free on Heroku. Onwards...

Personally I think the news about Reeder is quite sad, as I would quite happily have paid for it as a service. In fact I like RSS so much that I actually shelled out the $30 for Fever when it first came out years ago (I was also pretty massive Shaun Inman fanboy if I’m being honest).

I ended up setting Fever aside because screw having to manage self-hosting for PHP and MySQL, right?

If you’re new to Fever I recommend going and checking it out, but also reading the post in response to the Google Reader announcement by Fevers author, Shaun, for a good list of what Fever is and isn’t.

Enough jibba-jabba!

<?php
class kirbytextExtended extends kirbytext {
function __construct($text=false, $markdown=true, $smartypants=true) {
parent::__construct($text, $markdown, $smartypants);
// define custom tags
$this->addTags('figure');