Skip to content

Instantly share code, notes, and snippets.

View Mandar-Shinde's full-sized avatar

Mandar Shinde Mandar-Shinde

View GitHub Profile
@Mandar-Shinde
Mandar-Shinde / clearworkingset.cpp
Last active December 14, 2015 13:25
Clear Memory Working Set
//
// Removes as many pages as possible from the working set of the current process.
// Library: Psapi.h
//
if(EmptyWorkingSet(GetCurrentProcess()))
{
// Cleared up some working set
}
else
@Mandar-Shinde
Mandar-Shinde / Qt_RunTime_UI.cpp
Created December 1, 2015 14:28
Qt Runtime GUI
// Main Widget
QWidget *mainAppWindow = new QWidget;
mainAppWindow->setWindowTitle("Runtime GUI");
mainAppWindow->setFixedSize(200, 300);
// Parent layout
QVBoxLayout *layoutParent= new QVBoxLayout();
// List of items
@Mandar-Shinde
Mandar-Shinde / Win32RegistryDelete.cpp
Created November 19, 2015 09:48
WinAPI Registry Delete
//
// Delete Registry (64bit machine - 64bit Registry)
//
HKEY hKey = NULL;
long lReturn = RegOpenKeyEx( HKEY_LOCAL_MACHINE,(L"SOFTWARE\\coderbox\\Boost"),0L,KEY_WRITE| KEY_WOW64_64KEY,&hKey );
if (lReturn == ERROR_SUCCESS)
{
lReturn = RegDeleteValueW(hKey, (L"OpenGL"));
RegCloseKey(hKey);
@Mandar-Shinde
Mandar-Shinde / Qt_SetDatetime.cpp
Created November 19, 2015 07:08
Qt Set Datetime
#include <QCoreApplication>
#include <qdatetime.h>
#include <windows.h>
// QT 5.4 - Console Application
// (RUN AS ADMINISTRATOR)
//
int main(int argc, char *argv[])
{
@Mandar-Shinde
Mandar-Shinde / 0_reuse_code.js
Created October 11, 2015 13:32
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console