Skip to content

Instantly share code, notes, and snippets.

View mstuttgart's full-sized avatar
🏠
Working from home

Michell Stuttgart mstuttgart

🏠
Working from home
View GitHub Profile
@bashbunni
bashbunni / .zshrc
Created January 4, 2023 16:28
CLI Pomodoro for Linux
# study stream aliases
# Requires https://github.com/caarlos0/timer to be installed. spd-say should ship with your distro
declare -A pomo_options
pomo_options["work"]="45"
pomo_options["break"]="10"
pomodoro () {
if [ -n "$1" -a -n "${pomo_options["$1"]}" ]; then
val=$1
@VonHeikemen
VonHeikemen / nvchad-setup.lua
Created September 24, 2022 23:58
Separate NvChad's configuration from Neovim's default configuration
local path_sep = vim.loop.os_uname().version:match('Windows') and '\\' or '/'
local join = function(...) return table.concat({...}, path_sep) end
local getpath = function(arg)
local path = vim.fn.stdpath(arg)
return vim.fn.substitute(path, [[\(.*\)\zsnvim]], 'nvchad', '')
end
local user_path = getpath('config')
local data_path = getpath('data')
local chad_core = join(data_path, 'core', 'nvim')
@zocker-160
zocker-160 / python3-pyqt5.yml
Created April 1, 2022 01:25
Flatpak manifest for PyQt5
name: PyQt5
cleanup:
- "/include"
- "/lib/python3.8/site-packages/*.pyi"
- "/lib/python3.8/site-packages/PyQt5/uic"
config-opts:
- "--disable-static"
- "--enable-x11"
buildsystem: simple
build-commands:
@lbbedendo
lbbedendo / pgadmin4_install_linux_mint.sh
Last active May 1, 2025 11:23
Instalando o pgAdmin 4 no Linux Mint (web e/ou desktop)
# Adaptado da página oficial do pgAdmin: https://www.pgadmin.org/download/pgadmin-4-apt/
# Testado na versão 20.3 (una)
#
# Setup the repository
#
# Install the public key for the repository (if not done previously):
sudo curl https://www.pgadmin.org/static/packages_pgadmin_org.pub | sudo apt-key add
@danielk333
danielk333 / gcal_events.py
Created May 3, 2021 06:02
Simple script to get google calendar events using the Google API
#!/usr/bin/env python
import datetime
import pathlib
ROOT = pathlib.Path(__file__).resolve().parent
#List of calendar names to get events from
#if empty, just take all calendars
GOOGLE_CALENDARS = [
@johnathanmay
johnathanmay / logitech-mx-master-3-extras-for-linux-with-logiops.md
Last active April 28, 2025 05:05
How to install and configure PixlOne's logid to program Logitech MX Master 3 buttons on Linux.

Logitech MX Master 3 Extras for Linux With logiops

The Logitech Options program isn't available for Linux, but by a nice guy on GitHub (PixlOne) created an open source project that lets you obtain some of that functionality. It's called logiops. It works in conjunction with the Solaar project as well, which I find especially handy since that shows your available battery life in the system tray and lets you pair/unpair devices with the Logitech Unifying Receiver.

Here are some additional pages with info that I used to generate this documentation:

@kurahaupo
kurahaupo / TrueColour.md
Last active April 1, 2025 00:06 — forked from XVilka/TrueColour.md
True Colour (16 million colours) support in various terminal applications and terminals

Terminal Colors

There exists common confusion about terminal colors. This is what we have right now:

  • Plain ASCII
  • ANSI escape codes: 16 color codes with bold/italic and background
  • 256 color palette: 216 colors + 16 ANSI + 24 gray (colors are 24-bit)
  • 24-bit true color: "888" colors (aka 16 million)
@sahilsk
sahilsk / mock_requests.py
Created February 24, 2021 17:41 — forked from evansde77/mock_requests.py
Example of mocking requests calls, python requests.get mock
#!/usr/bin/env python
"""
mocking requests calls
"""
import mock
import unittest
import requests
from requests.exceptions import HTTPError
@TheSherlockHomie
TheSherlockHomie / RenewExpiredGPGkey.md
Created January 3, 2021 16:36
Updating expired GPG keys and backing them up 🔑🔐💻

Updating expired GPG keys and their backup 🔑🔐💻

I use a GPG key to sign my git commits.

An error like this one might be a sign of an expired GPG key.

error: gpg failed to sign the data fatal: failed to write commit object
@darrenpmeyer
darrenpmeyer / README.md
Created November 20, 2020 19:35
Automatically start a single instance of ssh-agent for all terminal sessions to share (bash)

Installation

  1. mkdir -p ~/.config && touch ~/.config/ssh-agent.pid
  2. Paste the contents of ssh-agent-manage.sh into your .bashrc or .bash_profile or similar
  3. killall -9 ssh-agent
  4. Start a new terminal session (note: old sessions will not see ssh-agent, only new ones)

Details

This snippet, when included in .bashrc, will ensure that your session has a working ssh-agent with all your ssh keys loaded into it. It does this without creating separate ssh-agent processes by: