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 / 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 / negative-margin.css
Created June 18, 2012 13:29
Отрицательные поля
body {
padding:20px;
background:#FFF;
color:#000;
}
#header {
padding:10px;
background:#51CAC8;
}
#container {
@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 / 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 / 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 / dabblet.css
Created November 28, 2012 15:23
Анимированное появление попапа
/**
* Анимированное появление попапа
*/
.popup {
width: 500px;
height: 500px;
margin: 30px;
background: #900;
animation: 'fadeIn' 1s 0 4;
@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 January 24, 2013 20:46
CSS3 Blur filter test
/**
* CSS3 Blur filter test
*/
img {
-webkit-filter: blur(5px);
}
@h4
h4 / capture.sh
Last active December 14, 2015 08:08 — forked from ftomza/gist:5028891
if pgrep gst-launch
then
pkill gst-launch
else
DIR=`date "+%Y-%m-%d-%H:%M:%S"`
mkdir $DIR
gst-launch \
flvmux name=camera ! filesink location="$DIR/camera.flv" \
flvmux name=screen ! filesink location="$DIR/screen.flv" \
\
@h4
h4 / app.py
Created August 11, 2013 21:31
Simple bottle app that works with github web hook.
# coding=utf-8
import json
from bottle import route, run, request, debug, default_app
from git import Repo
repo = Repo("/var/www/lookido.ru/promo/htdocs")
origin = repo.remotes.origin
@route("/", method="POST")