Skip to content

Instantly share code, notes, and snippets.

@Webreaper
Webreaper / docker-compose.yml
Last active May 8, 2024 13:51
Sample Docker-compose file which shows how to set up Sonarr, Radarr, Prowlarr, Lidarr, QBittorrent and a VPN container so that all all traffic from the containers is routed through the VPN. Also includes Plex and get_iplayer containers, which are not routed through the VPN.
# Docker compose to set up containers for all services you need:
# VPN
# Sonarr, Radarr, Lidarr, Qbittorrent
# Non-VPN
# Plex, get_iplayer
# Before running docker-compose, you should pre-create all of the following folders.
# Folders for Docker State:
# /volume1/dockerdata. - root where this docker-compose.yml should live
# /volume1/dockerdata/plex - Plex config and DB
# /volume1/dockerdata/sonarr - Sonarr config and DB
@JoshCheek
JoshCheek / learning_elm.md
Last active February 18, 2017 22:50
Learning Elm

Learning Elm

What is it? (20 min)

Glance through a few of the examples, maybe 5 or so, to see what kinds of things Elm is doing, what domains they're in, what the code looks like, what other people think Elm is.

defmodule WordCount do
def run do
System.argv
|> path
|> file
|> size
|> count
|> IO.puts
end
defmodule Koncur.AuthenticationPlug do
alias Plug.Conn
alias Phoenix.Status
alias Phoenix.Controller.Errors
alias Poison, as: JSON
import Phoenix.Controller.Connection
import Plug.Conn
import Ecto.Query, only: [from: 2]
def init(opts), do: opts
@timkuijsten
timkuijsten / smartos.vbox.md
Last active October 2, 2020 10:55
SmartOS on VirtualBox

VirtualBox config

vbox host vboxnet0 = 192.168.56.1 (static, no dhcp)

vbox smartos guest config:

storage:

  • add ISO

audio:

  • disable
@dpwright
dpwright / arr.rb
Last active August 29, 2015 14:01
Functional additions to ruby "array"
# Threw together these two functions to demonstrate adding some immutable modification
# functions to Ruby's Array class. "update" takes a hash of indices to values and
# returns a new array with the appropriate indices replaced by the supplied values.
# "modify" takes a list of indices and runs the block on those indices that match;
# like a version of "map" where you can specify the indices.
# Maybe you can already do this in Ruby, but I couldn't see anything in the docs so
# here's my hacky little monkey patch...
class Array
#!/usr/bin/env jruby
require 'rubygems'
require 'spoon'
APPNAME = 'fileserver'
WORK_PATH = Dir.pwd
EXEC = "#{ENV['HOME']}/.rbenv/shims/puma"
PID_PATH = "#{WORK_PATH}/log/#{APPNAME}.pid"
OUT_PATH = "#{WORK_PATH}/log/#{APPNAME}.out.log"
@edubkendo
edubkendo / hide
Created April 3, 2014 18:00
Unshow hidden files in Finder on OSX
#!/bin/bash
defaults delete com.apple.finder AppleShowAllFiles
killall Finder
@edubkendo
edubkendo / unhide
Created April 3, 2014 17:59
Reveal hidden files on OSX in Finder
#!/bin/bash
defaults write com.apple.finder AppleShowAllFiles -boolean true
killall Finder