Skip to content

Instantly share code, notes, and snippets.

View ffmpeg-wasm.sh
[
"-i",
"VID.mp4",
"-map", "0:a", "-c:a", "copy",
"rec.m4a"
]
View gist:fe8e2470915efc73172c16fac9400c8e
cd %USERPROFILE%\Desktop\ViVeTool-v0.3.3
ViVeTool.exe /query /id:36354489,37634385,39145991
vivetool /fullreset
vivetool /disable /id:40729001,37634385
@Trass3r
Trass3r / docker-wsl.sh
Created August 1, 2023 16:44
setup Docker in WSL2
View docker-wsl.sh
# https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository
sudo apt update
sudo apt install -y ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
@Trass3r
Trass3r / boost_stacktrace.cpp
Created May 22, 2023 17:56
boost stacktrace enabler
View boost_stacktrace.cpp
#define BOOST_STACKTRACE_USE_ADDR2LINE 1
//#define BOOST_STACKTRACE_USE_BACKTRACE 1
#include <boost/stacktrace.hpp>
#include <signal.h> // ::signal, ::raise
void my_signal_handler(int signum)
{
::signal(signum, SIG_DFL);
// boost::stacktrace::safe_dump_to("./backtrace.dump");
std::cout << boost::stacktrace::stacktrace();
View dustmite.sh
ldmd2 -i -O -release -inline -L--gc-sections -Xcc=-static-libgcc dustmite.d -v
docker run --rm -it -v `pwd`:/workspace/ ubuntu:rolling
sudo chown 1000:1000 dustmite
View beveledCubeTest.js
var createScene = function() {
var scene = new BABYLON.Scene(engine);
var camera = new BABYLON.ArcRotateCamera("Camera", - Math.PI / 2, Math.PI / 4, 10, BABYLON.Vector3.Zero(), scene);
camera.attachControl(canvas, true);
var light1 = new BABYLON.DirectionalLight("DirectionalLight", new BABYLON.Vector3(0, -1, 1), scene);
var light2 = new BABYLON.HemisphericLight("HemiLight", new BABYLON.Vector3(0, 1, 0), scene);
light1.intensity =0.75;
light2.intensity =0.5;
@Trass3r
Trass3r / test.wpaProfile
Last active February 7, 2023 13:23
WPA profile for exporting template instantiation statistics via `wpaexporter build.etl -profile test.wpaProfile -delimiter "\t"`
View test.wpaProfile
<?xml version="1.0" encoding="utf-8"?>
<WpaProfileContainer xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="2" xmlns="http://tempuri.org/SerializableElement.xsd">
<Content xsi:type="WpaProfile2">
<Sessions>
<Session Index="0">
<FileReferences />
</Session>
</Sessions>
<Views>
<View Guid="ab3305f1-304e-4545-9f85-0b7488072055" IsVisible="true" Title="Analysis">
@Trass3r
Trass3r / base.json
Created November 9, 2022 16:15
magic enum base benchmark
View base.json
{
"traceEvents": [
{
"pid": 8058,
"tid": 8058,
"ph": "X",
"ts": 3546,
"dur": 108,
"name": "Source",
"args": {
View test-cpp17.json
This file has been truncated, but you can view the full file.
{
"traceEvents": [
{
"pid": 24148,
"tid": 24148,
"ph": "X",
"ts": 6808,
"dur": 102,
"name": "Source",
"args": {
View clang-query-symbol-export-tests.sh
export PATH="/c/Program Files/LLVM/bin":$PATH
find include/llvm/IR -name '*.h' | xargs clang-query -p objdir
clang-query -p objdir include\llvm\IR\Value.h include\llvm\IR\Use.h include\llvm\Analysis\CallGraph.h
clang-query -p objdir include\llvm\ADT\SmallVector.h
vs
clang-query -p objdir include\llvm\Support\Allocator.h
m cxxRecordDecl(hasDefinition().bind("d"), hasExternalFormalLinkage(), unless(anyOf(isExpansionInSystemHeader(), isExplicitTemplateSpecialization(), hasParent(classTemplateDecl()), hasParent(classTemplateSpecializationDecl()))))