Skip to content

Instantly share code, notes, and snippets.

View kolonuk's full-sized avatar

John Wood kolonuk

View GitHub Profile
@vnl
vnl / MediaDownloader.yaml
Created October 5, 2021 20:10
Docker-compose file which shows how to set up Sonarr, Radarr, Prowlarr, Lidarr, Jackett, QBittorrent and a VPN container so that all all traffic from the containers is routed through the VPN. Also includes get_iplayer containers, which is not routed through the VPN.
version: "3"
services:
vpn:
image: qmcgaw/gluetun
container_name: vpn
cap_add:
- NET_ADMIN
ports:
- 8888:8888/tcp # HTTP proxy
- 8388:8388/tcp # Shadowsocks
@jaircuevajunior
jaircuevajunior / shrink_xenserver_vm_disk.md
Last active January 22, 2023 10:20
Shrinking XenServer VDI VM Disk

Shrinking XenServer VDI VM Disk

XenServer doesn't allow us to do this kinda shrinking so we better recreate the vm copying all the files and recreating grub (boot) files.

1. Prepare the new disk

  • Create a Virtual Disk with the final desired size (eg our running vm disk has currently 100G and we want to shrinkg it to 80G so this new disk is gonna be 80G)
  • Attach the new disk to the running VM. (For this we'll need to shutdown the vm for a brief moment and power up it back again)
  • Under the VM terminal we format the new disk:
fdisk /dev/xvdb #(n, p, ...) DON'T FORGET TO CREATE THE SWAPP PARTITION!!!
mkfs.ext4 /dev/xvdb1
@lukechilds
lukechilds / get_latest_release.sh
Created August 9, 2016 19:43
Shell - Get latest release from GitHub
get_latest_release() {
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api
grep '"tag_name":' | # Get tag line
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value
}
# Usage
# $ get_latest_release "creationix/nvm"
# v0.31.4
@minazou67
minazou67 / howto-remote-access-to-phpMyAdmin-on-bitnami.md
Last active February 4, 2019 11:10
How to remote access to phpMyAdmin on Bitnami Redmine Stack

How to remote access to phpMyAdmin on Bitnami Redmine Stack

Bitnami Redmine Stack の phpMyAdmin にリモート端末からアクセスする方法です。

Environment

  • Debian jessie
  • bitnami-redmine-3.1.0-0-linux-x64
@gbaman
gbaman / HowToOTG.md
Last active May 2, 2024 01:27
Simple guide for setting up OTG modes on the Raspberry Pi Zero

Raspberry Pi Zero OTG Mode

Simple guide for setting up OTG modes on the Raspberry Pi Zero - By Andrew Mulholland (gbaman).

The Raspberry Pi Zero (and model A and A+) support USB On The Go, given the processor is connected directly to the USB port, unlike on the B, B+ or Pi 2 B, which goes via a USB hub.
Because of this, if setup to, the Pi can act as a USB slave instead, providing virtual serial (a terminal), virtual ethernet, virtual mass storage device (pendrive) or even other virtual devices like HID, MIDI, or act as a virtual webcam!
It is important to note that, although the model A and A+ can support being a USB slave, they are missing the ID pin (is tied to ground internally) so are unable to dynamically switch between USB master/slave mode. As such, they default to USB master mode. There is no easy way to change this right now.
It is also important to note, that a USB to UART serial adapter is not needed for any of these guides, as may be documented elsewhere across the int

@teroka
teroka / dell_warranty.py
Created November 8, 2014 19:38
Dell API: Warranty Information
#!/usr/bin/env python
# Quick script to check your Dell asset's warranty status
# Just drop your service tag as parameters for the script and go.
import sys
import requests
APIKEY = 'd676cf6e1e0ceb8fd14e8cb69acd812d'
URL = 'https://api.dell.com/support/v2/assetinfo/warranty/tags.json?svctags={0}&apikey=' + APIKEY
@jeromerobert
jeromerobert / extract-data.py
Last active December 12, 2023 18:46
Extract embedded images from svg
#! /usr/bin/env python3
import xml.etree.ElementTree as ET
import sys
import base64
import os
PREFIX="data:image/png;base64,"
ATTR="{http://www.w3.org/1999/xlink}href"
DEFAULT_NS="http://www.w3.org/2000/svg"
with open(sys.argv[1]) as f: