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
| #!/bin/bash | |
| # Complete GrapheneOS Installation Script for Pixel 8 | |
| # This script guides you through the entire installation process | |
| # No need to restart - just follow the prompts! | |
| # | |
| # Security features: | |
| # - Automatic signature verification (SSH Signatures) | |
| # - SHA256 checksum validation | |
| # - Secure download over HTTPS |
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
| // ==UserScript== | |
| // @name Auto Hide & Mute YouTube Sponsored Ads | |
| // @namespace http://tampermonkey.net/ | |
| // @version 1.0 | |
| // @description Mute and hide YouTube video when "Sponsored" text appears in the player overlay; otherwise unmute and show. | |
| // @match https://www.youtube.com/* | |
| // @grant none | |
| // ==/UserScript== | |
| (function () { | |
| 'use strict'; |
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 filecmp | |
| import http.server | |
| import mimetypes | |
| import os | |
| import shutil | |
| import socketserver | |
| import time | |
| from subprocess import run | |
| from threading import Thread |
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
| >w< |
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
| // Bresenham average time: 30.9531ms | |
| // DDA average time: 54.9077ms | |
| // Xiaolin Wu average time: 58.1189ms | |
| // Midpoint average time: 22.2429ms | |
| // Gupta-Sproull average time: 121.9053ms | |
| // Bresenham (flat buffer) avg time: 92.995ms | |
| // DDA (flat buffer) avg time: 127.3775ms | |
| // Xiaolin Wu (flat buffer) avg time: 144.9308ms | |
| // Midpoint (flat buffer) avg time: 77.1491ms | |
| // Gupta-Sproull (flat buffer) avg time: 252.5661ms |
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
| pub trait IntoOk<T> { | |
| fn ok(self) -> anyhow::Result<T>; | |
| } | |
| impl<T> IntoOk<T> for T { | |
| fn ok(self) -> anyhow::Result<T> { | |
| Ok(self) | |
| } | |
| } |
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
| use std::sync::{Arc, Weak}; | |
| fn main() { | |
| struct A { | |
| valid: Option<Arc<()>> | |
| } | |
| impl A { | |
| fn weak(&mut self) -> Weak<()> { |
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
| // Local bool access: 384.0872ms | |
| // Arc<bool> access: 337.0548ms | |
| // Arc<AtomicBool> access: 665.9188ms | |
| // Weak<AtomicBool> upgrade & access (valid): 19.8125438s | |
| // Weak<bool> upgrade & access (valid): 17.187099s | |
| // Weak<AtomicBool> upgrade & access (dropped): 19.7792422s | |
| // Weak<bool> upgrade & access (dropped): 17.5252546s | |
| use std::sync::{Arc, Weak}; | |
| use std::sync::atomic::{AtomicBool, Ordering}; |
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
| // Arc<AtomicBool> access: 4.3390258s | |
| // Arc<bool> access: 3.3204702s | |
| // Option<Arc<AtomicBool>> access: 4.1391463s | |
| // Option<Arc<bool>> access: 3.3405671s | |
| // Weak<AtomicBool> access after drop: 6.6603574s | |
| // Weak<bool> access after drop: 6.5926837s | |
| use std::sync::{Arc, Weak}; | |
| use std::sync::atomic::AtomicBool; | |
| use std::time::Instant; |
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
| // Total textures created (Surface -> Texture): 300 | |
| // Time taken: 2.1722655s | |
| // Memory Usage: 1533 MB | |
| // Total textures created (Streaming Texture): 300 | |
| // Time taken: 798.8623ms | |
| // Memory Usage: 1567 MB | |
| use std::ffi::{c_int, CString}; | |
| use sdl3_sys::everything::*; | |
| use std::ptr::{null, null_mut, NonNull}; |
NewerOlder