This file contains 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
{validation_errors for='template'} | |
{render_partial template='editform.tpl'} |
This file contains 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
#!/usr/bin/env ruby | |
#Creates projects from approved estimates in Freshbooks | |
#(c)2010 Ted Kulp [email protected] | |
#Requires the tedkulp-freshbooks.rb gem | |
#To install: | |
# sudo gem install tedkulp-freshbooks.rb | |
# | |
#Create a ~/.freshbooks file (yaml format) with 'url' and 'key' keys | |
#to set the URL and API keys for freshbooks |
This file contains 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
#!/usr/bin/env ruby | |
#Script to import a large set of users from a CSV | |
#into CMSMS's FrontEndUsers module. Assumes the | |
#'cms_' database prefix. | |
require 'rubygems' | |
require 'faster_csv' | |
require 'pp' | |
require 'mysql' |
This file contains 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
class TestDataMapperTable extends CmsDataMapper | |
{ | |
var $counter = 0; | |
static public $static_counter = 0; | |
var $_fields = array( | |
'id' => array( | |
'type' => 'int', | |
'primary' => true, | |
'serial' => true, |
This file contains 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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'nestful' | |
require 'pivotal-tracker' | |
require 'yaml' | |
# Ensure that you have the active_resource gem installed on your local system: | |
# gem install nestful pivotal-tracker |
This file contains 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 | |
use \silk\database\Database; | |
class TestController extends \silk\action\Controller | |
{ | |
function index() | |
{ | |
$this->set('the_var', "It works!"); | |
} |
This file contains 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
$form = new \silk\form\Form('blah'); | |
$fs = $form->addFieldSet('blah', array('legend' => 'Config Options')); | |
$fs->addField('TextBox', 'thing'); | |
$form->addButton('Submit'); | |
$form->addButton('Cancel', array('value' => 'Get Me Out of Here!')); | |
if ($form->isPosted()) //Checks and then fills in values from POST | |
{ | |
if ($form->getClickedButton() == 'Submit') | |
{ |
This file contains 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 | |
# app/controllers/TestController.php | |
use \silk\action\Controller; | |
use \silk\form\Form; | |
class TestController extends Controller | |
{ | |
function index() | |
{ |
This file contains 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
#!/usr/bin/env ruby | |
# -*- coding: utf-8 -*- #specify UTF-8 (unicode) characters | |
#Email to Jekyll script | |
#(c)2011 Ted Kulp <[email protected]> | |
#MIT license -- Have fun | |
#Most definitely a work in progress | |
#Mail is an awesome gem. Install it. | |
require 'rubygems' |