Skip to content

Instantly share code, notes, and snippets.

View mike183's full-sized avatar

Michael Donaldson mike183

View GitHub Profile
@mike183
mike183 / adapters.application\.js
Last active August 17, 2020 18:15
LexasCMS Blog Example
// ===========================================================
// ===========================================================
//
// This is an example of a simple blog website which has been
// created using the following technologies:
//
// - LexasCMS (https://www.lexascms.com)
// - Ember.js (https://emberjs.com/)
// - TailwindCSS (https://tailwindcss.com/)
//
@mike183
mike183 / controllers.application.js
Last active November 29, 2016 13:53
Textarea Bug?
import Ember from 'ember';
export default Ember.Controller.extend({
textValue: 'Some random text value',
actions: {
addText() {
let textValue = this.get("textValue");
textValue += "[SOME MORE TEXT]";
@mike183
mike183 / application.template.hbs
Last active November 18, 2015 16:55
Contextual Components Positional Params Issue (Working)
{{#parent-component as |component|}}
{{component component.childComponent "param1" "param2"}}
{{/parent-component}}
@mike183
mike183 / application.template.hbs
Created November 18, 2015 16:37
Contextual Components Positional Params Issue (Not Working)
{{#parent-component as |component|}}
{{component.childComponent "param1" "param2"}}
{{/parent-component}}
@mike183
mike183 / application.template.hbs
Created November 4, 2015 11:13
Tagless Component Issue (Includes JS File)
{{some-component tagName=""}}
@mike183
mike183 / application.template.hbs
Last active January 4, 2017 20:21
Tagless Component Issue (No JS File)
{{some-component tagName=""}}
@mike183
mike183 / pagination.php
Last active December 30, 2015 20:19
A simple PHP function that can be used to generate pagination for use in a HTML template.
<?php
/**
* Generates an array of pages that could be used in an HTML template to
* create pagination links.
*
* @param integer $page
* @param integer $totalpages
* @param integer $spaces (change this value if you want to display more pages, this should be an odd number)
*