Skip to content

Instantly share code, notes, and snippets.

Алексей agragregra

Block or report user

Report or block agragregra

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@agragregra
agragregra / hash-change.js
Last active May 7, 2019
CSS Target Without Jumping | Hash Change Without Jump
View hash-change.js
// Original
var hashLinks = document.querySelectorAll("a[href^='#']");
[].forEach.call(hashLinks, function (link) {
link.addEventListener("click", function (event) {
event.preventDefault();
history.pushState({}, "", link.href);
history.pushState({}, "", link.href);
history.back();
});
});
@agragregra
agragregra / nodejs-gulp-install.txt
Last active Sep 6, 2019
Node.js + Gulp installation (Ubuntu) one line command
View nodejs-gulp-install.txt
1. Simple (Node.js LTS, Gulp, rimraf, NCU):
sudo apt-add-repository -y ppa:brightbox/ruby-ng; sudo apt-get update; sudo apt-get -y install curl; curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -; sudo apt-get -y install nodejs; sudo npm i -g gulp rimraf npm-check-updates bower; sudo chown -R $USER:$(id -gn $USER) /home/$USER/.config
2. Advanced (Node.js LTS, Gulp, rimraf, NCU, Ruby, Jekyll, Jekyll paginate)
sudo apt-add-repository -y ppa:brightbox/ruby-ng; sudo apt-get update; sudo apt-get -y install curl ruby2.5 ruby2.5-dev gcc make g++ libffi-dev; curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -; sudo apt-get -y install nodejs; sudo gem i jekyll; sudo gem i jekyll-paginate-v2; sudo npm i -g gulp rimraf npm-check-updates bower; sudo chown -R $USER:$(id -gn $USER) /home/$USER/.config
3. Длинна командной строки (добавить PROMPT_DIRTRIM=3 в конец и сохранить файл):
sudo nano ~/.bashrc
PROMPT_DIRTRIM=3
@agragregra
agragregra / Main.css
Last active Jul 16, 2018
How to Change Safari Web Inspector Font
View Main.css
/*
1. Reboot & hold Cmd+R at the chimes
2. Open Terminal Utility
3. Type csrutil disable; reboot
4. Add lines to end of file: /System/Library/PrivateFrameworks/WebInspectorUI.framework/Versions/Current/Resources/Main.css
*/
.tree-outline.dom li.parent{line-height:21px}
@agragregra
agragregra / rsync-backup.sh
Last active Jun 3, 2019
Backup Files/Folders to External Hard Drive (Rsync)
View rsync-backup.sh
rsync -aP --delete --exclude=node_modules --exclude=Thumbs.db --exclude=.DS_Store /Users/alex/Work/ /Volumes/BACKUP/Work/
@agragregra
agragregra / install
Last active Jun 3, 2019
Fast Install Node.js, Gulp & Jekyll into Windows 10/Ubuntu/Mint
View install
sudo apt-add-repository -y ppa:brightbox/ruby-ng; sudo apt-get update; sudo apt-get -y install curl ruby2.5 ruby2.5-dev gcc make g++ libffi-dev; curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -; sudo apt-get -y install nodejs; sudo gem i jekyll -v 3.7.2; sudo gem i jekyll-paginate-v2; sudo npm i -g gulp rimraf npm-check-updates; sudo chown -R $USER:$(id -gn $USER) /home/$USER/.config
@agragregra
agragregra / owl-equal-heights.js
Created Mar 5, 2017
Owl Carousel Equal Heights
View owl-equal-heights.js
onRefresh: function () {
owl.find('div.owl-item').height('');
},
onRefreshed: function () {
owl.find('div.owl-item').height(owl.height());
}
@agragregra
agragregra / scroll-top.html
Last active Oct 10, 2019
Scroll Top Button
View scroll-top.html
<div class="top" title="Наверх"><i class="fa fa-angle-double-up"></i></div>
.top
position: fixed
bottom: 25px
background-color: #E0E0E0
border-radius: 10em
color: #666
font-size: 26px
width: 50px
@agragregra
agragregra / window-resize-end.js
Last active Oct 10, 2019
Window resize-end function
View window-resize-end.js
//Resize Window
function onResize() {
};
var doit;
doit = setTimeout(onResize, 400);
window.onresize = function() {
clearTimeout(doit);
doit = setTimeout(onResize, 400);
};
@agragregra
agragregra / nth-child-loop.sass
Created Dec 20, 2016
Sass nth-child background-color loop
View nth-child-loop.sass
$colors: $red, $blue, $accent
@for $i from 1 through length($colors)
.carousel-services .owl-item:nth-child(#{length($colors)}n+#{$i})
background-color: nth($colors, $i)
@agragregra
agragregra / button.sass
Last active Oct 10, 2019
Button Sass Styles (Universal Starter)
View button.sass
.button
display: inline-block
border: none
color: #fff
text-decoration: none
background-color: $accent
padding: 15px 45px
font-size: 13px
text-transform: uppercase
font-weight: 600
You can’t perform that action at this time.