This Gist / Backtick command will make the issue queue description sticky when you scroll down the comments of the issue. Read more here: https://association.drupal.org/node/17983
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 | |
// Structure to use | |
$terms = array( | |
array('name' => 'Technical', 'weight' => 1, 'parent' => 0), | |
array('name' => 'Operations', 'weight' => 6, 'parent' => 0), | |
array('name' => 'Customer Relationship', 'weight' => 7, 'parent' => 0), | |
array('name' => 'Talent & Culture', 'weight' => 11, 'parent' => 0), | |
array('name' => 'Finance', 'weight' => 12, 'parent' => 0), | |
array('name' => 'Dev', 'weight' => 0, 'parent' => 'Technical'), |
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 | |
// Select all nodes of type article created by anonymous and admin | |
$result = db_select('node', 'n') | |
->fields('n', array('nid')) | |
->condition('type', 'article') | |
->condition('uid', array(0,1), 'IN') | |
->execute(); | |
// go through results and unpublish each article. |
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 | |
// ------------------------------------------------------------------------------------------ | |
// This simple script adds the specified table prefix to all tables in the current DB. | |
// It is used if you want to add a prefix to all tables once the DB has been created. | |
// | |
// WARNING: Do not run on a DB which already uses prefixes to separate different databases. | |
// | |
// To run copy this script to the docroot of your Drupal installation and then do: | |
// |
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 | |
// Select all nodes of type Document | |
$result = db_select('node', 'n') | |
->fields('n', array('nid')) | |
->condition('type', 'document') | |
->execute(); | |
// create thumbnail and attach it | |
foreach($result as $row) { |
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 (count($argv) != 3) { | |
die('Usage: php remap-csv.php <infile> <outfile>'); | |
} | |
// in / out files are $argv[1] and $argv[2] | |
$in = fopen($argv[1], "r"); | |
$out = fopen($argv[2], "w"); |
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 | |
/** | |
* Implements hook_field_formatter_info(). | |
*/ | |
function edl_flowplayer_field_formatter_info() { | |
return array( | |
// the key must be unique, so it's best to prefix with your module's name. | |
'edl_flowplayer_flowplayer' => array( | |
// the label is is what is displayed in the select box in the UI. |
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 | |
/** | |
* Implements hook_menu(). | |
*/ | |
function xxxxx_menu() { | |
$items['path'] = array( | |
'title' => '[Title]', | |
'access callback' => TRUE, | |
'page callback' => 'xxxxx_render_page', |
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
#!/bin/bash -x | |
# | |
# Script que actualiza el codigo en el ambiente a donde se hace push | |
# | |
# | |
# The "post-receive" script is run after receive-pack has accepted a pack | |
# and the repository has been updated. It is passed arguments in through | |
# stdin in the form | |
# <oldrev> <newrev> <refname> | |
# For example: |
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
<html> | |
<head> | |
<title>Titulo</title> | |
</head> | |
<body><p>Titulo</p> | |
<h1>This is an h1 header</h1> | |
<h2>This is an h2 header</h2> | |
<h3>This is an h3 header</h3> | |
<h4>This is an h4 header</h4> | |
<h5>This is an h5 header</h5> |