CARVIEW |
Select Language
HTTP/2 200
date: Tue, 29 Jul 2025 06:24:31 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
etag: W/"709b46c399e7da87866ad03bbf8794c0"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: origin-when-cross-origin, strict-origin-when-cross-origin
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=ARpSQZb9zc2rv4d3OLsTxU%2Ffhh%2FXhFoBlwprUda3tM1syT5ntNN23r88W4NvndTbJhtrMZpz0qQddgzT2MQjaPNSWwzQCfACyDE9TV6d4xOxHjA4w7YjjYnwwKB0VSZZp2NtBiIs9vvDtKa6fwsuLHOVTay1%2FrkWJFhP2TggXRlve8QOYreKIKPpwXT4iFM4k5X%2FLNmWM%2BPnNyY8haY8vvdpNCX3YTT3UZc49FLXl7t4JksskobWhMsCFLoUrSxzZjZCgEw4L1%2BPGra5KOkYSQ%3D%3D--5rloED2gXfrZiY%2BM--V6QHdl7cyM2Vfj9insVxHA%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.1405796852.1753770270; Path=/; Domain=github.com; Expires=Wed, 29 Jul 2026 06:24:30 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Wed, 29 Jul 2026 06:24:30 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: 8E5A:B13D1:45DE22:5B6207:6888691E
TooTallNate’s gists · GitHub
View GitHub Profile
{{ message }}
Instantly share code, notes, and snippets.
- San Francisco, CA
- https://n8.io
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
// These source values are seen in other open source repos: | |
// - https://github.com/blawar/tinleaf/blob/3363538600e47e1862d64d265dab1a031b32d037/include/util/crypto.hpp#L41-L42 | |
// - https://github.com/ITotalJustice/sphaira/blob/0370e47f7fac0e426675624f363fe50f3b442048/sphaira/source/owo.cpp#L339-L346 | |
const headerKekSource = new Uint8Array([ | |
0x1f, 0x12, 0x91, 0x3a, 0x4a, 0xcb, 0xf0, 0x0d, 0x4c, 0xde, 0x3a, 0xf6, | |
0xd5, 0x23, 0x88, 0x2a, | |
]); | |
const headerKeySource = new Uint8Array([ | |
0x5a, 0x3e, 0xd8, 0x4f, 0xde, 0xc0, 0xd8, 0x26, 0x31, 0xf7, 0xe2, 0x5d, | |
0x19, 0x7b, 0xf5, 0xd0, 0x1c, 0x9b, 0x7b, 0xfa, 0xf6, 0x28, 0x18, 0x3d, |
TooTallNate
/ vc-files.sh
Last active
September 5, 2022 21:54
Uploads a single file as a Now deployment
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 | |
set -euo pipefail | |
input="$1" | |
shift | |
files_dir="$HOME/files" | |
mkdir -p "$files_dir" | |
# Delete old files | |
rm -f "$files_dir"/* |
TooTallNate
/ convert_to_hevc.sh
Last active
March 24, 2020 03:32
Transcodes input video file to use the h265/HEVC codec
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 | |
# Transcodes input video file to use the h265/HEVC codec. | |
# Outputs the same filename but with x264/h264/xvid/etc. replaced with HEVC. | |
sed=sed | |
if type gsed >/dev/null 2>&1; then | |
sed=gsed | |
fi | |
get_streams() { |
TooTallNate
/ on-macos.txt
Created
February 11, 2020 19:43
Does anyone know why this script takes >2s to receive the `error` event on Windows? On MacOS it's essentially instant…
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
$ time node slow-windows-error.js | |
Error: connect ECONNREFUSED 127.0.0.1:4 | |
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1134:16) { | |
errno: 'ECONNREFUSED', | |
code: 'ECONNREFUSED', | |
syscall: 'connect', | |
address: '127.0.0.1', | |
port: 4 | |
} |
TooTallNate
/ add.sh
Created
September 1, 2018 02:45
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
add() { | |
expr "$1" + "$2" | |
} |
TooTallNate
/ test.sh
Created
August 15, 2018 17:46
Running `shakedown` HTTP unit tests through `import`
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
#!/usr/bin/env bash | |
eval "`curl -sfLS import.pw`" | |
import "import.pw/robwhitby/shakedown" # load the framework | |
shakedown GET /foo # make a GET request | |
status 404 # assert on http status code | |
content_type 'text/html' # assert Content-Type header contains string | |
contains 'Not found' # assert body contains string | |
matches 'No.*' # assert body matches regex |
TooTallNate
/ test.sh
Created
August 14, 2018 20:19
Running `shunit2` shell script tests through `import`
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/sh | |
testEquality() { | |
assertEquals 1 2 | |
} | |
# Load shUnit2. | |
eval "`curl -sfLS import.pw`" | |
import "import.pw/kward/shunit2" |
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
# This is the "base image" which contains Alpine Linux and Node.js v10.x.x preinstalled | |
FROM mhart/alpine-node:10 | |
# Use the `NPM_TOKEN` build arg to create the `~/.npmrc` file | |
ARG NPM_TOKEN | |
RUN echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc | |
# Set the working direcrory to `/usr/src` | |
WORKDIR /usr/src |
TooTallNate
/ add.sh
Created
June 23, 2018 17:22
Basic "add" function for bash, for demonstration purposes
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
add() { | |
echo "$(( $1 + $2 ))" | |
} |
TooTallNate
/ jsfunc.sh
Created
June 20, 2018 05:37
Write JavaScript functions - use as bash functions
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 | |
jsfunc() { | |
local code="$(cat)" | |
local fn="$(cat <<EOFF | |
$1() { | |
node <(cat <<EOF | |
require('stream').Readable.prototype.then = function (...args) { return new Promise((res, rej) => { const bufs = []; this.on('error', rej).on('data', buf => bufs.push(buf)).on('end', () => res(Buffer.concat(bufs))); }).then(...args) }; | |
(async () => { | |
${code} | |
})().then(val => typeof val !== 'undefined' && console.log(typeof val === 'string' ? val : JSON.stringify(val, null, 2))).catch(err => console.error(err.stack) || process.exit(1)); |
NewerOlder
You can’t perform that action at this time.