Skip to content

Instantly share code, notes, and snippets.

@koko1000ban
koko1000ban / xtrabackup_runner.sh
Created September 28, 2012 14:36
run innobackupex for slave script
#!/bin/sh
BACKUP_DIR="${HOME}/backup"
TMPFILE="/tmp/backup_xtra.tmp"
MY_CONF="/etc/my.cnf"
XTRABACKUP="/usr/bin/innobackupex"
USER="root"
PASSWORD="--password=ぱすわーど"
LOCKFILE=`basename $0`.lock
ON_SLAVE='--slave-info --safe-slave-backup'
@bartimaeus
bartimaeus / install-ruby.sh
Created May 31, 2012 19:55 — forked from ryanb/chef_solo_bootstrap.sh
Install Ruby 1.9.3-p286 on Ubuntu 12.04 LTS
#!/usr/bin/env bash
apt-get -y update
apt-get -y install build-essential zlib1g-dev libssl-dev libxml2-dev libxslt-dev libreadline6-dev libyaml-dev
# apt-get -y install libmysqlclient-dev # uncomment for mysql support
cd /tmp
wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p286.tar.gz
tar -xvzf ruby-1.9.3-p286.tar.gz
cd ruby-1.9.3-p286/
./configure --prefix=/usr/local
make
@hirose31
hirose31 / gist:1891020
Created February 23, 2012 06:15
daemontools詰め合わせ
### helper shell function
daemonup() {
[ -z "$1" ] && return
case $1 in
*/*)
DAEMONDIR=$1
;;
*)
if [ -d "$SYS_HOME" ]; then
@zerok
zerok / couch_backup.py
Created October 23, 2010 12:23
A simple backup script for couchdbs
"""
Copyright (c) 2010, Horst Gutmann <zerok@zerokspot.com>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
@tmm1
tmm1 / debug.rb
Created October 14, 2009 06:48
debug a process using strace/gdb
# collect information about a running process
# ruby debug.rb <pid>
begin
raise ArgumentError unless pid = ARGV[0]
pid = pid.to_i
raise ArgumentError unless pid > 0
Process.kill(0,pid)
rescue TypeError, ArgumentError
raise 'pid required'