Skip to content

Instantly share code, notes, and snippets.

View thewh1teagle's full-sized avatar
💭
coding

thewh1teagle

💭
coding
  • localhost
  • The martian
View GitHub Profile
cargo : Compiling sherpa-rs-sys v0.1.0 (C:\Users\User\Documents\code\sherpa-rs\sys)
At line:1 char:1
+ cargo run --example basic_use 2>error.txt
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: ( Compiling sh...\sherpa-rs\sys):String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
error: failed to run custom build command for `sherpa-rs-sys v0.1.0 (C:\Users\User\Documents\code\sherpa-rs\sys)`
Caused by:
@thewh1teagle
thewh1teagle / main.rs
Created July 4, 2024 11:44
Hide app from taskbar in tauri windows 11
// windows = { version = "0.58.0", features = ["Win32", "Win32_UI", "Win32_UI_WindowsAndMessaging"] }
#[tauri::command]
fn set_app_visible(app: AppHandle, visible: bool) {
use windows::Win32::UI::WindowsAndMessaging::{
GetWindowLongPtrW, SetWindowLongPtrW, GWL_EXSTYLE, WS_EX_APPWINDOW, WS_EX_TOOLWINDOW,
};
use windows::Win32::Foundation::HWND;
use std::os::raw::c_void;
import sqlite3
conn = sqlite3.connect('company.db')
cursor = conn.cursor()
cursor.execute('''
CREATE TABLE IF NOT EXISTS departments (
department_id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL
)
@thewh1teagle
thewh1teagle / main.py
Created June 22, 2024 19:58
Text to speech in hebrew using mms-tts-heb
# pip insatll numpy==1.26.4
# pip insatll soundfile
# pip install transformers
# pip install
# pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
from transformers import VitsModel, AutoTokenizer
import torch
import soundfile as sf
@thewh1teagle
thewh1teagle / gist:ada82334dabefa0fcca89302e7c5a5da
Created May 22, 2024 23:04
Check instructions cpu windows
dumpbin /disasm required.dll > dll_disasm.asm
[✔] 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
@thewh1teagle
thewh1teagle / README.md
Last active May 12, 2024 22:16
Git commit signing on Windows

Commit signing on Windows

  1. Open notepad.exe
  2. Open github.com/settings/emails
  3. Copy your Github email to notepad (ends with @users.noreply.github.com)
  4. Open cmd.exe
  5. Create new ssh key
ssh-keygen -t ed25519 -C "{email}"
@thewh1teagle
thewh1teagle / README.md
Created May 9, 2024 22:09
Copy folder exclude subdirectory

Copy folder exclude subdirectory

rsync -av --exclude target/ make1/ make2
@thewh1teagle
thewh1teagle / main.rs
Last active May 8, 2024 14:41
catch panics in rust
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));

Accessibility control permission checking on macOS

image