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 | |
// Super Secret Spy Award | |
$people = '{"data":[{"first_name":"jake","last_name":"bennett","age":31,"email":"jake@bennett.com","secret":"VXNlIHRoaXMgc2VjcmV0IHBocmFzZSBzb21ld2hlcmUgaW4geW91ciBjb2RlJ3MgY29tbWVudHM="},{"first_name":"jordon","last_name":"brill","age":85,"email": "jordon@brill.com","secret":"YWxidXF1ZXJxdWUuIHNub3JrZWwu"},]}'; | |
// Removing trailing comma and creating an associative array | |
$peopleList = json_decode(preg_replace('/,\s*([\]}])/m', '$1', $people), true); | |
$emailList = array_map(function($people) { |
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
mv /etc/init.d/redis-server /etc/init.d/redis_6379 | |
cp /etc/redis/redis_6379.conf /etc/redis/redis_6380.conf | |
nano /etc/redis/redis_6380.conf | |
cambiar lineas | |
pidfile /var/run/redis_6379.pid | |
port 6379 | |
logfile /var/log/redis/redis_6379.log | |
dir /var/lib/redis/6379 |
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
add-apt-repository ppa:ondrej/php | |
# Update index | |
apt-get update | |
sudo apt-get install gcc | |
apt-get install php7.2 | |
apt-get install php7.2-fpm php7.2-cli php7.2-common php7.2-json php7.2-opcache php7.2-mysql php7.2-phpdbg php7.2-mbstring php7.2-gd php7.2-imap php7.2-ldap php7.2-pgsql php7.2-pspell php7.2-recode php7.2-tidy php7.2-dev php7.2-intl php7.2-gd php7.2-curl php7.2-zip php7.2-xml php7.2-mcrypt | |
# Installing redis with php | |
apt-get install php-redis |