Skip to content

Instantly share code, notes, and snippets.

View garethredfern's full-sized avatar
🔥

Gareth garethredfern

🔥
View GitHub Profile
/**
* FUNCTIONS
**/
/**
* Functions create closures; variables defined
* inside of them are accessible inside the
* function, and to any functions that were
* defined within the same scope.
**/
@garethredfern
garethredfern / special-select.scss
Created April 12, 2014 07:31
Styling select elements in all modern browsers.
.selectWrap {
position: relative;
border-radius: 0.3em;
background-color: $compColor;
background-repeat: no-repeat;
background-position: right top;
background-image: image-url("dropdown-border-white.png");
&:after {
width: 0;
top: 48%;

Critique Checklist

1. Description

  • Who created the composition and who is it for?
  • State a brief description about the composition.
  1. Things you see in the work. Be specific. (Include size, medium, and the title.)
  2. This can be very literal or figurative

2. Analysis

  • Determine the style by describing how the work is organized.
<?php
// USAGE: php convert.php
// Edit the details below to your needs
$import_file = 'imports/example.xml';
$export_folder = '_content/01-gallery/03-day-3/'; // existing files will be over-written use with care
$image_folder = '/assets/img/gallery/days/';
if (file_exists($import_file)) {
$xml = simplexml_load_file($import_file);
@garethredfern
garethredfern / cheatsheet-raw
Last active August 29, 2015 14:05 — forked from centwave/cheatsheet-raw
Markdown cheatsheet.
# Header 1 #
## Header 2 ##
### Header 3 ### (Hashes on right are optional)
#### Header 4 ####
##### Header 5 #####
## Markdown plus h2 with a custom ID ## {#id-goes-here}
[Link back to H2](#id-goes-here)
This is a paragraph, which is text surrounded by whitespace. Paragraphs can be on one
@garethredfern
garethredfern / gist:d8ce349ae2a0671f7f85
Last active August 29, 2015 14:08
Fetch URL Segments PHP
<?php
/*
* segments ( [ int $index = NULL ] ) -> string
*/
function segments( $index = NULL )
{
static $segments;
// build $segments on first function call
@garethredfern
garethredfern / checkbox.html
Created January 2, 2015 09:11
Raven Form Fields
<div class="form-group">
<p>Which of the following facilities will the contractor have permission to use?</p>
<label>
<input type="checkbox" name="facilities[]" value="Water"> Water
</label>
<label>
<input type="checkbox" name="facilities[]" value="Electricity"> Electricity
</label>
<label>
<input type="checkbox" name="facilities[]" value="Toilet"> Toilet
@garethredfern
garethredfern / new-job.yaml
Last active August 29, 2015 14:13
Raven new job formset example for Statamic.
###########################################################################################
#
# NEW JOB RAVEN FORMSET
#
# Formsets can override any default settings (raven.yaml) EXCEPT master_killswitch
#
###########################################################################################
# Location (from root) to save form submissions
submission_save_path: _content/_jobs/
@garethredfern
garethredfern / request-funds.yaml
Created January 13, 2015 12:40
Request funds Raven formset for Statamic.
###########################################################################################
#
# REQUEST FUNDS RAVEN FORMSET
#
# Formsets can override any default settings (raven.yaml) EXCEPT master_killswitch
#
###########################################################################################
# Location (from root) to save form submissions
submission_save_path: _content/_funds/
@garethredfern
garethredfern / README.md
Last active August 29, 2015 14:13
Base template for emails.

Notes

  1. Add email title
  2. Change general styles to suit.
  3. Add content in commented block areas.
  4. Use Mailchimp's inline CSS tool to set CSS inline.