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
#!/bin/bash | |
mkdir -p alac | |
for flac_file in ./*.flac; do | |
base_name=$(basename "$flac_file" .flac) | |
alac_file="./alac/$base_name.m4a" | |
echo ffmpeg -i "$flac_file" -map 0:a -c:a alac "$alac_file" | |
ffmpeg -i "$flac_file" -map 0:a -c:a alac "$alac_file" | |
done |
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
#!/bin/bash | |
# Usage: eval "$(bin/dot-env)" | |
set -eo pipefail | |
PROJECT=$(git rev-parse --show-toplevel) | |
for f in ${PROJECT}/.env.*; do | |
echo "# ${f}" |
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
python3 rebuild_db3.py Music/ |
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
import { mdx } from './mdx.ts' | |
import renderToString from 'preact-render-to-string' | |
import { type FunctionalComponent } from 'preact' | |
const MDXContent = await mdx(new URL('./test.mdx', import.meta.url)) | |
const Page: FunctionalComponent = ({ children }) => ( | |
<html lang='en'> | |
<head> | |
<title>Example MDX page</title> |
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
<!doctype html> | |
<html> | |
<head> | |
<meta charset=utf-8> | |
<style> | |
@keyframes rotate { | |
0% { | |
transform: rotate(0); | |
} | |
50% { |
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
local threads = {} | |
function setup(thread) | |
-- track each thread | |
table.insert(threads, thread) | |
end | |
function init(args) | |
-- thread local statuses table | |
statuses = {["100"] = 0} |
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
// Example usage: | |
// <script type="module" src="./html-import.js"></script> | |
// <html-import href="./example.html" runscripts></html-import> | |
// <!-- now we can use the component defined from example.html --> | |
// <example-custom-element><p>This paragraph will be slotted.</p></example-custom-element> | |
export class HTMLImport extends HTMLElement { | |
static { | |
customElements.define('html-import', this) | |
} |
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
defmodule ExtInteger do | |
defimpl Collectable, for: Integer do | |
@doc """ | |
Collect into: an integer | |
## Examples | |
iex> for n <- 1..5, into: 0, do: n | |
15 | |
""" |
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
import React from 'react' | |
/** | |
* A variant of `React.useState` which allows the `inputState` to change over time as well. | |
* Important: This hook is synchronous / single-render-pass (i.e. doesn't use `useEffect` or `setState` directly). | |
*/ | |
const useStateWithReactiveInput = <T>(inputState: T): [T, (newState: T | ((prev: T) => T)) => void] => { | |
const [_, rerender] = React.useState(0) | |
const stateRef = React.useMemo<{ current: T }>(() => ({ current: inputState }), []) |
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
Internal application error: TypeError: cannot read headers: request closed | |
at Object.get headerList (ext:deno_fetch/23_request.js:115:17) | |
at Request.request.<computed> (ext:deno_fetch/23_request.js:565:60) | |
at Request.get [headers] (ext:deno_fetch/23_request.js:252:46) | |
at Request.get headers (ext:deno_fetch/23_request.js:452:16) | |
at NativeRequest.get headers (https://deno.land/x/[email protected]/http_server_native_request.ts:72:26) | |
at new Request (https://deno.land/x/[email protected]/request.ts:150:21) | |
at new Context (https://deno.land/x/[email protected]/context.ts:172:20) | |
at Application.#handleRequest (https://deno.land/x/[email protected]/application.ts:450:17) | |
at Application.listen (https://deno.land/x/[email protected]/application.ts:656:28) |
NewerOlder