start new:
tmux
start new with session name:
tmux new -s myname
#!/bin/bash | |
# | |
# description: Apache Tomcat init script | |
# processname: tomcat | |
# chkconfig: 234 20 80 | |
# | |
# | |
# Copyright (C) 2014 Miglen Evlogiev | |
# | |
# This program is free software: you can redistribute it and/or modify it under |
[oracle@database scripts]$ crontab -l | |
# Perform full backup on database Sunday at 3:05 am | |
5 3 * * 0 /$HOME/scripts/backup_db database_name full > /$HOME/scripts/logs/full_backup.log | |
# Perform incremental backups on database Mon-Sat at 3:05 am | |
5 3 * * 1-6 /$HOME/scripts/backup_db database_name inc > /$HOME/scripts/logs/inc_backup.log |
#====================================== | |
from java.io import FileInputStream | |
import java.lang | |
import os | |
import string | |
import sys | |
sys.stdout = file('currentAppState_file_DEL','w') | |
#propertiesFile = raw_input('Please enter path of properties file (e.g. /u01/app/oracle/domains/oms01/oms01.properties) : ') |
###Single hop tunelling:
ssh -f -N -L 9906:127.0.0.1:3306 [email protected]
where,
-f
puts ssh in background-N
makes it not execute a remote command#!/bin/bash | |
MONGO_DATABASE="your_db_name" | |
APP_NAME="your_app_name" | |
MONGO_HOST="127.0.0.1" | |
MONGO_PORT="27017" | |
TIMESTAMP=`date +%F-%H%M` | |
MONGODUMP_PATH="/usr/bin/mongodump" | |
BACKUPS_DIR="/home/username/backups/$APP_NAME" |
rpm --import ftp://ftp.inf.utfsm.cl/pub/Linux/CentOS/7/os/x86_64/RPM-GPG-KEY-CentOS-7 | |
yum install -y python-simplejson m2crypto mod_wsgi openscap wget | |
wget http://dev.centos.org/centos/6/upg/x86_64/Packages/preupgrade-assistant-1.0.2-33.el6.x86_64.rpm | |
wget http://dev.centos.org/centos/6/upg/x86_64/Packages/preupgrade-assistant-contents-0.5.13-1.el6.noarch.rpm | |
wget http://dev.centos.org/centos/6/upg/x86_64/Packages/preupgrade-assistant-ui-1.0.2-33.el6.x86_64.rpm | |
wget http://dev.centos.org/centos/6/upg/x86_64/Packages/python-rhsm-1.9.7-1.el6.x86_64.rpm | |
wget http://dev.centos.org/centos/6/upg/x86_64/Packages/redhat-upgrade-tool-0.7.22-1.el6.noarch.rpm |
#enable each service for boot | |
systemctl enable nodemanager | |
systemctl enable adminserver | |
#then reboot and test |
# source: https://trac.ffmpeg.org/wiki/CentosCompilationGuide | |
yum -y install autoconf automake gcc gcc-c++ git libtool make nasm pkgconfig zlib-devel | |
mkdir ~/ffmpeg_sources | |
cd ~/ffmpeg_sources | |
curl -O http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz | |
tar xzvf yasm-1.2.0.tar.gz | |
cd yasm-1.2.0 |
#!/bin/bash | |
# | |
# Usage: | |
# ./make_certs.sh test.example.com | |
# | |
# The required input to make_certs.sh is the path to your pfx file without the .pfx prefix | |
# | |
# test.example.com.key | |
# test.example.com.crt (includes ca-certs) |