[✔] Environment
- OS: Windows 10.0.22631 X64
✔ WebView2: 124.0.2478.97
✔ MSVC: Visual Studio Community 2022
✔ rustc: 1.77.1 (7cf61ebde 2024-03-27)
✔ cargo: 1.77.1 (e52e36006 2024-03-26)
✔ rustup: 1.27.0 (bbb9276d2 2024-03-08)
✔ Rust toolchain: stable-x86_64-pc-windows-msvc (default)
- node: 20.12.0
- Open
notepad.exe
- Open github.com/settings/emails
- Copy your Github email to notepad (ends with
@users.noreply.github.com
) - Open
cmd.exe
- Create new ssh key
ssh-keygen -t ed25519 -C "{email}"
Copy folder exclude subdirectory
rsync -av --exclude target/ make1/ make2
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
fn main() { | |
// Set up a panic hook to print the backtrace | |
std::panic::set_hook(Box::new(|info| { | |
let mut message = String::new(); | |
message.push_str(&format!("thread '{}' ", std::thread::current().name().unwrap_or("unknown"))); | |
message.push_str(&format!("{}", info)); | |
if let Ok(var) = std::env::var("RUST_BACKTRACE") { | |
if var == "1" { | |
let backtrace = std::backtrace::Backtrace::capture(); | |
message.push_str(&format!("{}", backtrace)); |
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 fs from 'fs' | |
async function getMeta(url) { | |
let resp = await fetch(url, { method: 'HEAD' }); | |
const size = parseInt(resp.headers.get('Content-Length')); | |
const contentDisposition = resp.headers.get('Content-Disposition') | |
const filename = contentDisposition.match(/; filename=(.+)/)[1] ?? 'Unnamed' | |
return {size, filename}; | |
} |
Language Tag | Language | Region | Description |
---|---|---|---|
ar-SA | Arabic | Saudi Arabia | Arabic (Saudi Arabia) |
bn-BD | Bangla | Bangladesh | Bangla (Bangladesh) |
bn-IN | Bangla | India | Bangla (India) |
cs-CZ | Czech | Czech Republic | Czech (Czech Republic) |
da-DK | Danish | Denmark | Danish (Denmark) |
de-AT | German | Austria | Austrian German |
de-CH | German | Switzerland | "Swiss" German |
de-DE | German | Germany |
warning: patch for the non root package will be ignored, specify patch at the workspace root:
package: C:\Users\User\Documents\code\vibe\desktop\src-tauri\Cargo.toml
workspace: C:\Users\User\Documents\code\vibe\Cargo.toml
Info Watching C:\Users\User\Documents\code\vibe\core for changes...
Info Watching C:\Users\User\Documents\code\vibe\desktop\src-tauri for changes...
Info Watching C:\Users\User\Documents\code\vibe\cli for changes...
Compiling proc-macro2 v1.0.81
Compiling unicode-ident v1.0.12
Compiling cfg-if v1.0.0
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 eyre::{bail, Context, Result}; | |
use privilege::user::privileged; | |
use rand::distributions::Alphanumeric; | |
use rand::{thread_rng, Rng}; | |
use std::path::PathBuf; | |
pub fn temp_path(prefix: &str, suffix: &str, rand_len: usize) -> PathBuf { | |
let random_string: String = thread_rng() | |
.sample_iter(&Alphanumeric) | |
.take(rand_len) |
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::sync::mpsc::{sync_channel, SyncSender}; | |
use screencapturekit::sc_stream::SCStream; | |
use screencapturekit::{ | |
cm_sample_buffer::CMSampleBuffer, | |
sc_content_filter::InitParams::Display, | |
sc_content_filter::SCContentFilter, | |
sc_error_handler::StreamErrorHandler, | |
sc_output_handler::{SCStreamOutputType, StreamOutput}, |
NewerOlder