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 / alarm.js
Created March 16, 2025 17:35
C:\Users\Nisim Hurst\Downloads\sunrise set alarm tasker\sunrise.js
function addOrSubtractMinutes(timeString, minutesToAddOrSubtract) {
var timeParts = timeString.split(':');
var hours = parseInt(timeParts[0], 10);
var minutes = parseInt(timeParts[1], 10);
var date = new Date();
date.setHours(hours);
date.setMinutes(minutes + minutesToAddOrSubtract);
var newHours = date.getHours();
@langheran
langheran / sh_pod.ps1
Last active March 19, 2025 01:18
C:\Users\NisimHurst\NDS\scripts\cmds\sh_pod.ps1
# read parameters from the command line
param(
[string]$namespace = "default",
[string]$pattern = "",
[bool]$previous = $false
)
# check if pattern has a space and if so, split it in two and use the first part
$container = ""
if ($pattern.Contains(" ")) {
@langheran
langheran / sh_pod.ps1
Created March 14, 2025 23:17
C:\Users\NisimHurst\NDS\scripts\cmds\sh_pod.ps1
# read parameters from the command line
param(
[string]$namespace = "default",
[string]$pattern = "",
[bool]$previous = $false
)
# check if pattern has a space and if so, split it in two and use the first part
$container = ""
if ($pattern.Contains(" ")) {
@langheran
langheran / SumatraPDF-settings.txt
Last active March 12, 2025 20:55
C:\Users\NisimHurst\Utilities\SumatraPDF\SumatraPDF-settings.txt
# For documentation, see https://www.sumatrapdfreader.org/settings3.2.html
MainWindowBackground = #80fff200
EscToExit = false
ReuseInstance = false
UseSysColors = false
RestoreSession = true
FixedPageUI [
TextColor = #000000
@langheran
langheran / del_pod.ps1
Created March 7, 2025 17:25
C:\Users\NisimHurst\NDS\scripts\cmds\delpod.cmd
# read parameters from the command line
param(
[string]$namespace = "default",
[string]$pattern = "",
[bool]$previous = $false
)
# check if pattern has a space and if so, split it in two and use the first part
$container = ""
if ($pattern.Contains(" ")) {
@langheran
langheran / stop_windows_error_reporting.bat
Created March 7, 2025 16:02
C:\Users\NisimHurst\NDS\scripts\stop_windows_error_reporting.bat
@echo off
echo Disabling Windows Error Reporting Service ...
sc query "WerSvc"| find "RUNNING" >nul 2>&1 && net stop "WerSvc" && sc config "WerSvc" start= disabled
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting" /v Disabled /t REG_DWORD /d 1 /f >nul 2>&1
echo
echo Windows Error Reporting Service has been disabled.
@langheran
langheran / gp.cmd
Last active July 1, 2025 17:38
C:\Users\NisimHurst\NDS\scripts\cmds\gp.cmd
@echo off
for /F %%a in ('echo prompt $E ^| cmd') do set "ESC=%%a"
@REM echo ^<ESC^>[4m %ESC%[4mUnderline Underline%ESC%[0m
@REM echo ^<ESC^>[32m %ESC%[32mGreen Green Green%ESC%[0m
@REM echo ^<ESC^>[33m %ESC%[33mYellow Yellow Yellow%ESC%[0m
echo %ESC%[32mPulling latest changes from the remote repository...%ESC%[0m
git pull %*
echo.
echo.
@langheran
langheran / export_diff.bat
Created February 25, 2025 17:20
C:\Users\NisimHurst\NDS\scripts\export_diff.bat
vimdiff -c TOhtml -c "w vimdiff_export.html | qa!" "C:\Users\NisimHurst\Desktop\algorithm-dev.py" "C:\Users\NisimHurst\Desktop\algorithm-pro.py"
@langheran
langheran / disable_chrome_occlusion.reg
Created February 21, 2025 22:12
C:\Users\NisimHurst\NDS\scripts\disable_chrome_occlusion.reg
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome]
"NativeWindowOcclusionEnabled"=dword:00000000
"WindowOcclusionEnabled"=dword:00000000
@langheran
langheran / profile.ps1
Last active February 21, 2025 23:04
C:\Windows\System32\WindowsPowerShell\v1.0\profile.ps1
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# THIS SAMPLE CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
# WHETHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
# IF THIS CODE AND INFORMATION IS MODIFIED, THE ENTIRE RISK OF USE OR RESULTS IN
# CONNECTION WITH THE USE OF THIS CODE AND INFORMATION REMAINS WITH THE USER.
# chcp 437 | Out-Null
chcp 65001 | Out-Null