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
| User = Backbone.Model.extend({ | |
| login_attempts: 3, | |
| login: function(){ | |
| var that = this; | |
| var res = null; | |
| $.ajaxSetup({async:false}); | |
| $.post(SITE_PATH + 'user/login', $('form#loginform').serialize(), function(data){ | |
| try{ | |
| res = $.parseJSON(data); |
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 window.Form extends Backbone.Model | |
| selected: -> | |
| @trigger 'selected' | |
| class window.Forms extends Backbone.Collection | |
| model: Form | |
| select: (form) -> | |
| @trigger 'form:selected', form | |
| form.selected() |
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 IndexState extends State | |
| constructor: -> | |
| super() | |
| @route = '/' | |
| @mappings = | |
| null: => | |
| @render() | |
| FinishedEditingState: => | |
| @doSomethingElseFirst() | |
| @render() |
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 'formula' | |
| class Vim < Formula | |
| homepage 'http://www.vim.org/' | |
| url 'ftp://ftp.vim.org/pub/vim/unix/vim-7.3.tar.bz2' | |
| sha256 '5c5d5d6e07f1bbc49b6fe3906ff8a7e39b049928b68195b38e3e3d347100221d' | |
| version '7.3.161' | |
| def features; %w(tiny small normal big huge) end | |
| def interp; %w(lua mzscheme perl python python3 tcl ruby) 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
| def new_plural (number, text) | |
| number == 1 ? text : text.pluralize | |
| 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
| attributes_value: self.template_eval("$H(" + attributes_hash + ")") |
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
| Single Entity HTTP Get | |
| <?xml version="1.0" encoding="utf-8"?> | |
| <invoiceResponse> | |
| <invoice uid="1974185" lastUpdatedUid="AAAAAAGAPmc="> | |
| <transactionType>S</transactionType> | |
| <date>2009-10-06</date> | |
| <contactUid>381359</contactUid> | |
| <requiresFollowUp>false</requiresFollowUp> | |
| <layout>I</layout> |
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 'rubygems' | |
| require 'apachelogregex' | |
| require 'ostruct' | |
| @requests = {} | |
| def to_date(d) | |
| Date.strptime d.gsub('[', '').gsub(']', ''), "%d/%b/%Y" | |
| 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
| require 'rubygems' | |
| require 'apachelogregex' | |
| require 'ostruct' | |
| @requests = {} | |
| def to_date(d) | |
| Date.strptime d.gsub('[', '').gsub(']', ''), "%d/%b/%Y" | |
| 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
| require 'rubygems' | |
| require 'apachelogregex' | |
| require 'ostruct' | |
| @requests = {} | |
| def to_date(d) | |
| Date.strptime d.gsub('[', '').gsub(']', ''), "%d/%b/%Y" | |
| end |