Skip to content

Instantly share code, notes, and snippets.

View dragon-bn's full-sized avatar

dragon-bn

  • France
  • 10:05 (UTC +01:00)
View GitHub Profile
@dragon-bn
dragon-bn / gist:7f18e68aef9d776251979f502257165a
Created January 26, 2025 05:48 — forked from andres-erbsen/gist:1307745
Bash script to install firefox extension xpi (for all users by default)
#!/bin/bash
EXTENSIONSDIR="/usr/lib/firefox-addons/extensions"
TMP="/tmp/firefox-extension-install-temp"
[ x"$1" == "x" ] || [ ! -f $1 ] && echo "Specify valid .xpi file as argument." && exit 1
sudo rm -rf $TMP 2>/dev/null
mkdir -p "$TMP"
trap "sudo rm -rf $TMP 2>/dev/null" 1 2 3 15
@dragon-bn
dragon-bn / asdf-direnv.sh
Created August 22, 2024 02:33 — forked from pelletencate/asdf-direnv.sh
Install latest asdf stable and asdf-direnv, from scratch, and make it all work
#!/bin/sh
shell=$(basename $SHELL)
# Exit if we don't support your shell
if [ $shell != "zsh" -a $shell != "bash" ]; then
printf "This script only works if you're using zsh or bash\n"
exit 1
fi
# Crash if the asdf or direnv commands already exist, or if ~/.asdf, ~/.envrc or ~/.tool-versions already exist
@dragon-bn
dragon-bn / sshconfig
Created October 8, 2021 04:31 — forked from mosdevly/sshconfig
SSH Config Example
# Format
Host alias
HostName myserver.com
User username
IdentityFile ~/.ssh/mykey
# Usage: `ssh alias`
# Alternative: `ssh -i ~/.ssh/mykey [email protected]`
Host myrepos
HostName github.com