Skip to content

Instantly share code, notes, and snippets.

View zheng95z's full-sized avatar

Zheng Zeng zheng95z

  • Jo Inc.
  • Green Dophin
View GitHub Profile
@PolyShifter
PolyShifter / download_megascans.py
Created October 14, 2024 19:26
Download Quixel Megascans with the ability to dictate what resolution and file type you want to download. Also checks for corrupt zip files. Tested with Surfaces and 3d Assets.
import zipfile
import os
import json
import concurrent.futures
import requests
import shutil
import time
######## INITIAL SETUP ########
# Define the token, download path, and target category
@ad044
ad044 / quixel.py
Last active October 4, 2024 21:34
A script to download all assets from Quixel (not properly tested/incomplete)
import requests
import time
token = TOKEN
def get_assets(page):
url = "https://6UJ1I5A072-2.algolianet.com/1/indexes/assets/query?x-algolia-application-id=6UJ1I5A072&x-algolia-api-key=e93907f4f65fb1d9f813957bdc344892"
params = {
"page": page,
@iliyang
iliyang / latexmkrc
Created June 23, 2024 21:43
A latexmkrc file to compress PDFs with non-JPEG images on Overleaf after compilation
#!/usr/bin/perl
## Put this (Perl) file in the root of your Overleaf project. It overrides the
## `pdflatex` compilation command to run GhostScript as a post-process which will
## compress non-JPEG images to JPEG in the output PDF file. The JPEG quality
## settings are set to high to minimize the loss of image quality. This should
## work well even for images that contain a lot of high-frequency noise.
## To disable, simply rename the file to something other than latexmkrc.
##
## Created by Iliyan Georgiev.
@mbinna
mbinna / effective_modern_cmake.md
Last active April 21, 2025 14:17
Effective Modern CMake

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft

@goldsborough
goldsborough / conv.cu
Last active February 2, 2025 09:14
Convolution with cuDNN
#include <cudnn.h>
#include <cassert>
#include <cstdlib>
#include <iostream>
#include <opencv2/opencv.hpp>
#define checkCUDNN(expression) \
{ \
cudnnStatus_t status = (expression); \
if (status != CUDNN_STATUS_SUCCESS) { \
@bkaradzic
bkaradzic / orthodoxc++.md
Last active April 25, 2025 00:16
Orthodox C++

Orthodox C++

What is Orthodox C++?

Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. It's exactly opposite of what Modern C++ suppose to be.

Why not Modern C++?

Byobu is a suite of enhancements to tmux, as a command line
tool providing live system status, dynamic window management,
and some convenient keybindings:
F1 * Used by X11 *
Shift-F1 Display this help
F2 Create a new window
Shift-F2 Create a horizontal split
Ctrl-F2 Create a vertical split
Ctrl-Shift-F2 Create a new session