Skip to content

Instantly share code, notes, and snippets.

View langheran's full-sized avatar
🎧
Automation Ninja 🐱‍👓

Nisim Hurst-Tarrab langheran

🎧
Automation Ninja 🐱‍👓
View GitHub Profile
@langheran
langheran / tfanl.cmd
Created October 27, 2025 19:09
C:\Users\NisimHurst\NDS\scripts\cmds\tfanl.cmd
@echo off
echo %time%
setlocal
@REM set TF_LOG=DEBUG
for /F %%a in ('echo prompt $E ^| cmd') do set "ESC=%%a"
IF NOT DEFINED ENV (
set ENV=qa
)
IF NOT EXIST "%CD%\vars" (
echo %ESC%[33mterraform apply -lock=false -auto-approve%ESC%[0m
@langheran
langheran / remove_docker_desktop.ps1
Created October 9, 2025 16:45
C:\Users\NisimHurst\NDS\scripts\remove_docker_desktop.ps1
# Run this as Administrator
Write-Host "Stopping Docker processes and services..."
# Stop Docker service if exists
if (Get-Service -Name "com.docker.service" -ErrorAction SilentlyContinue) {
Write-Host "Stopping com.docker.service..."
Stop-Service -Name "com.docker.service" -Force -ErrorAction SilentlyContinue
}
@langheran
langheran / gu.cmd
Created October 6, 2025 17:56
C:\Users\NisimHurst\NDS\scripts\cmds\gu.cmd
@echo off
for /F %%a in ('echo prompt $E ^| cmd') do set "ESC=%%a"
call gcloud config configurations list
call gcloud config configurations activate %*
call gcloud config configurations list
echo %ESC%[33mRun the following commands to authenticate and set up your environment:%ESC%[0m
@langheran
langheran / 0. copy user or password.example.bat
Created September 29, 2025 22:12
C:\Users\NisimHurst\NDS\scripts\0. copy user or password.example.bat
@echo off
setlocal
:PROMPT
SET /P ACTION=User or Password (U/[P])? || SET "ACTION=P"
IF /I NOT "%ACTION%"=="U" IF /I NOT "%ACTION%"=="P" GOTO END
IF /I "%ACTION%" == "U" GOTO USER
IF /I "%ACTION%" == "P" GOTO PASS
:PASS
echo|set/p=<password>|clip
GOTO END
@langheran
langheran / 0. copy user or password.example.bat
Created September 29, 2025 22:11
C:\Users\NisimHurst\NDS\PiSA McKinsey\scripts\0. copy user or password.example.bat
@echo off
setlocal
:PROMPT
SET /P ACTION=User or Password (U/[P])? || SET "ACTION=P"
IF /I NOT "%ACTION%"=="U" IF /I NOT "%ACTION%"=="P" GOTO END
IF /I "%ACTION%" == "U" GOTO USER
IF /I "%ACTION%" == "P" GOTO PASS
:PASS
echo|set/p=<password>|clip
GOTO END
@langheran
langheran / README.md
Created August 12, 2025 19:45
C:\Users\NisimHurst\Utilities\Autohotkey\UserScripts\firefox\chrome\userChrome.css

Customizing Firefox with userChrome.css

I guess you can fake an SSB in firefox by some hacking. I don't know how much work you want to put into this but here a sketch of an idea.

  • Create a new Profile in firefox: open about:profiles click in create new profile and give it the name of the SSB application you want to create.

  • Open firefox in the new profile by running the command firefox --no-remote -P "ProfileName"

  • Check if you are in the correct profile by opening about:support, in the information table look for Profile Directory. The path must end in "ProfileName". Click in Open Directory.

@langheran
langheran / remove_secrets_from_tf.bat
Created July 10, 2025 02:35
C:\Users\NisimHurst\NDS\scripts\remove_secrets_from_tf.bat
terraform state rm "azurerm_key_vault_secret.env_vars["""HUGGINGFACE_EMBEDDER"""]"
terraform state rm "azurerm_key_vault_secret.env_vars["""AZURE_OPENAI_API_KEY"""]"
terraform state rm "azurerm_key_vault_secret.env_vars["""EMBEDDER_MODEL"""]"
terraform state rm "azurerm_key_vault_secret.env_vars["""AZURE_OPENAI_ENDPOINT"""]"
terraform state rm "azurerm_key_vault_secret.env_vars["""EMBEDDER_ENDPOINT"""]"
terraform state rm "azurerm_key_vault_secret.env_vars["""JWT_ALGORITHM"""]"
terraform state rm "azurerm_key_vault_secret.env_vars["""MONGO_URI"""]"
terraform state rm "azurerm_key_vault_secret.env_vars["""OPENAI_EMBEDDER"""]"
terraform state rm "azurerm_key_vault_secret.env_vars["""AZURE_OPENAI_API_VERSION"""]"
terraform state rm "azurerm_key_vault_secret.env_vars["""OPENAI_ENGINE"""]"
@langheran
langheran / tfg.cmd
Created July 7, 2025 16:20
C:\Users\NisimHurst\NDS\scripts\cmds\tfg.cmd
@echo off
setlocal
@REM set TF_LOG=DEBUG
terraform plan -generate-config-out=generated_resources.tf
code generated_resources.tf
endlocal
@langheran
langheran / tfi.cmd
Last active July 7, 2025 17:01
C:\Users\NisimHurst\NDS\scripts\cmds\tfi.cmd
@echo off
setlocal
@REM set TF_LOG=DEBUG
set ENV=qa
IF NOT EXIST "%CD%\backends" (
echo "No backends directory found. Using default backend configuration."
terraform init -reconfigure -upgrade
) ELSE (
echo "Using backend configuration from backends/%ENV%.tfbackend"
terraform init -reconfigure -upgrade -backend-config=./backends/%ENV%.tfbackend
@langheran
langheran / gb.cmd
Last active August 29, 2025 17:22
C:\Users\NisimHurst\NDS\scripts\cmds\gb.cmd
@echo off
git fetch --all
git branch -a -v %*