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>
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. | |
# |