Skip to content

Instantly share code, notes, and snippets.

Avatar
👽
kcak11.com / ashishkumarkc.com

K.C.Ashish Kumar kcak11

👽
kcak11.com / ashishkumarkc.com
View GitHub Profile
@kcak11
kcak11 / 0000.md
Last active Nov 9, 2022
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 Jun 18, 2021
StringObfuscator
View App.md

StringObfuscator

@kcak11
kcak11 / App.md
Last active Jun 16, 2021
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 Jun 7, 2021
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 Jun 11, 2021
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 Nov 3, 2022
Country Codes
View App.md

Country Codes

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

@kcak11
kcak11 / App.md
Created Oct 4, 2020
JS Event Handling and Dispatching
View App.md

JS Event Handling and Dispatching

@kcak11
kcak11 / App.md
Last active Jul 9, 2020
JS FileReader Example
View App.md

JavaScript FileReader Example