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 | |
// OH HAI THARE | |
// NO CACH PLZ | |
header( "Cache-Control: no-cache, max-age=0, must-revalidate"); | |
// SET ERROR HANDLR | |
set_error_handler('monitor_handle_error'); | |
// CAN HAS DRUPAL BOOTSTRAP? | |
define('DRUPAL_ROOT', __DIR__); | |
chdir(DRUPAL_ROOT); | |
require_once 'includes/bootstrap.inc'; |
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 Behat\Behat\Context\ClosuredContextInterface, | |
Behat\Behat\Context\TranslatedContextInterface, | |
Behat\Behat\Context\BehatContext, | |
Behat\Behat\Exception\PendingException; | |
use Behat\Gherkin\Node\PyStringNode, | |
Behat\Gherkin\Node\TableNode; | |
/** |
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
project_id = 1 | |
private_token = "XXXXXXXXXXXXXXXXXXXX" | |
return new groovy.json.JsonSlurper().parseText(new URL("https://git.pheromone.ca/api/v3/projects/"+project_id+"/repository/branches?private_token="+private_token).text).name |
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
function fun_with_entity_view($entity, $entity_type, $view_mode, $langcode) { | |
list($entity_id) = entity_extract_ids($entity_type, $entity); | |
if ($view_mode === 'full') { | |
$entity->content['teaser'] = entity_view(entity_load($entity_type, $entity_id), $entity_type, 'teaser', $langcode); | |
} | |
} |
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 | |
/** | |
* Implements hook_field_info(). | |
*/ | |
function MODULE_field_info() { | |
return array( | |
'video_thumbnail_settings' => array( | |
'label' => t('Video Thumbnail Settings'), | |
'description' => t('Configure Video Thumbnail display.'), | |
'settings' => 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
#! /usr/bin/python | |
from tuxisalive.api.TuxAPI import * | |
import pygst | |
pygst.require("0.10") | |
import gst | |
import gtk | |
__author__="pbuyle" | |
__date__ ="$05-janv.-2009 21:21:57$" | |
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/python | |
from tuxisalive.api.TuxAPI import * | |
import gtk | |
tux = TuxAPI('127.0.0.1', 270) | |
tux.server.autoConnect(CLIENT_LEVEL_RESTRICTED, 'TuxGTK', 'NONE') | |
tux.server.waitConnected(10.0) | |
tux.dongle.waitConnected(10.0) | |
tux.radio.waitConnected(10.0) | |
if tux.access.waitAcquire(10.0, ACCESS_PRIORITY_NORMAL): |
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/python | |
# -*- coding: UTF8 -*- | |
import dbus | |
from tuxisalive.api.TuxAPIConst import * | |
from tuxisalive.api.TuxAPI import TuxAPI | |
__author__ = '[email protected]' | |
__appname__ = 'TuxVlcControl' | |
__version__ = '0.0.1' | |
__date__ = '2008/12/29' |
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
from tuxisalive.api import * | |
def start_spin(*args): | |
key = args[0] | |
if(key == K_LEFT): | |
tux.spinning.leftOnAsync(1.0, SPV_SLOW) | |
else: | |
tux.spinning.rightOnAsync(1.0, SPV_SLOW) | |
tux = TuxAPI('127.0.0.1', 270) |