Skip to content

Instantly share code, notes, and snippets.

View ryross's full-sized avatar

Ryder Ross ryross

View GitHub Profile
<?php
$repo_dir = '/var/www/';
// Full path to git binary is required if git is not in your PHP user's path. Otherwise just use 'git'.
$git_bin_path = 'git';
$branch = '';
//$update = false;
$update = true;
@ryross
ryross / orm.php
Created May 14, 2013 01:48
extended orm class to auto save created & updated datetimes.
<?php
class ORM extends Kohana_ORM {
public function create(Validation $validation = NULL) {
if (isset($this->_table_columns['created_at'])) {
$this->created_at = date('Y-m-d H:i:s');
}
if (isset($this->_table_columns['updated_at'])) {
@ryross
ryross / gist:5564565
Created May 12, 2013 19:10
windows gvim rc
execute pathogen#infect()
syntax on
filetype plugin indent on
colorscheme slate
set guifont=courier_new:h11
:let mapleader = ","
map <leader>n :NERDTreeToggle<CR>
set guioptions-=T
set guioptions-=m
<?php
interface Context {
public function execute($params);
}
@ryross
ryross / gist:3953663
Created October 25, 2012 16:02
Git Alias Commands for new accounts
# pretty git log http://www.jukie.net/bart/blog/pimping-out-git-log
git config --global alias.lg "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative"
@ryross
ryross / ryderbeans.vim
Created November 2, 2010 23:40
fork of jellybeans vim colorscheme
" Vim color file
"
" " __ _ _ _ "
" " \ \ ___| | |_ _| |__ ___ __ _ _ __ ___ "
" " \ \/ _ \ | | | | | _ \ / _ \/ _ | _ \/ __| "
" " /\_/ / __/ | | |_| | |_| | __/ |_| | | | \__ \ "
" " \___/ \___|_|_|\__ |____/ \___|\____|_| |_|___/ "
" " \___/ "
"
" "A colorful, dark color scheme for Vim."
@ryross
ryross / .bashrc
Created October 30, 2010 00:27
bash prompt w/ git branch
## GIT PROMPT
RED="\[\033[0;31m\]"
YELLOW="\[\033[0;33m\]"
GREEN="\[\033[0;32m\]"
BLUE="\[\033[0;34m\]"
LIGHT_RED="\[\033[1;31m\]"
LIGHT_GREEN="\[\033[1;32m\]"
WHITE="\[\033[1;37m\]"
LIGHT_GRAY="\[\033[0;37m\]"

Pagination Configuration

[Pagination] uses 6 settings: current_page, total_items, items_per_page, view, auto_hide and first_page_in_url.

Configuration Examples

This example shows the default configuration:

return array(
@ryross
ryross / footer.php
Created August 5, 2010 05:21
views/template/footer.php
@ryross
ryross / header.php
Created August 5, 2010 05:19
views/template/header.php
<div id="header">
<h1><a href="/">Header</a></h1>
</div>