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
FF000000 | |
FFFFFFFF | |
FFFF0000 | |
FF00FF00 | |
FF0000FF | |
FFFFFF00 | |
FFFF00FF | |
FF00FFFF | |
FF800000 | |
FF008000 |
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
# Allow a command to continue execution after logout | |
nohup mycommand & | |
# Display one particular line from a file | |
gzip -dc mytarball.tar.gz | tar xvf - | |
# Display current runlevel | |
who -r | |
# Split lines of text into n-char lines |
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 | |
# Script will output dumps for all databases using seperate files | |
# Derived from this post: http://www.cyberciti.biz/faq/ubuntu-linux-mysql-nas-ftp-backup-script/ | |
USER="root" | |
PASSWORD="SnM1073k" | |
HOST="localhost" | |
MYSQL="$(which mysql)" | |
MYSQLDUMP="$(which mysqldump)" | |
OUTPUT_DIR="/backups/files" |
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
<?php | |
$pid = pcntl_fork(); | |
if ($pid == -1) { | |
die("could not fork"); | |
} else if ($pid) { | |
exit(); // we are the parent | |
} else { | |
// we are the child | |
} | |
if (posix_setsid() == -1) { |
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
<? | |
$num_to_char = array( | |
'27' => "1", | |
'28' => "2", | |
'29' => "3", | |
'30' => "4", | |
'31' => "5", | |
'32' => "6", | |
'33' => "7", | |
'34' => "8", |
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
### Ubuntu Mongodb ### | |
### Installing Mongodb ### | |
sudo apt-get install mongodb-server | |
sudo service mongodb start | |
Check log in "/var/log/mongodb/mongodb.log" |
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
LOGROTATE CENTOS | |
================ | |
INFO | |
==== | |
Check is logrotate active: | |
cat /etc/cron.daily/logrotate |
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
=== Install Gearman === | |
sudo add-apt-repository -y ppa:ondrej/php | |
sudo apt-get update | |
sudo apt-get -y install php7.0 php7.0-fpm php-gearman | |
sudo touch /var/log/gearmand.log | |
sudo chmod 0666 /var/log/gearmand.log | |
gearmand -d |
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
=== Install === | |
=== Prepare Docker === | |
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo apt-key fingerprint 0EBFCD88 | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ | |
$(lsb_release -cs) \ | |
41 stable" | |
sudo apt-get install docker-ce |
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
# Install Redis | |
sudo apt-get install redis-server | |
sudo apt-get install php-redis | |
sudo nano /etc/redis/redis.conf | |
Edit: | |
maxmemory 128mb |
OlderNewer