Skip to content

Instantly share code, notes, and snippets.

View rsmahmud's full-sized avatar

Rasel Mahmud rsmahmud

View GitHub Profile
@DinleyH
DinleyH / windowkill.py
Last active March 21, 2026 21:34
Automatically close problematic dialog popups in sublime text 3.
This closes the popups instantly so you never see them and they dont effect indenting etc. Works on windows.
To install
1. open sublime
2. go to tools -> Developer -> New Plugin
3. paste the code into the document (replacing any existing code sublime includes in the document)
4. save the file using the default user plugin directory sublime suggests.
(on windows this is C:\Users\yourname\AppData\Roaming\Sublime Text\Packages\User)
5. Restart.
@rsmahmud
rsmahmud / getch.c
Created March 17, 2017 20:15
getch() function from conio.h library implementation on Windows
#include <windows.h>
TCHAR getch(){
DWORD mode, cc;
HANDLE h = GetStdHandle( STD_INPUT_HANDLE );
if (h == NULL)
return 0; // console not found
GetConsoleMode( h, &mode );
SetConsoleMode( h, mode & ~(ENABLE_LINE_INPUT | ENABLE_ECHO_INPUT) );
TCHAR c = 0;
ReadConsole( h, &c, 1, &cc, NULL );