Skip to content

Instantly share code, notes, and snippets.

View SilverJan's full-sized avatar

jbi SilverJan

View GitHub Profile
@SilverJan
SilverJan / install_bootstrap_studio_ubuntu.sh
Last active April 3, 2024 13:49
Bootstrap Studio setup on Ubuntu/Linux incl. desktop file (app launcher)
# step 1) download binary
sudo su
mkdir -p /opt/bootstrapstudio
cd /opt/bootstrapstudio
# get latest link from https://bootstrapstudio.io/download
wget https://bootstrapstudio.io/releases/desktop/5.6.3/Bootstrap%20Studio.AppImage -O bootstrapstudio.AppImage
chmod +x *.AppImage
# step 2) create desktop file
cat <<EOF > /usr/share/applications/bootstrapstudio.desktop
@pirate
pirate / docker-compose-backup.sh
Last active May 3, 2024 13:42
Backup a docker-compose project, including all images, named and unnamed volumes, container filesystems, config, logs, and databases.
#!/usr/bin/env bash
### Bash Environment Setup
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
# https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html
# set -o xtrace
set -o errexit
set -o errtrace
set -o nounset
set -o pipefail
@mosquito
mosquito / README.md
Last active May 4, 2024 12:42
Add doker-compose as a systemd unit

Docker compose as a systemd unit

Create file /etc/systemd/system/docker-compose@.service. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin, you should use paths specific for your environment.

[Unit]
Description=%i service with docker compose
PartOf=docker.service
After=docker.service
@cdown
cdown / gist:1163649
Last active April 9, 2024 01:10
Bash urlencode and urldecode
urlencode() {
# urlencode <string>
old_lc_collate=$LC_COLLATE
LC_COLLATE=C
local length="${#1}"
for (( i = 0; i < length; i++ )); do
local c="${1:$i:1}"
case $c in