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
# Video: http://rubyhoedown2008.confreaks.com/08-chris-wanstrath-keynote.html | |
Hi everyone, I'm Chris Wanstrath. | |
When Jeremy asked me to come talk, I said yes. Hell yes. Immediately. But | |
then I took a few moments and thought, Wait, why? Why me? What am I supposed | |
to say that's interesting? Something about Ruby, perhaps. Maybe the | |
future of it. The future of something, at least. That sounds | |
keynote-y. | |
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 | |
/* | |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
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
//Get the currently selected option's value | |
$(this).val(); | |
//Get the currently selected option's title | |
$(this).text(); | |
//Set the currently selected option to the supplied value | |
$(this).val('value'); | |
//Get an option with a specified value |
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 | |
$depth = 0; | |
echo '<ol class="tree">'; | |
foreach ($children as $i => $child) | |
{ | |
// Get the last and next nodes | |
$last = isset($children[$i-1]) ? $children[$i-1] : $children[0]; | |
$next = isset($children[$i+1]) ? $children[$i+1] : $children[0]; |
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 | |
Route::set('feed', 'feed<format>', array('format' => '\.\w+')) | |
->defaults(array( | |
'controller' => 'feed', | |
)); | |
Route::set('article', 'article(s)/<article>(<format>)', array('format' => '\.\w+')) | |
->defaults(array( |
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
$(document).ready(function() { | |
$('form').live('submit', function() | |
{ | |
var form = $(this); | |
var action = form.attr('action'); | |
$.post(action, form.serialize(), function(response) | |
{ | |
form.replaceWith(response); |
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
#!/bin/sh | |
# have submodules been added? | |
MODS=0 | |
# Github base URL | |
GITHUB="https://github.com" | |
# Default branch | |
DEFAULT_BRANCH="3.0/master" |
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
#!/bin/sh | |
# have submodules been added? | |
MODS=0 | |
# Github base URL | |
GITHUB="https://github.com" | |
# Default branch | |
DEFAULT_BRANCH="3.0/master" |
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 defined('SYSPATH') or die('No direct script access.'); | |
class View { | |
public static function factory($template, array $partials = NULL) | |
{ | |
$class = 'View_'.str_replace('/', '_', $template); | |
if ( ! class_exists($class)) | |
{ |
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 | |
/** | |
* Wrapper around PHP's procedural API | |
*/ | |
class Kohana_cURL | |
{ | |
public static function factory(string $url = NULL) | |
{ | |
// Raises E_WARNING upon error |
OlderNewer