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

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 / 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
    
@TaufiqHdyt
TaufiqHdyt / githook.js
Created December 7, 2021 06:39 — forked from stigok/githook.js
Verify GitHub webhook signature header in Node.js
/*
* Verify GitHub webhook signature header in Node.js
* Written by stigok and others (see gist link for contributor comments)
* https://gist.github.com/stigok/57d075c1cf2a609cb758898c0b202428
* Licensed CC0 1.0 Universal
*/
const crypto = require('crypto')
const express = require('express')
const bodyParser = require('body-parser')
@TaufiqHdyt
TaufiqHdyt / settings.json
Created October 8, 2021 07:18 — forked from bradwilson/settings.json
Ubuntu color scheme for Windows Terminal
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"tabWidthMode": "titleLength",
"defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
"copyOnSelect": false,
"copyFormatting": false,
"largePasteWarning": false,
"multiLinePasteWarning": false,
"disableAnimations": true,
"profiles": {
@TaufiqHdyt
TaufiqHdyt / clean_code.md
Created April 29, 2021 18:54 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@TaufiqHdyt
TaufiqHdyt / meta-tags.md
Created June 20, 2019 19:49 — forked from lancejpollard/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">