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 node | |
/* | |
* ./lines-of-code.js ./directory .js,.mjs,.php | |
* | |
* Ignores comments, blank lines and lines with less than <minl> chars. | |
* Add additional languages and rules in 'lang' object. | |
*/ | |
const fs = require('fs/promises'); |
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 node | |
/* | |
* ./simple-cli.js --agave hello world --eggs 123 | |
*/ | |
function processArguments(flagCallbackMap, argv) { | |
const groups = argv.reduce((a,s) => { | |
if(s[0] === '-') a.push([]); | |
if(a.length > 0) a[a.length-1].push(s); |
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
/* | |
* java SimpleCLI --agave hello world --eggs 123 | |
*/ | |
import java.util.*; | |
import java.util.function.*; | |
public final class SimpleCLI { | |
static Consumer<String[]> CallAgave = args -> { | |
if(args.length < 3) |
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 | |
# Options: | |
# max <int> - set maximum amount of elements | |
# current <int> - set current index (starting from 0) | |
# update - update and print progress bar | |
# clear - clear progress bar | |
# time - print elapsed time | |
# reset - reset time and progress | |
# width <int> - set the width of the progress bar |
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
// ------------------------------------------------------------------ | |
// HTMLElement.removeClass( search [, exeption] ) | |
// ------------------------------------------------------------------ | |
// | |
// Description: | |
// Removes all classes from the element matching a pattern. | |
// | |
// | |
// Parameter: | |
// search: A string or an array of strings. |
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
// ------------------------------------------------------------------ | |
// array HTMLElement.findChildClass( string ) | |
// ------------------------------------------------------------------ | |
// | |
// Description: | |
// Will recursively search down the DOM tree for Elements with the specfied class. | |
// | |
// Parameter: | |
// string: The name of the class to search for. | |
// |