![](name-of-giphy.gif)
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 | |
require_once('countries.php'); | |
$row = 0; | |
$fp = fopen('hubspot10daysnew.csv', 'w'); | |
$countries = get_countries(); | |
if (($handle = fopen("hubspot10days.csv", "r")) !== FALSE) { | |
while ($data = fgetcsv($handle)) { |
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
""" | |
Exports issues from a list of repositories to individual csv files. | |
Uses basic authentication (Github username + password) to retrieve issues | |
from a repository that username has access to. Supports Github API v3. | |
Forked from: unbracketed/export_repo_issues_to_csv.py | |
""" | |
import argparse | |
import csv | |
from getpass import getpass | |
import requests |
This setup is for Windows 10 using powershell. You should already have Git for Windows installed, PHP in the path specified (c:\php) and composer with phpcs and the Drupal coding standards installed.
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
/** | |
* Insert terms for School Level vocabulary. | |
*/ | |
function bracknell_deploy_update_7018() { | |
// Create the new school level vocab. | |
$vocabulary = new stdClass(); | |
$vocabulary->name = 'School Level'; | |
$vocabulary->machine_name = "school_level"; | |
$vocabulary->description = t('List of school levels weighted by order preference.'); | |
$vocabulary->module = 'taxonomy'; |
This code came as a result of using the following modules in Drupal 7:
node_display_title
entity_reference_multiple
The output returned from entity ref mult was unalterable and used the default entity label in the markup. I was unable to theme the field and didn't want to alter the markup so implemented these hooks to change the label itself. Rather dangerous but it does fall back gracefully to the default node title.
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 | |
# Help menu | |
print_help() { | |
cat <<-HELP | |
This script is used to fix permissions of a Drupal installation | |
you need to provide the following arguments: | |
1) Path to your Drupal installation. | |
2) Username of the user that you want to give files/directories ownership. | |
3) HTTPD group name (defaults to www-data for Apache). | |
Usage: (sudo) bash ${0##*/} --drupal_path=PATH --drupal_user=USER --httpd_group=GROUP |
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_alter(&$item) | |
* | |
* Giant hack around a non-functioning permissions system - gets the users roles and checks to see if they | |
* can create content types - if so allow the menu link else disable it. | |
*/ | |
//function olc_access_menu_alter(&$items) { | |
// // get the current user entity | |
// global $user; | |
// $account = $user; |