Skip to content

Instantly share code, notes, and snippets.

View haseeb-heaven's full-sized avatar
🏠
Working from home

HeavenHM haseeb-heaven

🏠
Working from home
View GitHub Profile
@haseeb-heaven
haseeb-heaven / CSharp-Utils.cs
Last active May 26, 2022 15:05
CSharp Utilities for UI,File Operations Handles,Web Connectsions and more.
//UI-Dialogs and MessageBox.
internal static void ShowWarning(string warnMsg, string caption = "WARNING") {
DialogMsgBox.ShowBox(caption, warnMsg, MsgBoxButtons.Ok);
}
internal static void ShowError(string errMsg, string caption = "ERROR") {
DialogMsgBox.ShowBox(caption, errMsg, MsgBoxButtons.Ok);
}
internal static void LogException(string methodName, Exception ex) {
/**
* @description - Read any ASCII,BINARY or HEX file.
* @param - Source file name and file type.
* @return - Returns data in tuple format,use std::get<TUPLE_ID>(TUPLE_OBJ) to get data.
*/
/*Including STD-C++ libraries*/
#include <iostream> /*For basic I/O.*/
#include <fstream> /*For basic I/O.*/
#include <sstream> /*For basic I/O.*/
#include <vector> /*For STL vector.*/
/* AutoCloseMessageBox - C++ Implementation of original code of C# from CodeProject https://www.codeproject.com/Articles/7968/MessageBox-with-a-timeout-for-NET
By Artic Coder.
*/
#undef UNICODE
#include <iostream>
#include <Windows.h>
using std::string;
//Pointer to Hook functions.
@haseeb-heaven
haseeb-heaven / AsciiTextGenerator.c
Last active June 15, 2022 10:11
AsciiTextGenerator is text generator like FIGlet fonts.
/*Ascii text Generator in C. - Convert your text or any text to fancy ASCII font.
Artic Coder */
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#define TEXT_LEN 0x64
#define FONT_HEIGHT 5
#define FONT_WIDTH 53
@haseeb-heaven
haseeb-heaven / FileSummary.cpp
Last active October 12, 2021 23:07
Prints file summary all printable, non-printable characters from any file , or strings extraction from any file just like GNU 'strings'. tool.
/*File summary - Prints file summary all printable, non-printable characters from any file.
Can also works as strings extraction from any file just like GNU 'strings'. tool.
By Artic Coder.
*/
#include <iostream>
#include <fstream>
#include <vector>
std::string ReadFile(std::string file_name);