Skip to content

Instantly share code, notes, and snippets.

@csmr
csmr / draft-code.lua
Created March 1, 2025 16:08
Avante mod draft to support provider conf dir/files and codestral
-- ~/.config/nvim/avante_providers dir for providers
-- ~/.config/nvim/avante_providers/codestral.lua
return {
endpoint = "https://api.codestral.com/v1",
model = "codestral-model-v1",
api_key_name = "CODESTRAL_API_KEY",
timeout = 30000,
temperature = 0.7,
max_tokens = 4096,
}
@csmr
csmr / HOWTO.avante.nvim.md
Last active February 28, 2025 17:07
Avante.nvim start for Debian 12

For nvim >0.10.0 with vim-plug

  1. sudo apt install pandoc as avante dep rendermarkdown.nvim depends on this
  2. Go to https://github.com/yetone/avante.nvim/blob/main/README.md
  3. find vim-plug instructions, copy snippet
  4. open ~/.config/nvim/init.vim
  5. paste snippet between call plug#, edit autocmd line to autocmd! User avante.nvim lua require('avante').setup()
  6. save/:w<enter>
  7. :PlugUpdate<enter>
  8. ???
@csmr
csmr / env
Last active February 28, 2025 15:54
AppImage nvim to $PATH from ~/.nvim-appimage/env
# Add Neovim AppImage executable in path - from ~/.deno setup
# Usage:
# 1. Download nvim AppImage, under $NVIMDIR
# 2. In `.bashrc`, add `source "$HOME/.nvim-appimage/env"`
NVIMDIR="5HOME/.nvim-appimage"
NVMIMG="$NVIMDIR/nvim-linux-x86_64.appimage"
case ":${PATH}:" in
*:"$NVIMDIR":*)
@csmr
csmr / ng.install.sh
Last active April 9, 2024 11:46
Angular lessons base deps installer
#!/bin/bash
echo "OK this runs the basic stuff to work with the lessons. If error, read script and fix it."
# npm
npm -v
# node
node -v
# ng cli
sudo npm install -g @angular/cli
ng version
@csmr
csmr / mixtral.llm.fail.rtf
Created April 9, 2024 10:58
Prompt: Emoticon for testing?
Here are a few emoji options that could represent testing:
* ๐Ÿงช Test Tube: This emoji can represent the idea of testing or experimentation.
* ๐Ÿ”ฌ Microscope: This emoji can represent the idea of close examination or analysis, which could be associated with testing.
* ๐Ÿ“Š Chart Increasing: This emoji can represent the idea of tracking data or results, which could be associated with testing.
* ๐Ÿ“ˆ Chart Increasing with Yen: This emoji can represent the idea of tracking financial data or results, which could be associated with testing in a business context.
* ๐Ÿ“‰ Chart Decreasing: This emoji can represent the idea of tracking negative data or results, which could be associated with testing.
* ๐Ÿ“Š Bar Chart: This emoji can represent the idea of tracking data or results, which could be associated with testing.
* ๐Ÿ“ˆ Upwards Arrow with Tip Leftwards: This emoji can represent the idea of positive results or progress, which could be associated with successful testing.
* ๐Ÿ“‰ Downwards Arrow with Tip Rightwards: This emoji can repre
@csmr
csmr / debian_dt.configuration.nx
Created April 8, 2024 11:23
Debian desktop NixOS conf
{ config, pkgs, ... }:
{
imports = [
# Import the default NixOS configuration
<nixpkgs/nixos/modules/installer/cd-dvd/x86_64-linux.nix>
];
# Set the system timezone
time.timeZone = "America/Los_Angeles";
@csmr
csmr / debian_dt_script.sh
Created April 8, 2024 11:20
Debian desktop bash installer example
#!/bin/bash
# Install desktop environment
apt-get update && \
apt-get install -y xfce4 firefox thunderbird libreoffice gimp
# Set timezone
echo "America/Los_Angeles" > /etc/timezone && \
dpkg-reconfigure -f noninteractive tzdata
@csmr
csmr / Dockerfile
Created April 8, 2024 11:16
Debian desktop docker file
#
# Dockerfile
#
# Use Debian as the base image
FROM debian:latest
# Install desktop environment
RUN apt-get update && \
apt-get install -y xfce4 firefox thunderbird libreoffice gimp
@csmr
csmr / debian_desk.sls
Created April 8, 2024 11:12
Debian desktop saltstack state
#
# File: debian_desktop.sls
#
# Install desktop environment
xfce4:
pkg.installed
# Install common applications
firefox:
@csmr
csmr / debian_dt_recipe.rb
Created April 8, 2024 11:06
Debian Chef cookbook
#
# Cookbook:: debian_desktop
# Recipe:: default
#
# Install desktop environment
package 'xfce4' do
action :install
end