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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{SERVER_PORT} 80 | |
RewriteRule ^(.*)$ https://domain.nane/$1 [R,L] | |
RewriteCond %{HTTPS} !=on | |
RewriteRule ^(.*) https://%{SERVER_NAME}/$1 [R=301,L] |
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 nano /etc/apache2/sites-available/test.site.conf | |
<VirtualHost *:80> | |
ServerName test.site | |
ServerAlias www.test.site | |
ServerAdmin webmaster@localhost | |
DocumentRoot /var/www/test.site/public_html | |
ErrorLog ${APACHE_LOG_DIR}/error.log | |
CustomLog ${APACHE_LOG_DIR}/access.log combined | |
</VirtualHost> |
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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{SERVER_PORT} 80 | |
RewriteRule ^(.*)$ https://www.yoursite.com/$1 [R,L] | |
RewriteCond %{HTTPS} !=on | |
RewriteRule ^(.*) https://%{SERVER_NAME}/$1 [R=301,L] |
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
jQuery(function($){ | |
$("header li a").click(function(e) { | |
e.preventDefault(); | |
var elemID=$(this).attr('href'); | |
$('html, body').animate({ | |
scrollTop: $(elemID).offset().top-100 | |
}, 1000); | |
}); | |
}) |
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 options page | |
*/ | |
if( function_exists('acf_add_options_page') ) { | |
$option_page = acf_add_options_page(array( | |
'menu_title' => __('Theme options','textdomain'), | |
'menu_slug' => 'mytheme-settings', | |
'capability' => 'edit_posts', | |
'redirect' => true |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Get file data</title> | |
<meta charset="UTF-8"> | |
</head> | |
<body> | |
<?php if(isset($_POST['file_url']) || !empty($_POST['file_url'])):?> | |
<?php |
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 | |
$circular_primes=array(); | |
function is_prime ($num){ | |
for ($x = 2; $x <= sqrt($num); $x++) | |
if (!($num % $x)) return false; | |
return true; | |
} | |
function is_circular($str){ | |
$tmp_array=array(); | |
array_push($tmp_array,$str); |