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 | |
// Include the phpQuery library | |
// Download at http://code.google.com/p/phpquery/ | |
include 'phpQuery.php'; | |
// Load Mike Fisher's player page on thescore.com | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, 'http://www.thescore.com/nhl/player_profiles/859-mike-fisher'); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 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
import random | |
num = input('login ') | |
pas = '' | |
for x in range(16): #Количество символов (16) | |
pas = pas + random.choice(list('1234567890abcdefghigklmnopqrstuvyxwzABCDEFGHIGKLMNOPQRSTUVYXWZ')) #Символы, из которых будет составлен пароль | |
print('Hello, ', num, 'your password is: ', pas) |
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_deflate.c> | |
# Compress HTML, CSS, JavaScript, Text, XML and fonts | |
AddOutputFilterByType DEFLATE application/javascript | |
AddOutputFilterByType DEFLATE application/json | |
AddOutputFilterByType DEFLATE application/schema+json | |
AddOutputFilterByType DEFLATE application/rss+xml | |
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject | |
AddOutputFilterByType DEFLATE application/x-font | |
AddOutputFilterByType DEFLATE application/x-font-opentype | |
AddOutputFilterByType DEFLATE application/x-font-otf |
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_expires.c> | |
ExpiresActive on | |
ExpiresDefault “access plus 1 month” | |
ExpiresByType text/html "access plus 2 hours" | |
ExpiresByType image/gif "access plus 1 year" | |
ExpiresByType image/jpg "access plus 1 year" | |
ExpiresByType image/jpeg "access plus 1 year" | |
ExpiresByType image/png "access plus 1 year" | |
ExpiresByType text/js "access plus 1 month" | |
ExpiresByType text/javascript "access plus 1 month" |
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
## How to install mcrypt in php7.2 | |
## | |
## https://lukasmestan.com/install-mcrypt-extension-in-php7-2/ | |
## | |
# | |
# Check version php and pecl | |
# | |
php -v # if default php is not 7.2 then use /usr/bin/php7.2 instead 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
<!-- | |
Progressive Disclosure Demo - Updated 15 August, 2012 by Ros | |
Thank you for taking a look under the hood of our progressive disclosure demo. Please note that this is a work in progress, so it's a tad messy and bound to change. | |
If you have any questions, feel free to pop a line to support@campaignmonitor.com - we might learn something, too! | |
Known bugs | |
---------- |
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
if ($bExcel) | |
{ | |
$APPLICATION->RestartBuffer(); | |
// hack. any '.default' customized template should contain 'excel' page | |
$this->__templateName = '.default'; | |
Header("Content-Type: application/force-download"); | |
Header("Content-Type: application/octet-stream"); | |
Header("Content-Type: application/download"); |
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
<? | |
/*+ Начало вывода данных +*/ | |
$arResult = array(); | |
/*+ Здесь будем кешировать данные +*/ | |
$cache = new CPHPCache(); | |
$cache_time = $arParams["CACHE_TIME"]; | |
$cache_id = md5('userTagsKey'); | |
$cache_path = '/userTags/'; |
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 | |
/** | |
* Plugin Name: CF7 Modal Right Answer | |
* Plugin URI: https://gist.github.com/campusboy87/a056c288c99feee70058ed24cee805ad | |
* Author: Campusboy (wp-plus) | |
* Author URI: https://www.youtube.com/wp-plus | |
*/ | |
add_action( 'wp_enqueue_scripts', 'wpcf7_modal_right_answer_js' ); | |
add_action( 'wp_footer', 'wpcf7_modal_right_answer_js_inline', 999 ); |
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
#Вариант 1 | |
RewriteCond %{HTTP:X-HTTPS} !1 | |
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L] | |
#Вариант 2 | |
RewriteEngine On | |
RewriteCond %{HTTPS} off | |
RewriteCond %{HTTP:X-Forwarded-Proto} !https | |
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] |