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/bash | |
# user info | |
USER=USERNAME | |
PASSWORD=SECRET | |
export PASSPHRASE=GPG-PARAPHRASE | |
# server info | |
PROTOCOL="scp" | |
SERVER=SERVERNAME |
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
remote_file "/tmp/BOA.sh" do | |
source "http://files.aegir.cc/BOA.sh.txt" | |
mode 00755 | |
end | |
execute "/tmp/BOA.sh" do | |
creates "/usr/local/bin/boa" | |
end | |
(1..3).each do |boa_user| |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant::Config.run do |config| | |
config.vm.box = "base" | |
# Boot with a GUI so you can see the screen. (Default is headless) | |
# config.vm.boot_mode = :gui | |
# Forward a port from the guest to the host, which allows for outside |
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
Drush command terminated abnormally due to an unrecoverable error. Error: Class 'RegistrationTypeUIController' not found in /data/disk/o1/static/vih--drupal-7.15-build-20121006-/profiles/vih_dk/modules/contrib/entity/entity.module, line 994 |
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_form_commerce_cart_add_to_cart_form_alter(&$form, &$form_state). | |
*/ | |
function hook_form_commerce_cart_add_to_cart_form_alter(&$form, &$form_state) { | |
$options = $form['product_id']['#options']; | |
$op = array(); | |
foreach ($options as $key => $value) { | |
$op[] = $key; | |
} |
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
language: php | |
php: | |
- 5.3 | |
mysql: | |
database: drupal | |
username: root | |
encoding: utf8 | |
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 | |
abstract class BasicUsersMigration extends Migration | |
{ | |
public function __construct() | |
{ | |
parent::__construct(); | |
// With migrate_ui enabled, migration pages will indicate people involved in | |
// the particular migration, with their role and contact info. We default the | |
// list in the shared class; it can be overridden for specific migrations. |
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
/** | |
* Implements hook_menu_local_task() | |
* | |
* @param array $variables | |
* | |
* return string with html | |
*/ | |
function mytheme_menu_local_task($variables) { | |
$link = $variables['element']['#link']; | |
// remove the view link when viewing the node |
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 | |
# | |
# Checks whether the box can be shutdown | |
# | |
IS_XBMC_RUNNING=$(pgrep xbmc) | |
mythshutdown --check | |
MYTHSTATUS=$? | |
if [ $MYTHSTATUS -ne 0 ]; then |
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 | |
$string = '--- | |
layout: default | |
title: Some title - yeah, right | |
--- | |
<h1>Tester</h1> | |
<p>Some content</p>'; | |
preg_match("'/---.*?---/s'", $content, $yaml_frontmatter); |