Skip to content

Instantly share code, notes, and snippets.

View h4's full-sized avatar
💭
I may be slow to respond.

Mikhail Baranov h4

💭
I may be slow to respond.
View GitHub Profile
@h4
h4 / dabblet.css
Created January 21, 2013 20:41 — forked from tyv/dabblet.css
Untitled
body
{
background: pink
}
.popup
{
position: relative;
width: 200px;
@h4
h4 / dabblet.css
Created November 28, 2012 15:23
Анимированное появление попапа
/**
* Анимированное появление попапа
*/
.popup {
width: 500px;
height: 500px;
margin: 30px;
background: #900;
animation: 'fadeIn' 1s 0 4;
@h4
h4 / get_row_count.py
Created October 21, 2012 19:09
Работа с gdocs
# -*- coding: utf-8 -*-
from flask import Flask
import gdata.docs.service
import gdata.spreadsheet.service
app = Flask(__name__)
def getRegistrationsCount():
client = gdata.spreadsheet.service.SpreadsheetsService()
@h4
h4 / uri.js
Created September 6, 2012 10:12 — forked from jlong/uri.js
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@h4
h4 / dabblet.css
Created July 11, 2012 15:13 — forked from kizu/dabblet.css
Vertical fixed centering by inline-blocks
/* Vertical fixed centering by inline-blocks */
.container {
position: fixed;
top: 0;
bottom: 0;
left: -9999px;
}
.container:after {
content: "";
display: inline-block;
@h4
h4 / negative-margin.css
Created June 18, 2012 13:29
Отрицательные поля
body {
padding:20px;
background:#FFF;
color:#000;
}
#header {
padding:10px;
background:#51CAC8;
}
#container {
@h4
h4 / tbl.html
Created May 26, 2012 18:01
Вопрос 12116
<table>
<tr>
<td>Внутри одного файла</td>
<td>Распространяется на множество элементов</td>
</tr>
<tr>
<td colspan="2">
<table>
<tr>
<td>Встроенные стили</td>
@h4
h4 / index.txt
Created May 26, 2012 13:32
Задание «Назад в будущее»
Назад в будущее
«Назад в будущее» (англ. Back to the Future) — культовый фантастический фильм в трёх частях
о путешествиях во времени, описывающий альтернативные реальности маленького американского
городка Хилл-Вэлли и нескольких проживающих там семей, поставленный режиссёром Робертом Земекисом
и спродюсированный Стивеном Спилбергом, Фрэнком Маршаллом и Кэтлин Кеннеди.
Первый фильм вышел в 1985 году в кинотеатрах Соединённых Штатов и Канады и получил рейтинг PG
от организации Motion Picture Association of America (MPAA) — «Детям рекомендуется просмотр
совместно с родителями». Один из наиболее известных в СССР американских фильмов во второй
@h4
h4 / django-ath-group.py
Created May 23, 2012 08:20
Проверка вхождения пользователя в группу в Django
if not request.user.is_authenticated():
return redirect('/login/?next=%s' % request.path)
else:
for group in request.user.groups.values_list():
if (u'profsoux' in group) or request.user.is_staff:
break
else:
if not request.user.is_staff:
return render(request, 'denied.html', {})
@h4
h4 / dabblet.css
Created May 22, 2012 21:33 — forked from tyv/dabblet.css
Untitled
div
{
position: relative;
width: 400px;
height: 400px;
border: 1px solid red;
}