REST API response format based on some of the best practices
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 python3 | |
PRINTER = '/dev/usb/lp0' # the printer device | |
DOTS_MM = 8 # printer dots per mm, 8 == 203 dpi | |
WIDTH_MM = 100 # sticker width, mm | |
HEIGHT_MM = 35 # sticker height, mm | |
GAP_MM = 2 # sticker gap, mm | |
FONT = "0" # built-in vector font, scalable by X and Y |
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
# File adapted from: https://github.com/h5bp/html5-boilerplate/blob/master/dist/.htaccess | |
# ------------------------------------------------------------------------------ | |
# | File Types | | |
# ------------------------------------------------------------------------------ | |
# Allow access from all domains for web fonts | |
<IfModule mod_headers.c> | |
<FilesMatch "\.(eot|font.css|otf|ttc|ttf|woff)$"> |
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 ls -gp --depth=0 | awk -F/ '/node_modules/ && !/\/npm$/ && !/\/corepack$/ {print $NF}' | xargs npm -g rm | |
corepack enable | |
corepack prepare yarn@3.2.1 --activate | |
corepack prepare pnpm@latest --activate |
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 path from 'path'; | |
import {fileURLToPath} from 'url'; | |
const __filename = fileURLToPath(import.meta.url); | |
const __dirname = path.dirname(__filename); | |
console.log('directory-name 👉️', __dirname); | |
console.log(path.join(__dirname, '/dist', 'index.html')); |
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
server { | |
listen 80; | |
server_name localhost; | |
location / { | |
root /app; | |
index index.html; | |
try_files $uri $uri/ /index.html; | |
} | |
error_page 500 502 503 504 /50x.html; | |
location = /50x.html { |
clear all logs in \Library\Logs\DiagnosticReports
NewerOlder