Skip to content

Instantly share code, notes, and snippets.

@online
online / doubleHover.js
Created August 23, 2012 19:22 — forked from artpolikarpov/doubleHover.js
Cинхронное подсвечивание одинаковых ссылок: http://artgorbunov.ru/bb/soviet/20120823/
/*
Функция для одновременной подсветки ссылок с одинаковым href,
на вход принимает:
1) selector — джеквери-селектор ссылок, чтобы
была возможность включить дублирующую подсветку в определённом фрагменте;
2) hoverClass — какой класс добавить по ховеру и псевдо-ховеру.
Инициализация для всего документа:
doubleHover('a', 'hover');
@online
online / default.hbs
Last active December 12, 2015 22:08
Локализация даты в теме Ghost
<!DOCTYPE html>
<html>
<head>
{{! Document Settings }}
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> {{! Page Meta }}
<title>{{meta_title}}</title>
<meta name="description" content="{{meta_description}}" />
@online
online / _config.yml
Created June 6, 2017 19:55
_config.yml from Next theme
# ---------------------------------------------------------------
# Site Information Settings
# ---------------------------------------------------------------
# Put your favicon.ico into `hexo-site/source/` directory.
favicon: /favicon.ico
# Set default keywords (Use a comma to separate)
keywords: "Hexo, NexT"
@online
online / bash-cheatsheet.sh
Last active August 19, 2019 07:36 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@online
online / my_first_function.py
Last active September 23, 2019 21:43
my_first_function.py (Python)
def discounted(price, discount): # это функция, которая считает скидку
price = abs(float(price)) # приводим всё к float и удаляем знаки минус / плюс
discount = abs(float(discount))
if discount >= 100: # если скидка больше или равно 100
price_with_discount = price # выводим просто цену
else:
price_with_discount = price - price * discount / 100
return price_with_discount # ничего не выведет на экран
# Создадим словарь
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required