Skip to content

Instantly share code, notes, and snippets.

View itsashis4u's full-sized avatar

Ashish Kumar Badtiya itsashis4u

View GitHub Profile
function Badge({ title }) {
const [discount, off] = title.split(' ')
return (
<View style={{ margin: 10 }}>
<View style={badgeStyle.box3} />
<View style={badgeStyle.box2} />
<View style={badgeStyle.box1} />
<View style={badgeStyle.main}>
<Text style={{ color: "white", fontWeight: 'bold' }}>{discount}</Text>
<Text style={{ color: "white", fontWeight: 'bold' }}>{off}</Text>
@itsashis4u
itsashis4u / config
Created June 28, 2021 20:06
expo config
{
name: 'app',
slug: 'app',
version: '1.0.0',
orientation: 'portrait',
icon: './assets/icon.png',
assetBundlePatterns: [
'**/*'
],
plugins: [
@itsashis4u
itsashis4u / lru.ts
Created June 19, 2021 19:45
Simple LRU (Least Recently Used) cache implementation using TypeScript
interface LRUType<K, V> extends Iterable<[K, V]> {
get(key: K): V | undefined;
readonly size: number;
set(key: K, value: V): LRUType<K, V>;
delete(key): boolean;
has(key): boolean;
@itsashis4u
itsashis4u / payment-validations.js
Last active September 27, 2020 10:15
Payment Validations
function paymentModeClick(panCardMember, AVPA) {
if (!panCardMember) {
var maxLimit = AVPA ? AVPA : maxCashLimit;
if (totalCart > maxLimit) {
return `${totalCart} cannot be greater than ${Constants.rupee_sign}${maxLimit}`;
}
}
var totalCart = 210000;
@itsashis4u
itsashis4u / feedbackModal.diff
Last active June 12, 2020 16:15
Feedback modal
diff --git src/components/popup/feedbackModal.jsx src/components/popup/feedbackModal.jsx
index 709a23bf..bb79d629 100644
--- src/components/popup/feedbackModal.jsx
+++ src/components/popup/feedbackModal.jsx
@@ -11,6 +11,38 @@ import Button from '../button';
import Feedback, { DEFAULT } from '../feedback';
import PopUpHeader from './popUpHeader';
/** Modal for Feedback of the user */
+
+function FeedbackLabelButton({ code, label, handleClick, selectedLabels }) {
@itsashis4u
itsashis4u / audit.log
Created June 8, 2018 10:14
Known vulnerabilities
=== npm audit security report ===
┌──────────────────────────────────────────────────────────────────────────────┐
│ Manual Review │
│ Some vulnerabilities require your attention to resolve │
│ │
│ Visit https://go.npm.me/audit-guide for additional guidance │
└──────────────────────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Moderate │ Memory Exposure │
=== npm audit security report ===
┌──────────────────────────────────────────────────────────────────────────────┐
│ Manual Review │
│ Some vulnerabilities require your attention to resolve │
│ │
│ Visit https://go.npm.me/audit-guide for additional guidance │
└──────────────────────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ Moderate │ Prototype pollution │
@itsashis4u
itsashis4u / index.html
Created May 22, 2017 14:02
JS Bin Transform and transition perfs // source https://jsbin.com/xuvexuf
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Transform and transition perfs">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style id="jsbin-css">
body {
background-color: #fff;

Keybase proof

I hereby claim:

  • I am itsashis4u on github.
  • I am itsashis4u (https://keybase.io/itsashis4u) on keybase.
  • I have a public key ASCUxBT5egKPCBbt6IBIe_5iVszN0vtyugkRN_mi7HkGPQo

To claim this, I am signing this object:

@itsashis4u
itsashis4u / index.html
Last active April 22, 2017 21:32
Learning Redux and React-Redux | JS Bin// source https://jsbin.com/tuwoyim
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<script src="https://fb.me/react-15.1.0.js"></script>
<script src="https://fb.me/react-dom-15.1.0.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/redux/3.6.0/redux.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-redux/5.0.4/react-redux.min.js"></script>