/etc/systemd/system/mkdir-nix.service
[Unit]
Description=Make folder for Nix store
DefaultDependencies=no
Requires=local-fs-pre.target
After=local-fs-pre.target
// Super simple stack-only ini parser | |
// for embedded systems in C | |
// 2023 Simon Ryabinkov <ssleert@gmail.com> | |
#include "ini.h" | |
#include <assert.h> | |
#include <string.h> | |
// return pointer to truncated string |
/* | |
* Copyright (c) 2023 ssleert | |
* | |
* Permission to use, copy, modify, and distribute this software for any | |
* purpose with or without fee is hereby granted, provided that the above | |
* copyright notice and this permission notice appear in all copies. | |
* | |
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
local use = require('packer').use | |
require('packer').startup(function() | |
use 'wbthomason/packer.nvim' -- Package manager | |
use 'neovim/nvim-lspconfig' -- Configurations for Nvim LSP | |
end) | |
local opts = { noremap=true, silent=true } | |
vim.keymap.set('n', '<space>e', vim.diagnostic.open_float, opts) | |
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts) | |
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts) |
package main | |
import ( | |
"golang.org/x/tour/wc" | |
"strings" | |
) | |
func WordCount(s string) map[string]int { | |
m := make(map[string]int) | |
w := strings.Fields(s) |