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> | |
<div class="progress-gauge"> | |
<!-- <strong>{{ progress | floor10 }}</strong> --> | |
<svg ref="container" class="progress" :width="size" :height="size" :viewBox="`0 0 ${size} ${size}`" | |
:style="{ strokeDashoffset: dashoffset, strokeDasharray: circumference }"> | |
<circle ref="meter" class="progress-meter" :cx="innerSize" :cy="innerSize" :r="radius" stroke-width="12" /> | |
<circle ref="value" class="progress-value" :cx="innerSize" :cy="innerSize" :r="radius" stroke-width="12" /> | |
</svg> | |
<!-- <input id="control" type="range" value="60" /> --> | |
</div> |
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
// truncate text | |
function trimMiddle (text, maxLength, div) { | |
let t | |
let d = div || ' ' | |
let l = text.length | |
let a | |
let b | |
if (l > maxLength) { | |
a = Math.floor((maxLength / 2) - 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
// classDiagram | |
// [classA][Arrow][ClassB]:LabelText | |
// classA <|-- classB | |
// classC *-- classD | |
// classE o-- classF | |
// classG <-- classH | |
// classI -- classJ |
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
/** | |
* Standardize Task Data. | |
* Service to be run in nodejs as an npm process (`npm run pre:serve`) | |
* Drop into directory with CSV/TSV files to be parsed, and run as | |
* @example `node path/to/csv-to-json.js` | |
*/ | |
const { once } = require('events') | |
const { createReadStream } = require('fs') | |
const { createInterface } = require('readline') | |
const { writeFile, readdir } = require('fs/promises') |
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
/* no LANG attributes in HTML document */ | |
html:([lang])::before { | |
content: "No lang declared in HTML element."; | |
display: block; | |
color: white; | |
background-color: red; | |
} | |
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 MODULE_NAME = 'Calculate positions offset value for each frame provided.' | |
/** | |
* Convert time into seconds which is the smallest increment of time encoded into the video. | |
* @param {string} time Time in the format of HH:MM:SS using colons as the delimiter. | |
* @return {number} Time converted to seconds. | |
*/ | |
const seconds = time => { | |
const [hours,minutes,seconds] = time.split(':') | |
return parseInt((((parseInt(hours) * 60) + parseInt(minutes)) * 60) + parseInt(seconds)) |
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 { createHash } from 'crypto' | |
import { createReadStream } from 'fs' | |
/** | |
* Generate hash from file. | |
* @param {string} filename - path to file. | |
* @param {string} algorithm | |
* @returns {Promise} | |
*/ | |
export const shasum = (filename, algorithm = 'sha256') => ( |
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
#!/bin/bash | |
# /** instant nodejs **/ | |
# get it | |
wget https://nodejs.org/dist/v12.12.0/node-v12.12.0-linux-x64.tar.xz | |
tar xf node-v12.*.*-linux-*.tar.xz | |
# validate it | |
echo 'console.log(`versions: ${console.log(process.versions)} - nodejs.`)' > versions.js |
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
bin/bash -e | |
DOMAIN=example.org | |
BUILD_DIR=/tmp/www-build | |
PRODUCTION_DIR=/var/www/html/$DOMAIN | |
OWNER=TravisMullen | |
REPO=TravisMullen-Vue | |
APP_TITLE="'Travis Mullen Brochure'" | |
# start ==== |
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
#!/bin/bash -e | |
# @example | |
# ./update-cli-binaries.sh zcoin zcoinofficial/zcoin linux64 | |
# | |
BINARY_INSTALL_DIR='/usr/local/bin' | |
# get CRYPTO_NAME | |
if [ "$#" -lt 1 ] |
NewerOlder