S No | Parts | Size ( Bytes ) |
Description |
1 | Boot Loader | 446 | Boot loader to load the kernel into the memory to the start the operating system |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Query to Update Data from another table with current table value | |
UPDATE tablename | |
SET tablenameid = ( SELECT id from anothertable where xyz = tabllename.tablenameid ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- SQL- MSSQL | |
-- OpenQuery to get data from Postgresql DB on MSSQL Studio | |
SELECT * FROM OPENQUERY(YASUCE, 'SELECT * FROM yasuce.public.auth_user') | |
EXEC ( 'SELECT * FROM yasuce.public.auth_user' ) AT YASUCE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv | |
# START pre-kvmhost-partitions | |
# | |
set \$(list-harddrives) | |
echo "\$@" | |
disk=( \$1 \$3 ) | |
size=( \$2 \$4 ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from airflow.hooks.postgres_hook import PostgresHook | |
from airflow.models import BaseOperator | |
from airflow.utils.decorators import apply_defaults | |
class PostgresOperator(BaseOperator): | |
""" | |
Executes sql code in a specific Postgres database |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# store start date to a variable | |
imeron=`date` | |
echo "Import started: OK" | |
dumpfile="/home/bob/bobiras.sql" | |
ddl="set names utf8; " | |
ddl="$ddl set global net_buffer_length=1000000;" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
cat <<EOT > /etc/issue | |
*********************************************************************** | |
* Access to this computer system is limited to authorised users only. * | |
* Unauthorised users may be subject to prosecution under the Crimes * | |
* Act or State legislation * | |
* * | |
* Please note, ALL CUSTOMER DETAILS are confidential and must * | |
* not be disclosed. * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Set up the serial console | |
# | |
%post | |
echo ":: Setting up Serial Console ::" >> /root/post.log | |
perl -p -i -e 's/^(default.*)$/$1\nserial --unit=0 --speed=9600 --data=8 --parity=no --stop=1\nterminal --timeout=5 serial console/' /boot/grub/grub.conf >> /root/post.log 2>&1 | |
perl -p -i -e 's/^(\s+kernel.*)$/$1 console=tty0 console=ttyS0,9600/' /boot/grub/grub.conf >> /root/post.log 2>&1 | |
echo "" >> /etc/inittab | |
echo "# Run serial console on ttyS0" >> /etc/inittab | |
echo "S1:2345:respawn:/sbin/agetty ttyS0 9600 vt100" >> /etc/inittab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- SQL : Postgresql | |
-- Query : Kill all the active connection of particular database. | |
SELECT | |
pg_terminate_backend(pid) | |
FROM | |
pg_stat_activity | |
WHERE | |
pid <> pg_backend_pid() | |
AND datname = 'dev'; -- dev- Database Name which connection needs to be terminate |
OlderNewer