Skip to content

Instantly share code, notes, and snippets.

View dogmatic69's full-sized avatar
🎯
Building the new IKEA

Carl Sutton dogmatic69

🎯
Building the new IKEA
View GitHub Profile
@dogmatic69
dogmatic69 / json_source.php
Created March 8, 2011 01:46
base abstract class for fetching data
We couldn’t find that file to show.
[public_html master] $ cake bake
PHP Warning: Module 'inclued' already loaded in Unknown on line 0
Welcome to CakePHP v1.3.7 Console
---------------------------------------------------------------
App : public_html
Path: /var/www/sites/phpwm-cakephp.dev/public_html
---------------------------------------------------------------
Interactive Bake Shell
My normal setup... (many cake sites from one cake install)
--------------------------------------------------------------------------------
sudo apt-get install php5-dev mysql-server apache2|cherokee etc
cd /var/www
mkdir frameworks
cd frameworks
git clone git://github.com/cakephp/cakephp.git cakephp/
@dogmatic69
dogmatic69 / docs.php
Created November 26, 2010 16:09
base doc block for classes
/**
* Short Description / title.
*
* Overview of what the file does. About a paragraph or two
*
* Copyright (c) 2010 Carl Sutton ( dogmatic69 )
*
* @copyright Copyright (c) 2010 Carl Sutton ( dogmatic69 )
* @link http://www.infinitas-cms.org
* @package {see_below}
@dogmatic69
dogmatic69 / symlink_assets.php
Created November 23, 2010 22:03
link to plugin and theme assets in CakePHP
@dogmatic69
dogmatic69 / random.php
Created November 22, 2010 11:04
get random rows from a db
class RandomBehavior extends ModelBehavior
{
public $name = 'Random';
@dogmatic69
dogmatic69 / bashrc.sh
Created October 19, 2010 18:27
make git prompt more useful
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
@dogmatic69
dogmatic69 / .bashrc
Created October 19, 2010 18:26
cakephp path for ubuntu10.10 - getting cake bake working
export PATH=$PATH:/var/www/frameworks/cakephp/cake/console
@dogmatic69
dogmatic69 / .gitconfig
Created October 11, 2010 00:22
my git config file, if you want to use it remember to change your username and email address
[color]
diff = auto
status = auto
branch = auto
[color "branch"]
current = yellow reverse
local = yellow
[color "diff"]
@dogmatic69
dogmatic69 / .htaccess
Created October 3, 2010 22:32
redirecting your sub domains
<IfModule mod_rewrite.c>
RewriteEngine on
# redirect all www traffic to non-www
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
# normal cakephp stuff
RewriteRule ^$ webroot/ [L]
RewriteRule (.*) webroot/$1 [L]