cd ~/'Library/Application Support/Steam/steamapps/common/Sid Meier's Civilization VI/Civ6.app/Contents/Assets/Base/Platforms/Windows/Movies'
mv Bink2_Aspyr_Logo_Black_White_1080P_30FPS.bk2 Bink2_Aspyr_Logo_Black_White_1080P_30FPS-disabled.bk2
mv logos.bk2 logos-original.bk2
mv LOGO_2KFiraxis.bk2 LOGO_2KFiraxis-original.bk2
cat << _END_ | base64 --decode -o logos.bk2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Common terminology found in across literature and implementations: | |
| Page | |
| Region of memory. Usually 4096, 8192 or 16384 bytes | |
| Page Frame | |
| Same as a Page but when talking about physical memory. Same size as a Page. | |
| Page Table | |
| Per virtual address space table mapping virtual addresses to Pages. | |
| Page Directory | |
| Like Page Table and is often the same thing. The first level of Page Tables. | |
| PTE - Page Table Entry |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import math, random, os.path | |
| from perlin_noise import PerlinNoise | |
| from math import pi as PI | |
| def pathtext(text, pos, size, wght, opsz=32, **kwargs): | |
| t = FormattedString( | |
| font="Inter.var.ttf", fontSize=size, align="center", | |
| #openTypeFeatures={}, | |
| fontVariations={"wght":wght,"opsz":opsz}, **kwargs) | |
| t.append(text) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Find the latest version of this script here: | |
| // https://gist.github.com/rsms/a8ad736ba3d448100577de2b88e826de | |
| // | |
| const EM = 2048 | |
| interface FontInfo { | |
| familyName :string | |
| styleName :string | |
| unitsPerEm :int | |
| ascender :int |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ./linelen_hist.sh src '*.c' | |
| COLS COUNT | |
| 2 1317 ████████████████████████████████████████████████████████████▌ | |
| 4 583 ██████████████████████████▏ | |
| 6 500 ██████████████████████▎ | |
| 8 253 ███████████▊ | |
| 10 264 ████████████▊ | |
| 12 448 ████████████████████▋ | |
| 14 417 ███████████████████▌ | |
| 16 476 █████████████████████▍ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
| { | |
| "hardware_acceleration": "opengl", | |
| "atomic_save": false, | |
| "auto_complete": false, | |
| "auto_complete_commit_on_tab": true, | |
| "show_definitions": false, | |
| "binary_file_patterns": | |
| [ | |
| "node_modules/**", | |
| "deps/**", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| pkgs ? (import <nixpkgs> {}).pkgsMusl | |
| }: | |
| let | |
| inherit (pkgs) lib; | |
| llvmPkgs = pkgs.llvmPackages_13; | |
| stdenv = llvmPkgs.stdenv; | |
| # stdenv = llvmPkgs.libcxxStdenv; | |
| mkShell = pkgs.mkShell.override { inherit stdenv; }; | |
| hello_c = pkgs.writeText "hello.c" '' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| struct WorldGrid { | |
| static const size_t vertexDataStride = 6; | |
| wgpu::Buffer _indexBuffer; | |
| wgpu::BindGroup _bindGroup; | |
| wgpu::DepthStencilState _depthStencil; | |
| wgpu::RenderPipeline _pipeline; | |
| WorldGrid() { | |
| _depthStencil.format = wgpu::TextureFormat::Depth24PlusStencil8; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SRCROOT := $(shell pwd) | |
| SYSTEM := $(shell uname -s) | |
| OBJDIR := .build | |
| SKIA_DIR := skia | |
| SOURCES := remote-render.cc | |
| # skia-compatible config sourced from skia/out/Release/obj/remote_demo.ninja | |
| # via temporarily configuring Skia with skia_enable_tools=true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include "tools/sk_app/Application.h" | |
| #include "tools/sk_app/Window.h" | |
| #include "include/core/SkCanvas.h" | |
| #include "include/core/SkFont.h" | |
| #include "include/core/SkTime.h" | |
| #include "include/core/SkGraphics.h" | |
| #include "include/core/SkSurface.h" |