Install Ubuntu Hardy from HDD

#!/bin/bash

# download netboot image
wget http://archive.ubuntu.com/ubuntu/dists/trusty-updates/main/installer-amd64/current/images/netboot/netboot.tar.gz -P /tmp

# extract and copy install files
tar xzf /tmp/netboot.tar.gz -C /tmp
mkdir /boot/ubuntu
cp /tmp/ubuntu-installer/amd64/initrd.gz /boot/ubuntu/
cp /tmp/ubuntu-installer/amd64/linux /boot/ubuntu/

# create GRUB menu entry
cat < /etc/grub.d/49_ubuntu
#!/bin/sh
exec tail -n +4 $0

menuentry "Network Ubuntu install" {
root (hd0,0)
kernel /boot/ubuntu/linux
initrd /boot/ubuntu/initrd.gz
}
EOF
chmod

Oracle queries

-- show tables
select table_name from all_tables;

-- output parameter
set wrap off;
set pagesize 0;
set linesize 120;
column owner format a30;

-- show configuration
show parameters;

-- list users
select username from all_users

-- find constraint
select *
from all_constraints
where constraint_name = 'SYS_C00381400';

-- select a random row from table
SELECT column FROM
SELECT column FROM table
ORDER BY dbms_random.value
)
WHERE rownum = 1

-- update materialized view
begin
dbms_snapshot.refresh('SCHEMA.MATERIALIZED_VIEW_NAME');
end;

-- view sched

MySQL Queries

-- view hostname
select @@hostname;

-- view version
select version();

-- view engines
show engines;

-- list databases
show databases;

-- change database
use mysql;

-- show tables in database
show tables;

-- show table informations
show table status;

-- show engines
show engines;

-- show bin_log info
show variables like '%log_bin%';

-- list users
select user, host from mysql.user;

-- delete user
DROP USER 'USER_NAME'@'%';

-- set user password
--SET PASSWORD FOR 'USER_NAME'@'%' = PASSWORD('NEW_PASSWORD')
use mysql;
update user set password=PASSWORD(