I hereby claim:
- I am michelemina on github.
- I am michelemina (https://keybase.io/michelemina) on keybase.
- I have a public key ASAdVun8dbQvBT67eDYhrxD_7h32qZi67_4EfUC6i79DEgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env ruby | |
require 'net/telnet' | |
cache_dump_limit = 100 | |
servers = ["localhost"] | |
servers.each do |host| | |
p host | |
begin | |
server = Net::Telnet::new("Host" => host, "Port" => 11211, "Timeout" => 3) | |
slab_ids = [] |
module ActiveRecord | |
class Base | |
def readonly? | |
true | |
end | |
def destroy | |
raise "Are you Crazy?" | |
end |
... | |
set :default_environment, { | |
'LD_LIBRARY_PATH' => "#{shared_dir}/oracle/" | |
} |
#!/bin/bash | |
echo "Mysql complete hot backup started" | |
DEST="/dest-path" | |
USERNAME="username" | |
PASSWORD="password" | |
databases=`mysql -u$USERNAME -p$PASSWORD -e "show databases;" | grep -v +----------------------+ | grep -v Database | grep -v information_schema` | |
INFO_SCHEMA="information_schema" | |
if [ ! -d $DEST ]; then |
#!/bin/bash | |
echo "Postgresql complete hot backup started" | |
DIR="/dump-path" | |
[ ! $DIR ] && mkdir -p $DIR || : | |
LIST=$(su postgres -c "psql -l" | awk '{ print $1}' | grep -vE '^-|^List|^Name|template[0|1]|^\(|^\||^$') | |
for d in $LIST | |
do | |
echo "Dump $d started" | |
su postgres -c "/usr/bin/pg_dump $d" | gzip -c > $DIR/$d.dump.gz |
# make less more friendly for non-text input files, see lesspipe(1) | |
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" | |
# set variable identifying the chroot you work in (used in the prompt below) | |
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then | |
debian_chroot=$(cat /etc/debian_chroot) | |
fi | |
# set a fancy prompt (non-color, unless we know we "want" color) | |
case "$TERM" in |