Skip to content

Instantly share code, notes, and snippets.

@unhammer
unhammer / apertium-xsel
Last active November 9, 2020 12:49
Bind "/path/to/apertium-xsel" and "/path/to/apertium-xsel prev" to some global shortcut key, and get apertium translation on whatever you've selected with your mouse (if it's an URL, then it'll download the page, translate it and open that). The one with the "prev" argument will use your most recently used language pair, the other one pops up a …
#!/bin/bash
# This file gives you apertium translation on whatever you've selected
# with your mouse. When called with "prev" as an argument, it will use
# your most recently used language pair, without it will pop up a
# picker. It only uses installed pairs, ie. the ones listed by
# "apertium -l".
# Install dependencies on Debian/Ubuntu:
# $ sudo apt-get install xsel zenity
@hwdsl2
hwdsl2 / .MOVED.md
Last active April 18, 2024 01:37
IPsec VPN Server Auto Setup Script for Ubuntu and Debian
@abtrout
abtrout / pass.md
Created July 8, 2014 14:51
Using password-store with git repository synching

Password-store keeps your passwords (or any other sensitive information) saved in GnuPG encrypted files organized in ~/.password-store. For more information about GPG, consult the GNU Privacy Handbook.

Getting started

To get started, install pass and generate a keypair.

$ brew install pass
$ gpg --gen-key
$ gpg --list-keys
@streetturtle
streetturtle / sp
Last active March 29, 2024 08:53 — forked from wandernauta/sp
sp is a command-line client for Spotify's dbus interface. Play, pause, skip and search tracks from the comfort of your command line.
#!/bin/bash
#
# This is sp, the command-line Spotify controller. It talks to a running
# instance of the Spotify Linux client over dbus, providing an interface not
# unlike mpc.
#
# Put differently, it allows you to control Spotify without leaving the comfort
# of your command line, and without a custom client or Premium subscription.
#
@josh-padnick
josh-padnick / fish-agent.sh
Last active April 1, 2024 06:28
Run ssh-agent via fish shell
#!/bin/bash
#
# Convert ssh-agent output to fish shell
#
eval "$(ssh-agent)" >/dev/null
echo "set SSH_AUTH_SOCK \"$SSH_AUTH_SOCK\"; export SSH_AUTH_SOCK"
echo "set SSH_AGENT_PID \"$SSH_AGENT_PID\"; export SSH_AGENT_PID"
@researcx
researcx / config_audio.md
Last active February 16, 2024 17:36
Linux System-wide Audio Tuning [24bit 192 kHz HD Audio + A=432 Hz Tuning + Equalizer]

24bit 192 kHz HD Audio + A=432 Hz Tuning + Equalizer

High-quality sampling

ALSA

echo 'defaults.pcm.rate_converter "speexrate_best"' | tee -a .asoundrc
sudo alsactl restore

PulseAudio

sudo echo 'default-sample-format = s24le' | sudo tee -a /etc/pulse/daemon.conf
sudo echo 'default-sample-rate = 192000' | sudo tee -a /etc/pulse/daemon.conf