Skip to content

Instantly share code, notes, and snippets.

View hafidbuilds's full-sized avatar

hafidbuilds

  • Indonesia
  • 23:26 (UTC +07:00)
View GitHub Profile
#!/usr/bin/env sh
# If DEBUG environment variable is not defined set as false
if [[ "x${DEBUG}" == "x" ]]
then
DEBUG=false
fi
# Logger function. Display a message if DEBUG is true
logMessage() {
@hafidbuilds
hafidbuilds / README.md
Created February 10, 2018 03:07 — forked from addyosmani/README.md
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@hafidbuilds
hafidbuilds / install-webpack-from-scratch.md
Created August 14, 2018 16:48 — forked from swyxio/install-webpack-from-scratch.md
install-webpack-from-scratch.md

my notes ripped shamelessly from https://webpack.academy

  1. add webpack yarn add webpack --dev. this adds to devDependencies
  2. add {"build": "webpack"} under scripts to package.json. optionally:
  • "watch": "webpack --watch",
  • "start:dev": "webpack -w & nodemon server/app.js",
  • "build-watch": "npm run build -- -w",
  • "start-watch": "nodemon server/start.js --watch server --watch db --watch index.js --watch package.json",
  • "start-dev": "cross-env NODE_ENV=development npm run start-watch",
@hafidbuilds
hafidbuilds / using-eslint-with-prettier.md
Created April 11, 2019 00:10 — forked from yangshun/using-eslint-with-prettier.md
Comparison between tools that allow you to use ESLint and Prettier together.
prettier-eslint eslint-plugin-prettier eslint-config-prettier
What it is A JavaScript module exporting a single function. An ESLint plugin. An ESLint configuration.
What it does Runs the code (string) through prettier then eslint --fix. The output is also a string. Plugins usually contain implementations for additional rules that ESLint will check for. This plugin uses Prettier under the hood and will raise ESLint errors when your code differs from Prettier's expected output. This config turns off formatting-related rules that might conflict with Prettier, allowing you to use Prettier with other ESLint configs like eslint-config-airbnb.
How to use it Either calling the function in your code or via [prettier-eslint-cli](https://github.co
@hafidbuilds
hafidbuilds / gist:7b17f1b4a4658b1186f9877b49e56ebe
Created July 31, 2021 13:44 — forked from digitaljhelms/gist:4287848
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch
@hafidbuilds
hafidbuilds / rfc-template.md
Created October 27, 2023 03:41 — forked from michaelcurry/rfc-template.md
RFC Template [Markdown]

RFC Template

Feature Name: (fill me in with a unique identity, myawesomefeature)

Type: (feature, enhancement)

Start Date: (fill me in with today's date, YYYY-MM-DD)

Author: (your names)