Skip to content

Instantly share code, notes, and snippets.

View Swistikkk's full-sized avatar
🏠
Working from home

Victor Oberemko Swistikkk

🏠
Working from home
View GitHub Profile
forEach(menuItems, (link) => {
$(link).on('click', function(e) {
e.preventDefault();
$('html, body').stop().animate({
scrollTop: $($(this).attr('href')).offset().top}, 500, 'linear');
})
});
<?php
$Pages = array(
'http://sitename.ru/stranica-A.html' ,
'http://sitename.ru/stranica-B.html'
);
$MaxRandom = getrandmax();
$RandomValue = intval( rand( 0 , count( $Pages ) - 1 ) );
header( 'Location: '.$Pages[ $RandomValue ] );
?>
@Swistikkk
Swistikkk / text.js
Created May 10, 2016 16:01
test.js
import utils from './utils'
var commonTableHeaders = utils.headers;
commonTableHeaders.forEach(function(el) {
if(el.title == "Имя, уровень") {
for(var a in el) {
a.title = "Имя";
a.format = function() {
return `<b>${item.char}</b>`;
git push git@github.com:my_user_name/my_repo.git master
git remote set-url origin git@github.com:username/repo.git
@Swistikkk
Swistikkk / mixin.sass
Last active November 14, 2019 13:58
Adaptive mixin (sass)
@mixin adaptive($media)
@if $media == mobile
@media only screen and (max-width: $mobile)
@content
@else if $media == pad
@media only screen and (min-width: $mobile + 1) and (max-width: $desktop - 1)
@content
@else if $media == desktop
@media only screen and (min-width: $desktop )
@content