Skip to content

Instantly share code, notes, and snippets.

View Eronmmer's full-sized avatar
🏠
Working from Home

Erons Eronmmer

🏠
Working from Home
View GitHub Profile
@Eronmmer
Eronmmer / gist:1440d852fd38750df11ceaf2483c2721
Created August 9, 2021 22:15
Accessibility, semantic HTML, and stuff...
```
<nav aria-label="Main menu">
<!-- items -->
</nav>
```
@Eronmmer
Eronmmer / readme.md
Created March 23, 2021 22:58
Snippets
  • Format a valid string or number to any currency.
const formatAsMoney = (amount, locale = "en-NG", currency = "NGN") => {
  return new Intl.NumberFormat(locale, {
    style: "currency",
    currency,
  }).format(amount);
};
@Eronmmer
Eronmmer / History|-109049b7|entries.json
Last active May 12, 2022 14:43
Visual Studio Code Settings Sync Gist
{"version":1,"resource":"file:///Users/erons/Documents/work/Luxor/lmf-v5/apps/brokerage/pages/api/hosting/index.ts","entries":[{"id":"WBqJ.ts","timestamp":1649371599924},{"id":"ThMd.ts","timestamp":1649371626951},{"id":"Tem9.ts","timestamp":1649371658197},{"id":"LBmY.ts","source":"undoRedo.source","timestamp":1649371659569},{"id":"IZmb.ts","timestamp":1649371664000},{"id":"2cea.ts","timestamp":1649371746080},{"id":"WWhs.ts","timestamp":1649371805860},{"id":"Uynv.ts","timestamp":1649371825719},{"id":"byFX.ts","timestamp":1649371858598}]}
@Eronmmer
Eronmmer / surverying-js.md
Last active February 24, 2020 09:37
Random JavaScript musings inspired by the YDKJS book by Kyle Simpson

surveying JavaScript

  • Values come in two forms in JavaScript. primitive and object. Primitives include: strings, boolean, numbers(another variation to this is bigint: big-integer which is used for storing arbitrarily large numbers), null, undefined and symbol. Object values are: Arrays and Objects. It's important to note that functions in JS are a special type of object.

  • The best semantic use of const is when you have a simple primitive value that you want to to give a useful name to, such as using myBirthday instead of true. This makes programs easier to read.

  • Other ways variables can be declared are in function parameters and in catch clauses. The former behave var-ish while the latter behaves const and let-ish

  • Function declarations are so named because they appear as statements by themselves. Not as expressions in another statement. For this reason, they can be hoisted in contrast to function expressions which are usually defined and assigned to variable names. It is important to n

@Eronmmer
Eronmmer / surverying-js.md
Created February 24, 2020 09:36
Random JavaScript musing inspired by the YDKJS book by Kyle Simpson

Random JavaScript musings inspired by the YDKJSY book 🔥

  • Values come in two forms in JavaScript. primitive and object. Primitives include: strings, boolean, numbers(another variation to this is bigint: big-integer which is used for storing arbitrarily large numbers), null, undefined and symbol. Object values are: Arrays and Objects. It's important to note that functions in JS are a special type of object.

  • The best semantic use of const is when you have a simple primitive value that you want to to give a useful name to, such as using myBirthday instead of true. This makes programs easier to read.

  • Other ways variables can be declared are in function parameters and in catch clauses. The former behave var-ish while the latter behaves const and let-ish

  • Function declarations are so named because they appear as statements by themselves. Not as expressions in another statement. For this reason, they can be hoisted in contrast to function expressions which are usually defined and assigned to v

@Eronmmer
Eronmmer / readme.md
Last active February 15, 2020 01:35
Link and Button CSS tricks.
  • To create a link that triggers a download, do the following
<a href="/files/file.pdf" download>Download PDF</a>
  • If your link contains just an icon or emoji, use aria-label or a visually-hidden class like the following
<a href="/">
  <!-- Hide the icon from assistive technology -->
@Eronmmer
Eronmmer / mysql_cheat_sheet.md
Created November 23, 2019 18:44 — forked from bradtraversy/mysql_cheat_sheet.md
MySQL Cheat Sheet

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

<picture>
<source srcset="./img/pie.jpg" media="{min-width: 700px}" />
<source srcset="./img/pie-400.jpg" media="{min-width: 400px}" />
<img src="./img/pie.jpg" />
</picture>
@Eronmmer
Eronmmer / js_linked_list.js
Created July 6, 2019 17:55 — forked from bradtraversy/js_linked_list.js
JS Linked List Class
// Construct Single Node
class Node {
constructor(data, next = null) {
this.data = data;
this.next = next;
}
}
// Create/Get/Remove Nodes From Linked List
class LinkedList {