Skip to content

Instantly share code, notes, and snippets.

View djones's full-sized avatar
🍍
' OR '1'='1

David Jones djones

🍍
' OR '1'='1
View GitHub Profile
@djones
djones / gist:2333134
Created April 8, 2012 00:31
Feedback regarding Refinery CMS
An email exchange regarding Refinery CMS
----------------------------------------
#1 Inquiry received on the Resolve Digital website
From: X
Email: X
I really cannot stop wondering how can you even dare to call something
like Refinery "a CMS". It amazes me even more that you combine that with
@djones
djones / gist:1032852
Created June 18, 2011 06:09
Improves the readability on Ryan's blog
article {
color: #AAA;
}
body {
line-height: 195%;
font-size: 16px;
background: #333;
}
@djones
djones / gist:720672
Created November 29, 2010 21:37
4 views in Refinery that use a new type of content_page
rendering a custom plugin
<% content_for :page_title do %>
<%= @destination.title %>
<% end %>
<% content_for :page_body do %>
<section>
<h1>Choose from our most popular recommended itineraries below</h1>
</section>
@djones
djones / gist:720668
Created November 29, 2010 21:36
4 views in Refinery that use the current _content_page partial
rendering a custom plugin
<% content_for :page_title do %>
<%= @destination.title %>
<% end %>
<% content_for :page_body do %>
<section>
<h1>Choose from our most popular recommended itineraries below</h1>
</section>
@djones
djones / gist:720667
Created November 29, 2010 21:35
4 views in Refinery that are hardcoded
rendering a custom plugin
<section id='body_content'>
<h1><%= @destination.title %></h1>
<section id='page_body'>
<section>
<h1>Choose from our most popular recommended itineraries below</h1>
</section>
<%= render @destination.trips %>
#import <AVFoundation/AVFoundation.h>
@interface Player : NSObject <AVAudioPlayerDelegate> {
AVAudioPlayer *_audioPlayer;
BOOL preloading;
}
@property (nonatomic) BOOL preloading;
- (void)playSound:(NSString *)soundName ofType:(NSString *)type;
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
http://developer.apple.com/library/safari/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html
@djones
djones / gist:702473
Created November 16, 2010 20:40
Refinery CMS Wiki Article
{{Infobox software
| name = Refinery CMS
| logo = [[File:Refinery-cms-logo.png]]
| screenshot = [[File:Dashboard-2.png|400px|Screenshot]]
| caption =
| collapsible =
| developer = [[David Jones (Software Developer)|David Jones]], [[Philip Arndt (Software Developer)|Philip Arndt]]. [[Resolve Digital (Web Firm)|Resolve Digital]]
| released = {{Start date|2009|5}}
| discontinued =
| latest release version = 0.9.8.5
@djones
djones / twitter_controller.rb
Created September 30, 2010 23:15
Shows you how to get the latest tweets from RSS, cache them and display them in Refinery CMS
class TwitterController < ApplicationController
around_filter :cache_twitter, :only => [:twitter]
def twitter
begin
Timeout::timeout(5) {
result = RSSParser.run(RefinerySetting.find_or_set(:twitter_rss_feed_url,
"http://twitter.com/statuses/user_timeline/19258840.rss"))
@tweets = result[:items][0..0] if result.present? and result[:items].present?
@djones
djones / blog_controller.rb
Created September 30, 2010 18:56
Shows how to get the latest posts from an external RSS feed into Refinery
class BlogController < ApplicationController
def index
begin
Timeout::timeout(5) {
@posts = RSSParser.run('http://refinerycms.com/blog.rss')[:items][0..3] # get the first 3 posts
}
rescue Timeout::Error => e
logger.warn("timeout exceeded for downloading blog RSS: #{e}")
@posts = nil
end