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 | |
if [ "$(whoami)" != "root" ]; then | |
echo "Script must be run as user: root" | |
sudo $0 | |
wait 1 | |
fi | |
while true | |
do | |
clear |
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 | |
# Shell script to backup MySQL database | |
# Set these variables | |
MyUSER="" # DB_USERNAME | |
MyPASS="" # DB_PASSWORD | |
MyHOST="" # DB_HOSTNAME | |
# Backup Dest directory | |
DEST="" # /home/username/backups/DB |
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
<?php | |
$input = file('some_csv_file_with_3_columes.csv'); | |
foreach ($input as $value) { | |
// code... | |
$csv[] = explode (';', $value); | |
} | |
$site = $csv[0][0]; |
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 | |
## source: https://serverfault.com/questions/29262/how-to-manage-my-ssh-known-hosts-file | |
list=`cat ~/.ssh/known_hosts | awk '{print $1}' |sed -e 's/,/ /g' | sort -u ` | |
listsorted=$(printf "%s\n" ${list[@]} | sort -u) | |
echo $listsorted | |
#listsorted="10.2.10.1" | |
echo > /tmp/sshstat.txt | |
for host in $listsorted ; |
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
130.67.15.198 | |
193.213.112.4 | |
2001:4600:4:1fff::253 | |
2001:4600:4:fff::253 | |
DNS: | |
ns11.e.nsc.no | |
ns12.e.nsc.no | |
nv2.ti.telenor.net | |
nv1.ti.telenor.net |
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
$model = "lantech"; | |
$config['model'][$model] = array( | |
'.1.3.6.1.4.1.37072.302.2.1' => array('name' => 'ipes-2208ca'), | |
'.1.3.6.1.4.1.37072.302.2.2' => array('name' => 'ies-2208ca'), | |
'.1.3.6.1.4.1.37072.302.2.3' => array('name' => 'ipes-3408gsfp'), | |
'.1.3.6.1.4.1.37072.302.2.8' => array('name' => 'ipes-2208cb'), | |
); |
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
## velg database | |
# use observium | |
## list kollonner | |
# DESC `devices`; | |
## finn brukte verdier, i 'disable' | |
#SELECT DISTINCT `disabled` FROM `devices`; | |
## finn alle som er diablet. |
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
# /etc/btrfs.d/btrfs-scrub-volum1 | |
mountpoint=/volum1 |
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
SP=$PWD | |
for A in `ls -d $PWD/*`; do | |
cd $A | |
rename-video.sh | |
done | |
cd $SP |
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
$model = "cisco-IE1000"; | |
$config['model'][$model] = array( | |
'.1.3.6.1.4.1.9.1.2330' => array('name' => 'IE-1000-4T1T-LM'), | |
'.1.3.6.1.4.1.9.1.2331' => array('name' => 'IE-1000-6T2T-LM'), | |
'.1.3.6.1.4.1.9.1.2332' => array('name' => 'IE-1000-4T2S-LM'), | |
'.1.3.6.1.4.1.9.1.2333' => array('name' => 'IE-1000-8P2S-LM'), | |
); |
OlderNewer