# 2. Get the list of printers
lpstat -p -d
# 3. Print to the ZPL
lpr -P NAME_OF_PRINTER -o raw path/to/file.zpl
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
SELECT | |
table_name AS `Table`, | |
table_rows AS `Records`, | |
ROUND((data_length + index_length) / 1024 / 1024, 2) AS `Size (MB)` | |
FROM | |
information_schema.tables | |
WHERE | |
table_schema = 'your_db_table' | |
ORDER BY | |
`Size (MB)` DESC; |
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
// Bootstrap 5 Color Palette | |
// Docs: https://getbootstrap.com/docs/5.3/customize/color | |
// Theme colors | |
$primary: #0d6efd; | |
$secondary: #6c757d; | |
$success: #198754; | |
$info: #0dcaf0; | |
$warning: #ffc107; | |
$danger: #dc3545; |
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 | |
# Start from the current directory or specify the root directory as an argument | |
start_dir="${1:-.}" | |
process_config() { | |
local config_file="$1" | |
echo "Processing $config_file" | |
sed -i.bak 's|https://github.com/|[email protected]:|g' "$config_file" | |
} |
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
function resetForm() { | |
deleteAllFormResponses() | |
resetFormResponseDestination() | |
} | |
function resetFormResponseDestination() { | |
var form = FormApp.getActiveForm(); | |
var formResponsesSheetId = form.getDestinationId(); | |
var spreadsheet = SpreadsheetApp.openById(formResponsesSheetId); | |
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 random | |
n = 36 | |
random.randint(pow(10, n - 1), pow(10, n) - 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
#!/bin/bash | |
# shellcheck disable=SC2104 | |
# The following script will setup the project for the first time for local dev | |
# To run the project after setup, use `docker compose up -d` | |
set -e | |
REPO_NAME="$1" |
NewerOlder