Skip to content

Instantly share code, notes, and snippets.

@xezpeleta
xezpeleta / led.py
Created December 16, 2013 21:19
RaspberryPi - Switch on a LED (pin 4) during 1 second
#! /usr/bin/python
import RPi.GPIO as GPIO
import time
LED = 4
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BCM)
GPIO.setup(LED, GPIO.OUT)
@xezpeleta
xezpeleta / saveconf_3C3800.py
Last active September 28, 2016 14:59
Copy 3COM switch configuration file to a TFTP server. It uses Telnet connection (usually enabled by default).
#! /usr/bin/python
'''
This script backups your 3COM
switch configuration data. It
needs a TFTP service running!
Usage: saveconf_3C3800 <host>
It works with:
@xezpeleta
xezpeleta / mount_vm.sh
Last active February 21, 2018 13:18
Proxmox VM Backup ./mount_vm.sh <VMID> ./umount_vm.sh <VMID>
#! /bin/sh
if [ $# -eq 0 ]
then
echo "No arguments supplied"
exit 1
fi
if [ -z "$1" ]