Skip to content

Instantly share code, notes, and snippets.

View MidasXIV's full-sized avatar
🌴
On vacation

MidasXIV

🌴
On vacation
  • ESRI -Environmental Systems Research Institue
  • Sharjah, United Arab Emirates.
View GitHub Profile
@MidasXIV
MidasXIV / adventOfCode-2023-11.js
Last active December 5, 2023 11:55
Advent Of Code 2023.
const day1Solution = (text) => {
const textToArrayOfStrings = text.split(`\n`)
const numberPattern = /\d+/g;
const getCodeFromString = (str) => {
const input = str.match(numberPattern).join('');
const code = input[0] + input.slice(-1);
return code;
}
const output = textToArrayOfStrings.reduce((acc, str) => {
const code = Number.parseInt(getCodeFromString(str));

Closures & Hoisting

Question 1

var variable = 10;
(()=>{
   console.log(variable);
   variable = 20;
   console.log(variable);
})();
@MidasXIV
MidasXIV / conventional_commit_messages.md
Created February 2, 2021 21:03 — forked from qoomon/conventional_commit_messages.md
Conventional Commit Messages

Conventinal Commit Messages

See how a minor change to your commit message style can make a difference. Examples

Have a look at CLI util git-conventional-commits to ensure this conventions and generate changelogs

Commit Formats

Default

@MidasXIV
MidasXIV / index.html
Created September 4, 2020 14:16
Tailwind Accessibility Config
<div class="bg-gray-100 block min-h-screen">
<div class="bg-gray-900 border-b-1 mb-4 border-gray-500 text-white p-4 shadow-lg">
<h1 class="text-2xl uppercase font-bold">Tailwind Accessibility Config 🎨</h1>
<div class="text-xs">
Github: <a href="https://github.com/optimizasean/TailwindAccessibilityConfig" target="_blank" class="font-mono">optimizasean/TailwindAccessibilityConfig
</a>
</div>
</div>
@MidasXIV
MidasXIV / README-badges.md
Created January 7, 2020 19:56 — forked from tterb/README-badges.md
A collection of README badges

Badges

License

MIT License GPLv3 License AGPL License

Version

Version GitHub Release

@MidasXIV
MidasXIV / sampleREADME.md
Created January 7, 2020 11:36 — forked from FrancesCoronel/sampleREADME.md
A sample README for all your GitHub projects.

FVCproductions

INSERT GRAPHIC HERE (include hyperlink in image)

Repository Title Goes Here

Subtitle or Short Description Goes Here

let pokemons = [{
"name": "Pikachu",
"id": 25,
"type": "electric",
"ability": {
"primary": "Static",
"hidden": "Lightning rod"
},
"moves": ["Quick Attack", "Volt Tackle", "Iron Tail", "Thunderbolt"]
}, {
let pokemon = {
"name": "Pikachu",
"id": 25,
"type": "electric",
"ability": {
"primary": "Static",
"hidden": "Lightning rod"
},
"moves": ["Quick Attack", "Volt Tackle", "Iron Tail", "Thunderbolt"]
};
let pokemon = {
"name": "Pikachu",
"id": 25,
"type": "electric",
"ability": {
"primary": "Static",
"hidden": "Lightning rod"
},
"moves": [
"Quick Attack", "Volt Tackle", "Iron Tail", "Thunderbolt"
let arr = [10, 20];
let one, two;
[one, two] = arr;
console.log(`${one} ${two}`);
let obj = { prop1: 'mxiv', prop2: 'UAE' };
let name, location;
({ prop1: name, prop2: location } = obj);
console.log(`${name} ${location}`);