$ rails g model User
belongs_to
has_one
/* | |
Small ng-admin config showing how to inject a Login controller when | |
a 401 error is returned by the server. | |
*/ | |
(function () { | |
"use strict"; | |
var app = angular.module('myApp', [ |
TodoMVC.module 'TodoApp', (App, TodoMVC, Backbone, Marionette, $, _) -> | |
log arguments | |
class App.TodoForm extends Marionette.ItemView | |
events: | |
'keypress #new-todo' : 'createOnEnter' | |
'click .mark-all-done' : 'toggleAllClicked' | |
triggers: | |
'click .todo-clear a' : 'clear:completed' |
# This is a simple script to convert an XML file exported | |
# from Evernote into a bookmarks file that can be imported | |
# into Pinboard. In my case, all I cared about were notes | |
# that had a source-url, and all I'm retaining is the title | |
# and URL. I'm adding a fixed "evernote" tag for all notes. | |
require 'nokogiri' | |
def note_attributes(note) | |
{ |
#!/usr/bin/env ruby | |
require 'appscript' | |
require 'nokogiri' | |
require 'open-uri' | |
require 'clipboard' | |
url = ARGV.length >= 1 ? ARGV[0] : Clipboard.paste | |
def zhihu(doc) |
<!-- http://twitter.github.io/typeahead.js/data/repos.json --> | |
<input type="text" autocomplete="off" class="form-control" | |
id="client-search" | |
data-typeahead-url="./repos.json" | |
data-typeahead-target="client-id"> | |
<input type="hidden" id="client-id" name="client-id"> |
<!-- http://twitter.github.io/typeahead.js/data/repos.json --> | |
<input type="text" autocomplete="off" class="form-control" | |
id="client-search" | |
data-typeahead-url="./repos.json" | |
data-typeahead-target="client-id"> | |
<input type="hidden" id="client-id" name="client-id"> |
Here are some links that were helpful in me building my presentation.
The article that got me started on this topic.
Set variables in a page (page.html.haml) at the very biginning of the file:
---
variable: value
variable2: value 2
---