This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const {createJestRunner} = require('create-jest-runner') | |
| module.exports = createJestRunner(require.resolve('./node-runner')) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| addEventListener('fetch', event => { | |
| event.respondWith(handleRequest(event.request)) | |
| }) | |
| const CLIENT_ID = '<your client ID>' | |
| const CLIENT_SECRET = '<your client Secret>' | |
| async function handleRequest(request) { | |
| if (request.method === 'GET') { | |
| return new Response(`$ curl -XPOST -H'Content-Type: application/json' -d'{"code": "<your oauth code>"}' ${request.url}`) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const colors = [ | |
| 'transparent', // transparent | |
| '#000', // black | |
| '#fff', // white | |
| // gray | |
| '#f7fafc', // 100 | |
| '#edf2f7', // 200 | |
| '#e2e8f0', // 300 | |
| '#cbd5e0', // 400 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| declare module 'ember-cli-fastboot/services/fastboot' { | |
| import Service from '@ember/service'; | |
| interface Request { | |
| method: string; | |
| body: unknown; | |
| cookies: unknown; | |
| headers: unknown; | |
| queryParams: unknown; | |
| path: string; |
A syntax we are widely used to write is markdown, which also has a syntax to write blocks of code. In this variant of a potential SFC thingy, the only allowed "top-level-syntaxes" are code blocks. Based on the language they are assigned script, template or style. Everything other than code blocks is ignored (= comment)
References
The instructions below apply to older versions of Homebrew which still provide switch capability.
For current Homebrew, you'll likely need to keep Versions around, and build locally. Here's my versions repository https://github.com/rdump/homebrew-versions
MacPorts is now keeping versioned installations available as well, by default.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * @module ember-paper | |
| */ | |
| /* globals FastBoot */ | |
| import { inject as service } from '@ember/service'; | |
| import Component from '@ember/component'; | |
| import { computed } from '@ember/object'; | |
| import { run } from '@ember/runloop'; | |
| import TransitionMixin from 'ember-css-transitions/mixins/transition-mixin'; | |
| import { invokeAction } from 'ember-invoke-action'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * A higher-order microstate that takes a validation function, and returns | |
| * a field class that validates the input of that field based on inputs. | |
| */ | |
| export function Field(validationFn) { | |
| return class Field extends String { | |
| get validation() { | |
| return validationFn(valueOf(this)); | |
| } | |
| get hasErrors() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Timer from 'simple-timer'; | |
| import Component from '@glimmer/component'; | |
| import { } from '@glimmer/tracking'; | |
| export default class TimerComponent extends Component { | |
| constructor() { | |
| // Mark the timer as "untracked" (i.e., we're asserting | |
| // that timer contains no interior tracked properties at all). | |
| // This function gives us back the timer as well as a callback | |
| // function to call when any interior mutation may have occurred. |