Skip to content

Instantly share code, notes, and snippets.

View nivaca's full-sized avatar

Nicolas Vaughan nivaca

View GitHub Profile
@nivaca
nivaca / chezmoi.toml
Created May 3, 2024 21:09
chezmoi config
[git]
autoCommit = true
autoPush = true
[diff]
command = "emacsdiff"
[merge]
command = "emacsdiff3"
@nivaca
nivaca / emacsdiff3.sh
Created May 3, 2024 21:08
emacsdiff3.sh
#!/usr/bin/env bash
if [ "$#" -lt 3 ]
then
echo "Needs three filenames as input."
exit 1
fi
EMACS="/usr/bin/emacsclient"
@nivaca
nivaca / emacsdiff.sh
Created May 3, 2024 21:08
emacsdiff.sh
#!/usr/bin/env bash
if [ "$#" -lt 2 ]
then
echo "Needs two filenames as input."
exit 1
fi
EMACS="/usr/bin/emacsclient"
#!/usr/bin/env bash
set -x # echo on
sudo dnf remove -y aajohan-comfortaa-fonts
sudo dnf remove -y google-droid-sans-fonts
sudo dnf remove -y jomolhari-fonts
sudo dnf remove -y khmer-os-system-fonts
sudo dnf remove -y lohit-assamese-fonts
sudo dnf remove -y lohit-bengali-fonts
sudo dnf remove -y lohit-devanagari-fonts
#!/usr/bin/env bash
set -x # echo on
sudo dnf remove -y abrt
sudo dnf remove -y akregator
sudo dnf remove -y artikulate
sudo dnf remove -y blinken
sudo dnf remove -y bomber
sudo dnf remove -y cantata
sudo dnf remove -y cantor
sudo dnf remove -y clementine
@nivaca
nivaca / myauctex.el
Created March 9, 2023 12:05
AucTeX configurarion
;;; mylisp/myauctex.el -*- lexical-binding: t; -*-
(use-package auctex
:straight t
:defer t
:mode
("\\.tex\\'" . latex-mode)
("\\.ltx\\'" . latex-mode)
:commands
(latex-mode
%this tex file was auto produced from TEI by lbp-print-xslt 1.0.0 critical stylesheets on 2022-08-10T19:39:07.443717Z using the file:/usr/src/app/annotations.xslt
\documentclass[twoside, openright]{report}
%imakeidx must be loaded beore eledmac
\usepackage{imakeidx}
@nivaca
nivaca / titlecaseclipboard.py
Created August 1, 2021 20:40
Converts to smart title case a text in the clipboard and stores it again in it
import pyperclip
from titlecase import titlecase
inputtext = pyperclip.paste()
outputtext = titlecase(inputtext)
pyperclip.copy(outputtext)
function _prompt_char() {
if $(git rev-parse --is-inside-work-tree >/dev/null 2>&1); then
echo ' '
fi
}
PROMPT='%F{red}[%B%F{220}%n%F{green}@%F{39}%m %F{5}%1~%F{red}$(_prompt_char)$(git_prompt_info)%F{red}%b]%f
%# '
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}‹"
#!/usr/bin/env bash
# set -x # echo on
_isInstalled() {
package="$1";
check="$(sudo pacman -Qs --color always "${package}" | grep "local" | grep "${package} ")";
if [ -n "${check}" ] ; then
echo 0; #'0' means 'true' in Bash
return; #true
fi;