Skip to content

Instantly share code, notes, and snippets.

View franciscoj's full-sized avatar
🎯
Focusing

Fran Casas franciscoj

🎯
Focusing
View GitHub Profile
@rickklaasboer
rickklaasboer / how-to-setup-plex-with-sonarr-radarr-jackett-overseerr-and-qbittorrent-using-docker.md
Last active June 28, 2024 16:30
How to setup Plex with Sonarr, Radarr, Jackett, Overseerr and qBitTorrent using Docker

How to setup Plex with Sonarr, Radarr, Jackett, Overseerr and qBitTorrent using Docker

This is a guide that will show you how to setup Plex Media Server with Sonarr, Radarr, Jackett, Overseerr and qBitTorrent with Docker. It is written for Ubuntu 20.04 but should work on other Linux distributions as well (considering supported distributions by Docker). It is also written for people who have some experience with Linux and Docker. If you are new to Docker, I recommend you to read the Docker documentation, and if you are new to Linux, I recommend you to read the Ubuntu documentation.

Now, let's get started!

Please note: This guide was written without considering hardlinking for Sonarr/Radarr. If you want to use hardlinking refer to #Hardlinking

Prerequisites

@QWxleA
QWxleA / custom-zk.css
Created April 24, 2022 06:19
Logseq Zettelkasten 💚🐔CSS
/* FLEETING NOTES */
span.page-reference[data-ref="fleeting note"]
{ background: var(--ls-primary-background-color);
background-size: 100%;
color: var(--ls-primary-text-color);
padding: 2px 5px 2px 5px;
font-size: 13px;
line-height: 1em;
font-weight: 500;
@markallenpark
markallenpark / papermc.service
Created March 7, 2022 18:12
Systemd service wrapper for PaperMC
[Unit]
Description=PaperMC Server
After=network.target
[Service]
WorkingDirectory=/opt/paper
User=paper
Group=paper
@mosquito
mosquito / README.md
Last active June 17, 2024 20:26
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
@arsham
arsham / go_cpu_memory_profiling_benchmarks.sh
Last active June 26, 2024 13:32
Go cpu and memory profiling benchmarks. #golang #benchmark
go test -run=. -bench=. -benchtime=5s -count 5 -benchmem -cpuprofile=cpu.out -memprofile=mem.out -trace=trace.out ./package | tee bench.txt
go tool pprof -http :8080 cpu.out
go tool pprof -http :8081 mem.out
go tool trace trace.out
go tool pprof $FILENAME.test cpu.out
# (pprof) list <func name>
# go get -u golang.org/x/perf/cmd/benchstat
benchstat bench.txt

How to calculate your hourly rate as a freelancer?

Many people struggle with this question. Some just try to make as much as a full-time employee makes (and ignore that they won't be able to bill as many days). Others follow tips on startup related websites that suggest to ask for 20% to 50% more than an salary would yield (and ignore the additional risk and expenses they have).

Below you will find some numbers to help you calculate how high your hourly or daily rate should be.

Your yearly income should be higher than an average salary

  • You take more risk than full time employees, phases without income are likely
@jondeandres
jondeandres / gist:8528614
Created January 20, 2014 20:35
Dynamic debugger for Emacs/ruby
# -*- mode: snippet -*-
# name: debug
# key: db
# --
require ` (let ((version (shell-command-to-string "rbenv version")))
(if (string-match-p "^2" version)
(concat "'byebug';byebug")
(concat "'ruby-debug';debugger")))
`
$0
@samlown
samlown / resque
Created July 26, 2013 10:04
Simple script to queue Resque worker tasks from the console or command line. Especially useful for cron tasks.
#!/usr/bin/env ruby
#
# Resque Runner
#
# Quickly queue a resque task using the command line. Fast alternative to running
# rake from the crontab, and prevent loading too many rake tasks.
#
# Usage:
#
# resque queue WorkerClass [arguments]
#!/usr/bin/env ruby
#
# Git commit-msg hook. If your branch name is in the form "username/vod-45-new-feature"
# it automatically adds the prefix "[VOD-45]" to commit
# messages.
#
# Example
# =======
#
# git checkout -b bob/vod-45-some-cool-feature
@brentd
brentd / parallel_asset_compiler.rb
Created July 31, 2012 23:11
Parallelize assets:precompile
require 'parallel' # gem install parallel (https://github.com/grosser/parallel)
# Monkey patch to Sprockets::StaticCompiler, a class provided by actionpack
# that's used by the assets:precompile task. This patch uses the Parallel gem
# to parallelize asset compilation in the simplest way possible.
#
# Parallel wraps Process.fork to handle things like inter-process communication
# via pipes and determining the maximum number of processes to run based on
# your system's total logical processors. So far only tested on MRI 1.9.3 on OS X.
module Sprockets