Skip to content

Instantly share code, notes, and snippets.

View dezashibi's full-sized avatar
🎯
Focusing on my targets

Navid Dezashibi dezashibi

🎯
Focusing on my targets
View GitHub Profile
fn main() {
{
let args: Vec<String> = std::env::args().collect();
if args.len() < 2 {
eprintln!("Usage: todo &lt;command&gt; [arguments]");
return;
}
let command = &args[1];
match command.as_str() {
"add" => add_todo(),
@dezashibi
dezashibi / wasm4_wasm32.odin
Created April 4, 2024 09:33 — forked from gingerBill/wasm4_wasm32.odin
WASM-4 Odin bindings
// WASM-4: https://wasm4.org/docs
package wasm4
foreign import wasm4 "env"
#assert(size_of(int) == size_of(u32))
// ┌───────────────────────────────────────────────────────────────────────────┐
// │ │
// │ Platform Constants │
@dezashibi
dezashibi / 0 Odin debugging on windows.md
Created April 2, 2024 05:26 — forked from RednibCoding/0 Odin debugging on windows.md
Odin debugging on windows with vscode. See: readme

To setup debugging for Odin programs on Windows with VsCode follow these steps:

  • make sure you have the C/C++ extension pack (VsCode extension) installed
  • create a .vscode folder at the root of your Odin project
  • copy the launch.json and tasks.json into it
  • click on the debug tab in VsCode, then click on the debug button at the top (or press F5)
@dezashibi
dezashibi / audio_uploader.html
Created February 25, 2024 11:32
upload recorded audio HTML/JS only
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Record and Upload Audio</title>
</head>
<body>
<h2>Record and Upload Audio</h2>
<button id="startBtn">Start Recording</button>
<button id="stopBtn" disabled>Stop Recording</button>
@dezashibi
dezashibi / detect_client_operating_system.html
Created February 24, 2024 05:59
How to detect client operating system in javascript, Got from: https://tecadmin.net/demo/javascript-detect-os.html
<!DOCTYPE html>
<html>
<head>
<title>OS Detection</title>
<style>
body {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
@dezashibi
dezashibi / win_lib_finder.h
Created October 3, 2023 07:21
to find the folders that contain libraries you may need to link against, on Windows
// Author: Jonathan Blow
// Version: 2
// Date: 7 May, 2019 (update to original version released on 31 August, 2018).
//
// This code is released under the MIT license, which you can find at
//
// https://opensource.org/licenses/MIT
//
//
//
@dezashibi
dezashibi / open_source_licenses.md
Created November 15, 2022 04:20 — forked from nicolasdao/open_source_licenses.md
What you need to know to choose an open source license.
@dezashibi
dezashibi / getopt.c
Created April 8, 2022 11:09 — forked from ashelly/getopt.c
"Port of GNU getopt() to Win32 for anyone who's tired of dealing with getopt() calls in Unix-to-Windows ports." Ported by Pete Wilson. Recovered from the Internet Archive's snapshot of www.pwilson.net/sample.html.
/* Getopt for GNU.
NOTE: getopt is now part of the C library, so if you don't know what
"Keep this file name-space clean" means, talk to drepper@gnu.org
before changing it!
Copyright (C) 1987,88,89,90,91,92,93,94,95,96,98,99,2000,2001
Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@dezashibi
dezashibi / ABOUT.md
Created April 6, 2022 16:35 — forked from laobubu/ABOUT.md
A very simple HTTP server in C, for Unix, using fork()

Pico HTTP Server in C

This is a very simple HTTP server for Unix, using fork(). It's very easy to use

How to use

  1. include header httpd.h
  2. write your route method, handling requests.
  3. call serve_forever("12913") to start serving on port 12913
@dezashibi
dezashibi / neomuttrc
Created March 28, 2022 11:03 — forked from VladimirPal/neomuttrc
Minimal neomutt config for gmail imap
set imap_user="mail.vpal@gmail.com"
set imap_pass=`/usr/bin/security find-generic-password -w -a 'mail.vpal@gmail.com' -s 'Gmail'`
set folder=imaps://imap.gmail.com/
set spoolfile=+INBOX
set record="+[Gmail]/Sent Mail"
set postponed="+[Gmail]/Drafts"
# https://www.neomutt.org/guide/reference search sleep_time for additional info
set sleep_time=0 # be faster