Skip to content

Instantly share code, notes, and snippets.

View 00sapo's full-sized avatar

Federico Simonetta 00sapo

View GitHub Profile
@00sapo
00sapo / aptitude-downgrader.sh
Last active July 28, 2024 15:54
A script that helps downgrading Debian-based systems
#!/bin/bash
deps() {
echo "Missing dependencies, run:\n sudo apt-get install aptitude grep"
exit 1
}
if ! command -v aptitude &>/dev/null; then
deps
fi
if ! command -v grep &>/dev/null; then
#!/bin/env fish
#! GistId: 893916ef26ee61310fe00186b26c9893
# Settings
set working_branch 'working'
set auto_commit '[autopush]'
set remote 'server'
# if test (count $argv) -ne 2
# return
@00sapo
00sapo / pa_solo_mode.sh
Last active September 27, 2022 09:49
PulseAudio Solo Mode
#!/bin/sh
SLEEP_TIME=0.1
print_help() {
cat << EOF
This script can be used to run any shell command so that it's the only
process that can play sounds using PulseAudio. It continuously mutes all the
new streams that are not connected to the command passed as argument. Once
muted, it won't be managed by this script anymore (so that it will stay
@00sapo
00sapo / compile.py
Last active November 28, 2021 19:52
Generic Binder Compilation Using CMake
# GistID: 6ac4980910a08a2c3410cd5fc800cd17
"""
This module allows to compile cpp code into python modules using binder anc
cmake.
The following options are available:
* BINDER_REPO: a `Path` object to the cloned repo of binder
* SOURCE: a string-like to the C++ source code
# GistID: bdd9cbb81528ff0c400137b2dfd96f38
# basic
set --export PATH "$HOME/.local/bin/:$PATH"
# editor
set --export EDITOR "/usr/bin/nvim"
# java
set --export JAVA_HOME "/usr/lib/jvm/default/"
@00sapo
00sapo / config.lua
Last active February 6, 2023 04:14
-- GistID: 8a79cef93c34ab39ba7264d582a0af15
-- THESE ARE EXAMPLE CONFIGS FEEL FREE TO CHANGE TO WHATEVER YOU WANT
-- After changing plugin config exit and reopen LunarVim, Run :PackerInstall :PackerCompile
-- +-----------------------------------------+
-- | General |
-- +-----------------------------------------+
-- default shell to avoid slow downs with fish
@00sapo
00sapo / 0_shell_tricks.md
Last active October 15, 2020 15:56
Useful shell commands

shell tricks

@00sapo
00sapo / init.vim
Last active October 27, 2024 14:15
A neovim distribution for data science
" GistID: b96887c96646762730cacf99a1c4c36d
"
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" README:
" This configuration file is intended for neovim, but most of it should also
" work on vim. It works out of the box with nvim-qt or similar gui and with
" alacritty or other modern terminals.
"