A Command custom attribute that handles click triggers that return a promise, disabling the element while the promise runs, and does basic progress reporting with Toastr.
Example usage:
<button command.call="submit()">Save</button>| {"name":"Presentation","icon":"preview","settings":"{\"settings\":\"{\\r\\n \\\"workbench.colorTheme\\\": \\\"GitHub Dark\\\",\\r\\n \\\"window.commandCenter\\\": false,\\r\\n \\\"workbench.layoutControl.enabled\\\": false,\\r\\n \\\"chat.commandCenter.enabled\\\": false,\\r\\n \\\"workbench.statusBar.visible\\\": false,\\r\\n \\\"workbench.activityBar.location\\\": \\\"hidden\\\",\\r\\n \\\"editor.fontFamily\\\": \\\"Cascadia Mono\\\",\\r\\n \\\"terminal.integrated.fontFamily\\\": \\\"Cascadia Mono\\\",\\r\\n \\\"editor.fontWeight\\\": \\\"600\\\",\\r\\n \\\"editor.fontSize\\\": 24,\\r\\n \\\"terminal.integrated.fontSize\\\": 24,\\r\\n \\\"terminal.integrated.fontWeight\\\": 800,\\r\\n \\\"editor.formatOnSave\\\": false,\\r\\n \\\"files.autoSave\\\": \\\"onFocusChange\\\"\\r\\n}\"}","extensions":"[{\"identifier\":{\"id\":\"github.github-vscode-theme\",\"uuid\":\"7328a705-91fc-49e6-8293-da6f112e482d\"},\"displayName\":\"GitHub Theme\",\"applicationScoped\":false},{\"i |
| import { expect } from 'chai' | |
| import { Logger } from 'tslog' | |
| import { TemplateLogger } from './template-logger' | |
| describe('Template Logger', () => { | |
| const logs: any[] = [] | |
| const baseLogger = new Logger({ type: 'hidden' }) | |
| baseLogger.attachTransport((logObj) => logs.push(logObj)) | |
| afterEach(function () { |
| # A simple wrapper function for the pattern of run a command and if the command succeeds | |
| # commit all the changes to git with a git commit message of the command line prefixed | |
| # with a wrench (🔧) | |
| function Invoke-GitExpression { | |
| param( | |
| [string[]] | |
| [Parameter(ValueFromRemainingArguments)] | |
| $Remaining | |
| ) |
| import { decode } from 'blurhash' | |
| import { useEffect, useState } from 'react' | |
| function useBlurhash (blurhash: string, width: number, height: number, punch: number = 1) { | |
| punch = punch || 1 | |
| const [url, setUrl] = useState(null as string | null) | |
| useEffect(() => { | |
| let isCancelled = false |
A Command custom attribute that handles click triggers that return a promise, disabling the element while the promise runs, and does basic progress reporting with Toastr.
Example usage:
<button command.call="submit()">Save</button>I hereby claim:
To claim this, I am signing this object:
| # Simple, stupid Wave Annotation Markup | |
| # Copyright 2010 Max Battcher. Licensed for use under the Ms-PL. | |
| from google.appengine.ext.webapp import template | |
| from waveapi import element | |
| import yaml | |
| def append_waml(blip, filename, context={}): | |
| """ | |
| Applies to the doc, which is expected to be a Wave API Document, the | |
| transforms specified in an appropriate data structure loaded from a |
| #!/usr/bin/python | |
| # Celtx HTML Film Script to Ren'Py Script Tool (Based on KeyLimePie tools) | |
| # Copyright 2010 Max Battcher. Some Rights Reserved. | |
| # Licensed for use under the Ms-PL. | |
| from BeautifulSoup import BeautifulSoup, Tag | |
| import logging | |
| def tagtext(contents): | |
| def txt(thing): | |
| if isinstance(thing, Tag): |
| # | |
| # textapp -- Combined SMS and IM dispatching | |
| # Copyright 2009 Max Battcher. All Rights Reserved. | |
| # | |
| # Microsoft Public License (Ms-PL) | |
| # | |
| # This license governs use of the accompanying software. If you use the | |
| # software, you accept this license. If you do not accept the license, | |
| # do not use the software. | |
| # |