Skip to content

Instantly share code, notes, and snippets.

View greising's full-sized avatar
🎧

Guillermo Greising greising

🎧
View GitHub Profile
""" Simple mod from the original gist submitted by @zoufou
https://gist.github.com/zoufou/5701d71bf6e404d17cb4
Mod by: @pguillem
Purpose:
- Integrates PySQLPool lib to handle MySQL
- Visit https://pythonhosted.org/PySQLPool/tutorial.html
Requirements:
@greising
greising / jasmind_consumer
Last active September 7, 2015 19:43 — forked from pguillem/jasmind_consumer
init.d script to launch consume_MT_messages.py as a system daemon (Should work in Debian/Ubuntu)
#!/bin/sh
### BEGIN INIT INFO
# Provides: rabbit consumer
# Required-Start: $network $local_fs
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Jasmin SMS Gateway Mysql Reporter Init Script
# Description: Jasmin SMS Gateway Mysql Reporter Init Script
### END INIT INFO
@greising
greising / maze.ps1
Last active August 29, 2015 14:20 — forked from dfinke/maze.ps1
param($Rows=8, $Columns=8)
Add-Type -AssemblyName System.Drawing
class Cell {
[int]$Row
[int]$Col
$links = @{}
@greising
greising / CFSBuddy.ps1
Last active August 29, 2015 14:20 — forked from dfinke/CFSBuddy.ps1
#Requires -Version 5.0.9814.0
if(!($PSVersionTable.PSVersion.Major -ge 5 -and $PSVersionTable.PSVersion.Build -ge 9814)) {
"Sorry you need PSVersion 5.0.9814.0 or newer"
$psversiontable
return
}
Add-Type -AssemblyName presentationframework
<#
.SYNOPSIS
Migrates a Azure Virtual Machine to another subscription or data centre
.DESCRIPTION
Shutsdown the source VM
Exports the VM config to a temporary file
Loops through all Azure disks attached to the source VM
Schedules an async copy of the underlying VHD to the destination storage account
- optionally overwrites existing VHD in destination if it exists