Skip to content

Instantly share code, notes, and snippets.

View jedateach's full-sized avatar
🤓

Jeremy Shipman jedateach

🤓
View GitHub Profile
@jedateach
jedateach / index.html
Created November 8, 2015 23:10 — forked from anonymous/index.html
Ember 1.12.1 Clone this to play with Ember 1.12.1 // source https://jsbin.com/xotuxe
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Clone this to play with Ember 1.12.1">
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/ember.js/1.12.1/ember.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/ember.js/1.12.1/ember-template-compiler.js"></script>
<meta charset="utf-8">
<title>Ember 1.12.1</title>
<style id="jsbin-css">
@jedateach
jedateach / howliquidfireanimationworks.md
Last active August 26, 2015 23:31
How Liquid-Fire Fade Slide Fade Animation works

How Liquid Fire FSF Animation Works

Each helper produces two wrapping div elements to aid in the animation:

  • liquid-container
  • liquid-child

The liquid-container introduces relative positioning for the children, and also handles the resizing height/width with slide animation. The liquid-child contains the actual content, and is the element that will be faded / unfaded. The 'old-child' will be completely replaced with a 'new-child' after the animation has completed.

@jedateach
jedateach / process.php
Last active August 29, 2015 14:18
New BulkLoading Process
<?php
/**
* process:
* raw data is extracted using BulkLoaderSource as iterable rows
* row data is mapped into a standardised form
* standard form is transformed into a placeholder dataobject
*/
//raw data
@jedateach
jedateach / OrderProcessor.php
Created February 3, 2015 04:53
Previously sOtripped out StatusLog functionality
<?php
class OrderProcessor {
/**
* Send a message to the client containing the latest
* note of {@link OrderStatusLog} and the current status.
*
* Used in {@link OrderReport}.
*
@jedateach
jedateach / README.md
Last active January 16, 2016 04:27
Subscription Module Planning

Subscription

Subscription module for SilverStripe

  • Member has subscription.

  • Organisation has a subscription (list of members).

  • Subscription many_many Member.

  • Subscription has an expiry date.

  • Subscription period calculator.

@jedateach
jedateach / OverviewLink.php
Last active August 29, 2015 14:06
Shortcodable Dev
@jedateach
jedateach / _ss_environment.php
Created May 16, 2014 21:45
Localhost ss environment file
<?php
//set up reporting level, depending on ss version
if(strrpos($_SERVER['SCRIPT_NAME'], 'sapphire') !== false){
error_reporting(E_ERROR | E_WARNING | E_PARSE);
}else{
error_reporting(E_ALL);
}
define('SS_GEM_PATH', '/usr/bin/');
@jedateach
jedateach / blah.php
Created April 23, 2014 22:57
Silverstripe non-associative array config
<?php
public function getRequiredFields() {
$fields = self::config()->required_fields;
//hack to allow overriding arrays in ss config
if(self::$required_fields != $fields){
foreach(self::$required_fields as $requirement){
if(($key = array_search($requirement, $fields)) !== false) {
unset($fields[$key]);
}
@jedateach
jedateach / MyAdmin.php
Created December 16, 2013 23:42
Optionally hide SilverStripe LeftAndMain/ModelAdmin sections
<?php
class MyAdmin extends LeftAndMain{ //or ModelAdmin
private static $url_segment = "myadmin";
function alternateAccessCheck(){
return !$this->config()->hidden;
}
}
@jedateach
jedateach / .htaccess
Created November 28, 2013 02:22
Display a maintenance page for a site
RewriteCond %{REQUEST_URI} !/maintenance.html$
RewriteCond %{REMOTE_HOST} !^888\.888\.888\.888
RewriteRule $ /maintenance.html [R=302,L]