@nothingness
@lemmy.worldat https://hexdocs.pm/open_api_spex/3.2.0/readme.html there's a definition of a module User
defmodule MyApp.Schemas do
alias OpenApiSpex.Schema
defmodule User do
@behaviour OpenApiSpex.Schema
@derive [Jason.Encoder]
@schema %Schema{
title: "User",
description: "A user of the app",
type: :object,
properties: %{
id: %Schema{type: :integer, description: "User ID"},
name: %Schema{type: :string, description: "User name"},
email: %Schema{type: :string, description: "Email address", format: :email},
inserted_at: %Schema{type: :string, description: "Creation timestamp", format: :datetime},
updated_at: %Schema{type: :string, description: "Update timestamp", format: :datetime}
},
required: [:name, :email],
example: %{
"id" => 123,
"name" => "Joe",
"email" => "joe@gmail.com"
}
"x-struct": __MODULE__
}
def schema, do: @schema
defstruct Map.keys(@schema.properties)
end
In order to avoid re-describing it like that for Open API Specs whilst having already done so for Ecto, is it possible to combine the two definitions in a single module somehow? That is, my Ecto schema User would serve its purpose for Open API Specs too. With some required tweaks.
And if I do combine them, won't this mess up with the methods of the 2 modules and other things?
Why do Braizeiros NEVER under a question like this:
Há chá aqui?
Há wifi aqui?
Há alguma mesa livre aqui?
Never. Never. Never.
I'm aware of tem ... ?
. I'm aware that I could ask vende-se ...?
. But Há [...] aqui?
is a valid, normal, simple Portuguese phrase which must be understood ANYONE who speaks it.
What's the matter?
https://www.aljazeera.com/news/2023/10/30/russia-to-make-it-easier-for-friendly-countries-to-invest
Favoured countries include China, India, Brazil, Saudi Arabia, Turkey, Kazakhstan and Belarus.
I'm a developer.
I've already added payments in Solana and ETH onto my website and now want to add ones in Monero.
So I'll generate a 100 wallets that will be assigned to each user. How will I checking their balances? Will it be possible at all, without my own node, or with a third-party API only? Or will I have to run a node?
The key is to be able to do it automatically, in a web app.
On one server I run MailCow and other - Postfix and Dovecot. I also have a script that sends emails. For the moment I run a script from my local laptop and it works fine.
If I, however, ran a script on each of the 2 servers themselves, I'd be able to connect to the MTAs and get authenticated simpler.
How would I do it?
What would I have to set up, what permissions grant?
https://www.middleeastmonitor.com/20230925-lavrov-cites-israeli-occupation-of-golan-heights-to-expose-us-hypocrisy/
Russian Foreign Minister Sergei Lavrov accused the United States on Saturday of hypocrisy and double standards in its approach to the Israeli-occupied Golan Heights and the Donbas region of Ukraine....
https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes.git
I've managed to get it going compilation-wise.
Having not compiled anything related to the kernel before, I wonder: how to make it compile iwlwifi
module only? In its minimal configuration. Not anything additional and not what may not be needed.
I see that it's began to compile a lot of things
..........
CC arch/x86/kernel/cpu/cpuid-deps.o
CC arch/x86/kernel/cpu/umwait.o
CC arch/x86/kernel/cpu/proc.o
MKCAP arch/x86/kernel/cpu/capflags.c
CC arch/x86/kernel/cpu/capflags.o
CC arch/x86/kernel/cpu/powerflags.o
CC arch/x86/kernel/cpu/feat_ctl.o
CC arch/x86/kernel/cpu/intel.o
CC arch/x86/kernel/cpu/intel_pconfig.o
CC arch/x86/kernel/cpu/tsx.o
CC arch/x86/kernel/cpu/intel_epb.o
CC arch/x86/kernel/cpu/amd.o
CC arch/x86/kernel/cpu/hygon.o
.......
What does it have to with the kernel
?
My goals
I'm trying to build iwlwifi
module manually and for my needs.
https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes.git/tree/net/wireless/
When I run Makefile as make
, I get:
subcmd-util.h: In function ‘xrealloc’:
subcmd-util.h:58:31: error: pointer ‘ptr’ may be used after ‘realloc’ [-Werror=use-after-free]
58 | ret = realloc(ptr, 1);
| ^~~~~~~~~~~~~~~
subcmd-util.h:52:21: note: call to ‘realloc’ here
52 | void *ret = realloc(ptr, size);
| ^~~~~~~~~~~~~~~~~~
subcmd-util.h:56:23: error: pointer ‘ptr’ may be used after ‘realloc’ [-Werror=use-after-free]
56 | ret = realloc(ptr, size);
| ^~~~~~~~~~~~~~~~~~
subcmd-util.h:52:21: note: call to ‘realloc’ here
52 | void *ret = realloc(ptr, size);
| ^~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[4]: *** [/data/iwlwifi-fixes/tools/build/Makefile.build:97: /data/iwlwifi-fixes/tools/objtool/help.o] Error 1
make[3]: *** [Makefile:59: /data/iwlwifi-fixes/tools/objtool/libsubcmd-in.o] Error 2
make[2]: *** [Makefile:63: /data/iwlwifi-fixes/tools/objtool/libsubcmd.a] Error 2
make[1]: *** [Makefile:69: objtool] Error 2
make: *** [Makefile:1349: tools/objtool] Error 2
Why is it? How to fix it?
I want to take aт existing, a standard or one of the popular ones, WiFi driver for Linux and tweak it. I'll inroduce a whitelist into it. That is, to the consumer a driver will show the networks from a whitelist only ignoring all other ones.
It's a PoC. I want to implement it as simply as possible.
Can this be implemented? And how, in a high level?
Can a custom token be priced however much the owner may want? Can the author put the price of $10k/unit on a token?
The question isn't whether or not it'll then be selling.