Skip to content

Instantly share code, notes, and snippets.

View seanCodes's full-sized avatar

Sean Juarez seanCodes

View GitHub Profile
@seanCodes
seanCodes / controllers.application\.js
Created April 27, 2021 07:57
Inconsistent sorted list
import { inject as service } from '@ember/service';
import Controller from '@ember/controller';
export default class ApplicationController extends Controller {
@service
store;
get sortedTodos() {
return this.model.sortBy('isDone');
}
@seanCodes
seanCodes / markdown-in-page-link-test.md
Last active July 4, 2020 22:23
GitHub-flavored Markdown In-Page Links
@seanCodes
seanCodes / controllers.application\.js
Last active June 16, 2020 04:55
Tracked Prop Test
import Controller from '@ember/controller';
import { inject as service } from '@ember/service';
import { action } from '@ember/object';
export default class ApplicationController extends Controller {
@service session;
get isUserAuthenticated() {
return this.session.isAuthenticated;
}
<div
class="toast {{if this.isShown "show"}}"
role="alert"
aria-live="assertive"
aria-atomic="true"
{{did-insert this.show}}
{{on-transition-end "opacity" this.transitionEnd}}
>
<div class="toast-header">
<svg class="bd-placeholder-img rounded mr-2" width="20" height="20" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid slice" focusable="false" role="img">
@seanCodes
seanCodes / controllers.application.js
Created November 6, 2019 01:45
Whitespace Control Example
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
links: [
{ text: 'foo', url: '#' },
{ text: 'bar', url: '#' },
{ text: 'baz', url: '#' },
],
@seanCodes
seanCodes / jira-wiki-github-style.css
Last active February 8, 2019 01:57
Prettier JIRA wiki page styles (GitHub-flavored)
body,
.wiki-content { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-size: 16px; line-height: 1.5; word-wrap: break-word; color: rgb(51, 51, 51); }
.wiki-content p,
.wiki-content blockquote,
.wiki-content ul,
.wiki-content ol,
.wiki-content dl,
.wiki-content table,
.wiki-content pre,
.wiki-content .code.panel { margin-top: 0; margin-bottom: 16px; overflow: hidden; }
@seanCodes
seanCodes / property-order.css
Created July 12, 2016 20:51
My CSS property order preference
/**
* CSS property ordering for commonly used properties (not comprehensive).
* ** Note: The extra indentation is only for visual organization. **
*/
.property-order {
content: "";
width: auto;
height: auto;
background: url("") no-repeat 0 0/0 0 white;