Binding to C Libraries with Nim
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
# 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 ( |
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
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 |
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
/* 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 |
Exhaustive list of SPDX (Software Package Data Exchange) licenses: https://spdx.org/licenses/
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
andtasks.json
into it - click on the debug tab in VsCode, then click on the debug button at the top (or press F5)
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
// WASM-4: https://wasm4.org/docs | |
package wasm4 | |
foreign import wasm4 "env" | |
#assert(size_of(int) == size_of(u32)) | |
// ┌───────────────────────────────────────────────────────────────────────────┐ | |
// │ │ | |
// │ Platform Constants │ |