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
@account.feed_posts.each do |post| | |
puts 'init: '+post.user.inspect | |
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
<div id="profile_summary_tile"> | |
{{#user}} | |
<h2>{{username}}</h2> | |
<ul id="metadata"> | |
<li>Views: {{views}}</li> | |
<li>Votes: {{vote_count}}</li> | |
<li>Rating: {{rating_cache}}</li> | |
</ul> | |
<ul id="user_actions"> | |
{{^is_friend?}}<li><a href="user/friend/add?username={{username}}">Become friends</a></li>{{/is_friend?}} |
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
module Picombo | |
module Stache | |
class User_View < Mustache | |
self.template = File.open(Picombo::Core.find_file('views', 'user/view', true, 'mustache').shift).read | |
@user = nil | |
def initialize | |
Picombo::Head.add_js('js/jquery.js') | |
Picombo::Head.add_js('js/effects.js') |
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
diff --git a/classes/kohana/request.php b/classes/kohana/request.php | |
index d739056..a639c48 100644 | |
--- a/classes/kohana/request.php | |
+++ b/classes/kohana/request.php | |
@@ -988,7 +988,7 @@ class Kohana_Request { | |
if ($this !== Request::$instance) | |
{ | |
// Add the parent request uri | |
- $benchmark .= ' « "'.Request::$current->uri.'"'; | |
+ $benchmark .= ' « "'.(NULL == Request::$current ? '<empty uri>' : Request::$current->uri).'"'; |
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
<?php | |
/** | |
* The directory in which the Kohana resources are located. The system | |
* directory must contain the classes/kohana.php file. | |
* | |
* @see http://kohanaframework.org/guide/about.install#system | |
*/ | |
$system = '.'; |
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
diff --git a/classes/kohana/core.php b/classes/kohana/core.php | |
index 7b6eeb8..8f40260 100644 | |
--- a/classes/kohana/core.php | |
+++ b/classes/kohana/core.php | |
@@ -1438,7 +1438,7 @@ class Kohana_Core { | |
// Introspection on closures in a stack trace is impossible | |
$params = NULL; | |
} | |
- else | |
+ elseif (function_exists($step['function'])) |
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
Picombo::Router.add('_default', 'home/index') | |
Picombo::Router.add('index', 'home/index') | |
Picombo::Router.add('friends', 'user/friends') | |
Picombo::Router.add('saved', 'user/saved') | |
Picombo::Router.add(Regexp.new(/photo-comments\/([0-9]+).json/), "image/comments/\\1") | |
Picombo::Router.add('html route', lambda{ |path| | |
if Regexp.new('(.+).html').match(path) | |
parts = Regexp.last_match[1].split('/') | |
{:controller => parts[0], :method => parts[1], :params => parts[2..-1]} | |
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
#!/bin/bash | |
MAJOR_VERSION=$1 | |
MINOR_VERSION=$2 | |
if [ $# -lt 2 ] | |
then | |
echo "Usage: $0 <MAJOR-VERSION> <MINOR-VERSION>" | |
exit | |
fi |
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
#!/bin/sh | |
VIDEODIR=$1 | |
FILENAME=$2 | |
CHANID=$3 | |
STARTTIME=$4 | |
# Sanity checking, to make sure everything is in order. | |
if [ -z "$VIDEODIR" -o -z "$FILENAME" -o -z "$CHANID" -o -z "$STARTTIME" ]; then | |
echo "Usage: $0 <VideoDirectory> <FileName> <CHANID> <STARTTIME>" | |
fi | |
if [ ! -f "$VIDEODIR/$FILENAME" ]; then |
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
set :stages, %w(production staging) | |
set :default_stage, "staging" | |
require 'capistrano/ext/multistage' | |
# -------------------------------------------- | |
# Repository | |
# -------------------------------------------- | |
set :scm, :git # I am using git, so I specify it here | |
set :repository, "<repo>" # This is the path to the repository on the server, we pushed the code here earlier. |