Skip to content

Instantly share code, notes, and snippets.

@craigstjean
craigstjean / db2_install.sh
Created March 18, 2016 04:38
Automated DB2 installation on CentOS 7
#!/bin/sh
WHOAMI=$(whoami)
if [ "$WHOAMI" != "root" ]; then
echo must run as root
exit -1
fi
HOSTNAME=$(hostname)
WC=$(grep $HOSTNAME /etc/hosts | wc -l)
@ilkereroglu
ilkereroglu / simply-sending-e-mails-with-mailx.md
Created September 22, 2015 21:53
How To Send E-Mail On CentOS 7

Installing mailx

yum -y update
yum install -y mailx

We can now start sending e-mails using

@leandrotoledo
leandrotoledo / main.py
Last active February 2, 2024 00:08
Webhook using self-signed certificate and Flask (with python-telegram-bot library)
#!/usr/bin/env python
'''Using Webhook and self-signed certificate'''
# This file is an annotated example of a webhook based bot for
# telegram. It does not do anything useful, other than provide a quick
# template for whipping up a testbot. Basically, fill in the CONFIG
# section and run it.
# Dependencies (use pip to install them):
# - python-telegram-bot: https://github.com/leandrotoledo/python-telegram-bot
@protrolium
protrolium / ffmpeg.md
Last active September 9, 2025 22:54
ffmpeg guide

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

You can get the list of installed codecs with:

@haballan
haballan / dbdailychk.sh
Last active April 5, 2024 06:33
Shell Script To Perform Oracle Database Health Check (Performs multiple DB health checks and report them in one report to the user via E-mail) http://dba-tips.blogspot.com/2015/05/oracle-database-health-check-script.html
# ##################################################################################################################################
# DATABASE DAILY HEALTH CHECK MONITORING SCRIPT
VER="[6.2]"
# ===================================================================================================
# CAUTION: THIS SCRIPT MAY CAUSE A SLIGHT OVEARHEAD, DO NOT RUN IT TOO FREQUENT, ONCE A DAY IS IDEAL.
# ===================================================================================================
# ***********
# How To Use:
# ***********
# 1- Set your Email by modifying this parameter below: EMAIL="[email protected]"
@emmajane
emmajane / gist:59321345a81a4f5837c0
Last active February 28, 2024 16:35
JQL Syntax for the Impatient

JQL Syntax for the Impatient

There are a few JQL syntax bits to get you started:

  • AND --- allows you to add qualifiers to a list
  • != Thing --- target one thing
  • is in (List, Of, Things) --- target a bunch of things (Done, Closed, Resolved) typically
  • not in (List, of, Things) --- do not include a bunch of things
  • -1w --- relative time. You can also use -1d for day
  • "2015/3/15" --- specific dates
@P7h
P7h / tmux_vs_screen.md
Last active April 3, 2025 19:07
tmux vs screen commands

tmux vs. screen commands


Action tmux screen
start a new session tmux
tmux new
tmux new-session
screen
start a new session with a name tmux new -s name screen -S name
re-attach a detached session tmux attach
tmux attach-session
screen -r
re-attach a detached session with a name tmux attach -t name
tmux a -t name
screen -r name
re-attach an attached session (detaching it from elsewhere) tmux attach -dtmux attach-session -d screen -dr
@timbru31
timbru31 / openELEC.sh
Last active December 17, 2017 22:07
replace (root) password of squashfs from openELEC/LibreELEC // HowTo: https://dustpla.net/NyvMK
#!/bin/sh
#
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# Tested with openELEC v4.0.6, v4.2.1, v5.0.8 and v6.0.0 #
# Tested with LibreELEC v7.90.002 #
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
# author: Tim "xGhOsTkiLLeRx" Brust
@barrysteyn
barrysteyn / svn-to-git.md
Last active October 10, 2024 12:27
Migrate From SVN To GIT
@bbrothers
bbrothers / create_ftp_user.sh
Last active June 17, 2023 11:20
Bash for creating vsftp users
#!/bin/bash
# Create ftp user, create folders and set permissions
# Shamelessly coppied from http://dev.n0ise.net/2012/09/vsftpd-add-user-automation-bash-script/
# Usage: ./create_ftp_user.sh [username] "[password]"
#
NAME=$1
PASS=$2