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 apt-get purge code | |
Подключаем репозиторий MS | |
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg | |
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg | |
sudo sh -c 'echo "deb [arch=amd64] http://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list' | |
Устанавливаешь пакетом |
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 killall VDCAssistant |
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
$(document).ready(function() { | |
$("#about").click(function() { | |
$('#about > .lazyload').each(function() { | |
// установка src для элемента img на основании data-src | |
$(this).attr('src', $(this).attr('data-src')); | |
}); | |
}); | |
$("#articles").click(function() { | |
$('#articles > .lazyload').each(function() { |
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 | |
$args = array( | |
'category_name' => 'news', | |
'posts_per_page' => 3 | |
); | |
$my_query = new WP_Query( $args ); | |
if ( $my_query->have_posts() ) { |
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
const qsort = (arr) => { | |
if (arr.length < 2) { | |
return arr; | |
} else { | |
// Опорная точка для деления массива, выбирается случайно | |
const pivotPosition = Math.floor(Math.random() * arr.length); | |
const pivot = arr[pivotPosition]; | |
// Значения меньшие, либо равные опорному | |
// попадают в новый массив less | |
const less = arr.filter((value, index) => { |
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
class Person { | |
constructor(name) { | |
this.name = name; | |
} | |
kek () { | |
return 'lol kek'; | |
} | |
} | |
class GreatPerson extends Person { |
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
class Person { | |
constructor(name) { | |
this.name = name; | |
} | |
} | |
class GreatPerson extends Person { | |
constructor(name, phrase) { | |
super(name); | |
this.phrase = phrase; |
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
var body = document.body, | |
timer; | |
window.addEventListener('scroll', function() { | |
clearTimeout(timer); | |
if (!body.classList.contains('disable-hover')) { | |
body.classList.add('disable-hover'); | |
} | |
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
options = { | |
touchAction: 'auto', | |
inputClass: Hammer.SUPPORT_POINTER_EVENTS ? Hammer.PointerEventInput : Hammer.TouchInput, | |
recognizers: [ | |
[Hammer.Swipe, { | |
direction: Hammer.DIRECTION_HORIZONTAL | |
}] | |
] | |
}; |