Skip to content

Instantly share code, notes, and snippets.

View taylor-smith's full-sized avatar

Taylor Smith taylor-smith

View GitHub Profile
@taylor-smith
taylor-smith / Rakefile
Created May 29, 2014 18:44
(Poor) Examples of sample db:load, db:create, db:drop rake tasks
namespace :type_of_task do
task :name_of_task => [:task_dependency] do
puts "I Work!"
end
task :task_dependency do
puts "I am working as well!"
end
end
var TodoItem = Backbone.Model.extend({});
var TodoView = Backbone.View.extend({
render: function(){
var html = '<h3>' + this.model.get('description') + '</h3>'
this.$el.html(html);
return this;
}
});
validate: function(attrs, options){
if (attrs.data[0].value === null ||
attrs.data[1].value === null ||
attrs.data[2].value === null ||
attrs.data[3].value === null ||
attrs.data[4].value === null ||
attrs.data[5].value === null ||
attrs.data[6].value === null ||
attrs.data[7].value === null ||
attrs.data[8].value === null ||
var myLib = (function() {
// Using IIFE + Closure
var $cachedLookup = $('.element');
function hideCachedElement() {
$cachedLookup.hide();
}
return {
hide: hideCachedElement
{
"key": "cmd+1",
"command": "workbench.action.openEditorAtIndex1"
},
{
"key": "cmd+2",
"command": "workbench.action.openEditorAtIndex2"
},
{
"key": "cmd+3",