This file contains 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
// Name: ⌛ Presentation Timer | |
import '@johnlindquist/kit'; | |
import parse from 'parse-duration'; | |
let timer = await arg( | |
'Enter duration for timer (e.g. 3 [minutes], 90s, 15m30s)', | |
); | |
if (/^\d+$/.test(timer)) { |
This file contains 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
// Name: Presentation Timer | |
import '@johnlindquist/kit'; | |
import parse from 'parse-duration'; | |
let timer = await arg( | |
'Enter duration for timer (e.g. 3 [minutes], 90s, 15m30s)', | |
); | |
if (/^\d+$/.test(timer)) { |
This file contains 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
// Name: Jira Search | |
import '@johnlindquist/kit'; | |
import { adfConvert } from '../lib/adf-convert'; | |
import { encodeToBase64Node } from '../lib/base64'; | |
import { Jira } from '../lib/jira'; | |
const ATLASSIAN_EMAIL = await env('ATLASSIAN_EMAIL', async () => { | |
return await arg('Enter your jira email address'); | |
}); |
This file contains 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
// Name: Jira Search | |
import '@johnlindquist/kit'; | |
import { adfConvert } from '../lib/adf-convert'; | |
import { encodeToBase64Node } from '../lib/base64'; | |
import { Jira } from '../lib/jira'; | |
const ATLASSIAN_EMAIL = await env('ATLASSIAN_EMAIL', async () => { | |
return await arg('Enter your jira email address'); | |
}); |
This file contains 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
// Name: Jira Search | |
import '@johnlindquist/kit'; | |
import { Buffer } from 'buffer'; | |
function adfConvert(node) { | |
switch (node.type) { | |
case 'doc': | |
return node.content.map((node) => adfConvert(node)).join('\n\n'); |
This file contains 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
// Name: Presentation Timer | |
import '@johnlindquist/kit'; | |
import parse from 'parse-duration'; | |
let timer = await arg( | |
'Enter duration for timer (e.g. 3 [minutes], 90s, 15m30s)', | |
); | |
if (/^\d+$/.test(timer)) { |
This file contains 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
// Name: Open Project | |
import '@johnlindquist/kit'; | |
import { Dirent } from 'fs'; | |
export type ScriptDir = Dirent & { path: string }; | |
let dir1 = await readdir(home('git/studiox'), { withFileTypes: true }); | |
let dir2 = await readdir(home('git/public'), { withFileTypes: true }); | |
let dirs = [...dir1, ...dir2] |
This file contains 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
$.ajaxPrefilter(function (options, originalOptions, jqXHR) { | |
// Don't infinitely recurse | |
originalOptions._retry = isNaN(originalOptions._retry) | |
? Common.auth.maxExpiredAuthorizationRetries | |
: originalOptions._retry - 1; | |
// set up to date authorization header with every request | |
jqXHR.setRequestHeader("Authorization", Common.auth.getAuthorizationHeader()); | |
This file contains 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
function jsonProxyDo(jsonDataModel, callback, errorback) { | |
$.ajax({ | |
type: "POST", | |
dataType: "json", | |
url: settings.jsonProxyAddress, | |
data: $.param({ 'd': JSON.stringify({ | |
'Data': JSON.stringify(jsonDataModel), | |
'BaseAddress': settings.endpoint, | |
'ServiceName': 'SomeService.svc/js/', | |
'MethodName': 'SomeMethod' }) |