Skip to content

Instantly share code, notes, and snippets.

View craychee's full-sized avatar
💭
Lots of (private) python projects.

Michelle Krejci craychee

💭
Lots of (private) python projects.
View GitHub Profile
@craychee
craychee / gist:6118972
Created July 31, 2013 03:01
Visualizing the components of Course Group. (Permissions excluded.)
$group_course = array (
‘textbook’ => array(
‘chapter’ => array(
‘section’ => array(
‘video_viewer’ => array(
‘media_field’ => ‘brightcove_video’,
‘entity_reference’ => ‘video_check_quiz’,
),
),
‘reading_quiz’ => ‘reading_check_quiz’,
@craychee
craychee / Example Build Script
Created November 3, 2013 21:38
Getting your local build policy into code.
#!/usr/bin/env bash
# Pass all arguments to drush
while [ $# -gt 0 ]; do
drush_flags="$drush_flags $1"
shift
done
drush="drush $drush_flags"
@craychee
craychee / Promet Development Workflow FAQ
Last active December 28, 2015 01:09
Promet Development Workflow FAQs
##Q. What are you doing to my site?
###A. We are adding an additional directory in front of your project root that contains executables that can build and configure a virtualized development enviornment that mimics your production environment as much as possible and that allow us to deploy changes to your site with a testable, repeatable, transparent process.
##Q. After you do this, will my site look or behave any differently?
###A. No. We are not altering your Drupal codebase or database at all. We making your current configurations (of content types, views, feeds, taxonomy vocabularies, roles and permissions, etc.) explicit by putting them into code. If we alter the configurations we will do so by altering that code so that our changes are explicit. Moreover, every one who works on your site will be able to test our configuration changes in the exact same way as we will be deploying it live.
##Q. Why is this important?
###A. First, we want to ensure that changes that we make to the site are not dependent

##Q. What are you doing to my site? ###A. We are adding an additional directory in front of your project root that contains executables that can build and configure a virtualized development enviornment that mimics your production environment as much as possible and that allow us to deploy changes to your site with a testable, repeatable, transparent process.

##Q. After you do this, will my site look or behave any differently? ###A. No. We are not altering your Drupal codebase or database at all. We making your current configurations (of content types, views, feeds, taxonomy vocabularies, roles and permissions, etc.) explicit by putting them into code. If we alter the configurations we will do so by altering that code so that our changes are explicit. Moreover, every one who works on your site will be able to test our configuration changes in the exact same way as we will be deploying it live.

##Q. Why is this important? ###A. First, we want to ensure that changes that we make to the site are not depende

@craychee
craychee / access_product_employee.feature
Last active July 25, 2016 21:44
access_product_employee.feature
@api @javascript
Feature: View products.
In order for to buy a product,
As an employee,
I need be able to view products that are on offer.
Background:
Given I am a user with the "employee" role
Given "product" products:
| title | sku | status | field_price_type | field_product_employee_price | field_product_retail_price | field_product_partner_price |
@craychee
craychee / access_product_partner.feature
Last active August 29, 2015 13:57
View Product as a Partner
@api @javascript
Feature: View products.
In order for to buy a product,
As a partner,
I need be able to view products that are on offer.
Background:
Given I am a user with the "partner" role
Given "product" products:
| title | sku | status | field_price_type | field_product_employee_price | field_product_retail_price | field_product_partner_price |
@craychee
craychee / gist:10745141
Last active August 29, 2015 13:59
A script that creates the terms for a vocabulary.
<?php
/**
* * Create a taxonomy term and return the tid.
* */
$cat_terms = array(
'Backup & Sharing' => array(),
'Computer Security' => array(),
'Equipment Protection' => array(),
'ID Protection' => array(),
'Technical Support' => array(),
@craychee
craychee / Contract Killer 3.md
Last active August 29, 2015 14:25
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

@craychee
craychee / Rootcanal + Libraries workaround
Last active September 15, 2015 14:25
Rootcanal workaround script for using libraries (example composer.json and bash script).
[...]
"config": {
"bin-dir": "bin",
"process-timeout": 1200
},
"scripts": {
"post-install-cmd": [
"bin/rootcanal",
"bin/libraries"
],
@craychee
craychee / Are you Ready to Hire an Engineer?.md
Last active June 28, 2024 14:26
A plain English checklist to help non-technical people decide if the business is ready to engage the services of an engineer or a consulting firm. This checklist was made to accompany the following blog post: http://craychee.io/blog/2015/09/17/are-you-ready-to-hire-an-engineer/

Are you Ready to Hire an Engineer?

A plain English checklist


This checklist is intended to help non-technical people decide if the business is ready to engage the services of an engineer or a consulting firm. It is the goal of this checklist to give non-technical folks a leg up in these conversations so that they are less likely to get into lengthy (and very expensive) engagements.


###Content Content pertains to information that you already provide customers or plan to make available to anyone who comes to your site.