Skip to content

Instantly share code, notes, and snippets.

gem 'god'
gem 'capistrano'
gem 'san_juan', :git => 'git://github.com/SoftwareWithFriends/san_juan.git'
@inossidabile
inossidabile / Gemfile
Created October 17, 2012 08:02
God + Resque + Capistrano
gem 'god'
gem 'capistrano'
gem 'san_juan', :git => 'git://github.com/SoftwareWithFriends/san_juan.git'
class Fluffy < WashOut::Type
map :universe => {
:name => :string,
:age => :int
}
end
class FluffyContainer < WashOut::Type
type_name 'fluffy_con'
map :fluffy => :string
.content
.content-inner
!= @renderInline @account, ->
.breadcrumbs
%a.item{:href => '#!/accounts'} Мои счета и карты
%span.item= @displayTitle
class @FooPage extends ApplicationPage
@fetch (complete) ->
Post.find 'all', (posts) ->
@data.posts = posts
complete
{foo: 'bar'}
// VS
Object.extended({foo: 'bar'})
_.indexOf([1, 2, 3], 2);
// VS
[1, 2, 3].indexOf(2)
-# Your templates are in HAML out of box.
-# But you can use any other templating language as well.
-# Use Sugar.JS and Coffee!
- @posts.each (post) =>
.well
-# Encapsulate your code with widgets
!= @widget 'div', => new TitleEditorWidget(post)
%hr
Joosy.namespace 'Posts', ->
# Page that lists posts
class @IndexPage extends ApplicationPage
# Deterimes which Layout to wrap this page in
@layout ApplicationLayout
# Determines which template to use
@view 'index'
# Data fetching hook
@inossidabile
inossidabile / Effects.coffee
Created May 30, 2012 11:06
Joosy / Load, unload and 'in-progress' animations
# pages/application.js.coffee
class @ApplicationPage extends Joosy.Page
@beforePaint (container, complete) ->
#@layout.showSystemPreloader() if !@dataFetched
complete()
@paint (container, complete) ->
#@layout.hideSystemPreloader()
container.fadeTo 80, 0, =>