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
var Todo = Backbone.Model.extend({ | |
defaults: { | |
title: '', | |
completed: false | |
} | |
}); | |
var TodoView = Backbone.View.extend({ | |
template: '<label>' + | |
' <input class="toggle" type="checkbox">' + |
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
// js/note_list_item.js | |
App.NoteListItemView = Backbone.View.extend({ | |
tagName: 'tr', | |
render: function() { | |
var template = $('#noteListItemView-template').html(); | |
var compiled = _.template(template); | |
var html = compiled(this.model.toJSON()); | |
this.$el.html(html); | |
return this; |
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
App.NoteListItemView = Backbone.View.extend({ | |
tagName: 'tr', | |
initialize: function() { | |
// モデルのdestroyイベントを監視して | |
// Backbone.Viewのremove()メソッドを呼び出す | |
this.listenTo(this.model, 'destroy', this.remove); | |
}, | |
// [Delete]ボタンを監視して | |
// onClickDelete()メソッドを呼び出す | |
events: { |
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
// js/note_detail.js | |
App.NoteDetailView = Backbone.View.extend({ | |
render: function() { | |
var template = $('#noteDetailView-template').html(); | |
var compiled = _.template(template); | |
var html = compiled(this.model.toJSON()); | |
this.$el.html(html); | |
return this; | |
} |
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
function peco_select_branch | |
set -l query (commandline) | |
if test -n $query | |
set peco_flags --query "$query" | |
end | |
git branch | peco --prompt "GIT BRANCH>" $peco_flags | sed -e "s/^\* //g" -e "s/^ //g" | read line | |
if [ $line ] |
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
local wezterm = require "wezterm" | |
local config = wezterm.config_builder() | |
local act = wezterm.action | |
-- Colors | |
config.color_scheme = "iceberg-dark" | |
-- Font | |
config.font = wezterm.font("Moralerspace Neon") | |
config.font_size = 16.0 |
OlderNewer