Skip to content

Instantly share code, notes, and snippets.

View spencerfdavis's full-sized avatar

Spencer Davis spencerfdavis

View GitHub Profile
@spencerfdavis
spencerfdavis / Rakefile
Created December 5, 2012 22:23
FIX - rake aborted! undefined method `task' for #
require 'rake'
##!/usr/bin/env rake
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require File.expand_path('../config/application', __FILE__)
module ::Example
class Application
include Rake::DSL
@spencerfdavis
spencerfdavis / commands.bash
Created December 6, 2012 16:38
Linux Commands
# Find the specific Linux Version
$ cat /etc/issue
#CentOS release 5.6 (Final)
#Kernel \r on an \m
@spencerfdavis
spencerfdavis / jquery_commands.js
Created December 12, 2012 16:22
jQuery Commands
// Wait until document is ready
$(function(){
// Click any anchor tag and an element with id 'box' will fade out 'fast.'
// You can also pass fadeOut() a milliseconds argument.
$("a").click(function(){
$("#box").fadeOut('fast');
});
// Click any anchor tag and turn all anchors inside of p tags to red.
class Rise.Views.Teach.Courses.Content extends Backbone.Marionette.Layout
el: '.course--content'
ui:
$addLesson: '.add--lesson'
$addSection: '.add--section'
$reorderButton: '.reorder--items'
regions:
items: '#course--items'
require ['media-uploader'], (MediaUploader) ->
class Rise.Views.Teach.Lessons.UploadContentModal extends MediaUploader.UploadModal
el: '#upload-modal'
FILE_TYPES:
'Content::Document': ['pdf']
'Content::Media': ['video', 'audio']
initialize: ->
setDefaults()