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
module Lithium | |
%w[rubygems net/http uri json].each {|lib| require lib} | |
def self.call(params) | |
endpoint = "http://local-oars/connection/rpc" | |
query = URI.escape(params.map {|k,v| "#{k}=#{v}"}.join('&')) | |
uri = URI.parse(endpoint + '?' + query) | |
http = Net::HTTP.new(uri.host, uri.port) | |
request = Net::HTTP::Get.new(uri.request_uri) | |
request.initialize_http_header({"User-Agent" => "cucumber-lithium"}) |
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
public function action_publish_post( $post, $form ) | |
{ | |
if ( $post->content_type == Post::type( 'mycontenttype' ) ) { | |
$post->tags .= ',mytag'; | |
} | |
} |
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 ( !defined( 'HABARI_PATH' ) ) { die('No direct access'); } ?> | |
<form | |
id="<?php echo $id; ?>" | |
method="<?php echo isset($method)?$method:'post'?>" | |
action="<?php echo $action; ?>" | |
class="<?php echo $class; ?>" | |
enctype="<?php echo $enctype; ?>" | |
accept-charset="<?php echo $accept_charset; ?>" | |
<?php echo $onsubmit; ?> | |
> |
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
bindkey -d -k kb stuff "\010" | |
term screen-256color | |
shell $SHELL | |
# use the hardstatus line for the window list | |
# alwayslastline - always display the hardstatus as the last line of the | |
# terminal | |
# "%{= kR} %-Lw" - change to a blac[k] background with bright [R]ed text, | |
# and print all the tab [w]indow numbers and titles in | |
# the [L]ong format (ie with flags) upto ('-') the | |
# current tab window |
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
Get in contact with us: | |
[email protected] or [email protected] or [email protected] | |
02 8003 3523 | |
http://www.littlebirdelectronics.com/facebook | |
http://twitter.com/lbhq | |
http://www.littlebirdelectronics.com/googleplus | |
Hackerspaces: | |
http://www.makehackvoid.com/ (Canberra) |
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
\Habari\System\Core\SuperGlobal => /System/Core/SuperGlobal.php | |
\Habari\System\Core\Version => /System/Core/Version.php | |
\Habari\System\Core\Update => /System/Core/Update.php | |
\Habari\System\Core\Session => /System/Core/Session.php | |
\Habari\System\Core\Singleton => /System/Core/Singleton.php | |
\Habari\System\Core\Site => /System/Core/Site.php | |
\Habari\System\Core\Config => /System/Core/Config.php | |
\Habari\System\Core\Controller => /System/Core/Controller.php | |
\Habari\System\Core\Options => /System/Core/Options.php | |
\Habari\System\Core\Error => /System/Core/Error.php |
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
int ledPins[] = {2,3,4,5,6,7,8,9}; | |
int duration = 100; | |
int inLeft[] = {0, 8, 1}; | |
int inRight[] = {7, -1, -1}; | |
void setup() { | |
// This is weird, inRight only works if I do this | |
Serial.begin(9600); | |
// initialize the digital pins as an output. | |
for (int i = 0 ; i < 8; i++) { |
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
// Declare the pins backwards, so we can use pointer | |
// arithmetic without finding the end of the array | |
int ledPins[] = {9,8,7,6,5,4,3,2}; | |
int pinCount = 8; | |
int highValue = 2 << (pinCount - 1); | |
void setup() { | |
// initialize the digital pins as an output. | |
for (int i = 0 ; i < pinCount; i++) { | |
pinMode(ledPins[i], OUTPUT); |
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
✘ test_cache_assets | |
Expected simple_assets key to exist in array ( ) | |
test_pluggable.php:42 | |
Expected simple_assets key to exist in array ( ) | |
test_pluggable.php:42 | |
Expected simple_assets key to exist in array ( ) | |
test_pluggable.php:42 |
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
static::applyFilter('find', function($self, $params, $chain) { | |
// Check if we're finding forms linked to a test | |
if (isset($params['options']['conditions']['test_id'])) { | |
$test_id = (int)$params['options']['conditions']['test_id']; | |
$params['options']['joins'] = array(new Query(array( | |
'source' => 'test_forms', | |
'constraint' => array ('Form.id' => 'test_forms.form_id', 'test_forms.test_id' => $test_id), | |
))); | |
unset($params['options']['conditions']['test_id']); | |
} |