Skip to content

Instantly share code, notes, and snippets.

View adisreyaj's full-sized avatar
🎯
Focusing

Adithya Sreyaj adisreyaj

🎯
Focusing
View GitHub Profile
@adisreyaj
adisreyaj / vscode-settings.json
Created September 18, 2021 18:01
VSCode Settings JSON
{
"window.menuBarVisibility": "toggle",
"editor.fontFamily": "JetBrains Mono",
"editor.fontWeight": "400",
"editor.lineHeight": 24,
"editor.fontLigatures": true,
"explorer.confirmDelete": false,
"editor.minimap.enabled": false,
"editor.autoIndent": "full",
"editor.formatOnPaste": true,
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"test": {
"projectType": "application",
"schematics": {},
"root": "",
"sourceRoot": "src",
@adisreyaj
adisreyaj / feature-flags.json
Last active November 7, 2023 00:39
Test feature flag config
{
"bookmarks": true,
"snippets": false,
"packages": true
}
@adisreyaj
adisreyaj / scroll-spy.directive.ts
Created August 16, 2020 07:52
Angular scroll spy directive
import {
Directive,
Output,
EventEmitter,
ElementRef,
AfterViewInit,
OnDestroy,
QueryList,
ContentChildren,
Input,
@adisreyaj
adisreyaj / node_nginx_ssl.md
Created May 17, 2020 19:09 — forked from bradtraversy/node_nginx_ssl.md
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

@adisreyaj
adisreyaj / validators.ts
Created October 3, 2019 12:17
Check Email Validity usinggRegex
const emailPatter = `^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}$`;
@adisreyaj
adisreyaj / cloudSettings
Created August 6, 2019 14:38
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-08-06T14:38:03.575Z","extensionVersion":"v3.4.1"}
@adisreyaj
adisreyaj / loadScript.ts
Created May 24, 2019 03:02
Load a script dynamically inside the component rather than loading it in the main app itself
loadAPI: Promise<any>;
constructor() {
this.loadAPI = new Promise((resolve) => {
this.loadScript();
resolve(true);
});
}
public loadScript() {
@adisreyaj
adisreyaj / _theme.scss
Created May 8, 2019 02:56
Create Custom Theme for Material
/*-------------------------------------------------
CUSTOM MATERIAL THEME SETUP
--------------------------------------------------*/
@import '../scss/partials/variables';
@import '~@angular/material/theming';
@include mat-core();
$custom-purple: (50: #f3e5f5,
@adisreyaj
adisreyaj / scrollbar.scss
Created April 18, 2019 04:26
Custom Scrollbar styles with CSS
/*-----------------------------------------
Custom Scrollbar Styles
-----------------------------------------*/
/* width */
::-webkit-scrollbar {
width: 5px;
height: 5px;
}
/* Track */