Skip to content

Instantly share code, notes, and snippets.

View rachellawson's full-sized avatar

Rachel Lawson rachellawson

View GitHub Profile
@rachellawson
rachellawson / gist:7038775
Created October 18, 2013 09:07
source text fro one of the pages from the manual
<p>The eight principles of Atern support the Philosophy. They direct the team in the attitude they must take and the mindset they must adopt in order to deliver consistently. Compromising any principle undermines Atern&rsquo;s basic philosophy. If a team doesn&rsquo;t follow all of the principles then they don&rsquo;t get the full benefit. The collective value of Atern&rsquo;s principles enables organisations to deliver best value business solutions collaboratively. Atern&rsquo;s eight Principles are:</p><ol><li>Focus on the business need</li><li>Deliver on time</li><li>Collaborate</li><li>Never compromise quality</li><li>Build incrementally from firm foundations</li><li>Develop iteratively</li><li>Communicate continuously and clearly</li><li>Demonstrate control</li></ol><h3>&nbsp;<br />4.1 Principle 1 &ndash; Focus on the business need</h3><p>Every decision taken during a project should be viewed in the light of the overriding project goal, which is to deliver what the business needs it to deliver, when it n
function contactology_libraries_info() {
// A very simple library. No changing APIs (hence, no versions), no variants.
// Expected to be extracted into 'sites/all/libraries/contactology_api'.
$libraries['contactology_api'] = array(
'name' => 'Contactology API',
'vendor url' => 'http://www.contactology.com/',
'download url' => 'http://www.contactology.com/email-marketing-api/',
'version arguments' => array(
'file' => 'class.Contactology.phps',
// Best practice: Document the actual version strings for later reference.
@rachellawson
rachellawson / fullwidth.css
Last active September 3, 2015 12:05
to use <p class="wide">something</p>
//add <p class="wide"> to make a <p> stretch a grey background across full width
.wide {
background-color: #aaa;
position: relative;
padding: 20px 0;
}
.wide:before,
.wide:after {
content: ' ';
@rachellawson
rachellawson / _wysiwyg_ctas.scss
Created July 29, 2014 15:35
for adding multiple items
.cta_color_green {
background-color: $wax-green;
color: $white;
height: 150px;
border-radius: 8px;
padding: 10px;
}
.cta_color_red {
background-color: #ff0000;
@rachellawson
rachellawson / file.formatter.generic.css
Created September 20, 2014 11:35
just trying to understand how this fits into smacss
/**
* @file
* Default style for file module
*/
/**
* File icons
*/
.file {
padding-left: 20px; /* LTR */
@rachellawson
rachellawson / xxx.module
Last active August 29, 2015 14:12
Its possible to alter a user lookup on the owner field for an entity, such as an order in drupal commerce. In this case, I needed to make it possible to not only lookup a user by their username in drupal but also by their "Dealer Code", a field attached to the user entity. I have never had to select items across two or more columns in a Entity F…
<?php
/**
* Implements hook_form_alter().
* to allow admins to seach for order ownders by dealer code
*/
function xxx_form_commerce_order_ui_order_form_alter(&$form, &$form_state, $form_id) {
$form['user']['#title'] = 'Order owner';
$form['user']['name']['#description'] = t('Choose a user by entering their username or dealer code and
selecting from the list');

Keybase proof

I hereby claim:

  • I am rachellawson on github.
  • I am rachel_norfolk (https://keybase.io/rachel_norfolk) on keybase.
  • I have a public key whose fingerprint is 6146 E179 B14B FCE4 64DE 0701 0C03 7074 7E6D 2BC8

To claim this, I am signing this object:

@rachellawson
rachellawson / creategif
Last active September 1, 2015 13:07
Create a d.o compatible mini movie gif rather than a static screenshot
#!/bin/sh
# Create an animated GIF of a screen recording to upload to d.o
# Usage: creategif input_file.mp4 output_file.gif
# As described at http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html
palette="/tmp/palette.png"
filters="fps=15,scale=1280:-1:flags=lanczos"
<?php
$query = new EntityFieldQuery();
$query->entityCondition('entity_type', 'node');
$query->entityCondition('bundle', 'article');
$result = $query->execute();
if (!empty($result)) {
$entities = entity_load('node', array_keys($result['node']));
return entity_view('node', $entities, 'full');
} else {
@rachellawson
rachellawson / Letter.md
Created December 25, 2015 15:40
Letter to editor

Dear Editor

It is horrible to read of another road traffic collision on our local roads. My heart goes out the the families concerned.

I am not convinced, however, that the answer is to throw money at improvements to the road. Especially as those proposed by, amongst others, Henry Bellingham MP are expected to cost over £1 million. A million would pay for a police officer to permanently sit on that junction for a whole 20 YEARS.

The road isn't the problem. We have developed a habit of improving roads to cope with our standard of driving when what we should be doing is requiring our standard of driving to match the road conditions.

By both properly investing in improving driving standards in the whole of the U.K. and requiring people to prove that they are maintaining these standards will we reduce collisions further. Yes, I do believe we should invest in more police on the road and requiring all drivers to re-sit a driving test every 5 years. We should spend the money making this re-testing simple and