Skip to content

Instantly share code, notes, and snippets.

View burakEC's full-sized avatar

Burak Emre ÇOLAK burakEC

View GitHub Profile
@dmrub
dmrub / Dockerfile
Last active May 8, 2024 17:07
Dockerfile piece for installing su-exec in debian/ubuntu container
# Install latest su-exec
RUN set -ex; \
\
curl -o /usr/local/bin/su-exec.c https://raw.githubusercontent.com/ncopa/su-exec/master/su-exec.c; \
\
fetch_deps='gcc libc-dev'; \
apt-get update; \
apt-get install -y --no-install-recommends $fetch_deps; \
rm -rf /var/lib/apt/lists/*; \
gcc -Wall \
@fvigotti
fvigotti / docker.service
Created September 13, 2018 07:21
graceful docker/kubernetes shutdown sample
[Unit]
Description=Docker Application Container Engine
Documentation=http://docs.docker.com
After=network.target docker.socket
Wants=docker.socket
[Service]
Type=notify
Environment=GOTRACEBACK=crash
@superjose
superjose / .gitlab-ci.yml
Last active February 19, 2024 10:22
This is an example of a .gitlab-ci.yml that is required for Continuous Integration on GitLab projects.
# Reference: https://www.exclamationlabs.com/blog/continuous-deployment-to-npm-using-gitlab-ci/
# GitLab uses docker in the background, so we need to specify the
# image versions. This is useful because we're freely to use
# multiple node versions to work with it. They come from the docker
# repo.
# Uses NodeJS V 9.4.0
image: node:9.4.0
# And to cache them as well.
@cyberpsyquack
cyberpsyquack / middlewareCheck.py
Last active August 5, 2024 20:02
WLST/Jython script to chak the Healt Status, Hogging Thread and Stuck Thread and Heap status for a series of Oracle WebLogic Domains. It will use one properties file for each Domain. In the first comment a properties file skeleton.
# WebLogic 12c health monitoring tool
# Developer: Gian Luca Ricci
# Just another Pythoneer
# Code version: 4.0.1
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
@patmandenver
patmandenver / scp-speed-test.sh
Last active March 28, 2023 04:10
scp speed test between servers
#!/bin/bash
# scp-speed-test.sh
#
# Usage:
# ./scp-speed-test.sh user@hostname [test file size in MBs]
#
#############################################################
ssh_server=$1
test_file=".scp-test-file"
@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)
@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
@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
@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
@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"