Skip to content

Instantly share code, notes, and snippets.

@ntBre
ntBre / env.yaml
Created October 1, 2024 20:32
Debugging minimization issue
name: old-openeye
channels:
- conda-forge
- openeye
dependencies:
- python
- openff-qcsubmit
- openff-toolkit
@ntBre
ntBre / init.el
Created September 25, 2023 15:02
Emacs 29 config
(setq custom-file "~/.emacs.d/custom.el")
(load custom-file t)
(load-theme 'tango-dark)
(set-face-attribute 'default nil :height 140)
(use-package rust-ts-mode
:hook ((rust-ts-mode . eglot-ensure)
(rust-ts-mode . company-mode))
:mode (("\\.rs\\'" . rust-ts-mode))
@ntBre
ntBre / PKGBUILD
Created June 13, 2023 18:32
Modified PKGBUILD for mu 1.8.14 for evil-collection compatibility. Patches mu-error.hh to enable building with recent arch packages.
# Maintainer: Marcel Röthke <[email protected]>
# Contributor: Pierre Neidhardt <[email protected]>
# Contributor: csllbr; Popsch <[email protected]>
pkgname=mu
pkgver=1.8.14
pkgrel=1
pkgdesc="Maildir indexer/searcher and Emacs client (mu4e)"
arch=("x86_64" "armv7h")
url="http://www.djcbsoftware.nl/code/mu"
@ntBre
ntBre / rust.el
Created November 16, 2022 13:32
rust-mode and lsp-mode setup for emacs
;;; rust
(use-package rust-mode
:ensure t
:hook ((rust-mode . flycheck-mode)
(rust-mode . hs-minor-mode))
:bind (:map rust-mode-map
("<f6>" . my/rust-format-buffer)
("C-c 6" . my/rust-format-buffer))
:config
(require 'rust-rustfmt)
@ntBre
ntBre / internal.c
Created October 5, 2022 19:26
trying to read mopac parameters from the input file in C
#include <stdio.h>
#include <string.h>
#include <ctype.h>
/*
INTERNAL keyword requested by INTERNAL=block_name, where the parameters are
included in the same format used by EXTERNAL but inside of a block started by
block_name and ended "end block_name"
*/
@ntBre
ntBre / PKGBUILD
Last active February 6, 2023 00:59
rough arch pkgbuild for openmopac
# Maintainer: Brent Westbrook <[email protected]>
pkgname=mopac
pkgver=22.0.6
pkgrel=1
pkgdesc="a semiempirical quantum chemistry software package"
arch=('any')
url="http://openmopac.net/home.html"
license=('unknown')
groups=()
depends=()
@ntBre
ntBre / molecule.pl
Created April 4, 2022 16:11
Script to visualize a selected molecular geometry with molden
#!/usr/bin/perl
use warnings;
use strict;
use feature "say";
use File::Temp qw/ tempfile /;
my ($fh, $filename) = tempfile();
my $mol = `xclip -o -selection primary`;
@ntBre
ntBre / init.el
Created February 19, 2022 14:55
My Emacs configuration for writing Go
(use-package which-key
:ensure t
:config
(which-key-mode))
(use-package lsp-mode
:ensure t
:bind (:map lsp-mode-map
("C-c d" . lsp-describe-thing-at-point)
("C-c a" . lsp-execute-code-action))
@ntBre
ntBre / stamps.lua
Created February 12, 2022 18:57
Capturing video time stamps to a file in mpv
require 'mp'
FNAME = "timestamps.txt"
local function file_exists(name)
-- from https://stackoverflow.com/a/4991602
local f=io.open(name,"r")
if f~=nil then io.close(f) return true else return false end
end