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
//CUSTOM SELECT | |
$('select').each(function(){ | |
var $this = $(this), numberOfOptions = $(this).children('option').length; | |
$this.addClass('select-hidden'); | |
$this.wrap('<div class="select"></div>'); | |
$this.after('<div class="select-styled"></div>'); | |
var $styledSelect = $this.next('div.select-styled'); |
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
// for IE | |
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) | |
.nameBox__imgWrap | |
border-radius: 50% | |
// for Edge | |
@supports (-ms-ime-align:auto) | |
.nameBox__imgWrap | |
border-radius: 50% |
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
$('a[href^="#"]').on('click', function(e){ | |
e.preventDefault(); | |
var href = $(this).attr('href'); | |
if(href.length > 1){ | |
$('html,body').animate({scrollTop:$(this.hash).offset().top}, 800, | |
function(){ | |
//window.location.hash = href; | |
}); | |
}; | |
}); |
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
<VirtualHost *:80> | |
ServerName yii2 | |
DocumentRoot "D:/wamp64/www/yii2/basic/web" | |
<Directory "D:/wamp64/www/yii2/basic/web"> | |
Options +Indexes +Includes +FollowSymLinks +MultiViews | |
AllowOverride All | |
Require local | |
</Directory> | |
</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
'mailer' => [ | |
'class' => 'yii\swiftmailer\Mailer', | |
// send all mails to a file by default. You have to set | |
// 'useFileTransport' to false and configure a transport | |
// for the mailer to send real emails. | |
'useFileTransport' => false, | |
'transport' => [ | |
'class' => 'Swift_SmtpTransport', | |
'host' => 'smtp.gmail.com', | |
'username' => 'email', |
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
//check if the first node is an element node | |
function get_firstChild(n) { | |
var y = n.firstChild; | |
while (y.nodeType != 1) { | |
y = y.nextSibling; | |
} | |
return y; | |
} |
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
https://mlocati.github.io/articles/php-windows-imagick.html | |
https://ourcodeworld.com/articles/read/349/how-to-install-and-enable-the-imagick-extension-in-xampp-for-windows |
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
//Translates UTC timestamp to local date | |
function newDate($selector){ | |
var $UTCtimestamp = $($selector).data('timestamp'); | |
var $localData = new Date($UTCtimestamp * 1000); | |
var $date = "0" + $localData.getDate(); | |
var $mount = "0" + ($localData.getMonth() + 1); | |
var $year = $localData.getFullYear(); | |
var $hours = $localData.getHours(); |
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
function curl_get($url, $referer = 'https://www.google.com'){ | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, $url); | |
curl_setopt($ch, CURLOPT_HEADER, true); | |
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36'); | |
curl_setopt($ch, CURLOPT_REFERER, $referer); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
$data = curl_exec($ch); | |
curl_close($ch); | |
return $data; |
OlderNewer