I hereby claim:
- I am kyleschmolze on github.
- I am kyleschmolze (https://keybase.io/kyleschmolze) on keybase.
- I have a public key ASCLj-rOGJxpbAYpcYN-golqn5kBSyyhK3CEDTPWWRjmpgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
### | |
This super simple script loads SlimFAQ content into any page. | |
Specify a category from SlimFAQ by it's URL, and put a simple | |
template into the HTML, and this script will auto-load those questions | |
into the page. When clicked, the links will open inside the SlimFAQ sidebar. | |
Sample html template: | |
<div data-slimfaq-category='http://faq.groupmuse.com/323-hosting' data-slimfaq-limit=2> | |
<h2 data-slimfaq-category-name></h2> | |
<p data-slimfaq-question-template></p> |
# Another attempt using the built in Rails.cache.fetch (better serialization/deserialization) | |
class ActiveSupport::Cache::DalliStore | |
def fast_fetch(name, options=nil) | |
options ||= {} | |
name = expanded_key name | |
dupe_name = name+'_dupe' | |
if block_given? | |
unless options[:force] |
# Title | |
Groupmuse | |
# Picture | |
media: undefined | |
# Objective | |
undefined | |
# Duration | |
undefined | |
# Age Group | |
undefined |
### | |
This dead-simple service just returns a javascript object called "Db", | |
which comes with two functions built in: save() and clear(). | |
Save attributes directly onto the object, then call Db.save(), and it | |
will be written into localstorage. | |
Sample usage: | |
angular.module("my_app").controller "HomeCtrl", (Db) -> | |
$scope.user = Db.user || {}; |
<div class='container'> | |
<img src='http://bit.ly/catzzzzzz' /> | |
<p> | |
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. | |
<br> | |
<br> | |
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. | |
</p> | |
</div> |
<nav> | |
<a href='/'>Link 1</a> | |
<a href='/'>Link 2</a> | |
<a href='/'>Link 3</a> | |
<a href='/'>Link 4</a> | |
<a href='/'>Link 5</a> | |
</nav> |
<nav> | |
<a href='/'>Link 1</a> | |
<a href='/'>Link 2</a> | |
<a href='/'>Link 3</a> | |
<a href='/'>Link 4</a> | |
<a href='/'>Link 5</a> | |
</nav> |
<p> | |
We heard you like | |
<a href='/'>Links</a>, | |
so we put a | |
<a href='/'>Link</a> | |
in yo | |
<a href='/'>Link</a> | |
so you can | |
<a href='/'>Link</a> | |
while you |