Skip to content

Instantly share code, notes, and snippets.

View burakEC's full-sized avatar

Burak Emre ÇOLAK burakEC

View GitHub Profile
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active November 15, 2024 09:51
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@miglen
miglen / Apache Tomcat 8 Start stop script init.d script
Last active November 10, 2022 20:03 — forked from valotas/tomcat.sh
Apache Tomcat init script (or startup/controll script). Works fine for version 7/8. Read the comments for release history. Feel free to modify, copy and give suggestions. (c) GNU General Public License
#!/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
@garrettdieckmann
garrettdieckmann / CRON job
Last active November 8, 2021 03:16
RMAN Incremental backup via BASH Cron job
[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
@tant4lus
tant4lus / healthCheck.py
Last active December 18, 2023 22:53
Weblogic Server Health Check
#======================================
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) : ')
@ashrithr
ashrithr / ssh_tunneling.md
Last active August 28, 2024 14:17
ssh tunneling and port forwarding

###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
@sheharyarn
sheharyarn / mongo_backup.sh
Last active August 28, 2024 08:18
Mongodump Shell Script for Cronjob
#!/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"
@aledbf
aledbf / gist:df4bf8e266bd00d8e37f
Created July 12, 2014 22:26
Upgrade CentOS 6.5 to 7
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
@myst3k
myst3k / after
Last active June 21, 2024 06:10
enable on boot nodemanager and adminserver weblogic 12c
#enable each service for boot
systemctl enable nodemanager
systemctl enable adminserver
#then reboot and test
@bodny
bodny / latest-ffmpeg-centos7.sh
Last active September 26, 2022 13:12 — forked from mustafaturan/latest-ffmpeg-centos6.sh
Installs latest ffmpeg on Centos 7
# 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
@mediaupstream
mediaupstream / make_certs.sh
Last active July 15, 2024 07:57
extract ca-certs, key, and crt from a pfx file
#!/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)