Distribution | Install | Systemd Start on Boot | Alt Start on Boot |
---|---|---|---|
CentOS 8+ | dnf install cronie | systemctl enable crond | chkconfig crond on |
Fedora 22+ | dnf install cronie cronie-anacron | systemctl enable crond | chkconfig crond on |
Debian | sudo apt install cron | systemctl enable crond | update-rc.d cron defaults |
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
mysql > SET TRANSACTION ISOLATION LEVEL READ COMMITTED; | |
Query OK, 0 rows affected | |
Time: 0.001s | |
mysql > SET TRANSACTION ISOLATION LEVEL SERIALIZABLE; | |
Query OK, 0 rows affected | |
Time: 0.001s | |
mysql > SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; | |
Query OK, 0 rows affected | |
Time: 0.001s | |
mysql > SET TRANSACTION ISOLATION LEVEL REPEATABLE READ; |
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
git | |
vim | |
jenkins | |
Blogger | |
Wordpress |
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
SELECT | |
r.trx_wait_started AS wait_started, | |
TIMEDIFF(NOW(), r.trx_wait_started) AS wait_age, | |
rl.lock_table AS locked_table, | |
rl.lock_index AS locked_index, | |
rl.lock_type AS locked_type, | |
r.trx_id AS waiting_trx_id, | |
r.trx_mysql_thread_id AS waiting_pid, | |
r.trx_query AS waiting_query, | |
rl.lock_id AS waiting_lock_id, |
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
# Python example code of heap data structure | |
# importing "heapq" to implement heap queue | |
import heapq | |
# initializing list | |
li = [5, 6, 9, 2, 8] | |
# using heapify to convert list into heap | |
heapq.heapify(li) |
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 | |
_file="$1" | |
[ $# -eq 0 ] && { echo "Usage: $0 filename"; exit 1; } | |
[ ! -f "$_file" ] && { echo "Error: $0 file not found."; exit 2; } | |
if [ -s "$_file" ] | |
then | |
echo "$_file has some data." | |
# do something as file has data | |
else |
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 | |
# get file name only without path | |
file_name=$(basename $BASH_SOURCE) | |
# get extension | |
file_extension="${file_name##*.}" | |
# get file name without extension | |
file="${file_name%.*}" | |
# print them to verify | |
echo "Full input file : $BASH_SOURCE" | |
echo "Filename only : $file_name" |
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
{ | |
"filter": { | |
"id": "main", | |
"class": [ | |
{ | |
"name": "table_access_data", | |
"event": { | |
"name": [ | |
"insert", | |
"update", |
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
{ | |
"filter": | |
{ | |
"id": "main", | |
"class": | |
{ | |
"name": "table_access", | |
"event": | |
{ | |
"name": [ "insert" ], |
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
# ------------------------------------------------------------------------------ | |
# Dockerfile to build basic Ansible | |
# Based on Fedora | |
# ------------------------------------------------------------------------------ | |
# Set the base image | |
FROM fedora | |
# File Author / Maintainer | |
# Use LABEL rather than deprecated MAINTAINER |