Skip to content

Instantly share code, notes, and snippets.

View sdhull's full-sized avatar
🏃
Gettin it

Steve Hull sdhull

🏃
Gettin it
View GitHub Profile
.css-selector {
    background: linear-gradient(290deg, #5510ff, #af37ff);
    background-size: 400% 400%;
    -webkit-animation: AnimationName 0s ease infinite;
    -moz-animation: AnimationName 0s ease infinite;
    -o-animation: AnimationName 0s ease infinite;
    animation: AnimationName 0s ease infinite;
}
@-webkit-keyframes AnimationName {
    0%{background-position:0% 50%}
@sdhull
sdhull / components.doc-marker.js
Last active October 24, 2019 21:41
mobiledoc renderer
import Ember from 'ember';
export default Ember.Component.extend({
});
import Ember from 'ember';
import { computed } from '@ember/object';
const nsfw = ['nudity', 'violence', 'vulgarity', 'drug use', 'socialism', 'dangerous ideas'];
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
nsfwTags: computed('post.tags.nsfw.[]', function() {
return this.post.get('tags.nsfw');
}),
@sdhull
sdhull / components.my-component.js
Last active February 19, 2019 02:30
angle bracket splattributes vs attrs
import Ember from 'ember';
export default Ember.Component.extend({
tagName: '',
});
@sdhull
sdhull / adapters.application.js
Created September 6, 2018 06:02
push vs pushPayload
import DS from 'ember-data';
export default DS.JSONAPIAdapter.extend({
namespace: '/api'
});
@sdhull
sdhull / components.child-a.js
Created August 29, 2018 19:17
Inheritable Component layout?
import Parent from './my-component';
export default Parent.extend({
});
@sdhull
sdhull / components.input-list.js
Created July 11, 2018 19:56
Array manager component?
import Ember from 'ember';
export default Ember.Component.extend({
actions: {
updateItem(index, event) {
this.list.set(index, event.target.value);
if(this.list[this.list.length-1] !== '') {
this.list.addObject('');
}
},
@sdhull
sdhull / controllers.application.js
Last active June 30, 2018 04:11
ED 3.1.1 bug repro
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
@sdhull
sdhull / node.rb
Last active January 16, 2018 18:45
class Node < ApplicationRecord
# class that implements materialized path hierarchy
# a la https://medium.com/notes-from-a-messy-desk/representing-trees-in-postgresql-cbcdae419022
# Normal associations don't work
#
# has_many :children, ->(node) { where(path: node.path + [node.id]) }, class_name: "Node", foreign_key: nil
# primary_key: nil,
# inverse_of: :parent
# belongs_to :parent, ->(node) { find_by_sql(id: node.path.last) },
Verifying my Blockstack ID is secured with the address 1eit6KcnTa44QiyT5qHzAQhaCb4dLvcTd https://explorer.blockstack.org/address/1eit6KcnTa44QiyT5qHzAQhaCb4dLvcTd