This file contains hidden or 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
You can't expect to win unless you know why you'll lose. - Benjamin Lipson |
This file contains hidden or 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
james-rumbelows-macbook:Downloads Jamie$ sudo gem install mysql | |
Password: | |
Building native extensions. This could take a while... | |
ERROR: Error installing mysql: | |
ERROR: Failed to build gem native extension. | |
/usr/local/bin/ruby extconf.rb | |
checking for mysql_query() in -lmysqlclient... no | |
checking for main() in -lm... yes | |
checking for mysql_query() in -lmysqlclient... no |
This file contains hidden or 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
Let them in | |
by Jamie Rumbelow | |
C#m G#m F#m A | |
Take a breath and learn your name, | |
Take a hold and play the game, | |
You don’t know what to do at all, | |
What do I do who do I call? |
This file contains hidden or 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
Ruby Wins | |
by James CF | |
C#m G#m F#m A | |
Use a block to print your name, | |
Use equality to test the same, | |
Blocks and lambdas you can call, | |
Private methods, send from all. |
This file contains hidden or 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 | |
if (file_exists(get_template_directory() . '/pages/' . $post->post_name . '.php')) { | |
include(get_template_directory() . '/pages/' . $post->post_name . '.php'); | |
} else { | |
get_header(); | |
?> | |
<div id="post"> | |
<h3><?=$post->post_title?></h3> | |
<div class="image"> | |
<h2 id="page-title"><?=$post->post_title?></h2> |
This file contains hidden or 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 | |
/* | |
SimpleTest + CodeIgniter | |
test.php | |
the test runner - loads all needed files, | |
integrates with CodeIgniter and runs the tests | |
by Jamie Rumbelow | |
http://jamierumbelow.net/ |
This file contains hidden or 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 | |
// line 22 + | |
if (!isset($_GET['test'])) { | |
//What are we testing? | |
$files = array(); | |
if (isset($_GET['controllers'])) { | |
$files = @scandir(ROOT . 'application/tests/controllers'); | |
} elseif (isset($_GET['models'])) { |
This file contains hidden or 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 | |
//line 20+ | |
//Capture CodeIgniter output, discard and load system into $CI variable | |
ob_start(); | |
include(ROOT . 'index.php'); | |
$CI =& get_instance(); | |
ob_end_clean(); |
This file contains hidden or 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 | |
//line 19 | |
function add_test($file, &$test) { | |
$implementation = ''; | |
if (preg_match('/_controller/', $file) { | |
$controller = preg_replace('#' . ROOT . 'application/tests/controllers/([a-zA-Z0-9_\-])_controller_test.php#', '$1', $file); | |
$implementation = ROOT . 'application/controllers/'.$controller.'.php'; | |
} elseif (preg_match('/_model/', $file) { |
This file contains hidden or 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 | |
//line 41 | |
class CodeIgniterUnitTestCase extends UnitTestCase { | |
protected $ci; | |
public function __construct() { | |
parent::UnitTestCase(); | |
$this->ci =& get_instance(); | |
} |