Skip to content

Instantly share code, notes, and snippets.

Полезные консольные команды и утилиты

  • echo [что_вывести] - вывод строки в STDOUT (например, echo $DT выведет в консоль значение переменной $DT)
  • echo [что_вывести] >&2 — вывод строки в STDERR
  • pwd — вывести путь к текущей директории
  • whoami — вывести логин текущего пользователя

Работа с файловой системой

  • cd [путь] — перейти в заданную папку

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@pndparade
pndparade / active-slide.js
Created September 21, 2017 17:37 — forked from jayllellis/active-slide.js
Add a class to current slide in bxSlider
$('.top-slider').bxSlider({
onSliderLoad: function(currentIndex) {
$('.top-slider').children().eq(currentIndex + 1).addClass('active-slide');
},
onSlideAfter: function($slideElement){
$('.top-slider').children().removeClass('active-slide');
$slideElement.addClass('active-slide');
}
});
@pndparade
pndparade / main.js
Created May 31, 2017 11:33
jQuery each syntax
$("div").each(function(indx, el){
$(el).height();
});
@pndparade
pndparade / animate-css.js
Last active July 7, 2017 19:50
Animate effects on webpage.
//Animate CSS + WayPoints javaScript Plugin
//Example: $(".element").animated("zoomInUp", "zoomOutDown");
//Author URL: http://webdesign-master.ru
(function($) {
$.fn.animated = function(inEffect, outEffect) {
$(this).css("opacity", "0").addClass("animated").waypoint(function(dir) {
if (dir === "down") {
$(this).removeClass(outEffect).addClass(inEffect).css("opacity", "1");
} else {
$(this).removeClass(inEffect).addClass(outEffect).css("opacity", "1");
@pndparade
pndparade / 0_wp_admin_menu
Last active July 7, 2017 19:46
Remove menu items in Wordpress
_
@pndparade
pndparade / is-mobile.js
Last active July 7, 2017 19:47
Determine the mobile operating system
/**
* Determine the mobile operating system.
* This function returns one of 'iOS', 'Android', 'Windows Phone', or 'unknown'.
*
* @returns {String}
*/
function getMobileOperatingSystem() {
var userAgent = navigator.userAgent || navigator.vendor || window.opera;
// Windows Phone must come first because its UA also contains "Android"
@pndparade
pndparade / 0_wp_gallery
Last active July 7, 2017 19:44
Set image size for gallery items in wordpress
@pndparade
pndparade / functions.php
Created May 6, 2017 19:00
Change more link in wordpress
function custom_more_link($link) {
$link = '<p><a href="'. get_permalink(). '" class="more-link">Читать больше</a></p>';
return $link;
}
add_filter('the_content_more_link', 'custom_more_link');
@pndparade
pndparade / style.css
Last active July 7, 2017 19:47
Short clearfix
.clearfix:after {
content:"";
display:block;
clear:both;
}