...
This file contains hidden or 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 ModeEvents = { | |
showWelcome: 'SHOW_WELCOME', | |
showClosedCaptioning: 'SHOW_CLOSED_CAPTIONING', | |
showResources: 'SHOW_RESOURCES', | |
showSchedule: 'SHOW_SCHEDULE', | |
showInstaller: 'SHOW_INSTALLER', | |
showCheatMode: 'SHOW_CHEAT_MODE', | |
showTest: 'SHOW_TEST', | |
showDemos: 'SHOW_DEMOS', |
This file contains hidden or 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
function assignResult(name) { | |
return assign({ | |
results: (context, event) => { | |
console.log(event); | |
return { ...context.results, [name]: event.data }; | |
}, | |
}); | |
} | |
const log = (context, event) => { |
This file contains hidden or 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 React = require('react'); | |
const { useState, useEffect, useReducer } = require('react'); | |
const { render, Box, Text, useInput, useApp, useFocus } = require('ink'); | |
const useStdoutDimensions = require('ink-use-stdout-dimensions'); | |
const Key = ({ children, onSelect }) => { | |
const { isFocused } = useFocus(); | |
useInput((input, key) => { | |
if (key.return && isFocused) { | |
onSelect(); |
This file contains hidden or 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
/** Types vs Interfaces */ | |
type Configuration = { | |
baseUrl: string; | |
ttl: number; | |
}; | |
type ConfigWithCredentials = Configuration & { | |
credentials: { | |
username: string; |
It works
This file contains hidden or 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 { connect } from 'twilio-video'; | |
const TOKEN_URL = 'THE_URL_TO_YOUR_FUNCTION'; | |
const roomName = 'myroom'; | |
let connected = false; | |
let localMediaEl = document.getElementById('localMedia'); | |
let remoteMediaEl = document.getElementById('remoteMedia'); | |
let buttonConnectEl = document.getElementById('buttonConnect'); |
This file contains hidden or 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
type Safe<T> = { [P in keyof T]: string }; | |
function getSafeEnvironment<T extends {}>(e: T): Safe<T> { | |
return new Proxy(e, { | |
get: function(env: any, key: string): string { | |
const value: any = env[key]; | |
if (value == null) { | |
throw new Error("'" + key + "' environment variable is not set."); | |
} | |
return value; |
This file contains hidden or 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
10 REM Clear the screen | |
20 TEXT : HOME | |
25 REM DISPLAY WELCOME SCREEN | |
30 VTAB 4: HTAB 15: PRINT "$BASH RACER" | |
40 VTAB 13: HTAB 3: PRINT "USE LEFT AND RIGHT ARROW KEYS TO MOVE" | |
50 VTAB 14: HTAB 7: PRINT "ANY OTHER KEY GOES STRAIGHT" | |
60 VTAB 21: PRINT "PRESS ANY KEY TO PLAY" | |
65 VTAB 23: PRINT "SCORE 5000 POINTS TO WIN" | |
70 REM WAIT FOR KEYPRESS | |
80 GET KEY$ |
I hereby claim:
- I am dkundel on github.
- I am dkundel (https://keybase.io/dkundel) on keybase.
- I have a public key ASBVtUGttt-FlmMolkfj57F1etkXu76KDpS6O1twC7u1rAo
To claim this, I am signing this object:
NewerOlder