Skip to content

Instantly share code, notes, and snippets.

View baruchiro's full-sized avatar
🤷‍♂️
Can't do this anymore

Baruch Odem (Rothkoff) baruchiro

🤷‍♂️
Can't do this anymore
View GitHub Profile
@baruchiro
baruchiro / .mytheme.omp.json
Last active July 11, 2021 08:55
My oh-my-posh profile
{
"Gist": "https://gist.github.com/baruchiro/22d931516479981565c79278c04ba9a9",
"final_space": false,
"osc99": false,
"console_title": false,
"console_title_style": "",
"console_title_template": "",
"blocks": [
{
"type": "prompt",
@baruchiro
baruchiro / .gitconfig
Last active March 10, 2021 08:35
My git configurations and aliases
# This is Git's per-user configuration file.
# Gist: https://gist.github.com/baruchiro/95d5e0a3e4dde5d2642bbfb72d520a67
[user]
email = baruchiro@gmail.com
name = Baruch Odem
[credential]
helper = manager
[includeIf "gitdir:C:/Checkmarx/"]
path = C:/Checkmarx/.gitconfig
[alias]
@baruchiro
baruchiro / Dockerfile
Last active February 19, 2021 09:34
Dockerfile for auto update MongoDB from JSON file
FROM mongo
ARG REPO_USER=baruchiro
ARG REPOSITORY=Accounts
ARG RESTORE_SCRIPT=mongo/load.sh
ENV REPOSITORY=${REPOSITORY}
ENV RESTORE_SCRIPT=${RESTORE_SCRIPT}
RUN apt-get update
@baruchiro
baruchiro / SharedPromise.ts
Last active January 6, 2021 07:39
Three ways to mutual exclusion in NodeJS
const wait = (s: number) => new Promise((resolve) => setTimeout(resolve, s * 1000))
let promRef
const download = async () => {
if (promRef) return promRef
promRef = wait(3).then(() => {
console.log('finished')
promRef = null
@baruchiro
baruchiro / downloader.py
Created December 8, 2019 13:09
Find all missing dll's from .deps.json and download them
#!/usr/bin/python3
# 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
@baruchiro
baruchiro / bug.ipynb
Created August 20, 2018 15:29
Bug in openCV
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@baruchiro
baruchiro / Extensions.cs
Created May 30, 2018 17:43
Sample of extension methods for matrix
using System;
using System.Linq;
namespace extension
{
class Program
{
static void Main(string[] args)
{
double[][] matrix =