Skip to content

Instantly share code, notes, and snippets.

View kurtisdunn's full-sized avatar

Kurtis Dunn kurtisdunn

View GitHub Profile
@kurtisdunn
kurtisdunn / comparison.md
Created January 16, 2016 00:55 — forked from makmanalp/comparison.md
Angular vs Backbone vs React vs Ember notes

Note: these are pretty rough notes I made for my team on the fly as I was reading through some pages. Some could be mildly inaccurate but hopefully not terribly so. I might resort to convenient fiction & simplification sometimes.

My top contenders, mostly based on popularity / community etc:

  • Angular
  • Backbone
  • React
  • Ember

Mostly about MVC (or derivatives, MVP / MVVM).

@kurtisdunn
kurtisdunn / README.md
Created January 6, 2016 07:01
FizzBuzz

####FizzBuzz.js

@kurtisdunn
kurtisdunn / forums.md
Last active January 6, 2016 06:24
Drupal 8 Forums with REST

##Drupal 8 REST End Points and Examples

Headers

####POST to Forums

@kurtisdunn
kurtisdunn / post.json
Last active December 9, 2015 05:57
Drupal 8 REST POST Requests
//Create a new forum topic
http://d8.dev:3000/entity/node?_format=hal_json
{
"_links": {
"type": {
"href": "http://d8.dev/rest/type/node/forum"
}
},
@kurtisdunn
kurtisdunn / readme.md
Last active January 6, 2016 06:23
BackboneJS Sort Collection asc/desc

####BackboneJS Sort Collection asc/desc

@kurtisdunn
kurtisdunn / readme.md
Last active November 27, 2015 11:02
Use Twig Template stuff

Useful TWIG stuff for Drupal 8

@kurtisdunn
kurtisdunn / Gruntfile.js
Last active November 21, 2015 05:20
Drupal 8 - GruntJS - SASS - BrowserSync
'use strict';
module.exports = function(grunt) {
// show elapsed time at the end
require('time-grunt')(grunt);
grunt.initConfig({
notify_hooks: {
options: {
enabled: true,
@kurtisdunn
kurtisdunn / functions.php
Created November 12, 2015 11:54
Example WordPress functions.php
<?php
function site_resources() {
wp_enqueue_style( 'bootstrap-options-style', get_template_directory_uri() . '/css/bootstrap.min.css' );
wp_enqueue_style( 'custom-options-style', get_template_directory_uri() . '/css/custom.min.css' );
wp_enqueue_style( 'font-awesome-options-style', get_template_directory_uri() . '/bower_components/font-awesome/css/font-awesome.min.css' );
wp_enqueue_style( 'animate-options-style', get_template_directory_uri() . '/bower_components/animate.css/animate.min.css' );
}
add_action('wp_enqueue_scripts', 'vitalConsult_resources');
@kurtisdunn
kurtisdunn / gulpfile.js
Last active March 22, 2019 11:24
Gulp Config for Drupal 8, Drush, SASS & BrowserSync.
/rest//*global -$ */
'use strict';
var gulp = require('gulp');
var sass = require('gulp-sass');
var mainBowerFiles = require('main-bower-files');
var $ = require('gulp-load-plugins')();
var browserSync = require('browser-sync');
var reload = browserSync.reload;
// Error notifications
@kurtisdunn
kurtisdunn / backboneViewTemplates.js
Last active November 6, 2015 02:46
Backbone.js Views - Template Loader.
fetchTemplates: function() {
var that = this;
var templatesCollection = new TemplatesCollection();
switch (window.location.pathname) {
case '/':
templatesCollection.fetch({
url: '/api/template/home',
success: function(rsp) {
//Set Template
templateName = 'Home';