Skip to content

Instantly share code, notes, and snippets.

View mshahin364's full-sized avatar

Shahinur Islam mshahin364

  • Bangladesh
View GitHub Profile
@mshahin364
mshahin364 / README.md
Created November 8, 2024 04:32 — forked from eesur/README.md
d3 | legend scroll

Testing legend with scroll for an overtly long legend. Test has simple fade out of lines on click of legend item, and moves the legend on roll over of bar lines. Use the slider to increase/decrease the lines and keys in legend.

@mshahin364
mshahin364 / deep-equals.ts
Created October 6, 2024 13:13 — forked from jsdevtom/deep-equals.ts
fast deep equals in TypeScript
const isArray = Array.isArray;
const keyList = Object.keys;
const hasProp = Object.prototype.hasOwnProperty;
export function isDeeplyEqual<T extends any>(a: T, b: T): boolean {
if (a === b) { return true; }
if (a && b && typeof a === 'object' && typeof b === 'object') {
const arrA = isArray(a)
@mshahin364
mshahin364 / index.html
Created May 20, 2022 08:14 — forked from alexkrolick/index.html
React-Quill Custom Format w/Parchment Demo
<div class="app">
</div>
@mshahin364
mshahin364 / code.md
Created January 10, 2020 10:42 — forked from gopalindians/code.md
Jetbrains IntelliJ IDEA 2019.2.4 Activation code

Please make fork of this, as this can be removed by Github.com sooner or later.

CATF44LT7C-eyJsaWNlbnNlSWQiOiJDQVRGNDRMVDdDIiwibGljZW5zZWVOYW1lIjoiVmxhZGlzbGF2IEtvdmFsZW5rbyIsImFzc2lnbmVlTmFtZSI6IiIsImFzc2lnbmVlRW1haWwiOiIiLCJsaWNlbnNlUmVzdHJpY3Rpb24iOiJGb3IgZWR1Y2F0aW9uYWwgdXNlIG9ubHkiLCJjaGVja0NvbmN1cnJlbnRVc2UiOmZhbHNlLCJwcm9kdWN0cyI6W3siY29kZSI6IklJIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiQUMiLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJEUE4iLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJQUyIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IkdPIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiRE0iLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJDTCIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IlJTMCIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IlJDIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiUkQiLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJQQyIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IlJNIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiV1MiLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJEQiIsI

// CatInputs.js
import React from 'react';
import PropTypes from 'prop-types';
const CatInputs = ({ idx, catState, handleCatChange }) => {
const catId = `name-${idx}`;
const ageId = `age-${idx}`;
return (
<div key={`cat-${idx}`}>
import React, { Component } from "react";
import { render } from "react-dom";
import "./index.css";
class Widget extends Component {
state = { text: "" };
handleChange = (e) => {
this.setState({ text: e.target.value });
};
render() {
@mshahin364
mshahin364 / media-query.css
Created October 5, 2018 06:46 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
@mshahin364
mshahin364 / androidBackButton.js
Created September 11, 2018 19:08 — forked from AlexBrasileiro/androidBackButton.js
React Native | Android Backbutton HOC
import React, { Component } from 'react';
import { BackHandler } from 'react-native';
const AndroidBackButton = (WrappedComponent) => {
return class extends Component {
constructor(props) {
super(props)
}
@mshahin364
mshahin364 / scroll-tracker.directive.ts
Created September 9, 2018 17:45 — forked from rosslavery/scroll-tracker.directive.ts
Angular service to save / restore scroll position of arbitrary elements on route change
import { AfterViewInit, Directive, ElementRef, NgZone, OnDestroy } from '@angular/core';
import { NavigationEnd, NavigationStart, Router } from '@angular/router';
import { Subscription } from 'rxjs/Subscription';
import { ScrollTrackerService } from './scroll-tracker.service';
@Directive({
selector: '[scrollTracker]'
})
export class ScrollTrackerDirective implements AfterViewInit, OnDestroy {
@mshahin364
mshahin364 / gist:219df83b6707c6d9e16cd17cf5d2b589
Created September 4, 2018 07:00 — forked from thebuilder/gist:7248688
Events with correct scope in TypeScript
class Tracker {
count = 0;
constructor() {
window.addEventListener("mousedown", this.mouseDown);
window.addEventListener("mouseup", this.mouseUp);
}
mouseDown = (ev: MouseEvent) => {
window.addEventListener("mousemove", this.mouseMove);
}
mouseUp = (ev: MouseEvent) => {