Skip to content

Instantly share code, notes, and snippets.

Avatar
💤
I may be slow to respond.

Vladimir Rodkin VovanR

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

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 Aug 29, 2015
ScrollTop Button with jQuery
View scrolltop-button.html
<!-- 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 Nov 2, 2015
Get artists list form Yandex.Music
View README.md
@VovanR
VovanR / anchor.css
Last active Jan 22, 2017
jQuery anchor scroll
View anchor.css
[name^="anchor-"] {
display: block;
}
View key-codes.js
const KEY_CODES = {
BACKSPACE: 8,
DELETE: 46,
};
export default KEY_CODES;
View jade2html.sh
#!/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 Jun 24, 2019
close-pull-request.sh
View 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 Aug 30, 2019
Arduino i2c_scanner
View i2c_scanner.ino
// --------------------------------------
// 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