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
#### | |
# ZSH function to auto-switch to correct Node version | |
# https://gist.github.com/callumlocke/30990e247e52ab6ac1aa98e5f0e5bbf5 | |
# | |
# - Searches up your directory tree for the closest .nvmrc, just like `nvm use` does. | |
# | |
# - If you are already on the right Node version, IT DOES NOTHING, AND PRINTS NOTHING. | |
# | |
# - Works correctly if your .nvmrc file contains something relaxed/generic, | |
# like "4" or "v12.0" or "stable". |
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
#!/usr/bin/env bash | |
http --body https://swd.weatherflow.com/swd/rest/locations/126636\?api_key\=a8f5dbda-af0a-4b57-99b9-f10baa88f27b\&build\=83\&include_arbitrary_locations\=true\&_\=1703136139243 | |
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 type { Config } from '@jest/types'; | |
import nextJest from 'next/jest'; | |
const createJestConfig = nextJest({ | |
// Provide the path to your Next.js app to load next.config.js and .env files in your test environment | |
dir: './', | |
}); | |
// Add any custom config to be passed to Jest | |
const customJestConfig: Config.InitialOptions = { |
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
#tests/pages/api/csv.test.ts | |
import { createMocks } from 'node-mocks-http'; | |
import handler from '../../../src/pages/api/csv'; | |
describe('/api/csv', () => { | |
test('returns Observations object', async () => { | |
const { req, res } = createMocks({ | |
method: 'GET', | |
query: { |
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
/* | |
* A Geolocation object | |
* | |
* Note: Uses GPS or similar hardware for data if available through | |
* the browser, but will fall back to using (Google) geolocation | |
* services with current IP address automatically. | |
* | |
* @property {boolean} supported If the geolocation functions are available in the current context | |
* @property {function} onsuccess The function to be called if the geolocation services are successful | |
* @property {function} onerror The function to be called if an error occurs |
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
// This file was initially generated by Windows Terminal 1.2.2381.0 | |
// It should still be usable in newer versions, but newer versions might have additional | |
// settings, help text, or changes that you will not see unless you clear this file | |
// and let us generate a new one for you. | |
// To view the default settings, hold "alt" while clicking on the "Settings" button. | |
// For documentation on these settings, see: https://aka.ms/terminal-documentation | |
{ | |
"$schema": "https://aka.ms/terminal-profiles-schema", |
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"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> |
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
[4/5] ⠁ sharp | |
error /Users/ivan/dev/gatsby-starter-reasonml-2/node_modules/sharp: Command failed. | |
Exit code: 1 | |
Command: (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy) | |
Arguments: | |
Directory: /Users/ivan/dev/gatsby-starter-reasonml-2/node_modules/sharp | |
Output: | |
info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.7.0/libvips-8.7.0-darwin-x64.tar.gz | |
prebuild-install WARN install No prebuilt binaries found (target=12.13.1 runtime=node arch=x64 libc= platform=darwin) | |
gyp info it worked if it ends with ok |
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
// Place your key bindings in this file to overwrite the defaults | |
[ | |
{ | |
"key": "f1", | |
"command": "extension.dash.specific", | |
"when": "editorTextFocus" | |
}, | |
{ | |
"key": "alt+cmd+r", | |
"command": "workbench.action.tasks.runTask", |
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
{ | |
"env": { | |
"browser": true, | |
"node": true, | |
"es6": true | |
}, | |
"plugins": ["react"], | |
"ecmaFeatures": { |
NewerOlder