Skip to content

Instantly share code, notes, and snippets.

View banister's full-sized avatar
🇳🇱

John Mair banister

🇳🇱
View GitHub Profile
class List.Panel extends App.Views.ItemView
template: "users/list/templates/_panel"
collectionEvents:
"reset" : "render"
<table class="table table-striped table-bordered">
<thead>
<tr>
<th>Name</th>
<th>Created</th>
</tr>
</thead>
<tbody></tbody>
</table>
<table class="table table-striped table-bordered">
<thead>
<tr>
<th>Name</th>
<th>Created</th>
</tr>
</thead>
<tbody></tbody>
</table>
@Demo.module "HeaderApp.List", (List, App, Backbone, Marionette, $, _) ->
List.Controller =
listHeader: ->
links = App.request "header:entities"
headerView = @getHeaderView links
App.headerRegion.show headerView
(defun touch-file (my-file)
(interactive (list (read-string "File to create:" default-directory)))
(shell-command (format "touch %s" my-file))
(if (eq major-mode 'dired-mode) (revert-buffer)))
(global-set-key (kbd "s-f") 'touch-file)
(defun touch-file (my-file)
(interactive (list (read-string "File to create:" default-directory)))
(shell-command (format "touch %s" my-file))
(revert-buffer))
(add-to-list 'load-path "~/.emacs.d/")
(add-to-list 'load-path "~/.emacs.d/ruby-dev/")
(autoload 'turn-on-ruby-dev "ruby-dev" nil t)
(add-hook 'ruby-mode-hook 'turn-on-ruby-dev)
(require 'package)
(add-to-list 'package-archives
'("marmalade" . "http://marmalade-repo.org/packages/") t)
(add-to-list 'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/") t)
@Demo.module "Users", (Users, App, Backbone, Marionette, $, _) ->
class Users.Router extends Marionette.AppRouter
appRoutes:
"users" : "listUsers"
API =
listUsers: ->
console.log "listusers"
App.on "initialize:after", ->
if Backbone.history
Backbone.history.start()
@navigate(@rootRoute, trigger: true) if @getCurrentRoute() is ""
App.navigate = (route, options={}) ->
Backbone.history.navigate(route, options)
App.addInitializer ->
new Users.Router
controller: API