- turn off
Secure Boot
- connect USB stick
- press F12
| credential.helper=osxkeychain | |
| diff.noprefix=true | |
| alias.s=status | |
| alias.co=checkout | |
| alias.ci=commit | |
| alias.st=status | |
| alias.br=branch |
| .zshrc | |
| ``` | |
| export LANG='ja_JP.UTF-8' | |
| export PATH=/usr/local/git/bin:/usr/local/sbin:$PATH | |
| autoload -Uz vcs_info | |
| precmd_vcs_info() { vcs_info } | |
| precmd_functions+=( precmd_vcs_info ) | |
| setopt prompt_subst | |
| PROMPT=\$vcs_info_msg_0_'%# ' |
| func CreateTask(projectID, locationID, queueID, relativeUri, message string) (*taskspb.Task, error) { | |
| ctx := context.Background() | |
| client, err := cloudtasks.NewClient(ctx) | |
| if err != nil { | |
| return nil, err | |
| } | |
| defer client.Close() | |
| queuePath := fmt.Sprintf("projects/%s/locations/%s/queues/%s", projectID, locationID, queueID) |
| package domain | |
| import ( | |
| "encoding/json" | |
| "reflect" | |
| "strings" | |
| ) | |
| func MergeJsonToStruct(jsonDiff *map[string]interface{}, origin interface{}, allowFields *[]string) { | |
| allKeys := TopLevelStructKeys(origin) |
| import { useRef, useEffect } from 'react' | |
| export default function useFetch() { | |
| const abortsRef = useRef({}) | |
| function fetchFoo() { | |
| return requestWithAbort(signal => fetch('/foo', { signal })) | |
| } | |
| function fetchBar() { |
Three.js has many example files under examples directory not src.
To use there from Next.js, We needs to small tweak config.
// next.config.js
const path = require('path')
module.exports = {
webpack: (config) => {based on https://github.com/zhuker/lamejs/tree/master/worker-example .
// mic.js
const stream = await navigator.mediaDevices.getUserMedia({audio: true});
const context = new AudioContext();
const microphone = context.createMediaStreamSource(stream);
await context.audioWorklet.addModule('/voiceRecorderProcessor.js')
const recorder = new AudioWorkletNode(context, 'recorder');In Chrome 87, scrolling with "scroll-behavior: smooth" is not working from requestAnimationFrame.
CodePen: https://codepen.io/superdoghuman/pen/ExgzjXP
<div id="parent">
<div class="child">1</div>
<div class="child">2</div>
<div class="child">3</div>