wget http://download.gna.org/wkhtmltopdf/0.12/0.12.3/wkhtmltox-0.12.3_linux-generic-amd64.tar.xz
tar -xvf wkhtmltox-0.12.3_linux-generic-amd64.tar.xz
cd wkhtmltox/bin/
sudo mv wkhtmltopdf /usr/bin/wkhtmltopdf
sudo mv wkhtmltoimage /usr/bin/wkhtmltoimage
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 | |
$location = get_field('location'); | |
if( !empty($location) ): | |
?> | |
<div class="acf-map"> | |
<div class="marker" data-lat="<?php echo $location['lat']; ?>" data-lng="<?php echo $location['lng']; ?>"></div> | |
</div> | |
<?php endif; ?> |
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
var last = ''; | |
var telefono = document.getElementById('telefono'); | |
telefono.addEventListener('input', function(e){ | |
if (isNaN(e.target.value)) | |
e.target.value=last; | |
else | |
last=e.target.value; | |
}); |
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
\DB::table('faces')->where('id', $faceId)->update(['meta'=> \DB::raw("json_remove(meta, '$.{$request->index}')") ]); |
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 | |
# Install the Build and Test Dependencies | |
apt-get update | |
apt-get install -y curl build-essential tcl | |
# Download and Extract the Source Code | |
cd /tmp | |
curl -O http://download.redis.io/redis-stable.tar.gz | |
tar xzvf redis-stable.tar.gz |
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
sudo add-apt-repository ppa:ondrej/php | |
sudo apt-get update | |
(optional) sudo apt-get remove php7.0 | |
sudo apt-get install php7.2; | |
sudo apt-get install php7.2-mysql php7.2-fpm php7.2-xml php7.2-gd php7.2-mbstring php7.2-xmlrpc php7.2-zip php7.2-curl |
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/sh | |
# | |
export DEBIAN_FRONTEND=noninteractive; | |
# Define a project name | |
projectname='your_project_name'; | |
cd /var/www; | |
mkdir $projectname; | |
cd /var; |
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
# Android SDK setup | |
## Install Java | |
```bash | |
sudo apt-get update | |
sudo dpkg --add-architecture i386 | |
sudo apt-get install libbz2-1.0:i386 | |
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 | |
# Si es ubuntu 14.04 |
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
# Security headers | |
add_header Strict-Transport-Security "max-age=2592000; includeSubDomains; preload"; | |
add_header X-Frame-Options DENY; | |
add_header X-Content-Type-Options nosniff; | |
add_header Content-Security-Policy "default-src 'self' www.google-analytics.com ajax.googleapis.com www.google.com google.com gstatic.com www.gstatic.com connect.facebook.net facebook.com;"; | |
add_header X-XSS-Protection "1; mode=block"; | |
add_header Referrer-Policy "origin"; | |
#https://developer.mozilla.org/es/docs/Web/HTTP/Headers/X-Frame-Options |
OlderNewer