Skip to content

Instantly share code, notes, and snippets.

<!-- component -->
<!-- Add the variant -->
<!-- variants: {
extend: {
translate: ['group-hover'],
}
}, -->
<!-- Soon review at https://moviedate.netlify.app/ -->
{"name":"ady-on-vscode","settings":"{\"settings\":\"{\\n \\\"workbench.colorTheme\\\": \\\"Atom One Dark\\\",\\n \\\"editor.inlineSuggest.enabled\\\": true,\\n \\\"editor.minimap.enabled\\\": false,\\n \\\"editor.accessibilitySupport\\\": \\\"on\\\",\\n \\\"prettier.printWidth\\\": 99999,\\n \\\"editor.wordWrap\\\": \\\"wordWrapColumn\\\",\\n \\\"editor.wordWrapColumn\\\": 100,\\n \\\"editor.formatOnSave\\\": true,\\n \\\"breadcrumbs.enabled\\\": false,\\n \\\"editor.renderControlCharacters\\\": false,\\n \\\"editor.wrappingIndent\\\": \\\"deepIndent\\\",\\n \\\"editor.mouseWheelZoom\\\": true,\\n \\\"gitlens.codeLens.authors.enabled\\\": false,\\n \\\"gitlens.codeLens.enabled\\\": false,\\n \\\"editor.cursorBlinking\\\": \\\"solid\\\",\\n \\\"audioCues.chatResponsePending\\\": \\\"off\\\",\\n \\\"audioCues.diffLineDeleted\\\": \\\"off\\\",\\n \\\"audioCues.diffLineInserted\\\": \\\"off\\\",\\n \\\"audioCues.diffLineModified\\\": \\\"off\\\",\\n \\\"
@adyngom
adyngom / angular-14-defaults-schematics.ts
Created October 3, 2022 14:38
My default generators config on new Angular projects version 14 and up
"schematics": {
"@schematics/angular:application": {
"strict": true
},
"@schematics/angular:component": {
"standalone": true,
"inlineStyle": true,
"inlineTemplate": true,
"changeDetection": "OnPush"
},
@adyngom
adyngom / blog.md
Last active March 6, 2022 19:00
angular worksapce article

Angular - Grouping Applications & Libraries Under A Single Workspace

As of Angular 9, the Angular CLI has a new feature called a workspace. If you have ever thought about segmenting a project into muliple smaller applications, and at the same time staying DRY with reusable libraries, data access tools and a sane way to keep all of it under the same version for easy updates then you are in for a treat with the new Angular Workspace feature.

In this article we will look at how straightforward it is to get started with an Angular workspace and more importantly look at a few use cases that make this feature a great fit for your project.

@adyngom
adyngom / js-alpharetta-vm.js
Created July 1, 2019 21:11
Solution to vending machine challenge - JavaScript Alpharetta June 2019
const VM = function(inventory) {
var drinks = inventory || null;
if (!drinks) {
throw new Error("No inventory: Cannot add a new VM");
}
const drinksKeys = Object.keys(drinks);
var sale = function(pid) {
@adyngom
adyngom / js-alpharetta-rolls-of-coins.js
Created July 1, 2019 21:09
Solution to rolls of coins workshop - JavaScript Alpharetta June 2019
const coinsJar = [5, 10, 10, 25, 25, 25, 10, 5, 1, 1, 1, 25, 25];
// [...coinsJar].forEach
const coinRolls = { "1": 2, "5": 2, "10": 2, "25": 2 };
const coinsLabels = {
"1": "Pennies",
"5": "Nickels",
"10": "Dimes",
"25": "Quarters"
};
@adyngom
adyngom / max-difference.js
Created June 13, 2019 04:12
Max difference in a set of numbers
const nums = [2, 4, 7, 5, 13, 11, 9, 1, 6, 2];
console.log(getMaxDifference(nums));
function getMaxDifference(arr) {
let max = arr[0], min = arr[0];
[...arr].forEach(n => {
if(n > max) max = n;
if(n < min) min = n;
});
@adyngom
adyngom / longest-subsequence.js
Last active June 13, 2019 04:23
longest subsequence between two strings
/*
Given two strings s1 and s2, return the longest common subsequence of s1 and s2
(with longest common subsequence defined as the longest sequence of characters
such that all of them appear in both of the strings, possibly with other characters in between)
'ABAZDC' 'BACBAD' => ABAD
'AGGTAB' 'GXTXAYB' => GTAB
'aaaa' 'aa' => aa
*/
console.log(getLongestSub('ABAZDC','BACBAD'));
<section>
<label for="offcanvas" class="biglabel"></label>
<!--- section content --->
</section>
<div class="container">
<div class="row">
<label for="offcanvas" class="toggler">
<span class="navicon"></span>
</label>
</div>
</div>