Skip to content

Instantly share code, notes, and snippets.

View greylabel's full-sized avatar

Grant Gaudet greylabel

View GitHub Profile
@greylabel
greylabel / block-annotation-with-context.php
Created January 3, 2018 16:25 — forked from dsnopek/block-annotation-with-context.php
Drupal 8 block annotation with context example
/**
* @Block(
* id = "my_block",
* context = {
* "node" = @ContextDefinition("entity:node")
* }
* )
*/
@greylabel
greylabel / 9191_config.php
Created December 21, 2016 00:03
This is a sample addition to the config.php for SimpleSAMLphp for Acquia Cloud.
<?php
// All custom changes below. Modify as needed.
// Defines account specific settings.
// $ah_options['database_name'] should be the Acquia Cloud workflow database name which
// will store SAML session information.set
// You can use any database that you have defined in your workflow.
// Use the database "role" without the stage ("dev", "stage", or "test", etc.)
//This file was last modified on Nov 4, 2015.
$ah_options = array(
'database_name' => 'mydatabasename',
@greylabel
greylabel / PhpVariableTask.php
Created December 23, 2015 07:20 — forked from grasmash/PhpVariableTask.php
This Phing tasks will read a PHP variable from a PHP file, allowing it to be output as a Phing property.
<?php
/**
* Class PhpVariableTask
*
* This task allows php variables from php files to be output into Phing
* properties.
*/
class PhpVariableTask extends Task {
@greylabel
greylabel / main.js
Last active August 29, 2015 14:23 — forked from coorasse/main.js
$(function() {
var bitbucket_project_name = 'YOUR_PROJECT_NAME LIKE coorasse/airesis';
var codeship_project_code = 'YOUR CODESHIPO PROJECT UUID CODE (look for it in the badge instructions page or general settings page)';
var regexp = new RegExp("^https://bitbucket.org/" + bitbucket_project_name + "/pull-request/","g");
if ((regexp).test(window.location.href)) {
var branch = $('dd.unabridged a').first().html();
var url = 'https://codeship.com/projects/'+codeship_project_code+'/status?branch='+branch;
var row = $('<div></div>')
var column1 = $('<dt>Codeship</dt>');