Skip to content

Instantly share code, notes, and snippets.

View virtualadrian's full-sized avatar
🤓
Geek: A knowledgeable and obsessive enthusiast.

VirtualAdrian virtualadrian

🤓
Geek: A knowledgeable and obsessive enthusiast.
View GitHub Profile
@virtualadrian
virtualadrian / kvm guest - vnc over ssh tunnel.sh
Created February 25, 2017 17:15 — forked from ashee/kvm guest - vnc over ssh tunnel.sh
How to connect vnc viewer to a kvm guest over ssh tunnel
amitava@bonjovi:~$ sudo virsh
Welcome to virsh, the virtualization interactive terminal.
Type: 'help' for help with commands
'quit' to quit
virsh # start latticegrid-demo
Domain latticegrid-demo started
virsh # list
@virtualadrian
virtualadrian / run.sh
Created February 26, 2017 01:55 — forked from Hades32/run.sh
Start a docker container with environment variables for external port and IP
#!/bin/bash
#Start a docker container with environment variables for external port and IP
if [ -z $1 ]
then
echo pass in starting port
exit 1
fi
START_PORT=$1
@virtualadrian
virtualadrian / haconfig.sh
Created February 28, 2017 08:37 — forked from jlazic/haconfig.sh
Split monolithic HAProxy configuration
#!/bin/bash
#Requirements: etckeeper, diffcolor
#This script concatenates multiple files of haproxy configuration into
#one file, and than checks if monolithic config contains errors. If everything is
#OK with new config script will write new config to $CURRENTCFG and reload haproxy
#Also, script will commit changes to etckeeper, if you don't use etckeeper you
#should start using it.
#Script assumes following directory structure:
#/etc/haproxy/conf.d/
@virtualadrian
virtualadrian / LogMeIn.php
Created February 28, 2017 17:30 — forked from kmark/LogMeIn.php
PHP implementation of cPanel's Perl LogMeIn class.
<?php
namespace cPanel;
/**************************************************************************************
* Copyright (c) 2013, cPanel, Inc. *
* All rights reserved. *
* *
* Redistribution and use in source and binary forms, with or without modification, *
* are permitted provided that the following conditions are met: *
* *
@virtualadrian
virtualadrian / phpversion.sh
Created March 12, 2017 15:29 — forked from vjandrea/phpversion.sh
Change php cli version in plesk
#!/bin/sh
printf "Switching php to version 5.6 with symlinks.\n"
printf "Press any key to continue...\n"
read CONTINUE
printf "Creating backups..."
# Backup original binaries
@virtualadrian
virtualadrian / phpversion.sh
Created March 12, 2017 15:29 — forked from vjandrea/phpversion.sh
Change php cli version in plesk
#!/bin/sh
printf "Switching php to version 5.6 with symlinks.\n"
printf "Press any key to continue...\n"
read CONTINUE
printf "Creating backups..."
# Backup original binaries
@virtualadrian
virtualadrian / phpversion.sh
Created March 12, 2017 15:29 — forked from vjandrea/phpversion.sh
Change php cli version in plesk
#!/bin/sh
printf "Switching php to version 5.6 with symlinks.\n"
printf "Press any key to continue...\n"
read CONTINUE
printf "Creating backups..."
# Backup original binaries
@virtualadrian
virtualadrian / phpversion.sh
Created March 12, 2017 15:29 — forked from vjandrea/phpversion.sh
Change php cli version in plesk
#!/bin/sh
printf "Switching php to version 5.6 with symlinks.\n"
printf "Press any key to continue...\n"
read CONTINUE
printf "Creating backups..."
# Backup original binaries