Skip to content

Instantly share code, notes, and snippets.

@keejelo
keejelo / run_taskman.bat
Last active May 20, 2025 12:24
Windows 10, run taskmanager minimized/hidden window at logon (and only show icon in the taskbartray)
@ECHO OFF
CLS
ECHO CreateObject("Wscript.Shell").Run("taskmgr.exe"),0,False>"%temp%\taskman.vbs"
%windir%\System32\cscript.exe %temp%\taskman.vbs //nologo
EXIT
::
:: Windows 10, run taskmanager minimized/hidden window at logon (and only show icon in the taskbartray)
:: Created by Keejelo - 2025
:: https://gist.github.com/keejelo/7f16ef96427ef9fde360463f789378ea
::
@keejelo
keejelo / time_convert.html
Last active May 14, 2023 14:41
Convert total time into seconds. Result is displayed in decimal, hex little/big endian. Also can convert back to time: hh:mm:ss
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="utf-8">
<title>Time converter</title>
<style>
body
{
margin:0;
@keejelo
keejelo / trim_string_whitespace.c
Last active March 15, 2022 07:42
Trim string whitespace
//--------------------------------------------------------------------------------
// Filename: trim_string_whitespace.c
//--------------------------------------------------------------------------------
// ** Trim leading and trailing whitespace
//--------------------------------------------------------------------------------
char *trim(char *s)
{
char c[] = "\x20\t\n\v\f\r"; // whitespace characters
int i, j;
@keejelo
keejelo / kill.vbs
Last active November 25, 2021 16:06
Terminates a running process (with optional wait timer)
'--------------------------------------------------------------------------------
' Filename: kill.vbs
'--------------------------------------------------------------------------------
' KillProcess v3.2 - Terminates a running process (program)
' Author: Keejelo
' gist.github.com/keejelo/476bf9cbe6e750cef561ebab9debb3fd
'--------------------------------------------------------------------------------
' Usage: kill "param1" param2
' @ param1 = "processname", i.e. "notepad.exe"
' @ param2 = seconds to wait until process is terminated (optional)
@keejelo
keejelo / wait.vbs
Created November 25, 2021 16:02
Waits n seconds before running something
'--------------------------------------------------------------------------------
' Filename: wait.vbs
'--------------------------------------------------------------------------------
' Wait v1.0 - Waits n seconds before running something
' Author: Keejelo
' gist.github.com/keejelo/52ba7b8a02afa10d95c07ae41e07b48c
'--------------------------------------------------------------------------------
' Usage: wait "arg1" [arg2]
' @arg1 = "processname", e.g. "notepad.exe"
' @arg2 = seconds to wait until process is started
@keejelo
keejelo / taskman.vbs
Last active November 25, 2021 16:09
Run Windows taskmanager (taskmgr.exe) minimized (at startup)
' How to run taskmanager minimized/hidden window:
' 1. Open Task Manager and click "More details" to activate the top menu.
' 2. Go to "Options" menu and toggle "Hide when minimized" checked (on)
' 3. Then copy this file (taskman.vbs) in your startup directory ( Win+R and type: shell:startup ),
' or run it some other way when you startup or log in to your computer.
' The command below runs taskmanager minimized and hidden:
CreateObject("Wscript.Shell").Run "taskmgr.exe", 0, False
@keejelo
keejelo / make_html_list.bat
Last active April 2, 2018 10:55
Export hakchi2 gamelist to HTML or plain text .
::***********************************************************************************************************************
:: Filename: make_html_list.bat
:: Author : keejelo
:: Version : 1.25
:: Descr. : Makes a dynamic and sortable HTML list containing all games in gamefolder.
:: Usage : vvvvvvv
:: Put this file into folder "hakchi2\games_snes" and then run it.
:: To make the list sortable -> postfix the gametitles (in hakchi2) with one of the labels below:
:: (NES),(SNES),(ARCADE),(MAME),(SEGA),(MD),(GEN),(GB) ..or make your own, just add it below in the code like the rest..
:: Examples of postfix: