Skip to content

Instantly share code, notes, and snippets.

View andrewzeneski's full-sized avatar

Andrew Zeneski andrewzeneski

  • Null Pointer, Inc.
  • New York, NY
View GitHub Profile
@miku
miku / mysqldump2sqlite3.sh
Created December 14, 2010 20:28
Convert a mysql database dump into something sqlite3 understands.
#!/bin/sh
# ================================================================
#
# Convert a mysql database dump into something sqlite3 understands.
#
# Adapted from
# http://stackoverflow.com/questions/489277/script-to-convert-mysql-dump-sql-file-into-format-that-can-be-imported-into-sqlit
#
# (c) 2010 Martin Czygan <[email protected]>
@silas
silas / xe-host-backup
Created September 14, 2010 20:18
Live XCP host backups
#!/usr/bin/env bash
DST_PATH="${DST_PATH:-/tmp}"
backup() {
uuid="$1"
label_name=$( xe vm-list uuid="$uuid" | grep 'name-label' | cut -b 24- )
snapshot_uuid=$( xe vm-snapshot vm="$uuid" new-name-label=backup_vm )
xe template-param-set is-a-template=false ha-always-run=false uuid="$snapshot_uuid"
@danmackinlay
danmackinlay / supervisord.sh
Created August 27, 2009 07:07
an init.d script for supervisord
#! /bin/sh
### BEGIN INIT INFO
# Provides: supervisord
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Example initscript
# Description: This file should be used to construct scripts to be
# placed in /etc/init.d.