Skip to content

Instantly share code, notes, and snippets.

View leegee's full-sized avatar

Lee Goddard leegee

View GitHub Profile
@Ircama
Ircama / LgMagicRemoteKeys.md
Last active November 15, 2024 17:26
Replacing Netflix and Amazon keys of the webOS LG TV LG Magic Remote with other apps

Replacing Netflix and Amazon keys of the webOS LG TV LG Magic Remote with other apps

This procedure allows substituting one or both Netflix and Amazon keys of the Magic Remote Control Unit with other apps or TV control menus of the webOS LG TV.

Netflix and Amazon keys can be found just over the Red-Green-Yellow-Blue color buttons of such remote.

Assumption for this procedure is that you accept to uninstall the apps related to the keys to be substituted. Example: if you want to replace the Netflix key, you need to uninstall Netflix (possibly, you are not using Netflix if you do not need such key).

To uninstall Netflix or Amazon Prime, press the Home key of the Magic Remote, select the "LG Content Store" app, press "APP" at the top of the screen, press "My Apps", press the "Rem

@npearce
npearce / install-docker.md
Last active November 11, 2024 13:09
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command

UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.

Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/

Docker CE Install

sudo amazon-linux-extras install docker
sudo service docker start
@umarov
umarov / index.ts
Created December 3, 2017 19:02
Polymer 3 with Webpack and TypeScript
import { OTUser, OTUserProvider, OTUserDetails } from './ot-user/ot-user'
import { OTFooter } from './ot-footer/ot-footer'
import { OTTopNav, OTTopNavSection, OTTopNavSubSection } from './ot-top-nav/ot-top-nav'
customElements.define('ot-user', OTUser)
customElements.define('ot-user-provider', OTUserProvider)
customElements.define('ot-user-details', OTUserDetails)
customElements.define('ot-footer', OTFooter)
@AdaRoseCannon
AdaRoseCannon / HTMLElementPlus.js
Last active March 3, 2023 11:33
HTML Element Plus for Web Components
'use strict';
class HTMLElementPlus extends HTMLElement {
static defaultAttributeValue() {
/* the name of the attribute is parsed in as a parameter */
return;
}
static parseAttributeValue(name, value) {
@pahund
pahund / setup.js
Last active April 20, 2022 04:35
Using Chai and Jest assertions together with Jest's expect (thanks Ruben Oostinga!)
import chai from 'chai';
import sinonChai from 'sinon-chai';
import chaiAsPromised from 'chai-as-promised';
import chaiEnzyme from 'chai-enzyme';
chai.use(sinonChai);
chai.use(chaiAsPromised);
chai.use(chaiEnzyme());
// Make sure chai and jasmine ".not" play nice together
@olanod
olanod / templates.js
Last active September 26, 2024 12:49
Simple template loader. A global object that loads and caches templates.
const templates = Object.create(null, {
load: {
value: async function(fileName) {
const url = new URL(fileName,
document.currentScript && document.currentScript.src || location.href)
if (url in this) return this[url]
// fetch and parse template as string
let template = await fetch(url)
template = await template.text()
template = new DOMParser().parseFromString(template, 'text/html')
@ndelangen
ndelangen / child.js
Last active December 5, 2022 18:38
NodeJS child_process communication (IPC) example
if (process.send) {
process.send("Hello");
}
process.on('message', message => {
console.log('message from parent:', message);
});
@ludwig
ludwig / logger.js
Created August 25, 2016 10:10 — forked from transitive-bullshit/logger.js
winston logger with filename:linenumber
// NOTE: this adds a filename and line number to winston's output
// Example output: 'info (routes/index.js:34) GET 200 /index'
var winston = require('winston')
var path = require('path')
var PROJECT_ROOT = path.join(__dirname, '..')
var logger = new winston.logger({ ... })
// this allows winston to handle output from express' morgan middleware
@ebidel
ebidel / app.html
Last active May 1, 2021 15:42
Fast Polymer app loading - optimized for first render, progressively enhanced lazy loading
<!DOCTYPE html>
<html>
<head>
<style>
body.loading #splash {
opacity: 1;
}
#splash {
position: absolute;
top: 0;
@anvk
anvk / deep_extend_javascript_objects.js
Last active September 19, 2020 04:01
Deep Extend for Javascript Objects (my polyfill for _.merge() function)
/* MIT license
* 2015 Alexey Novak
*
* Inspired by http://youmightnotneedjquery.com/ with few of my own modifications
*
**/
var deepExtend = function(out) {
out = out || {};