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 { Subject, fromEvent } from 'rxjs'; | |
| import { buffer, map, filter } from 'rxjs/operators'; | |
| function buffered<T>(handler: ((values: T[]) => Promise<void>)) { | |
| const valueQueue = new Subject<T>(); | |
| const bufferTrigger = new Subject<void>(); | |
| let busy = false; | |
| let destroyed = false; | |
| const sub = valueQueue.pipe( |
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
| .show-debug *[data-debug]::after { | |
| content: attr(data-debug); | |
| color: #f00; | |
| position: absolute; | |
| opacity: 0.1; | |
| } | |
| .show-debug *[data-debug]:hover::after { | |
| opacity: 1; | |
| } |
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
| npm init -y | |
| npm i -P react react-dom next bootstrap react-bootstrap @zeit/next-css @zeit-next-less | |
| npm i -D typescript @types/react @types/react-dom @types/node | |
| npx npm-add-script -k dev -v next -f | |
| npx npm-add-script -k build -v "next build" -f | |
| npx npm-add-script -k start -v "next start" -f | |
| mkdir pages | |
| mkdir components |
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 | |
| version=$1 | |
| if [ -z "$version" ]; then | |
| echo Must provide a version! | |
| exit; | |
| fi | |
| filename=node-v$version-linux-armv6l |
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
| param( | |
| [string]$csproj = $(throw "-csproj is required."), | |
| [ValidateSet('major', 'minor', 'patch')][string]$part = "patch" | |
| ) | |
| Function BumpVersion([string]$csprojPath, [int]$majorInc, [int]$minorInc, [int]$patchInc) { | |
| [xml]$xml = (Get-Content $csprojPath) | |
| $buildInfo = $xml.Project.PropertyGroup | Where-Object {$_.Label -eq 'BuildInfo'} | |
| #split product version in SemVer language |
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
| navigator.mediaDevices.enumerateDevices() | |
| .then(devices => devices.map(d => `[${d.kind}] ${d.label}`)) | |
| .then(console.log.bind(console)) |
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
| using System; | |
| using System.Diagnostics; | |
| using System.IO; | |
| using System.Reflection; | |
| using System.Runtime.InteropServices; | |
| using System.Threading.Tasks; | |
| using System.Timers; | |
| namespace CodeGear.Utilities | |
| { |
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
| javascript: !function(){var n=new XMLHttpRequest;n.responseType="blob",n.onload=function(){var e=new FileReader;e.onloadend=function(){window.open(e.result,"_blank")},e.readAsDataURL(n.response)},n.open("GET",window.location.href),n.send()}(); |
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
| #!/usr/bin/env bash | |
| barWidth=60 # constant | |
| filePadding=8 # constant | |
| extension="file" # constant | |
| count=$1 | |
| size=$2 | |
| resetFlag=$3 |
NewerOlder