Binding to C Libraries with Nim
This file contains hidden or 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 hidden or 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="[email protected]" | |
set imap_pass=`/usr/bin/security find-generic-password -w -a '[email protected]' -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 hidden or 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 [email protected] | |
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 hidden or 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 β |
This file contains hidden or 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
#include<cstdio> | |
#include<cstring> | |
#ifdef _WIN32 | |
#include <winsock2.h> | |
#include <ws2tcpip.h> | |
#else | |
#include<unistd.h> |
This file contains hidden or 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
/******************************************************************************************* | |
* | |
* raylib [core] example - fullscreen toggle | |
* | |
* Welcome to raylib! | |
* | |
* To test examples, just press F6 and execute raylib_compile_execute script | |
* Note that compiled executable is placed in the same folder as .c file | |
* | |
* You can find all basic examples on C:\raylib\raylib\examples folder or |
OlderNewer