Skip to content

Instantly share code, notes, and snippets.

diff --git a/Gentoo/www-apps/mythweb/mythweb-0.25_rc20120329.ebuild b/Gentoo/www-apps/mythweb/mythweb-0.25_rc20120329.ebuild
index ec2fd17..8e9edef 100644
--- a/Gentoo/www-apps/mythweb/mythweb-0.25_rc20120329.ebuild
+++ b/Gentoo/www-apps/mythweb/mythweb-0.25_rc20120329.ebuild
@@ -15,8 +15,7 @@ DESCRIPTION="PHP scripts intended to manage MythTV from a web browser."
IUSE=""
KEYWORDS="~amd64 ~x86 ~ppc"
-RDEPEND="<dev-lang/php-5.4[curl,json,mysql,session,posix]
- || ( <dev-lang/php-5.3[spl,pcre] =dev-lang/php-5.3 )
diff --git a/classes/kohana/view.php b/classes/kohana/view.php
index 5427ad9..dbd5261 100644
--- a/classes/kohana/view.php
+++ b/classes/kohana/view.php
@@ -41,7 +41,7 @@ class Kohana_View {
* @param array $kohana_view_data variables
* @return string
*/
- protected static function capture($kohana_view_filename, array $kohana_view_data)
+ protected function capture($kohana_view_filename, array $kohana_view_data)
def triangle(a, b, c)
raise TriangleError unless valid_triangle?(a,b,c)
[:equilateral, :isosceles, :scalene][[a,b,c].uniq.size - 1]
end
def valid_triangle?(a,b,c)
ax,bx,cx = [a,b,c].sort
ax + bx > cx
end
[user]
name = Jeremy Bush
email = [email protected]
[color]
diff = auto
status = auto
branch = auto
[core]
autocrlf = input
[mergetool "diffmerge"]
@zombor
zombor / pre-commit.sh
Created August 15, 2011 19:25
phpcs pre-commit hook
#!/bin/bash
git diff --cached --name-status | awk '$1 != "D" && $1 != "R" { print $2 }' | xargs /usr/bin/env phpcs --tab-width=4 --extensions=php --report-width=140 --ignore=target/*,www/docroot/*,test/behat/
@zombor
zombor / authenticated.php
Created May 9, 2011 13:42
Controller/Action ACL logic
<?php
/**
* Extension to Controller_Website that enforces authentication
*
* @package
* @author Jeremy Bush
* @copyright (c) 2011 Jeremy Bush
*/
class Controller_Website_Authenticated extends Controller_Website
{
@zombor
zombor / deploy.rb
Created March 21, 2011 18:05
zombor's capistrano deploy scripts
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.
#!/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
@zombor
zombor / kohana-release.sh
Created March 11, 2011 04:44
Kohana Release Script - Bash script to do a kohana release from git.
#!/bin/bash
MAJOR_VERSION=$1
MINOR_VERSION=$2
if [ $# -lt 2 ]
then
echo "Usage: $0 <MAJOR-VERSION> <MINOR-VERSION>"
exit
fi
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