Skip to content

Instantly share code, notes, and snippets.

View justinyost's full-sized avatar

Justin Yost justinyost

View GitHub Profile
@justinyost
justinyost / Lifestream RSS Feed Generator
Created May 16, 2009 21:52
Generates an RSS feed from a pile of other RSS feeds
<?php header("Content-type: text/xml charset=utf-8");
//get the simplepie library
require_once('simplepie.inc');
//grab the feeds
$feed = new SimplePie();
$feed->set_feed_url(array(
'http://feeds2.feedburner.com/Yostivanich',
'http://twitter.com/statuses/user_timeline/7568942.rss',
'http://feeds.delicious.com/v2/rss/jtyost2',
'http://digg.com/users/jtyost2/history.rss',
@justinyost
justinyost / paging.ctp
Created March 20, 2012 16:05
Paging Element for Twitter Bootstrap and CakePHP 2.0+
<?php $span = isset($span) ? $span : 8; ?>
<?php $page = isset($this->request->params['named']['page']) ? $this->request->params['named']['page'] : 1; ?>
<div class="pagination">
<ul>
<?php echo $this->Paginator->prev(
'&larr; ' . __('Previous'),
array(
'escape' => false,
'tag' => 'li'
),
@justinyost
justinyost / Shell Commands
Last active December 20, 2015 10:49
CakePHP Intro for Las Vegas Users Group Commands Related Github Repo: https://github.com/jtyost2/cakephp-intro
Either
`chown -R _www ./app/tmp`
`chmod -R 777 ./app/tmp`
Cake Bake:
Console/cake -app ~/path/to/app/ bake all
@justinyost
justinyost / .travis.yml
Last active August 29, 2015 13:56
Super Simple .travis.yml with CakePHP 2.0+ Plugins
# Language Tests are Running In
language: php
# PHP Versions to Test
php:
- 5.3
- 5.4
- 5.5
# Environment Variables to set
@justinyost
justinyost / AppModel.php
Created March 20, 2014 02:42
Cake2.0 AppModel
<?php
/**
* Application model for Cake.
*
* This file is application-wide model file. You can put all
* application-wide model-related methods here.
*
* PHP 5
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
@justinyost
justinyost / keybase.md
Last active March 28, 2016 04:15
Keybase Verification Gist

Keybase proof

I hereby claim:

  • I am justinyost on github.
  • I am jtyost2 (https://keybase.io/jtyost2) on keybase.
  • I have a public key whose fingerprint is E1EB AF10 9927 8212 2D07 BD97 9A56 316C D007 FC87

To claim this, I am signing this object:

@justinyost
justinyost / vagrant ssh debug log
Created April 3, 2014 21:30
vagrant debug logs
INFO global: Vagrant version: 1.5.0
INFO global: Ruby version: 2.0.0
INFO global: RubyGems version: 2.0.14
INFO global: VAGRANT_EXECUTABLE="/Applications/Vagrant/bin/../embedded/gems/gems/vagrant-1.5.0/bin/vagrant"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/Applications/Vagrant/bin/../embedded"
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_DETECTED_OS="Darwin"
INFO global: VAGRANT_INSTALLER_ENV="1"
INFO global: VAGRANT_INTERNAL_BUNDLERIZED="1"
INFO global: VAGRANT_LOG="debug"
@justinyost
justinyost / Blog.php
Created June 14, 2014 21:09
Sample Model for Sitemap
<?php
App::uses('AppModel', 'Model');
/**
* Blog Model
*
*/
class Blog extends AppModel {
public $actsAs = array(
'Sitemap.Sitemap' => array(
// options for the Sitemap Behavior
@justinyost
justinyost / Blog.php
Created June 17, 2014 20:57
Sample Model With Modified DateTime Field Unset
<?php
App::uses('AppModel', 'Model');
/**
* Blog Model
*
*/
class Blog extends AppModel {
public $actsAs = array(
'Sitemap.Sitemap' => array(
// options for the Sitemap Behavior
@justinyost
justinyost / gist:dcb163d7887d917a0c8c
Created June 17, 2014 20:59
Sample Model with a Different Modified Date/Time Value in the Database
<?php
App::uses('AppModel', 'Model');
/**
* Blog Model
*
*/
class Blog extends AppModel {
public $actsAs = array(
'Sitemap.Sitemap' => array(
// options for the Sitemap Behavior