Skip to content

Instantly share code, notes, and snippets.

View iolathief108's full-sized avatar

Hafil Latheef iolathief108

View GitHub Profile

Directory Structure

Aerobatic defaults to some specific common front-end conventions. By conforming to these conventions you can simplify your configuration (convention over configuration).

Here is the basic suggested skeleton for your app repo that each of the starter templates conforms to:

├── app
│   ├── css
│ │ ├── **/*.css
@iolathief108
iolathief108 / gist:126563c78b4c6a86e164d36211a4e3d4
Created March 14, 2021 10:01 — forked from mikejolley/gist:1604009
WooCommerce - Add a special field to the checkout, order emails and user/order meta
/**
* Add the field to the checkout
**/
add_action('woocommerce_after_order_notes', 'my_custom_checkout_field');
function my_custom_checkout_field( $checkout ) {
echo '<div id="my_custom_checkout_field"><h3>'.__('My Field').'</h3>';
/**
@iolathief108
iolathief108 / js-benchmark.js
Created July 7, 2021 08:30
Javascript small benchmark script
function benchmark(method) {
const start = +(new Date);
const count = method();
const end = +(new Date);
const sec = ((end - start) / 1000) % 60;
console.log(`Processed in under: ` + sec + 's');
if (count && typeof count === 'number') {
@iolathief108
iolathief108 / sublime-new-window.md
Created July 22, 2021 22:58
Way to make sublime open in new window every time

how to make sublime open in new window

Right click open

  • Regedit
  • HKEY_CLASSES_ROOT/*/shell/Open with sublime/command/
  • "C:\Program Files\Sublime Text 3\sublime_text.exe" "-n" "%1"

Double click open

  • Regedit
@iolathief108
iolathief108 / breakpoints.ts
Created February 12, 2023 10:51
easy breakpoint solution for typescript react.
import {useEffect, useState} from 'react';
export const Breakpoints = {
mobile: 0,
tablet: 768,
laptop: 1024,
desktop: 1377,
};
let lastBreakpoint: keyof typeof Breakpoints | undefined = undefined;

Open regedit

folder right click

  1. Inside Computer\HKEY_CLASSES_ROOT\Directory\shell create a key Sublime
  • value of default Open with Sublime Text 3
  • right click new string value and name it Icon and set value C:\Program Files\Sublime Text 3\sublime_text.exe,0
  1. Inside Sublime new key name it command
  • value of default C:\Program Files\Sublime Text 3\sublime_text.exe -n "%1"

explorer right click