Skip to content

Instantly share code, notes, and snippets.

#
# /etc/fstab
# Created by anaconda on Fri Sep 27 04:39:12 2024
#
# Accessible filesystems, by reference, are maintained under '/dev/disk/'.
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info.
#
# After editing this file, run 'systemctl daemon-reload' to update systemd
# units generated from this file.
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
@gustavonmartins
gustavonmartins / assembly_to_readmemh
Created May 2, 2021 22:49
Verilgog :generate fie for readmemh
clang --target=riscv32 -march=rv32i test_instructions.s -c -o arquivo.o
llvm-objcopy -O ihex here.o here.hex
objcopy -O binary arquivo.o --only-section .text\* arquivo.bin
hexdump -ve '1/4 "%08x\n"' arquivo.bin > arquivo.mem
clang --target=riscv32 -march=rv32i test_instructions.s -c -o arquivo.o && llvm-objcopy -O binary arquivo.o --only-section .text\* arquivo.bin && hexdump -ve '1/4 "%08x\n"' arquivo.bin > arquivo.mem
defmodule CamelupWeb.GameChannel do
use CamelupWeb, :channel
alias CamelUp.{GameSaloon, GameTable, GameTablePrivateView}
def join("games:" <> game_id, %{"name" => uname}, socket) do
game_id = game_id |> String.to_integer()
socket = assign(socket, :game_user, %{:uuid => socket.assigns.user_id, :char => uname})
send(self(), :after_join)
{:ok, assign(socket, :game_id, game_id)}
end