Skip to content

Instantly share code, notes, and snippets.

@remlapmot
remlapmot / skhdrc
Last active November 14, 2024 13:59
skhd config ~/.config/skhd/
# App shortcuts
alt - c : open -a 'Google Chrome'
alt - d : open -a 'Docker Desktop'
alt - f : open -a 'Finder'
alt - g : open -a 'GitHub Desktop'
alt - m : open -a 'Microsoft Word'
alt - o : open -a 'Microsoft Outlook'
alt - p : open -a 'Microsoft PowerPoint'
alt - r : open -a 'RStudio'
alt - s : open -a 'Slack'
@remlapmot
remlapmot / install.sh
Last active November 5, 2024 07:42
Installing programs I use on Ubuntu
#!/usr/bin/env bash
# Git
sudo add-apt-repository ppa:git-core/ppa && sudo apt update && sudo apt install git
# R
# update indices
sudo apt update -qq
# install two helper packages we need
sudo apt install --no-install-recommends software-properties-common dirmngr
@remlapmot
remlapmot / update.sh
Created November 4, 2024 20:46
Update Ubuntu apt packages and snaps
#!/usr/bin/env bash
sudo apt-get update && sudo apt-get --with-new-pkgs upgrade -y
sudo snap refresh
@remlapmot
remlapmot / options.lua
Created November 1, 2024 11:17
NeoVim options ~/.config/nvim/lua/config
-- Options are automatically loaded before lazy.nvim startup
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
-- Add any additional options here
-- Enable line wrapping
vim.opt.wrap = true
@remlapmot
remlapmot / lazy.lua
Last active October 11, 2024 19:08
LazyVim config ~/.config/nvim/lua/config
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
-- bootstrap lazy.nvim
-- stylua: ignore
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
end
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
require("lazy").setup({
spec = {
@remlapmot
remlapmot / .wezterm.lua
Last active November 7, 2024 10:53
WezTerm config file. Place in ~
-- Pull in the wezterm API
local wezterm = require 'wezterm'
-- This will hold the configuration.
local config = wezterm.config_builder()
-- This is where you actually apply your config choices
-- For example, changing the color scheme:
config.font_size = 13
@remlapmot
remlapmot / pkgdown-delete-cache.R
Created July 9, 2024 08:39
Delete pkgdown cache - sometimes can get a corrupted .rds file somehow
fs::dir_delete(fs::path(tools::R_user_dir("pkgdown", "cache"), "http"))
# Amendment from https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Data-in-packages
# https://stat.ethz.ch/pipermail/r-devel/2022-July/081873.html
CheckLazyDataCompression <- function(pkg)
{
pkg_name <- sub("_.*", "", pkg)
lib <- tempfile(); dir.create(lib)
zs <- c("gzip", "bzip2", "xz")
res <- double(3); names(res) <- zs
for (z in zs) {
opts <- c(paste0("--data-compress=", z),
@remlapmot
remlapmot / brew-install-temurin.sh
Created April 2, 2024 10:38
Installing Java on Apple Silicon macOS for rJava R package to work
brew install temurin
@remlapmot
remlapmot / settings.json
Last active November 8, 2024 08:35
Zed settings ~/.config/zed/
// Zed settings
//
// For information on how to configure Zed, see the Zed
// documentation: https://zed.dev/docs/configuring-zed
//
// To see all of Zed's default settings without changing your
// custom settings, run the `open default settings` command
// from the command palette or from `Zed` application menu.
{
"theme": "Rosé Pine Moon",