This file contains 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 index | |
@status = params[ :status ] | |
@status = 'all' unless %w(all mine flocks).include?( @status ) | |
page = params[ :page ] || 1 | |
if params[ :category ] and ( category = current_organization.categories.find_by_name( params[ :category ] ) ) | |
blog_posts = category.blog_posts | |
else | |
blog_posts = current_organization.blog_posts | |
end |
This file contains 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.Mutators.ClassMethods = function( methods ){ | |
this.__classMethods = Object.append( this.__classMethods || {}, methods ); | |
this.extend( methods ); | |
}; | |
Class.Mutators.Extends = function( parent ){ | |
this.parent = parent; | |
parent.$prototyping = true; | |
this.prototype = new parent; | |
delete parent.$prototyping; |
This file contains 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
" File: php_check.vim | |
" Author: Olivier El Mekki | |
" Email: [email protected] | |
" Description: php syntax checks the buffer | |
" Usage: | |
" :PHPCheck - lauch the syntax check | |
if exists('php_check_plugin') | |
finish | |
endif |
This file contains 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
func Coding_php() | |
iab <silent> ife if ( )<Left><Left><C-R>=Eatchar('\s')<CR> | |
iab <silent> functione function ( )<Left><Left><Left><C-R>=Eatchar('\s')<CR> | |
iab <silent> fore for ( )<Left><Left><C-R>=Eatchar('\s')<CR> | |
iab <silent> foreache foreach ( )<Left><Left><C-R>=Eatchar('\s')<CR> | |
iab <silent> switche switch ( )<Left><Left><C-R>=Eatchar('\s')<CR> | |
iab <silent> whilee while ( )<Left><Left><C-R>=Eatchar('\s')<CR> | |
" iab <silent> {e {<return>}<return><up><up><esc>A<C-R>=Eatchar('\s')<CR> | |
iab <silent> LOGe error_log( "" );<Left><Left><Left><Left><C-R>=Eatchar('\s')<CR> | |
set foldmethod=indent |
This file contains 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
(function(){ | |
this.Controller = new Class({ | |
Extends: Framework.Controller, | |
options: { | |
View: this.View, | |
events: [ | |
{ el: 'commentField', type: 'focus', view_method: 'expandCommentField' }, | |
{ el: 'commentField', type: 'blur', view_method: 'shrinkCommentField' } |
This file contains 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
(function(){ | |
this.View = new Class({ | |
Extends: Framework.View, | |
options: { | |
selectors: { | |
'commentField': '#comment_content' | |
} | |
}, |
This file contains 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
(function(){ | |
this.Controller = new Class({ | |
Extends: Framework.Controller, | |
options: { | |
View: this.View, | |
events: [ | |
{ el: 'commentField', type: 'focus', view_method: 'expandCommentField' }, | |
{ el: 'commentField', type: 'blur' }, |
This file contains 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
(function(){ | |
this.View = new Class({ | |
Extends: Framework.View, | |
options: { | |
selectors: { | |
'commentField': '#comment_content', | |
'commentBlock': '#comment_block', | |
'commentSubmit': { sel: 'input[type="submit"]', within: 'commentBlock' } | |
} |
This file contains 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 DebugLogger < Logger | |
def format_message( severity, timestamp, progname, msg ) | |
case true | |
when ( msg.kind_of? Exception ) | |
"#{msg.message}\n#{msg.backtrace.join "\n" }" | |
when ( msg.is_a? String ) | |
"#{msg}\n" | |
else | |
"#{msg.inspect}\n" |
This file contains 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
# You can find more information about this file on the symfony website: | |
# http://www.symfony-project.org/reference/1_4/en/13-View | |
default: | |
javascripts: [/js/javascript.php?set=backend_domains] |