Skip to content

Instantly share code, notes, and snippets.

View jamesdixon's full-sized avatar

James Dixon jamesdixon

View GitHub Profile
@jamesdixon
jamesdixon / custom-fonts.php
Created March 9, 2015 21:54
Wordpress Allow Custom Font Upload
<?php
// add to your theme's functions.php file
add_filter('upload_mimes', 'add_custom_upload_mimes');
function add_custom_upload_mimes($existing_mimes) {
$existing_mimes['otf'] = 'application/x-font-otf';
$existing_mimes['woff'] = 'application/x-font-woff';
$existing_mimes['ttf'] = 'application/x-font-ttf';
$existing_mimes['svg'] = 'image/svg+xml';
$existing_mimes['eot'] = 'application/vnd.ms-fontobject';
return $existing_mimes;
@jamesdixon
jamesdixon / plv8-javascript-modules-loading.sql
Last active October 22, 2015 06:08 — forked from rafaelveloso/plv8-javascript-modules-loading.sql
How to load Javascript modules into postgres using plv8
\set rrule `cat rrule.js`
/******************************************************************************
Now that we have set variable containing the code
we need to create a table to store each of them in
postgres.
******************************************************************************/
create table plv8_modules(modname text primary key, load_on_start boolean, code text);
@jamesdixon
jamesdixon / rrule.js
Created October 24, 2015 01:55
rrule.js
/*!
* rrule.js - Library for working with recurrence rules for calendar dates.
* https://github.com/jkbrzt/rrule
*
* Copyright 2010, Jakub Roztocil and Lars Schoning
* Licenced under the BSD licence.
* https://github.com/jkbrzt/rrule/blob/master/LICENCE
*
* Based on:
* python-dateutil - Extensions to the standard Python datetime module.
@jamesdixon
jamesdixon / controllers.application.js
Created September 19, 2016 01:44 — forked from blimmer/controllers.application.js
Group-By Feature Reques
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
@jamesdixon
jamesdixon / controllers.application.js
Last active September 22, 2016 04:54
Group-by fix
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
@jamesdixon
jamesdixon / pbs-t-logo.html
Created April 24, 2017 16:28
Scout Logo: White Text + Transparent Background
<a href="https://scoutforpets.com" title="Powered by Scout" target="_blank">
<img width="300" src="https://scout-files.azureedge.net/media-kit/pbs-t.svg" alt="Powered by Scout" />
</a>
@jamesdixon
jamesdixon / pbs-b-logo.html
Last active April 24, 2017 18:18
Scout Logo: dark text + blue circle
<a href="https://scoutforpets.com" title="Powered by Scout" target="_blank">
<img width="300" src="https://scout-files.azureedge.net/media-kit/pbs-b.svg" alt="Powered by Scout" />
</a>
@jamesdixon
jamesdixon / pbs-g-logo.html
Created April 24, 2017 18:18
Scout Logo: dark text + green circle
<a href="https://scoutforpets.com" title="Powered by Scout" target="_blank">
<img width="300" src="https://scout-files.azureedge.net/media-kit/pbs-g.svg" alt="Powered by Scout" />
</a>
@jamesdixon
jamesdixon / controllers.application.js
Last active April 16, 2019 23:07
power-calendar-multiple-test
import Controller from '@ember/controller';
import { computed } from '@ember/object';
import {
add,
} from 'ember-power-calendar-utils';
export default Controller.extend({
center: new Date('2016-05-17'),
selected: null,