I hereby claim:
- I am egardner on github.
- I am egardner (https://keybase.io/egardner) on keybase.
- I have a public key whose fingerprint is 66DB 5FF3 D927 7B36 FD31 D40F C088 E2FA 4635 3D27
To claim this, I am signing this object:
require "sinatra" | |
require "httparty" | |
require "time" | |
url = "http://mashable.com/stories.json" | |
mash_stories = HTTParty.get(url) # returns a hash | |
get '/' do | |
# If url is root: ----------------------------------------------------------------------------- # |
# Regex code to separate sentences out of strings | |
/(\S.+?[.!?:])(?=\s+|$)/ |
I hereby claim:
To claim this, I am signing this object:
// Originally adapted from: http://sickdesigner.com/masonry-css-getting-awesome-with-css3/ | |
#grid { | |
-moz-column-count: 3; | |
-moz-column-gap: 10px; | |
-webkit-column-count: 3; | |
-webkit-column-gap: 10px; | |
column-count: 3; | |
column-gap: 10px; |
--- | |
layout: null | |
library: jquery-2.1.3.min.js | |
--- | |
// If using a JS framework, include it here | |
{% include_relative _lib/{{page.library}} %} | |
// Application code goes here | |
$(document).ready(function(){ | |
$('.js-menu-trigger').on('click touchstart', function(e){ |
require 'nokogiri' | |
require 'open-uri' | |
require 'json' | |
class Book | |
attr_accessor :isbn | |
attr_accessor :title | |
attr_accessor :author | |
attr_accessor :keywords | |
attr_accessor :type |
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'twitter' | |
require 'json' | |
require 'faraday' | |
# things you must configure | |
PATH_TO_DROPBOX = "/Users/your_name/Dropbox/backup/tweets/" # you need to create this folder | |
TWITTER_USER = "your_twitter_username" |
--- | |
layout: null | |
--- | |
[ | |
{% for post in site.posts %} | |
{ | |
"title" : "{{ post.title }}", | |
"url" : "{{ post.url }}", | |
"date" : "{{ post.date | date: "%B %d, %Y" }}", | |
"content" : "{{ post.content | strip_html | strip_newlines | escape_once }}" |
--- | |
--- | |
var chapters = { | |
{% for chapter in site.chapters %} | |
{{chapter.id}}: { | |
id: {{chapter.id}}, | |
title: "{{chapter.title}}", | |
content: "{{ chapter.content | strip_newlines | escape }}" | |
}{% if forloop.last %}{% else %},{% endif %} | |
{% endfor %} |
module Jekyll | |
class JSONPage < Page | |
def initialize(site, base, dir, name, content) | |
@site = site | |
@base = base | |
@dir = dir | |
@name = name | |
self.data = {} | |
self.content = content |