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
#!/bin/bash | |
install_keri() { | |
if [[ ! -d .venv ]]; then | |
python3.12 -m venv .venv | |
fi | |
source .venv/bin/activate | |
pip install keri==1.2.4 |
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
console.log(`Hello Cygni!`); |
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
async function fetchJson(url) { | |
const response = await fetch(url); | |
if (!response.ok) { | |
throw new Error( | |
`GET ${url} ${response.status} - ${response.statusText} `, | |
); | |
} | |
return response.json(); | |
} |
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
export type MockImplementation<T = any, Y extends any[] = any> = ( | |
...args: Y | |
) => T; | |
export interface Mock<T = any, Y extends any[] = any> { | |
calls: Y[]; | |
reset(): void; | |
setImplementation(impl: MockImplementation<T, Y>): Mock<T, Y>; | |
} |
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
// https://github.com/microsoft/TypeScript/issues/30878 | |
// https://github.com/denoland/deno/issues/3089 | |
console.log(`${"dummy string"}`) | |
console.log(`import { foo } from "./bar.ts"`) |
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 algolia = require("algoliasearch") | |
const client = algolia(ALGOLIA_APPLICATIONID, ALGOLIA_APIKEY) | |
async function run() { | |
const source = client.initIndex("test-index-from") | |
const target = client.initIndex("test-index-to") | |
const task = await client.copyIndex(source.indexName, target.indexName) | |
await source.waitTask(task.taskID) | |
} |
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
// @ts-check | |
import { useState, useEffect } from 'react' | |
function getCurrentLocation () { | |
return { | |
pathname: window.location.pathname, | |
search: window.location.search | |
} | |
} |
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
// @ts-check | |
import { useState, useEffect } from 'react' | |
function getCurrentLocation () { | |
return { | |
pathname: window.location.pathname, | |
search: window.location.search | |
} | |
} |
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
// @ts-check | |
import { useState, useEffect } from 'react' | |
/** | |
* @param {() => AsyncIterableIterator<T>} iterator | |
* @param {T} [defaultValue] | |
* @returns {T} | |
* @template T | |
*/ | |
export function useIterator (iterator, defaultValue) { |
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
using NUnit.Framework; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace ClassLibrary2 | |
{ | |
[TestFixture] | |
public class TestFixture | |
{ |
NewerOlder