Skip to content

Instantly share code, notes, and snippets.

View phillipskevin's full-sized avatar

Kevin Phillips phillipskevin

View GitHub Profile
@phillipskevin
phillipskevin / approaches.md
Last active July 22, 2019 18:04
CanJS marketing approaches

Easy all the way down

Easy to get started

  • Load an mjs file, no build
  • Create a class
  • customElements.define
  • Works with everything

Easy to do the right thing

@phillipskevin
phillipskevin / index.html
Last active May 8, 2019 21:53
can-observe/make-prototype with stache
<!doctype html>
<button>-</button>
<script src="./node_modules/steal/steal.js" main></script>
@phillipskevin
phillipskevin / 0-readme.md
Last active July 7, 2022 18:02
chrome-extension-accessing-dom-and-window

Description

This gist shows two techniques for (simultaneously) accessing the DOM and the window from a Chrome extension

solution 1: eval aka the easy way

You can run arbitrary code in the page using chrome.devtools.inspectedWindow.eval( ... )

This solution is shown in the files below prefixed with 1-.

@phillipskevin
phillipskevin / index.html
Last active February 7, 2018 20:37
can-view-live memory leak
<!doctype html>
<script src="./node_modules/steal/steal.js"></script>
@phillipskevin
phillipskevin / index.html
Last active February 6, 2018 22:26
onteardown-test
<!doctype html>
<script src="./node_modules/steal/steal.js"></script>
@phillipskevin
phillipskevin / auto-automount.md
Last active January 8, 2018 21:14
auto-automount test

This tests the performance impact of "automount"ing automatically.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Lazy Values</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@phillipskevin
phillipskevin / _codemods
Last active October 26, 2017 14:59
codemods
This is a set of codemods
@phillipskevin
phillipskevin / local-donejs-everything
Last active February 9, 2017 14:53
run donejs cli commands with local copies of everything and debugging all the things
npm uninstall -g donejs-cli
cd path/to/donejs-cli
npm link
cd path/to/generator-donejs
npm link
DEBUG=* node --inspect --debug-brk /path/to/bin/donejs add app