Skip to content

Instantly share code, notes, and snippets.

View TaufiqHdyt's full-sized avatar

fiq TaufiqHdyt

View GitHub Profile
@TaufiqHdyt
TaufiqHdyt / print-badge
Created November 12, 2024 06:44 — forked from gelin/print-badge
Python script to print a badge to a thermal printer with TSPL language (by TSC)
#!/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
@TaufiqHdyt
TaufiqHdyt / htaccess.txt
Created June 23, 2023 03:14 — forked from themorgantown/htaccess.txt
This htacess file resolves issues often encountered when loading Tumult Hype documents from Apache servers. ### Using this File ###This file needs to be renamed to .htaccess after uploading to your web server. If should be uploaded in the directory containing your files.
# 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)$">
@TaufiqHdyt
TaufiqHdyt / rest-api-response-format.md
Created October 27, 2022 04:54 — forked from igorjs/rest-api-response-format.md
REST API response format based on some of the best practices
@TaufiqHdyt
TaufiqHdyt / README.md
Last active October 18, 2022 00:04
Build Vue Project to gh-pages branch using PNPM + cache control

Notes

Place file to .github/workflows/gh-pages.yml

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@TaufiqHdyt
TaufiqHdyt / setup.sh
Last active July 28, 2023 10:50
Node Corepack Setup with PNPM and Yarn
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
@TaufiqHdyt
TaufiqHdyt / rm_mysql.md
Created June 5, 2022 07:31 — forked from vitorbritto/rm_mysql.md
Remove MySQL completely from Mac OSX

Remove MySQL completely

  1. Open the Terminal

  2. Use mysqldump to backup your databases

  3. Check for MySQL processes with: ps -ax | grep mysql

  4. Stop and kill any MySQL processes

  5. Analyze MySQL on HomeBrew:

    brew remove mysql
    
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'));
@TaufiqHdyt
TaufiqHdyt / example.com.conf
Created March 13, 2022 16:18
Vue 3 for Nginx Config
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 {
@TaufiqHdyt
TaufiqHdyt / fixStartUp.md
Created December 22, 2021 10:44
Fix: "You shut down your computer because of a problem"

clear all logs in \Library\Logs\DiagnosticReports