Skip to content

Instantly share code, notes, and snippets.

import Ember from 'ember';
export default Ember.Component.extend({
html: `<div>
<img src="https://via.placeholder.com/350x150" width="350" height="150" alt="Placeholder" />
</div>`,
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
@mansona
mansona / components.x-hint\.js
Created March 22, 2021 14:16
Testing Ember Component
import Component from '@ember/component';
export default class extends Component {
}
@mansona
mansona / clear-github-notifications.js
Created May 12, 2021 22:18
This is a super simple snippet that I paste into my browser console to clear github notifications. Once It has been run once I just push up-enter-up-enter until they are all gone!
let foundStuff = false;
let items = document.querySelectorAll('li.notifications-list-item')
items.forEach((item) => {
if(item.querySelector('img.avatar-user[alt="@dependabot-preview[bot]"]') || item.querySelector('img.avatar-user[alt="@dependabot[bot]"]') || item.querySelector('img.avatar-user[alt="@renovate[bot]"]')) {
console.log('did find one');
foundStuff = true;
item.querySelector('input[type="checkbox"]').click();
}
});
<style>
/* defintion */
--red-6: darkred;
/* use */
h1 {
color: var(--red-6);
}
</style>