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 / 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 / copies
Last active December 22, 2015 02:08
/home/luke/Sites/aldebaran/wp-contnent/myPlugin
/home/luke/Sites/tatuin/wp-contnent/myPlugin
@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 / 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 / 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 / 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 / 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/"
{namespace site.ui.widget.MarketJoinWidget}
/**
*
**/
{template .main}
<table class="{css markets-table} {css show-type} l-main" soy-tn="site.ui.widget.MarketJoinWidget.main">
<thead>
<tr>
<th></th>
@h4
h4 / FhGae.markdown
Created May 21, 2014 08:50
A Pen by Mikhail Baranov.
@h4
h4 / vim.txt
Created June 3, 2014 11:52
Vim cheatsheet
Файл настройки: ~/.vimrc
Можно редактировать файлы через сеть, например
:e <scp|ftp|ftps>://user@host/path/to/the/file.txt
:Ex или :e ./ - файловый менеджер
hjkl перемещение в разные стороны
i режим вставки
I добавление в начало строки
a режим добавления
A добавление в конец строки