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
/** | |
* Generates an ASCII-style (using UTF-8 characters) column graph of the provided values. | |
* | |
* @param {number[]} data The values to graph as columns. Each value will be represented by a single column in the graph. | |
* @param {number} minY The lower bound of the Y axis. | |
* @param {number} maxY The upper bound of the Y axis. | |
* @param {number} scaleY The number of text rows to represent the Y axis. | |
* @return {string} Generated text-based column graph. | |
*/ | |
function asciiGraph(data, minY, maxY, scaleY) { |
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/sh | |
# Add this script to your "Startup apps" to run it every time you sign into your OS. | |
updates_available=$(flatpak update | grep --perl-regexp '^\s*\d+\.\s+' | wc -l) | |
if [ "$updates_available" = 0 ] | |
then | |
# This may be caused by a missing dependecy of a new version of an app to | |
# update, so we need to explicitly check for that. |
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
/* | |
* Usage example: | |
* Open an image in a new tab, open the Dev tools, run the code in this gist using the console. | |
* After that, to create low-fi version of the opened image, run the following code: | |
* | |
* img = document.querySelector('img') | |
* | |
* document.body.append(createLoFiImage(img, [5, 6, 5])) // High color 16-bit | |
* document.body.append(createLoFiImage(img, [5, 5, 5])) // High color 15-bit | |
* document.body.append(createLoFiImage(img, [4, 4, 4])) // 12-bit |
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
// zobrazení | |
display | |
// pozicování | |
float | |
position | |
left | |
right | |
top | |
bottom |