Skip to content

Instantly share code, notes, and snippets.


Baruch Odem (Rothkoff) baruchiro

View GitHub Profile
baruchiro /
Last active May 8, 2022
Google Apps Script reuse
function doPost(e) {
log("Received doPost")
try {
const { chatId, text, update } = getUpdate(e)
if (myChatId !== chatId)
return sendMessage(chatId, `You are not authorized`)
if (!isDocument(update))
return sendMessage(chatId, `message is without document`)


I'm using semantic-release to perform releases and changelog.

The convention is the eslint format, with the next rules:

{tag: 'Breaking', release: 'major'},
{tag: 'Fix', release: 'patch'},
{tag: 'Update', release: 'minor'},
baruchiro / WindowsTerminal_settings.json
Last active Feb 21, 2021
Windows Terminal profile
View WindowsTerminal_settings.json
// This file was initially generated by Windows Terminal 1.5.10411.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see:
"$schema": "",
"defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
// You can add more global application settings here.
View Microsoft.PowerShell_profile.ps1
# Gist:
Set-PoshPrompt -Theme ~/.mytheme.omp.json
# git push master && git switch dev -> g p sm
function ParseAliases {
foreach ($command in $args) {
Write-Host "> git $command" -ForegroundColor Green
Invoke-Expression -Command "git $command"
baruchiro / .mytheme.omp.json
Last active Jul 11, 2021
My oh-my-posh profile
View .mytheme.omp.json
"Gist": "",
"final_space": false,
"osc99": false,
"console_title": false,
"console_title_style": "",
"console_title_template": "",
"blocks": [
"type": "prompt",
baruchiro / .gitconfig
Last active Mar 10, 2021
My git configurations and aliases
View .gitconfig
# This is Git's per-user configuration file.
# Gist:
email =
name = Baruch Odem
helper = manager
[includeIf "gitdir:C:/Checkmarx/"]
path = C:/Checkmarx/.gitconfig
baruchiro / Dockerfile
Last active Feb 19, 2021
Dockerfile for auto update MongoDB from JSON file
View Dockerfile
FROM mongo
ARG REPO_USER=baruchiro
RUN apt-get update
baruchiro / SharedPromise.ts
Last active Jan 6, 2021
Three ways to mutual exclusion in NodeJS
View SharedPromise.ts
const wait = (s: number) => new Promise((resolve) => setTimeout(resolve, s * 1000))
let promRef
const download = async () => {
if (promRef) return promRef
promRef = wait(3).then(() => {
promRef = null
baruchiro /
Created Dec 8, 2019
Find all missing dll's from .deps.json and download them
# args: <Project directory> <App Name>
# Example: ~/source/myapp/bin/Release/netcoreapp2.1/publish myapp
import json
import sys
import os
import urllib.request
import zipfile
import tempfile
View bug.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.