fetch('/things/10', {
credentials: 'same-origin',
headers: {
'accept': 'application/json'
}
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
# to get started: colima start | |
# to build: docker build -t n64sdkmod . | |
# to run with workspace dir: docker run -v $(pwd):/workspace -it n64sdkmod | |
FROM ubuntu:22.04 | |
ENV PATH=/etc/n64/usr/sbin:${PATH} | |
ENV PATH=/opt/crashsdk/bin:${PATH} | |
ENV ROOT=/etc/n64 |
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
// SPDX-FileCopyrightText: 2021 Phil Burgess for Adafruit Industries | |
// | |
// SPDX-License-Identifier: MIT | |
/* | |
GOOGLY EYES for Adafruit EyeLight LED glasses + driver. Pendulum physics | |
simulation using accelerometer and math. This uses only the rings, not the | |
matrix portion. Adapted from Bill Earl's STEAM-Punk Goggles project: | |
https://learn.adafruit.com/steam-punk-goggles | |
*/ |
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
diff --git a/../n64chain/tools/build-posix64-toolchain.sh b/build-posix64-toolchain.sh | |
index 71d56af..a81f60f 100755 | |
--- a/../n64chain/tools/build-posix64-toolchain.sh | |
+++ b/build-posix64-toolchain.sh | |
@@ -1,5 +1,5 @@ | |
#!/bin/bash | |
-set -eu | |
+set -eux | |
# |
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
sony { | |
enable = 1 | |
# The floppy disk insertion delay. Set this to: | |
# 0: never automatically insert the disk | |
# 1: have the disk inserted immediately on startup. | |
# The System will then either boot from the disk or | |
# eject it. | |
# x: delay insertion by x (emulated) seconds. |
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
var gm = require('gm'); | |
var glob = require('glob'); | |
var path = require('path'); | |
var fs = require('fs'); | |
const labels = []; | |
function pathWithSuffix(inpath, suffix) { | |
return path.join(path.dirname(inpath),path.basename(inpath,'.jpg')+suffix+'.jpg'); | |
} |
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
jest.dontMock('../getStuff'); | |
describe('getStuff', () => { | |
let getStuff; | |
let request; | |
let stuffStore; | |
it('loads the data', () => { | |
const id = 1; | |
const data = {a: 1}; |
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
var util = require('util'); | |
// nobody cares about warnings so lets make them errors | |
// keep a reference to the original console methods | |
var consoleWarn = console.warn; | |
var consoleError = console.error; | |
function logToError() { | |
throw new Error(util.format.apply(this, arguments).replace(/^Error: (?:Warning: )?/, '')); |
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
const immutableJSFormatter = { | |
header(x) { | |
if (x && x.toJS) return ['span', {}, x.toString()]; | |
return null; | |
}, | |
hasBody(x) { | |
return x && x.toJS; | |
}, | |
body(x) { | |
return ['span', {}, JSON.stringify(x.toJS(), null, 2)]; |
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'; | |
export default function flattenReactChildrenToArray(nodeChildren, accumulated = []) { | |
React.Children.forEach(nodeChildren, (childNode) => { | |
accumulated.push(childNode); | |
if (childNode && childNode.props && childNode.props.children) { | |
flattenReactChildrenToArray(childNode.props.children, accumulated); | |
} | |
}); | |
return accumulated; |
NewerOlder