Skip to content

Instantly share code, notes, and snippets.

View dapicester's full-sized avatar

Paolo D'Apice dapicester

View GitHub Profile
@dapicester
dapicester / orbit_swap.sh
Last active June 4, 2022 15:49
Swap mouse buttons for Orbit Wireless
#!/bin/bash
case $1 in
1|on|yes|true)
karabiner_cli --set-variables "{\"orbit_swap_buttons\":1}"
;;
0|off|no|false)
karabiner_cli --set-variables "{\"orbit_swap_buttons\":0}"
;;
*)
@dapicester
dapicester / lualine.lua
Created November 9, 2023 10:00 — forked from Lamarcke/lualine.lua
Lualine config for LSP clients, formatters and linters
-- Returns a string with a list of attached LSP clients, including
-- formatters and linters from null-ls, nvim-lint and formatter.nvim
local function get_attached_clients()
local buf_clients = vim.lsp.get_active_clients({ bufnr = 0 })
if #buf_clients == 0 then
return "LSP Inactive"
end
local buf_ft = vim.bo.filetype
@dapicester
dapicester / application_system_test_case.rb
Created November 2, 2024 10:02
Instrument JavaScript code with Istanbul when running system tests on Rails 7 with importmaps
# test/application_system_test_case.rb
require "test_helper"
class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
include IstanbulInstrumentation
instrument_dir "app/javascript/controllers"
driven_by :selenium, using: :chrome, screen_size: [1400, 1400]