Skip to content

Instantly share code, notes, and snippets.

View brendanoh's full-sized avatar
🎯
Focusing

Brendan OHara brendanoh

🎯
Focusing
View GitHub Profile
{"lastUpload":"2020-04-28T16:47:30.716Z","extensionVersion":"v3.4.3"}
@brendanoh
brendanoh / learning-svelte-sapper.md
Created January 4, 2020 18:37
Learning Svelte & Sapper
@brendanoh
brendanoh / index.html
Created January 7, 2019 04:21
Social Login Button
<div class="login-box">
<h2>Social Login Button</h2>
<a href="#" class="social-button" id="facebook-connect"> <span>Connect with Facebook</span></a>
<a href="#" class="social-button" id="google-connect"> <span>Connect with Google</span></a>
<a href="#" class="social-button" id="twitter-connect"> <span>Connect with Twitter</span></a>
<a href="#" class="social-button" id="linkedin-connect"> <span>Connect with LinkedIn</span></a>
</div>
@brendanoh
brendanoh / company.js
Created October 2, 2017 17:24
The files below show the use of a `locatable-model` Mixin, along with the `ember-cli-g-maps` AddOn to allow any and all objects in an Ember App to be locatable.
import Model from 'ember-data/model';
import attr from 'ember-data/attr';
import locatableModel from 'foundingphilly/mixins/locatable-model';
export default Model.extend(locatableModel, {
name: attr('string'),
domain: attr('string')
});
import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'td'
});
import Ember from 'ember';
const computed = Ember.computed;
export default Ember.Component.extend({
value: 0,
min: 1,
max: 5,
starClass: "white-text",
stars: computed('min', 'max', 'value', function() {
@brendanoh
brendanoh / controllers.application.js
Created August 16, 2016 00:35 — forked from poteto/controllers.application.js
ember-changeset-validations demo
import Ember from 'ember';
import AdultValidations from '../validations/adult';
import ChildValidations from '../validations/child';
import { reservedEmails } from '../validators/uniqueness';
const { get } = Ember;
export default Ember.Controller.extend({
AdultValidations,
ChildValidations,
reservedEmails,
@brendanoh
brendanoh / controller.js
Last active March 5, 2017 21:07
This is a GIST to explain a workaround to the lack of case insensitive or partial text search on the server side via the Emberfire add-on.
import Ember from 'ember';
import computed from 'ember-new-computed';
const inject = Ember.inject;
const alias = computed.alias;
const sort = computed.sort;
export default Ember.Controller.extend({
sessionManager: inject.service(),
person: alias('sessionManager.person'),