Skip to content

Instantly share code, notes, and snippets.

View PierceLBrooks's full-sized avatar
🇵🇸

Pierce Brooks PierceLBrooks

🇵🇸
View GitHub Profile
@Lichtso
Lichtso / unity3d_fs.bms
Created July 15, 2021 14:48
QuickBMS script to extract UnityFS files, the new asset bundle format introduced in Unity 5
# Script for quickbms: https://aluigi.altervista.org/quickbms.htm
# Extracts *.unity3d files
# (c) 2021-07-21 by Lichtso
endian big
# Header
idstring "UnityFS"
Padding 5
get FILE_VERSION byte
@meshula
meshula / character_anim.md
Created May 11, 2021 21:54
Character animation notes

Character Animation

@arthurbacci
arthurbacci / async-input.rs
Created April 9, 2021 22:17
A example of async input using threads in Rust
use std::thread;
use std::sync::mpsc::{self, TryRecvError};
use std::io;
use std::time::Instant;
struct CircularIter<T> where T: Copy {
data: Vec<T>,
index: usize,
}
@dov
dov / create_triangle_gltf.cpp
Created February 25, 2021 21:03
Example of how to build a gltf file from scratch with tiny_gltf.h
// An example of how to generate a gltf file from scratch. This example
// was translated from the pygltlib documentation in the pypi project page,
// which in turn is based on the Khronos Sample Models at:
//
// https://github.com/KhronosGroup/glTF-Sample-Models
//
// This example is released under the MIT license.
//
// 2021-02-25 Thu
// Dov Grobgeld <[email protected]>
@Nearcyan
Nearcyan / stylegan2_psi_translation_video.md
Last active October 1, 2022 15:22
create stylegan2 psi-translation video

Make psi-translation videos

Short file on how to make psi-transition videos with StyleGan2. This assumes you are already able to run StyleGan2.

example

Edit generator

Edit generate_images() in run_generator.py to iterate through psi values instead of seeds.

@wayhoww
wayhoww / converter.h
Created January 3, 2021 16:18
Boost.Python: Automatical Type Conversion
/**
* For Boost.Python
*
* Automatically convert between Python list, dict, tuple and C++ STL std::vector, std::map, std::tuple, respectively.
* --------------------------------------
* 自动转换 Python 和 STL 的几个常用数据类型。
*
* I am familiar with neither metaprogramming nor Boost.Python. This header works but I believe
* there are better ways (or even existing libraries) to do these conversions. Please comment at
* this page to help me improve it.
@Pikachuxxxx
Pikachuxxxx / Sphere.cpp
Last active July 24, 2024 19:12
A script to generate an UV Sphere vertices, normals, texture coordinates and Indices.
std::vector<glm::vec3> sphereVertices;
std::vector<glm::vec3> sphereNormals;
std::vector<glm::vec2> sphereUVs;
std::vector<unsigned int> sphereIndices;
void GenerateSphereSmooth(int radius, int latitudes, int longitudes)
{
if(longitudes < 3)
longitudes = 3;
if(latitudes < 2)
@TellowKrinkle
TellowKrinkle / HiguMeiExtractor.py
Created November 28, 2020 04:26
Extractor for unity3d files from Higurashi Mei
import unitypack
import unitypack.utils
import collections
import sys
import os
from unitypack.engine.texture import TextureFormat
from PIL import ImageOps
ASTC_MAP = {
TextureFormat.ASTC_RGB_4x4: (0x93B0, 0x1907),
@rokups
rokups / CMakeLists.txt
Last active March 26, 2025 03:00
Dear ImGui CMake build script.
#
# CMake build system for Dear ImGui
# =================================
#
# Build instructions:
# 1. Install latest CMake
# * Windows: https://cmake.org/download/ (Tick checkbox to place cmake in system PATH)
# * Linux: from your favorite package manager
# * MacOS: brew install cmake
# 2. Open command prompt in directory containing "imgui" and "imgui_dev" folders
@zhuowei
zhuowei / WDBSetWebSecurityEnabled.m
Created September 1, 2020 04:47
Disable same-origin policy on iOS WKWebView with private API.
// Allows disabling Same-Origin Policy on iOS WKWebView.
// Tested on iOS 12.4.
// Uses private API; obviously can't be used on app store.
@import WebKit;
@import ObjectiveC;
void WKPreferencesSetWebSecurityEnabled(id, bool);
@interface WDBFakeWebKitPointer: NSObject