Skip to content

Instantly share code, notes, and snippets.

View baruchiro's full-sized avatar
:shipit:
I'm on reserve duty

Baruch Odem (Rothkoff) baruchiro

:shipit:
I'm on reserve duty
View GitHub Profile
@Mosharush
Mosharush / .bashrc
Last active October 6, 2023 16:43
Bash Alias to run last wrong command wrote in Hebrew to the correct command :)
alias גררר="replace_hebrew_with_latin"
replace_hebrew_with_latin() {
previous_command=$(history | tail -n 1 | sed 's/^[ ]*[0-9]*[ ]*//')
latin_command=$(echo "$previous_command" | tr 'פםןוטארק׳/ףךלחיעכגדשץתצמנהבסז' 'poiuytrewq;lkjhgfdsa.,mnbvcxz')
# Display the translated command
echo "Translated Command: $latin_command"
# Ask for confirmation before executing
echo "Do you want to execute this command? [Press Enter again]"

Electron is tricky to get set up on Windows Subsystem for Linux, but it can work!

Four things needed overall:

  1. you need WSL2, not WSL1
  2. you need node, of course, and that part isn't so bad
  3. you need to apt install several dependencies
  4. you need an X Server so it can display the electron GUI over in Windows-land

Setup instructions, in order:

@brettcannon
brettcannon / steps.yml
Created January 24, 2020 22:56
GitHub Actions steps to cache VS Code stable when running extension tests
- name: Get VS Code versions
run: curl --output vscode-stable-versions.json https://update.code.visualstudio.com/api/releases/stable
- uses: actions/cache@v1
with:
path: .vscode-test/
key: ${{ runner.os }}-vscode-test-${{ hashFiles('vscode-stable-versions.json') }}
restore-keys: |
${{ runner.os }}-vscode-test-
@shooksm
shooksm / LICENSE
Last active December 23, 2021 19:22
Axios interceptor setup component for use with @okta/okta-react
Copyright (c) 2019 Matthew Shooks
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
@liamkernighan
liamkernighan / AppDbContext.cs
Last active January 3, 2022 20:02
Entity Framework Bot State for Bot Framework SDKv4 (to store in SQL database IStorage implementation)
namespace DAL
{
public class AppDbContext : DbContext
{
private readonly string defaultConnectionString;
#region tables
public DbSet<EFBotState> BotStates { get; set; }
@cecilemuller
cecilemuller / launch.json
Last active July 22, 2024 05:49
Run ts-node in VSCode Debugger
{
"version": "0.2.0",
"configurations": [
{
"name": "Example",
"type": "node",
"request": "launch",
"runtimeExecutable": "node",
"runtimeArgs": ["--nolazy", "-r", "ts-node/register/transpile-only"],
@ahmed-musallam
ahmed-musallam / console.html
Created December 11, 2017 19:34
A simple browser console-like html setup
<!--
I use this setup primarely on jsfiddle where I do not want to open chrome console while testing js code.
example: https://jsfiddle.net/wybmxgop/1/
-->
<!-- a Mono-spaced font-->
<link href="https://fonts.googleapis.com/css?family=Roboto+Mono" rel="stylesheet">
<style>
ul#console {
list-style-type: none;
@ibraheem4
ibraheem4 / postgres-brew.md
Last active July 18, 2024 00:18 — forked from sgnl/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
1. Setup a project
2. Add groovy SDK support:
https://www.bonusbits.com/wiki/HowTo:Add_Groovy_SDK_to_IntelliJ_IDEA
3. Download http://(yourjenkinsurl)/job/(yourpipelinejob)/pipeline-syntax/gdsl
- this will give you the .gdsl file - download this to the src folder of your project.
4. Finally follow this step - right click on the src folder -> Mark directory as -> Sources Root
@du5rte
du5rte / Auth.js
Created March 16, 2017 16:38
mobX Auth Store
import mobx, { computed, observable, action } from "mobx"
import store from "store"
import autoStore from "./autoStore"
class Auth {
constructor() {
autoStore("authentication", this)
}