Skip to content

Instantly share code, notes, and snippets.

View kcak11's full-sized avatar
👽
kcak11.com / ashishkumarkc.com

K.C.Ashish Kumar kcak11

👽
kcak11.com / ashishkumarkc.com
View GitHub Profile
@kcak11
kcak11 / 00000.md
Last active August 9, 2024 00:30
VSCode Profiles Collection

VSCode Profile Collection

A Collection of VSCode Profiles tailored specifically for different kind of development environments

@kcak11
kcak11 / 0000.md
Last active October 7, 2024 08:43
AES/CBC/PKCS5PADDING - Java/Javascript (Encryption & Decryption)

AES/CBC/PKCS5PADDING - Java/Javascript (Encryption & Decryption)

Resource Loader Script

Use during overrides

@kcak11
kcak11 / App.md
Last active June 18, 2021 11:02
StringObfuscator

StringObfuscator

@kcak11
kcak11 / App.md
Last active June 16, 2021 08:59
Input / TextArea - Range Selection

Input / TextArea - Range Selection

This pen demonstrates the JavaScript functionality to retrieve and set the start and end range selection values for "input" / "textarea" fields.

A Pen by K.C.Ashish Kumar on CodePen.

License.

@kcak11
kcak11 / README.md
Last active June 3, 2024 09:40
Angular Screen Simulation

Angular Screen Simulation

Usually while developing / testing an Angular application, there is a need to run a particular flow to reach a specific screen and then if we want to make any code changes like CSS / TS / TEMPLATE, then again we need to go back and come from the beginning to that specific screen. This might be easier if the screen appears 2nd or 3rd in the flow, but if the screen appears at 10th position for example, then it gets difficult to complete the flow and test with all the possible combinations each time.

To address this complexity, there is an easier way to simulate the various combinations, as described below.

In the constructor of your Angular component, inject the ngZone property.

import { NgZone } from '@angular/core';
@kcak11
kcak11 / App.md
Last active June 11, 2021 17:24
Trim Payload

Trim Payload

JavaScript utility to trim the payload object.

/**
* @dynamic is for runtime initializing DomHandler.browser
*
* If delete below comment, we can see this error message:
* Metadata collected contains an error that will be reported at runtime:
* Only initialized variables and constants can be referenced
* because the value of this variable is needed by the template compiler.
*/
// @dynamic
export class DomHandler {
@kcak11
kcak11 / App.md
Last active November 7, 2024 05:59
Country Codes

Country Codes

List of all Country Codes (ISO & Dialing) sorted in alphabetical order.

@kcak11
kcak11 / App.md
Created October 4, 2020 05:52
JS Event Handling and Dispatching

JS Event Handling and Dispatching