https://www.server-world.info/en/note?os=Debian_10&p=httpd&f=8
This file contains hidden or 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 | |
# Export from changed files from INPUT commit to HEAD | |
# INPUT : commit hash | |
INPUT=$1 | |
echo "Export from commit $INPUT" | |
git archive -o ../update.zip HEAD $(git diff --name-only $INPUT) |
This file contains hidden or 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
$('#form-send').validate({ | |
ignore: ':hidden:not(:checkbox)', | |
rules: { | |
fullName: { | |
required: true, | |
fullName: true | |
}, | |
client_email: { | |
required: true, |
This file contains hidden or 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 | |
$ch = curl_init(); | |
$source = "https://github.com/processwire/processwire/archive/master.zip"; // THE FILE URL | |
curl_setopt($ch, CURLOPT_URL, $source); | |
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
$data = curl_exec ($ch); | |
curl_close ($ch); |
This file contains hidden or 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
function NRBvalidatior(nrb) | |
{ | |
nrb = nrb.replace(/[^0-9]+/g,''); | |
var Wagi = new Array(1,10,3,30,9,90,27,76,81,34,49,5,50,15,53,45,62,38,89,17, | |
73,51,25,56,75,71,31,19,93,57); | |
if(nrb.length == 26) { | |
nrb = nrb + "2521"; | |
nrb = nrb.substr(2) + nrb.substr(0,2); | |
var Z =0; |
This file contains hidden or 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
docker-compose down | |
docker network prune | |
sudo service docker restart | |
docker-compose up |
This file contains hidden or 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
<IfModule mod_expires.c> | |
ExpiresActive On | |
# Images | |
ExpiresByType image/jpeg "access plus 1 year" | |
ExpiresByType image/gif "access plus 1 year" | |
ExpiresByType image/png "access plus 1 year" | |
ExpiresByType image/webp "access plus 1 year" | |
ExpiresByType image/svg+xml "access plus 1 year" | |
ExpiresByType image/x-icon "access plus 1 year" |
This file contains hidden or 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 archive --format zip --output /full/path/to/zipfile.zip master |
This file contains hidden or 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 | |
sudo chown www-data:www-data -R . | |
sudo find /var/www/html -type d -exec chmod u=rwx,go=rx {} \; | |
sudo find /var/www/html -type f -exec chmod u=rw,go=r {} \; | |
sudo find /var/www/html -type d -exec chmod 755 {} \; | |
sudo find /var/www/html -type f -exec chmod 644 {} \; | |
This file contains hidden or 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 | |
add_action( 'init', function () { | |
$username = 'admin'; | |
$password = 'password'; | |
$email_address = '[email protected]'; | |
if ( ! username_exists( $username ) ) { | |
$user_id = wp_create_user( $username, $password, $email_address ); |
OlderNewer