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 / 0000.md
Last active February 20, 2024 16:35
AES/CBC/PKCS5PADDING - Java/Javascript (Encryption & Decryption)
View 0000.md

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

View App.md

Resource Loader Script

Use during overrides

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

StringObfuscator

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

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 7, 2021 06:40
Angular Screen Simulation
View README.md

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
View App.md

Trim Payload

JavaScript utility to trim the payload object.

View domhandler.ts
/**
* @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 30, 2023 18:24
Country Codes
View App.md

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
View App.md

JS Event Handling and Dispatching

@kcak11
kcak11 / App.md
Last active July 9, 2020 06:28
JS FileReader Example
View App.md

JavaScript FileReader Example