- M1 mac
- Ruby 2.7.4
- Rails 6(latest)
- MySQL 5.7
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
credential.helper=osxkeychain | |
diff.noprefix=true | |
alias.s=status | |
alias.co=checkout | |
alias.ci=commit | |
alias.st=status | |
alias.br=branch |
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
.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_'%# ' |
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
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) |
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
package domain | |
import ( | |
"encoding/json" | |
"reflect" | |
"strings" | |
) | |
func MergeJsonToStruct(jsonDiff *map[string]interface{}, origin interface{}, allowFields *[]string) { | |
allKeys := TopLevelStructKeys(origin) |
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 { 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>
- Prepare a Mac supports BLE
- Download the Additional Tools for Xcode from Apple Developer
- Open the Bluetooth Explorer
- Press and hold the Oculus button and back button of controller until the controller LED blinks
- Select menu [Devices] -> [Low Energy Devices]
- Click [Start Scanning] button.
- Chose OMVR-V190 in Device and click [Connect] button.