# zsh plugin
plugins=(macos vi-mode)
# auto complete
autoload -U compinit && compinit
This file contains 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::{ | |
borrow::Cow, | |
fmt::Debug, | |
future::Future, | |
net::SocketAddr, | |
pin::Pin, | |
task::{ready, Context, Poll}, | |
time::Instant, | |
}; |
This file contains 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
edition="2021" | |
group_imports="StdExternalCrate" | |
imports_granularity="Crate" | |
reorder_imports=true | |
reorder_modules=true |
This file contains 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 mod as_text { | |
use std::{fmt::Display, str::FromStr}; | |
use serde::{de::Error as DeError, Deserialize, Deserializer, Serializer}; | |
#[derive(Deserialize)] | |
#[serde(untagged)] | |
enum OrText<'a, T> { | |
Data(T), | |
Text(&'a str), |
This file contains 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::{convert::Infallible, error::Error}; | |
#[cfg(feature = "reflection")] | |
use anyhow::{Context, Result}; | |
use axum::{ | |
body::Body, | |
http::{Request, Response}, | |
Router, | |
}; | |
use tonic::{body::BoxBody, server::NamedService}; |
This file contains 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 Foundation; | |
@import AVFoundation; | |
@import VideoToolbox; | |
@import AudioToolbox; | |
void videoCompressTest(void); | |
int main(int argc, const char * argv[]) { | |
@autoreleasepool { | |
videoCompressTest(); |
This file contains 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
#[cfg(target_os = "android")] | |
mod android { | |
use crate::{ | |
exceptions::PyBaseExceptionRef, stdlib::ssl::convert_openssl_error, VirtualMachine, | |
}; | |
use openssl::{ | |
ssl::SslContextBuilder, | |
x509::{store::X509StoreBuilder, X509}, | |
}; | |
use std::{ |