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/bash | |
# | |
# Shuts down the host on inactivity. | |
# | |
# Designed to be executed as root from a cron job. | |
# It will power off on the 2nd consecutive run without an active ssh session. | |
# That prevents an undesirable shutdown when the machine was just started, or on a brief disconnect. | |
# | |
# To enable, add this entry to /etc/crontab: | |
# */5 * * * * root /usr/local/bin/shutdown-if-inactive |
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
root@socketubs:/srv/gitosis/repositories/socket_site.git/hooks# cat post-receive | |
#!/bin/sh | |
echo "-- Attempting to pull and launch jekyll --" | |
cd /var/www/socket_site | |
git --git-dir /var/www/socket_site/.git pull file:///srv/.../socket_site.git/ master | |
jekyll | |
echo |
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
socketubs@socket-desktop:~/Repositories/canopsis$ ls -lh .git/hooks/ | |
total 44K | |
-rwxrwxr-x 1 socketubs socketubs 452 2011-10-21 21:04 applypatch-msg.sample | |
-rwxrwxr-x 1 socketubs socketubs 896 2011-10-21 21:04 commit-msg.sample | |
-rwxrwxr-x 1 socketubs socketubs 160 2011-10-21 21:04 post-commit.sample | |
-rwxrwxr-x 1 socketubs socketubs 552 2011-10-21 21:04 post-receive.sample | |
-rwxrwxr-x 1 socketubs socketubs 189 2011-10-21 21:04 post-update.sample | |
... |
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
wget http://labs.consol.de/wp-content/uploads/2011/09/check_oracle_health-1.7.6.1.tar.gz | |
tar xvf check_oracle_health-1.7.6.1.tar.gz | |
cd !$ | |
./configure | |
make | |
make install |
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
<addressname> = | |
(DESCRIPTION = | |
(ADDRESS_LIST = | |
(ADDRESS = (PROTOCOL = TCP)(Host = <hostname>)(Port = <port>)) | |
) | |
(CONNECT_DATA = | |
(SERVICE_NAME = <sid>) | |
) | |
) |
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
mkdir -p /opt/instantclient_11_2/network/admin | |
vim !$/tnsnames.ora |
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
perl Makefile.PL -V 11.2 | |
make | |
make install |
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
export ORACLE_HOME=/opt/instantclient_11_2 | |
export LD_LIBRARY_PATH=$ORACLE_HOME | |
echo 'ORACLE_HOME="/opt/instantclient_11_2"' >> /etc/environment | |
echo 'LD_LIBRARY_PATH=$ORACLE_HOME' >> /etc/environment |
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
wget http://search.cpan.org/CPAN/authors/id/P/PY/PYTHIAN/DBD-Oracle-1.56.tar.gz | |
tar xvf DBD-Oracle-1.56.tar.gz | |
cd !$ |
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
apt-get install libaio-dev | |
cpan DBI |
NewerOlder