Skip to content

Instantly share code, notes, and snippets.

View pivaldi's full-sized avatar

Philippe Ivaldi pivaldi

View GitHub Profile
@pivaldi
pivaldi / pim-advise-display-warning.el
Last active September 11, 2024 12:53
Filtering unwanted Emacs warning by message regexps.
;; Copyright (c) 2024, Philippe Ivaldi <www.piprime.fr>
;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@pivaldi
pivaldi / capture.el
Created August 17, 2024 20:59 — forked from hlissner/capture.el
Examples of Doom CLI scripts
#!/usr/bin/env doomscript
;; An example script showing off how use Doom's CLI framework to write your own.
(defcli! (capture)
((key ("-k" "--key" key))
&input input &args args)
"Open an org-capture window."
(exit! "emacsclient" "-a" "" "-e"
(format "(+org-capture/open-frame %S %S)"
(concat input (string-join args " "))
@pivaldi
pivaldi / .dir-locals.el
Created July 16, 2024 22:05
Emacs Project Local Variables for Go developer to Configure lsp-go-build-flags and flycheck-golangci-lint-config
;;; Put this file in the root directory of your Go project
;;; For more information see (info "(emacs) Directory Variables")
;;; https://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html
((nil . ((eval . (setq local_project_root_path
(projectile-project-root))
)))
(go-mode . ((eval . (set (make-local-variable 'flycheck-golangci-lint-config) (concat local_project_root_path ".golangci.yml")))
(subdirs . true)))
(go-mode . ((eval . (set (make-local-variable 'lsp-go-build-flags) (vector "-tags=no_pprof")))
@pivaldi
pivaldi / gitwatchd.sh
Created September 14, 2017 10:18
How to run and monitor gitwatch with monit
#!/bin/bash
## Run gitwatch as a daemon
# $1 is the repository to monitor
# $2 is the stop/start command
# Exemple gitwatchd.sh /etc/ start
##################################
@pivaldi
pivaldi / 50-marblemouse.conf
Last active January 1, 2023 12:01 — forked from weakish/50-marblemouse.conf
Xorg Logitech Marble Trackball Config on Debian
# put this file under /usr/share/X11/xorg.conf.d/50-marblemouse.conf
# Large button left : normal click
# Both large buttons : middle click
# Large button right : right-click
# Small button left : browser back
# Small button left+ball : scroll (verticaly or horizontally)
# Small button right : browser forward
@pivaldi
pivaldi / .psqlrc
Created November 11, 2012 10:28
.psqlrc dot file to customize the default psql sessions
-- psql prompt can be customized
\set PROMPT1 '%[%033[1;33m%]%M:%>%[%033[1;32m%] %n@%/%R%[%033[0m%]%# '
\set PROMPT2 :PROMPT1
\set PROMPT3 '>> '
-- Missing LIMIT fetch count is set to 1000
\set FETCH_COUNT 1000
-- Set pager to off
\pset pager off