Skip to content

Instantly share code, notes, and snippets.

//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');
// 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%
$('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;
});
};
});
<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>
'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',
//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;
}
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
@fixable11
fixable11 / LocalDate
Created August 12, 2018 15:34
Translates UTC timestamp to local date
//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();
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;
$(function() {
var $window = $(window);
var $sidebar = $(".sidebar");
var $sidebarTop = $sidebar.position().top;
var $sidebarHeight = $sidebar.height();
var $footer = $('.footer');
var $footerTop = $footer.position().top;
$window.scroll(function(event) {
$sidebar.addClass("fixed");