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 auth0 = require('auth0-js'); | |
const webAuth = new auth0.WebAuth({ | |
domain: '<YOUR_DOMAIN>', | |
clientID: '<YOUR_CLIENT_ID>', | |
}); |
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
# yarn included | |
FROM node:6 | |
# for installing chrome | |
RUN apt-get update -qqy \ | |
&& apt-get -qqy install \ | |
apt-transport-https \ | |
ca-certificates \ | |
ttf-wqy-zenhei \ | |
ttf-unfonts-core \ |
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 [ $rCount, $mCount ] = document.querySelectorAll('span'); | |
const [ | |
$rDecl, $rIncl, $rRand, | |
$mDecl, $mIncl, $mRand | |
] = document.querySelectorAll('button'); | |
const fetchRand = function() { | |
return new Promise(resolve => { | |
const a = (Math.random()*10|0) + 1; | |
const b = (Math.random()*10|0) + 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
// @flow | |
import React, { Component } from 'react'; | |
import { | |
AppRegistry, | |
Button, | |
StyleSheet, | |
Text, | |
View | |
} from 'react-native'; | |
import { |
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 lang="ja"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>How to set height of iframe on iOS</title> | |
</head> | |
<body> | |
<header>header</header> | |
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
window.handleMsg = function(ev, handler) { | |
// 同一ページ内イベントのみ受ける | |
if (ev.origin !== location.origin) { return; } | |
const { type, data } = JSON.parse(ev.data); | |
// そんなの待ち受けてないので無視 | |
if (type in handler === false) { return; } | |
handler[type].call(handler, data); |
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
navigator.mediaDevices.getUserMedia({ | |
video: { | |
width: 100, | |
} | |
}) | |
.then(stream => { | |
const $v = document.createElement('video'); | |
$v.srcObject = stream; | |
$v.play(); | |
document.body.append($v); |
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
<template> | |
<Component | |
@changeType="onChangeType" | |
></Component> | |
</template> | |
<script> | |
import Component from './static-props'; | |
export default { | |
methods: { |
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
{ | |
audio: { | |
advanced: [{ | |
deviceId: { | |
exact: ["default"] | |
} | |
}, { | |
googEchoCancellation: { | |
exact: true | |
} |
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
defmodule Kv do | |
@name :kvs | |
def new() do | |
GenServer.start_link(Kv.Server, %{}, name: @name) | |
end | |
def lookup(name) do | |
GenServer.call(@name, {:lookup, name}) | |
end |