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
| #!/bin/bash | |
| USER_POOL_ID=<user pool ID> | |
| CLIENT_ID=<application client ID> | |
| CLIENT_SECRET=<client secret> | |
| COGNITO_USERNAME=<any user name> | |
| COGNITO_TEMP_PASSWORD=<temporary password> | |
| COGNITO_PASSWORD=<any user password> | |
| SECRET_HASH=$(echo -n "${COGNITO_USERNAME}${CLIENT_ID}" | openssl dgst -sha256 -hmac "${CLIENT_SECRET}" -binary | base64) |
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 { EventEmitter } from "events"; | |
| interface TypedEventEmitter<T> { | |
| addListener<K extends keyof T>(event: K, listener: (arg: T[K]) => void): this; | |
| on<K extends keyof T>(event: K, listener: (arg: T[K]) => void): this; | |
| once<K extends keyof T>(event: K, listener: (arg: T[K]) => void): this; | |
| removeListener<K extends keyof T>( | |
| event: K, | |
| listener: (arg: T[K]) => void | |
| ): this; |
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 objectify(arr) { | |
| return Object.fromEntries(arr.reduce((acc, cur, idx) => (idx%2 ? acc[acc.length-1].push(cur) : acc.push([cur])) && acc, [])); | |
| } |
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
| <span></span> | |
| <script> | |
| const span = document.querySelector("span"); | |
| function step(timestamp) { | |
| const date = new Date(); | |
| const d = { | |
| h: date.getHours().toString().padStart(2, '0'), | |
| m: date.getMinutes().toString().padStart(2, '0'), | |
| s: date.getSeconds().toString().padStart(2, '0'), | |
| ms: Math.floor(date.getMilliseconds() / 100), |
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
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| name: redis-sentinel | |
| labels: | |
| app: redis-sentinel | |
| spec: | |
| clusterIP: None | |
| ports: | |
| - name: redis-sentinel |
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
| <canvas width="854" height="480"></canvas> | |
| <script> | |
| const canvas = document.querySelector("canvas"); | |
| const ctx = canvas.getContext("2d"); | |
| const imageData = ctx.createImageData(canvas.width, canvas.height); | |
| let offsetY = 0; | |
| // draw like a scanner | |
| const gradient = ctx.createLinearGradient(0, 0, 0, canvas.height); | |
| gradient.addColorStop(0, "rgba(0,0,0,0.6)"); |
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 { Selector } from 'testcafe' | |
| fixture `Loose Equality` | |
| .page `http://localhost:8000/` | |
| test('Say Hello', async t => { | |
| const btn = Selector("button") | |
| await t.click(btn) | |
| // assertion |
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
| FROM python:3.6-alpine3.7 | |
| LABEL "com.github.actions.name"="Assign Reviewer" | |
| LABEL "com.github.actions.description"="Assign a PR reviewer when it does not have enough reviewers" | |
| LABEL "com.github.actions.icon"="edit" | |
| LABEL "com.github.actions.color"="blue" | |
| LABEL "repository"="https://github.com/matsub/try-github-actions" | |
| LABEL "maintainer"="matsub <[email protected]>" |
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
| FROM alpine:3.8 | |
| LABEL "com.github.actions.name"="Hello World" | |
| LABEL "com.github.actions.description"="Write arguments to the standard output" | |
| LABEL "com.github.actions.icon"="anchor" | |
| LABEL "repository"="https://github.com/matsub/try-github-actions" | |
| LABEL "maintainer"="matsub <[email protected]>" | |
| ADD entrypoint.sh /entrypoint.sh |
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
| <!doctype html> | |
| <input type="range" value="1" min="0" max="1" step="0.05"> | |
| <script src="VolumeController.js"></script> | |
| <script> | |
| async function main() { | |
| const input = document.querySelector("input") | |
| const stream = await navigator.mediaDevices.getUserMedia({ | |
| video: false, | |
| audio: true | |
| }) |
NewerOlder