Octokit.js build setup using @pika/pack
npm install --save-dev @pika/pack @pika/plugin-build-node @pika/plugin-build-web @pika/plugin-ts-standard-pkg
// so named because why the hell not? | |
function banquo(func) { | |
var def = func.toString(); | |
// find the comma-delimeted list of parameters | |
var params = def.match(/\(\s*(\w+(\s*,\s*\w+)*)\s*\)/)[1].split(',').map(function (p) { | |
return p.trim(); | |
}); | |
// extract out just the function body |
@pika/pack
npm install --save-dev @pika/pack @pika/plugin-build-node @pika/plugin-build-web @pika/plugin-ts-standard-pkg
import {useState, useCallback, useRef} from 'react' | |
// Hook | |
const useHover = <T extends HTMLElement>(): [ | |
(node?: T | null) => void, | |
boolean, | |
] => { | |
const [value, setValue] = useState(false) | |
// Wrap in useCallback so we can use in dependencies below |
(defn point-outside-circle [c r p] | |
(if (< (vec2/dist c p) r) | |
(vec2/scale (vec2/normalize (vec2/- p c)) r) | |
p)) | |
(defn circle-tangent-point [c r b dir] | |
(let [B (point-outside-circle c r b) | |
cB (vec2/dist c B) | |
S (vec2/scale (vec2/normalize (vec2/- B c)) r) |
const { | |
isFetchingEnd, | |
isFetchingTop, | |
onRefresh, | |
onEndReached, | |
} = useRelayPagination(relay, users); | |
const isRefreshing = isFetchingEnd || isFetchingTop; | |
<FlatList |
var data; | |
process.stdin.resume(); | |
process.stdin.setEncoding('utf8'); | |
process.stdin.on('data', function(chunk) { | |
data += chunk; | |
}); | |
process.stdin.on('end', function() { |
.container { | |
height: 500px; | |
border: 2px solid grey; | |
position:relative; | |
} | |
.split { | |
display: flex; | |
height: 100%; | |
border: 1px solid black; |
.kanban-board { | |
background-color: #fff; | |
} | |
.kanban-card { | |
background-color: white; | |
margin: 8px; | |
box-shadow: 0px 1px 2px #9EB3C0; | |
padding: 10px; | |
border-radius: 2px; |
#!/bin/bash | |
# Automatically setup routing and DNS for a PiZero connected over a USB-network | |
# NOTE: Before running this script for the first time, you need to run the | |
# following two commands on your Linux PC | |
# sudo sysctl -w net.ipv4.ip_forward=1 | |
# sudo iptables -t nat -A POSTROUTING -s 169.254.0.0/16 -o eth0 -j MASQUERADE | |
# (replace eth0 in the second command with your internet-facing network device, | |
# e.g. wlan0 on a laptop) | |
# The Avahi-discovered hostname |