This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> | |
<title>Printed Demo Page</title> | |
<style type="text/css"> | |
#cover-page { | |
border: solid 5px red; | |
page-break-after: always; | |
overflow: hidden; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> | |
<title>Printed Demo Page</title> | |
<style type="text/css"> | |
@media print { | |
#cover-page { | |
border: solid 1px red; | |
page-break-after: always; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Written by steven for quick loadup of Markdown text into HTML | |
function! Mkdp() | |
write | |
let file = expand("%") | |
let mkd_file = file . ".html" | |
let result = system("markdown " . file . " > " . mkd_file) | |
let result = system("open " . mkd_file) | |
endfunction | |
augroup filetype_markdown | |
autocmd! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Timesheet.Tasks.reset(#{@tasks.to_json.html_safe}); | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- @newTask = new Timesheet.Models.Task Timesheet.localGet('task') | |
+ @newTask = new Timesheet.Models.Task |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@newTask = new Timesheet.Models.Task |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@newTask = new Timesheet.Models.Task Timesheet.localGet('task') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Timesheet.Models.Task extends Backbone.Model | |
defaults: | |
completed_on: Date.today().toDateString() | |
time: 0 | |
initialize: (attributes) -> | |
@set time: parseFloat(attributes.time) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.Timesheet = | |
Models: {} | |
Collections: {} | |
Views: {} | |
Routers: {} | |
init: -> | |
... | |
Timesheet.Store = new Persist.Store('timesheet') | |
new Timesheet.Routers.TasksRouter | |
Backbone.history.start() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Timesheet.localGet = (key, store = Timesheet.Store) -> | |
val = null | |
store.get key, (ok, value) -> | |
val = JSON.parse(value) | |
val | |
Timesheet.localSet = (key, value, store = Timesheet.Store) -> | |
store.set(key, JSON.stringify(value)) |