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
@letunglam
letunglam / custom.js
Created July 9, 2012 06:25 — forked from drewjoh/custom.js
Dynamic (AJAX) loaded Bootstrap Modal (Bootstrap 2.0)
$(document).ready(function() {
// Support for AJAX loaded modal window.
// Focuses on first input textbox after it loads the window.
$('[data-toggle="modal"]').click(function(e) {
e.preventDefault();
var href = $(this).attr('href');
if (href.indexOf('#') == 0) {
$(href).modal('open');
} else {
@letunglam
letunglam / trigram.html
Created August 18, 2012 08:47 — forked from tkadlec/trigram.html
Trigram for heaven icon
<html>
<head>
<title>Trigram for heaven icon</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width" />
<style type="text/css">
li {
list-style-type: none;
}
#menu{
@letunglam
letunglam / README.md
Created August 24, 2012 08:08 — forked from oodavid/README.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
<?php
class kirbytextExtended extends kirbytext {
function __construct($text=false, $markdown=true, $smartypants=true) {
parent::__construct($text, $markdown, $smartypants);
// define custom tags
$this->addTags('figure');

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!

# 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
[ { 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,
{
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',
{
"keyword": "grass",
"rate": 2,
"modification_date": {
"$date": "2014-04-02T00:00:00.000Z"
},
"page_num": 1,
"_id": {
"$oid": "53579dc61210ded423aca0e8"
},
[
{
"keyword": "people",
"page_num": 1,
"rate": 11,
"_id": "535914586ec4e0ae2cc3a071",
"__v": 0,
"modification_date": "2014-04-24T13:40:39.910Z",
"content": [
{