Skip to content

Instantly share code, notes, and snippets.

import Component from '@glimmer/component';
import { inject as service } from '@ember/service';
export default class extends Component {
@service myService;
get bar() {
console.log(this.myService);
console.log(this.args.otherThing);
console.log(this.args.itemComponent);
@rlivsey
rlivsey / components.my-component\.js
Last active September 2, 2020 17:01
Pinned scroll
import Component from '@glimmer/component';
import { tracked } from "@glimmer/tracking";
import { action } from "@ember/object";
export default class extends Component {
@tracked items
constructor() {
super(...arguments);
@rlivsey
rlivsey / git-prune-tags.rb
Created March 26, 2010 15:47
Script to prune any tags which exist locally but not on the remote
#!/usr/bin/env ruby
require 'readline'
def prompt(prompt="> ")
input = nil
prompt += " " unless prompt =~ /\s$/
loop do
input = Readline.readline(prompt)
break if input.length > 0
end
@rlivsey
rlivsey / sshconfig
Created February 2, 2012 11:19
Can't SSH tunnel using aliases
# ~/.ssh/config
Host linode_server
HostName 178.79.138.66
@rlivsey
rlivsey / pdf_generator.rb
Created June 28, 2012 10:22
HTML -> PDF with JRuby and Flying Saucer
require 'java'
require 'flying_saucer'
java_import org.xhtmlrenderer.pdf.ITextRenderer
class PDFGenerator
def self.generate(html)
new(html).generate
end
@rlivsey
rlivsey / ember-fest-2018.md
Last active October 19, 2018 15:11
Ember Fest 2018
@rlivsey
rlivsey / controllers.application.js
Created September 18, 2018 13:21
Sticky Query Params Issue
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
@rlivsey
rlivsey / controllers.application.js
Last active September 18, 2018 12:20
New Twiddle
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
import Ember from 'ember';
export default Ember.Controller.extend({
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});