Skip to content

Instantly share code, notes, and snippets.

View Debdut's full-sized avatar
💭
Chill

Debdut Karmakar Debdut

💭
Chill
View GitHub Profile
@Debdut
Debdut / find.sh
Created December 5, 2021 10:01
Find and Delete Files in Linux
find ~ -name "<pattern>" -delete
@Debdut
Debdut / brew.sh
Created December 4, 2021 20:19
Fix Brew in Linux
# Append this to .zshrc, .profile or .bashrc
# Add Brew bin to PATH
BREW_BIN=$(brew --prefix)/bin/
if [ -d BREW_BIN ] ; then
PATH="$PATH:$BREW_BIN"
fi
const NONTEXT_TAGS = [ 'SCRIPT', 'STYLE', 'IMAGE', 'VIDEO', 'AUDIO' ]
function isTextNode (node) {
return NONTEXT_TAGS.indexOf(node.tagName) === -1
}
// Inner Text Less Code, But Slower
function innerText (node) {
if (node.constructor.name === 'Text') {
return node.textContent
import $ from "jquery";
import uuid from "uuid/v4";
import { sendAmplitude, sendApiMutate } from "lib/messages";
import { MutationCreateMessageArgs } from "lib/types/graphql";
import { store } from "content/store";
import createMessageGql from "./create-message.gql";
import { renderHighlights } from "./Shadow";
@Debdut
Debdut / css-properties.css
Created March 19, 2021 06:42 — forked from simurai/css-properties.css
All CSS properties
/*
* CSS Properties
* http://ref.openweb.io/CSS/
**/
.properties {
align-content: value;
align-items: value;
align-self: value;
{
"data": [
{
"id": "1120951317",
"title": "Aahista Aahista",
"artist": "Udit Narayan & Sadhana Sargam",
"album": "Swades (Original Motion Picture Soundtrack)",
"albumLink": "https://geo.music.apple.com/in/album/aahista-aahista/1120951279?app=music&at=11lt62&ct=tracklink",
"isrc": "INS180461167",
"duration": "408",
function makeChange(x, coinSet) {
const mem = []
const getChangeCoins = (value) => {
if (!value) {
return []
}
if (mem[value]) {
return mem[value]
@Debdut
Debdut / bill.svg
Last active September 26, 2020 20:57
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Debdut
Debdut / README.md
Last active September 24, 2020 18:42
  • Save the index.html file
  • Use live-server to open it (http protocol)
  • Open file manager and open the file with Chrome or any browser (file protocol)

Why the two renderings http and file are so different?

@Debdut
Debdut / promise.js
Created September 20, 2020 17:17 — forked from vkarpov15/promise.js
Simple Promises/A+ Compliant Promise
const assert = (v, err) => {
if (!v) {
throw err;
}
};
let counter = 0;
class Promise {
constructor(executor) {