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 ApplicationController < ActionController::Base | |
| # Prevent CSRF attacks by raising an exception. | |
| # For APIs, you may want to use :null_session instead. | |
| protect_from_forgery with: :exception | |
| @public_actions = [:new, :create, :validate, :show, :index] | |
| before_filter :require_login, except: @public_actions | |
| def not_authenticated |
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
| $ -> | |
| $parent = $('.collapsable') | |
| $parent.find('.collapsable-header').click (e) -> | |
| $parent.find('.collapsable-content').slideToggle('slow') |
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
| Markdown = Struct.new(:markdown_text) do | |
| class << self | |
| def convert(text) | |
| Markdown.new(text).to_html | |
| end | |
| end | |
| def to_html(renderer_options = {hard_wrap: true, filter_html: true}) | |
| renderer_options = {hard_wrap: true, filter_html: true}.merge renderer_options | |
| redcarpet_options = { |
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> | |
| <link rel="stylesheet" href="todo_styles.css"> | |
| </head> | |
| <body> | |
| <div id="appcontainer"></div> | |
| <script src="cuddle.js"></script> | |
| <script src="todo_item.js"></script> | |
| <script src="todo_list.js"></script> |
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
| <ul class="tabs" data-view-template="#some-handlebars-template"> | |
| <li data-remote="/some_rest_api/1">First Tab</li> | |
| <li data-remote="/some_rest_api/2">Second Tab</li> | |
| </ul> | |
| <div class="container" id="tab-container"> | |
| </div> |
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
| require 'httparty' | |
| require 'nokogiri' | |
| require 'json' | |
| require 'pry' | |
| class Downloader | |
| def initialize(episode) | |
| system("wget #{episode.direct_link}") | |
| end | |
| end |
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 ArticleViewController extends ViewController | |
| initialize: (@params) -> | |
| @event.on('button.new-comment', 'click', @new_comment) | |
| @event.on('button.like', 'click', @like) | |
| new_comment: (event) -> | |
| comment_body = $('input.new-comment').val() | |
| comment = new Comment({body: comment_body}) | |
| if comment.save() | |
| flash_notice("Comment posted!") |
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
| " based on http://github.com/grigio/vim-sublime | |
| " Best view with a 256 color terminal and Powerline fonts | |
| set nocompatible | |
| filetype off | |
| set rtp+=~/.vim/bundle/vundle/ | |
| call vundle#rc() | |
| Bundle 'gmarik/vundle' | |
| Bundle 'tpope/vim-surround' |
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
| require 'map' | |
| class DiggerMap extends Map | |
| _generate: -> | |
| @_create new ROT.Map.Digger() |
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
| // Windows image file caches | |
| Thumbs.db | |
| ehthumbs.db | |
| // Folder config file | |
| Desktop.ini | |
| // Recycle Bin used on file shares | |
| $RECYCLE.BIN/ |