Skip to content

Instantly share code, notes, and snippets.

@sebleblanc
sebleblanc / Installing Flexget.md
Last active December 30, 2017 10:35
Installing flexget in a virtualenv

To avoid clashes with packages installed on your system, FlexGet can be installed in a Python virtualenv. A virtualenv is similar to a chroot, but specific to Python packages. Creating a virtualenv is a simple process. The virtualenv will contain its own Python interpreter and its own versions of downloaded dependencies, separate from the system's packages.

Creating a virtualenv is a standard procedure in a Python web application deployment.

Let's create a folder in which to create the virtualenv:

mkdir ~/virtualenv # or any name you prefer
cd ~/virtualenv

Now, create the virtualenv itself and make it relocatable. For some reason, we have to create a regular virtualenv before making it relocatable:

@bulljit
bulljit / transmissionSleepWake.sh
Created January 23, 2011 00:08
Transmission-Daemon Script: Pause & Resume Torrents
#!/bin/sh
NETRC=~/.netrc.transmission
TR="transmission-remote -N $NETRC" # command + authentication
FILE="lastrunning.list"
# accepts arguments -sleep -wake
if [ -z "$1" ]; then
echo usage: $0 -sleep or -wake
exit