Skip to content

Instantly share code, notes, and snippets.

@krisselden
krisselden / index.js
Created April 3, 2017 22:02
Chrome Code Coverage Automation
import * as fs from "fs";
import { createSession } from "chrome-debugging-client";
createSession(async (session) => {
let browser = await session.spawnBrowser("canary");
let api = await session.createAPIClient("localhost", browser.remoteDebuggingPort);
let tabs = await api.listTabs();
let tab = tabs[0];
let client = await session.openDebuggingProtocol(tab.webSocketDebuggerUrl);
await client.send("Profiler.enable");
@XVilka
XVilka / TrueColour.md
Last active April 8, 2024 14:02
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!

import DS from 'ember-data';
import {RSVP} from 'ember';
var Adapter = DS.RESTAdapter.extend({
namespace: 'api/v1',
findAll: function(store, type, sinceToken) {
var url = this.buildURL(type.typeKey);
var cached = localStorage.getItem(url);
QUnit.config.testTimeout = 4000;
/*global $ App*/
Ember.onLoad('application', function(application) {
//application.deferReadiness();
});
Ember.onLoad('Ember.Application', function(Application) {
Application.initializer({
name: 'tests',
@machty
machty / router-facelift-guide.md
Last active November 11, 2023 06:44
Guide to the Router Facelift

Ember Router Async Facelift

The Ember router is getting number of enhancements that will greatly enhance its power, reliability, predictability, and ability to handle asynchronous loading logic (so many abilities), particularly when used in conjunction with promises, though the API is friendly enough that a deep understanding of promises is not required for the simpler use cases.

@machty
machty / new-router-examples.md
Last active April 16, 2020 22:03
How to do cool stuff with the new Router API
@ronkorving
ronkorving / ios6-timers.js
Last active March 9, 2022 03:40
iOS6 webkit timer bug workaround
(function (window) {
// This library re-implements setTimeout, setInterval, clearTimeout, clearInterval for iOS6.
// iOS6 suffers from a bug that kills timers that are created while a page is scrolling.
// This library fixes that problem by recreating timers after scrolling finishes (with interval correction).
// This code is released in the public domain. Do with it what you want, without limitations. I do not promise
// that it works, or that I will provide support (don't sue me).
// Author: rkorving@wizcorp.jp
var timeouts = {};
@nesquena
nesquena / caveatPatchor.js
Created May 17, 2011 00:37
propane_extensions
/*
As of version 1.1.2, Propane will load and execute the contents of
~/Library/Application Support/Propane/unsupported/caveatPatchor.js
immediately following the execution of its own enhancer.js file.
You can use this mechanism to add your own customizations to Campfire
in Propane.
Below you'll find two customization examples.