Skip to content

Instantly share code, notes, and snippets.

View lihas's full-sized avatar
💭
OpenGL

sahil lihas

💭
OpenGL
View GitHub Profile
# This is a Python script.
# Same as previous version except with thread worker
# for one particular run the previous script took 21 mins, while this one took 14 mins
# This python script compares files in two directories
# on their md5 hash. lists the files which have same md5,
# and the ones which don't. I use this to verify my file backups.
# The directory structures are different hence a direct folder
# comparison with tools like beyond compare (compare on contents) wont work.
import glob
@lihas
lihas / DirectoryCompareConsole.py
Created February 6, 2022 16:57
This python script compares files in two directories on their md5 hash. lists the files which have same md5, and the ones which don't. I use this to verify my file backups. The directory structures are different hence a direct folder comparison with tools like beyond compare (compare on contents) wont work.
# This is a Python script.
#This python script compares files in two directories
# on their md5 hash. lists the files which have same md5,
# and the ones which don't. I use this to verify my file backups.
# The directory structures are different hence a direct folder
# comparison with tools like beyond compare (compare on contents) wont work.
import glob
import os
import hashlib
@lihas
lihas / gist:6514840808159f3892806b80871dba12
Created December 7, 2021 05:28
Canon Digital Photo Professional installer (direct link)
https://gdlp01.c-wss.com/gds/7/0200006477/01/dppw4.15.20-installer.zip
@lihas
lihas / SymbolSearchPath.txt
Last active April 22, 2021 08:20
SymbolSearchPath.txt
Loading Symbols:
There are two different ways in which you can load symbols in GPUView.
Either, through modifying the first line of this file or through setting
the environment variable "_NT_SYMBOL_PATH".
By modifying this file:
To use this file, simply change the first line of this file to point to
your symbol directory. For instance, if you project has to different
@lihas
lihas / DxDiagProviderEnum
Last active April 23, 2024 13:27
DxDiagProvider enum children and properties
// DxDiagProviderCom.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include <initguid.h>
#include <iostream>
#include <objbase.h>
#include <dxdiag.h>
#include <string>
using namespace std;
@lihas
lihas / usb.cpp
Created June 6, 2018 09:18 — forked from gabonator/usb.cpp
USB enumerating tools
#include "usb.h"
#ifndef DISABLE_USB
#pragma comment(lib, "setupapi.lib")
#include "SetupAPI.h"
#include "cfgmgr32.h"
#pragma pack(4)
@lihas
lihas / DUSBVC-intel
Created June 5, 2018 15:40
from DUSBVC.pdf file from intel
// DisplayUSB.cpp: Defines the entry point for the console application.
//
// Copyright (C) 2001, Intel Corporation
// All rights reserved.
// Permission is hereby granted to merge this program code with other program
// material to create a derivative work. This derivative work may be distributed
// in compiled object form only. Any other publication of this program, in any form,
// without the explicit permission of the copyright holder is prohibited.
//
// Send questions and comments to [email protected]
@lihas
lihas / RegisterDLL.ps1
Created July 28, 2017 19:23 — forked from nylyst/RegisterDLL.ps1
Powershell to register a dll without regsvr32.exe
$registerDLL = @"
namespace RegisterDLL {
using System;
using System.Runtime.InteropServices;
public static class Kernel32 {
[DllImport("kernel32", SetLastError=true, CharSet = CharSet.Ansi)]
public static extern IntPtr LoadLibrary([MarshalAs(UnmanagedType.LPStr)]string lpFileName);
[DllImport("kernel32", CharSet=CharSet.Ansi, ExactSpelling=true, SetLastError=true)]
@lihas
lihas / 0_reuse_code.js
Created September 24, 2016 19:40
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
@lihas
lihas / sparsify.c
Created August 21, 2016 18:47 — forked from kempniu/sparsify.c
sparsify - copy non-zero blocks of data from source to destination
/*
***********************************************************************
*
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* Version 2, December 2004
*
* Copyright (C) 2004 Sam Hocevar <[email protected]>
*
* Everyone is permitted to copy and distribute verbatim or modified
* copies of this license document, and changing it is allowed as long