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 / validate_task_number.py
Created November 23, 2013 20:21
Получение имени пользователя сделавшего пулл-риквест из теста в Тревисе
# encoding=utf-8
import os
import sys
import json
import urllib2
repo = os.environ['TRAVIS_REPO_SLUG']
pull_number = os.environ['TRAVIS_PULL_REQUEST']
api_head = "https://api.github.com/repos/"
@h4
h4 / 1.fronteers.dump.md
Last active December 25, 2015 07:29
Дамп твитов с конференции Fronteers2013 от @mista_k

#fronteers13 jam: “Techno-optimist issue — using same password for all services”.

#fronteers13 jam: “Follow the right people in Twitter that improve their skills in collaboration designers and programmers”. Easy to say.

#fronteers13 jam: “If you have a hammer all things looks like a nail”. JavaScript?!

#fronteers13 jam: “Illusion of speed”. The real world is full of stuff that gives you impression of speed up. Don’t get fooled by this.

#fronteers13 jam: Actually users doesn’t trust machines that produce quick results. So, developers have to slow down them. :)

@h4
h4 / 1.fronteers.dump.md
Last active February 29, 2016 10:47
Дамп трансляции конференции Fronteers 2013 от @webstandards_up

Мы начинаем текстовую трансляцию Fronteers 2013, двухдневной конференции в Амстердаме — http://t.co/QB5SYQ3cMx

Пол Айриш из Google открывает шестую конференцию Fronteers. Россия на шестом месте по количеству участников, например.

На сцене Стив Саудерс с докладом «Pre-browsing» http://t.co/AuqI08mSjX

Сетевые проблемы замедляют веб. Медленные сотовые сети и даже перегруженный WiFi. Мы часто видим белый экран без индикации загрузки.

Заголовок: отдавайте браузеру нужное ещё до того, как он за этим обратится.

@h4
h4 / bender.py
Last active December 25, 2015 03:28
Скрипт rtmp-транслятора
#!/usr/bin/env python
import gi
import time
import signal
import sys
import ConfigParser
import RPi.GPIO as GPIO
gi.require_version("Gst", "1.0")
@h4
h4 / imgo.sh
Created October 1, 2013 18:53
for package in $formulas !3449
do
brew install "https://raw.github.com/imgo/imgo-tools/master/Formula/"$package
done
Error: wrong constant name PngoutRb DefluffRbCryopngRbImgo
Please report this bug:
https://github.com/mxcl/homebrew/wiki/troubleshooting
/usr/local/Library/Homebrew/formulary.rb:9:in `const_defined?'
/usr/local/Library/Homebrew/formulary.rb:9:in `formula_class_defined?'
/usr/local/Library/Homebrew/formulary.rb:122:in `fetch'
@h4
h4 / copies
Last active December 22, 2015 02:08
/home/luke/Sites/aldebaran/wp-contnent/myPlugin
/home/luke/Sites/tatuin/wp-contnent/myPlugin
@h4
h4 / wp-plugin-submodules.sh
Created August 31, 2013 19:24
Настройка плагина вордпресса как сабмодуля
git clone [email protected]:WordPress/WordPress.git ~/Sites/MySite
cd ~/Sites/MySite
git submodule add git://github.com/khansolo/myPlugin.git wp-content/plugins/myPlugin
@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")
@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 / dabblet.css
Created January 24, 2013 20:46
CSS3 Blur filter test
/**
* CSS3 Blur filter test
*/
img {
-webkit-filter: blur(5px);
}