Skip to content

Instantly share code, notes, and snippets.

View sinux-l5d's full-sized avatar
🦀
Learning rust

Simon Leonard sinux-l5d

🦀
Learning rust
  • Chambéry, France
  • 15:37 (UTC +02:00)
  • LinkedIn in/simon-l5d
View GitHub Profile
@ryleu
ryleu / linuxoverwatch.md
Last active May 31, 2023 07:44
OW 2 on Linux

This guide is completely irrelevant! You no longer need to follow anything here—doing so may actually harm performance rather than helping it. Please tell whoever linked you here that they need to maintain their own guide, if they want to help people set up newer versions of DXVK / etc.

@tmo1
tmo1 / nextcloud-caddy-docker.md
Last active July 16, 2024 15:53
Nextcloud behind Caddy as a reverse proxy, using Docker

Introduction

This is a guide to deploying Nextcloud behind a Caddy reverse proxy, both running in Docker containers (an official Nextcloud one and a caddy-docker-proxy one), with the goal of implementing as much as possible via docker-compose files. This is much more difficult than it should be, for a variety of reasons:

  • As with Docker versions of software in general, documentation of the software does not always apply to the Docker versions, and the Docker documentation does not always include the Docker equivalent ways of doing things.

  • Docker images do not always expose the desired configuration knobs of the underlying software.

  • Nextcloud requires special configuration to run correctly behind a reverse proxy (and again, some of the instructions for this configuration requires modification for

@Pandry
Pandry / bashSpinner.sh
Created December 10, 2019 16:58
A simple script to show a spinner during long tasks in bash
#!/bin/bash
###
# Author: github.com/Pandry
# Version: v1.0
# Description: A simple function to create a spinner while executing a long command
# You can easily add your spinner by putting every "frame" into the spinarr array :)
###
spinner()
@parties
parties / renameReactJsToJsx.sh
Last active July 12, 2024 20:21
rename all *.js files containing React markup to *.jsx
# finds all *.js files that have either `</` or `/>` tags in them and renames them to *.jsx
find ./src -type f -name '*.js' -not -name '*.jsx' -not -name '*.ejs' -exec bash -c 'grep -l -E "</|/>" "$0"' {} \; -exec bash -c 'mv "$0" "${0%.js}.jsx"' {} \;
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active July 16, 2024 21:02
set -e, -u, -o, -x pipefail explanation
@mosquito
mosquito / README.md
Last active July 15, 2024 15:04
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
@justincjahn
justincjahn / README.md
Last active January 16, 2024 20:15
Minecraft server(s) using systemd and screen.

Install

# Install dependencies
sudo yum install -y java-1.8.0-openjdk screen

# Create a new unprivileged user for minecraft
useradd -r -m -d /opt/minecraft minecraft

# Create the directory that will house our minecraft instances

sudo su --shell /bin/bash minecraft

@atika
atika / pushover
Last active October 20, 2023 19:37
Send a pushover notification from Bash
#!/bin/bash
# ./pushover.sh -t "Pushover via Bash" -m "Pushover message sent with bash from $(hostname -f)" -p1 -s siren -u http://www.google.com -n "Google"
USER_TOKEN=YOUR_USER_TOKEN_HERE
# YOUR APPS TOKENS / UPPERCASE NAME WITH _TOKEN (usage: "-a monitor" uses MONITOR_TOKEN)
MONITOR_TOKEN=APP_TOKEN
BACKUP_TOKEN=APP_TOKEN
ALERT_TOKEN=APP_TOKEN
APP_LIST="monitor, backup, alert" # FOR USAGE
#!/usr/bin/env bash
# Download HTML converted from provided Markdown, using GitHub API v3
##
md2html(){
if [[ $# -ne 2 ]]; then
echo "ERROR.\nSYNTAX: Markdown_To_HTML <markdown-filepath> <dest-html-filepath>"
return
fi
unset _markdown_filepath