Skip to content

Instantly share code, notes, and snippets.

View garethredfern's full-sized avatar
🔥

Gareth garethredfern

🔥
View GitHub Profile
@natelandau
natelandau / .bash_profile
Last active April 9, 2025 08:09
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
/**
* 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.
**/
@pbojinov
pbojinov / README.md
Last active January 31, 2025 05:04
Two way iframe communication- Check out working example here: http://pbojinov.github.io/iframe-communication/

Two way iframe communication

The main difference between the two pages is the method of sending messages. Recieving messages is the same in both.

Parent

Send messages to iframe using iframeEl.contentWindow.postMessage Recieve messages using window.addEventListener('message')

iframe

@jasonvarga
jasonvarga / Gruntfile.js
Last active January 4, 2016 15:19
Using Grunt to copy Statamic add-on files to a sandbox site
module.exports = function(grunt) {
grunt.initConfig({
concat: {
// js stuff
},
uglify: {
// more js stuff
@brandonkelly
brandonkelly / templating.md
Last active March 11, 2025 21:41
Templating in EE vs. Craft
@jasonvarga
jasonvarga / gist:7492322
Last active December 28, 2015 11:19
Bison and Stripe integration
<div id="payment-errors">
{{ bison:checkout_form_errors }}
{{ if missing }}
<p>You are missing the following fields.</p>
<ul>
{{ missing }}
<li>The {{ field_label }} field {{ message }}</li>
{{ /missing }}
</ul>
{{ endif }}

Contract Killer 3

Revised date: 07/11/2012

Between us [company name] and you [customer name]

Summary:

We’ll always do our best to fulfil your needs and meet your expectations, but it’s important to have things written down so that we both know what’s what, who should do what and when, and what will happen if something goes wrong. In this contract you won’t find any complicated legal terms or long passages of unreadable text. We’ve no desire to trick you into signing something that you might later regret. What we do want is what’s best for both parties, now and in the future.

@jackmcdade
jackmcdade / kitchen_sink.yaml
Last active September 5, 2021 23:36
Statamic Fieldset Kitchen Sink
title: Fieldset Kitchen Sink
fields:
status:
type: status
_template:
type: templates
@justinbmeyer
justinbmeyer / jsmem.md
Last active June 29, 2024 16:00
JS Memory

JavaScript Code

var str = "hi";

Memory allocation:

Address Value Description
...... ...
@garethredfern
garethredfern / javascript.js
Created November 23, 2012 13:30 — forked from jamiepittock/ExpressionEngine template
Inject events from low_events:entries into low_events:calendar cells
$(".event").each(function() {
// get the ID of the event element
var the_date = $(this).attr("id");
// find the tabel cell with that same ID and append the div
$(this).clone().appendTo('.calendar td#' + the_date);
});