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
@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 / 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
@dezashibi
dezashibi / urlshort.nim
Created March 18, 2022 14:30 — forked from xmonader/urlshort.nim
urlshort.nim
# nimshorturl
# Copyright xmonader
# nim url shortening service
import jester, asyncdispatch, htmlgen, json, os, strutils, strformat, db_sqlite
# hostname can be something configurable "http://ni.m:5000"
let hostname = "localhost:5000"
var theDb : DbConn
if not fileExists("/tmp/mytest.db"):
theDb = open("/tmp/mytest.db", "", "", "")
theDb.exec(sql("""create table urls (
@dezashibi
dezashibi / wclwn.md
Created March 9, 2022 09:57 — forked from zacharycarter/wclwn.md
Binding to C Libraries with Nim