This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"sender_email": "email@email", | |
"app_password": "your_app_password", | |
"spreadsheet_id": "your_spreadsheet_id", | |
"sheet_name": "sheet_name", | |
"template_subject": "Subject_line", | |
"sender_placeholder": "email_placeholder", | |
"start_row": 2, | |
"end_row": 4, | |
"email_delay": 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# To convert .env file to .envrc | |
# usages: make [.env_file]2envrc | |
# e.g. "make .env2envrc" or "make .env.production2envrc" | |
%2envrc: | |
$(eval file := $*) | |
@(cat $(file) | sed 's/^/export /' > .envrc) | |
@echo ".envrc generated from $(file)" | |
# example |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"log" | |
"os" | |
"os/signal" | |
"syscall" | |
"github.com/pion/webrtc/v3" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default function (babel) { | |
const { types: t } = babel; | |
const infiniteLoopDetector = babel.parse(` | |
function __infiniteLoopDetector() { | |
loopdetector.count += 1; | |
if(loopdetector.count > 10000) { | |
throw new Error("Infinte loop detected.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//https://astexplorer.net/#/gist/6fa8fbfbc299ba7dcf27a83d50d89c26/3af7743eac480fd64e4b9013c9e0969097470959 | |
export default function (babel) { | |
const { types: t } = babel; | |
return { | |
name: "ast-transform", // not required | |
visitor: { | |
ImportDeclaration(importPath) { | |
if (importPath.node.source.value !== "lodash") return; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*** | |
* | |
* @author Ritwick Dey (https://github.com/ritwickdey) | |
* @license MIT | |
* | |
* What is the hell? | |
* - This is a automated script to do n numbers of facebook comments. | |
* | |
* Perpose of the hell? | |
* You may seen such kind of post |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useState, useEffect } from 'react'; | |
export const useLocalStorage = (storageKey, initialValue) => { | |
const [storageVal, setStorageVal] = useState(getFromLocalStorage(storageKey)); | |
useEffect(() => { | |
setToLocalStorage(storageKey, storageVal); | |
// eslint-disable-next-line react-hooks/exhaustive-deps | |
}, [storageVal]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const comment = `Hello. few questions!!, | |
When you're getting this issue? after load of vscode or after clicking to Go Live ? | |
Is this happen every-time ? or random ? | |
Please reply here https://github.com/ritwickdey/vscode-live-server/issues/278 | |
Duplicate of https://github.com/ritwickdey/vscode-live-server/issues/278 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function makeUnique<T>(arr: T[], idSelector: (e: T) => string | number) { | |
const obj = {}; | |
arr.forEach(e => { | |
obj[idSelector(e)] = e; | |
}); | |
return Object.keys(obj).map(key => obj[key]) as T[]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//For firebase funtion. | |
/* | |
Usage: | |
exports.foo = functions.https.onRequest(withCORS((req, res) => { | |
res.send("Hello World"); | |
}); | |
*/ |
NewerOlder