Skip to content

Instantly share code, notes, and snippets.

View VovanR's full-sized avatar
😺
I may be slow to respond.

Vladimir Rodkin VovanR

😺
I may be slow to respond.
View GitHub Profile
@VovanR
VovanR / gist:8822642
Created February 5, 2014 12:30
Префиксы именования картинок
# Префиксы именования картинок
bgr- Фон
shadow- Тень
icon- Иконка
btn- Кнопка
img- Картинка
pattern- Текстура
sep- Разделитель
sprite- Спрайт
@VovanR
VovanR / gist:7716e8183592bdeec2df
Last active August 29, 2015 14:03
Django AMD with Require.js

Django AMD with Require.js

App options

apps/foo/templates/foo/index.html

{% load staticfiles %}

...

{# jQuery is global for third party modules #}
@VovanR
VovanR / scrolltop-button.html
Last active August 29, 2015 14:17
ScrollTop Button with jQuery
<!-- scrolltop begin -->
<div class="scrolltop-placeholder">
<div class="scrolltop scrolltop_hidden js-scrolltop">
<span class="scrolltop__caret"></span>
<span class="scrolltop__text">Top</span>
</div>
</div>
<!-- scrolltop end -->
@VovanR
VovanR / README.md
Last active November 2, 2015 07:17
Get artists list form Yandex.Music
@VovanR
VovanR / anchor.css
Last active January 22, 2017 12:31
jQuery anchor scroll
[name^="anchor-"] {
display: block;
}
@VovanR
VovanR / key-codes.js
Created March 20, 2017 10:01
KEY_CODES
const KEY_CODES = {
BACKSPACE: 8,
DELETE: 46,
};
export default KEY_CODES;
@VovanR
VovanR / jade2html.sh
Last active December 13, 2017 11:10
jade2html
#!/bin/bash
# jade2html, version 0.1
#
# Convert .jade to .html
#
# Example (convert foo.jade to foo.html):
# jade2html foo
#
# github.com/VovanR
# Author: VovanR (Vladimir Rodkin)
@VovanR
VovanR / close-pull-request.sh
Created June 24, 2019 13:01
close-pull-request.sh
#!/usr/bin/env bash
gitclosepullrequest () {
local status branch
status="$(git status 2>/dev/null)"
[[ $? != 0 ]] && return;
branch="$(git branch | perl -ne '/^\* (.*)/ && print $1')"
git fetch origin master:master && git checkout master && git branch -d ${branch}
}
@VovanR
VovanR / i2c_scanner.ino
Created August 30, 2019 08:29
Arduino i2c_scanner
// --------------------------------------
// i2c_scanner
//
// Version 1
// This program (or code that looks like it)
// can be found in many places.
// For example on the Arduino.cc forum.
// The original author is not know.
// Version 2, Juni 2012, Using Arduino 1.0.1
// Adapted to be as simple as possible by Arduino.cc user Krodal