Skip to content

Instantly share code, notes, and snippets.

View leodevbro's full-sized avatar
Soccer and Table tennis

Levan Katsadze leodevbro

Soccer and Table tennis
View GitHub Profile
@leodevbro
leodevbro / gist:64b8fd11afc6c226e550a3ae4e31e1ae
Created February 18, 2024 21:59
Full text of the GotQuestions special question
Maybe I'm wrong, but I think the GotQuestions official answer of "What does the Bible say about extreme fighting?" has false conclusion.
Please read my arguments and then tell me your opinion about them.
So, I see: "the Bible does not give any hard-and-fast reason why a Christian cannot enjoy or participate in martial arts or the sport of mixed martial arts (MMA). "
I think, the principles in the Bible tells us that it is a sin to hurt each other physically for the sake of show/entertainment and/or money. I’m not talking about the combat sports which do not contain high risk of permanent physical damage, like brain damage. I am talking about the today’s popular MMA fights, and boxing fight, and other kinds of fights, because I believe that today’s MMA fights and boxing fights contain very high risk of permanent brain damage, as well as high risks of other permanent physical damage.
Here are my arguments:
@leodevbro
leodevbro / special-task-solution.ts
Created January 6, 2023 18:38
Special Task Solution
// more readable and maintainable (I converted it to TypeScript)
const makeLowerCaseAndfindLongWordsInReverseOrder = (text: string) => {
const lowerCased = text.toLocaleLowerCase();
const words = lowerCased.split(" ");
words.reverse();
const trimmedWords = words.map((w) => w.trim());
const longWords = trimmedWords.filter((w) => w.length > 5);
@leodevbro
leodevbro / vs-code-marketplace-api-get-info-of-all-extensions.ts
Last active April 10, 2023 07:48
VS Code Marketplace API - Get Info Of All Extensions
// Source:
// https://github.com/badges/shields/blob/master/services/visual-studio-marketplace/visual-studio-marketplace-base.js
// Base Url of VS Code Marketplace API:
const baseUrl = `https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery?api-version=3.0-preview.1`;
interface IOneExtensionForFlag256 {
publisher: {
publisherId: string; // "998b010b-e2af-44a5-a6cd-0b5fd3b9b6f8"
publisherName: string; // "ms-python"
@leodevbro
leodevbro / gmail_threads_stats_original_code.gs
Created November 29, 2022 21:47
Original gmail stats code
// Google Apps Script is a coding language based on JavaScript.
// This Apps Script code helps us to sort addresses by most threads.
// A thread is a group of messages, as a conversation.
const modes = {
inbox: "inbox", // to analyze threads in the "inbox" folder
outbox: "outbox", // to analyze threads in the "sent" folder
};
const currentMode = modes.inbox; // type 'outbox' if you want to analyze threads in the "sent" folder.
@leodevbro
leodevbro / gmail-stats.gs
Last active April 25, 2024 05:21
In Gmail inbox, Find sender with most mail threads
// Original script: https://gist.github.com/leodevbro/2987e8874a18b2086ea6cc1aa3c494e8
// v2.5
// Google Apps Script is a coding language based on JavaScript.
// This Apps Script code helps us to sort addresses by most threads.
// A thread is a group of messages, as a conversation.
const modes = {
inbox: "inbox", // to analyze threads in the "Inbox" folder
outbox: "outbox", // to analyze threads in the "Sent" folder
@leodevbro
leodevbro / react-into-single-file.md
Last active September 1, 2022 10:06
How to generate single file (HTML with all the CSS/JS inside) from React project

How to generate single file (HTML with all the CSS/JS inside) from React project

Note:

  • SVG files will be included (as SVG elements) in the single file.
  • Pixel based image files will be included as links/paths, so please host them somewhere to be accessible.
  • Also please host font files somewhere and then link them with @font-face.

Steps:

  • npm install --save-dev gulp gulp-inline-source gulp-replace
@media screen and (min-width: 1281px) {
.slider-header.slider-header.slider-header {
inset: 22% auto auto 40%;
align-items: center;
}
.slider-header.slider-header.slider-header h2 {
margin-right: 0px;
}
}
/* eslint-disable @typescript-eslint/naming-convention */
// import * as path from "path";
// import * as vscode from "vscode";
import { IExtensionPackage, IGrammar } from "./IExtensionGrammar";
// import fs = require("fs");
import { getRegexForBrackets } from "./bracketUtil";
// import JSON5 = require("json5");
import * as JSON5 from "json5";
import LanguageConfig from "./languageConfig";
// var ab2str = require("arraybuffer-to-string");
// 1)
console.log(3, typeof 3); // 3 "number"
console.log("a", typeof "a"); // "a" "string"
console.log(2, typeof 2, "a", typeof "a"); // 2 "number" "a" "string"
// 2) Recursion
let a = {v: 0};
let parentFn = () => {
let z = a;
let childFn = () => {
console.log(z.v);
};
return(childFn);
};
let myFn = parentFn();