Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Alexey Simonenko meritt

🎯
Focusing
View GitHub Profile
@meritt
meritt / 1.css
Last active Aug 29, 2015
Борьба с пробелами между блочно-строчными элементами
View 1.css
nav a {
display: inline-block;
padding: 5px;
background: red;
}
@meritt
meritt / wstdays.md
Last active Aug 29, 2015
Презентации с Web Standards Days. Санкт-Петербург, 28 июня.
View wstdays.md
@meritt
meritt / gist:6881450
Created Oct 8, 2013
icu4c failed to build on OS X 10.9 with xcode 5.0.1
View gist:6881450
$ brew install -v icu4c
==> Downloading http://download.icu-project.org/files/icu4c/51.1/icu4c-51_1-src.tgz
Already downloaded: /Library/Caches/Homebrew/icu4c-51.1.tgz
tar xf /Library/Caches/Homebrew/icu4c-51.1.tgz
==> ./configure --prefix=/usr/local/Cellar/icu4c/51.1 --disable-samples --disable-tests --enable-static --with-library-bits=64
./configure --prefix=/usr/local/Cellar/icu4c/51.1 --disable-samples --disable-tests --enable-static --with-library-bits=64
checking for ICU version numbers... release 51.1, library 51.1, unicode version 6.2
checking build system type... x86_64-apple-darwin13.0.0
checking host system type... x86_64-apple-darwin13.0.0
checking whether to build debug libraries... no
@meritt
meritt / gist:6854510
Created Oct 6, 2013
libxml2 failed to build on OS X 10.9
View gist:6854510
$ brew install -v libxml2
==> Downloading ftp://xmlsoft.org/libxml2/libxml2-2.9.1.tar.gz
Already downloaded: /Library/Caches/Homebrew/libxml2-2.9.1.tar.gz
tar xf /Library/Caches/Homebrew/libxml2-2.9.1.tar.gz
==> ./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/libxml2/2.9.1 --without-python
./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/libxml2/2.9.1 --without-python
checking build system type... x86_64-apple-darwin13.0.0
checking host system type... x86_64-apple-darwin13.0.0
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
@meritt
meritt / gist:6854505
Created Oct 6, 2013
cmake failed to build on OS X 10.9
View gist:6854505
$ brew install -v cmake
==> Downloading http://www.cmake.org/files/v2.8/cmake-2.8.11.2.tar.gz
Already downloaded: /Library/Caches/Homebrew/cmake-2.8.11.2.tar.gz
tar xf /Library/Caches/Homebrew/cmake-2.8.11.2.tar.gz
==> ./bootstrap --prefix=/usr/local/Cellar/cmake/2.8.11.2 --system-libs --no-system-libarchive --datadir=/share/cmake --docdir=/share/doc/cmake --mandir=/share/man
./bootstrap --prefix=/usr/local/Cellar/cmake/2.8.11.2 --system-libs --no-system-libarchive --datadir=/share/cmake --docdir=/share/doc/cmake --mandir=/share/man
---------------------------------------------
CMake 2.8.11.2, Copyright 2000-2012 Kitware, Inc.
C compiler on this system is: /usr/bin/clang -Os -w -pipe -march=native -Qunused-arguments -mmacosx-version-min=10.9
C++ compiler on this system is: /usr/bin/clang++ -Os -w -pipe -march=native -Qunused-arguments -mmacosx-version-min=10.9
@meritt
meritt / gist:6854470
Created Oct 6, 2013
icu4c failed to build on OS X 10.9
View gist:6854470
$ brew install -v icu4c
==> Downloading http://download.icu-project.org/files/icu4c/51.1/icu4c-51_1-src.tgz
Already downloaded: /Library/Caches/Homebrew/icu4c-51.1.tgz
tar xf /Library/Caches/Homebrew/icu4c-51.1.tgz
==> ./configure --prefix=/usr/local/Cellar/icu4c/51.1 --disable-samples --disable-tests --enable-static --with-library-bits=64
./configure --prefix=/usr/local/Cellar/icu4c/51.1 --disable-samples --disable-tests --enable-static --with-library-bits=64
checking for ICU version numbers... release 51.1, library 51.1, unicode version 6.2
checking build system type... x86_64-apple-darwin13.0.0
checking host system type... x86_64-apple-darwin13.0.0
checking whether to build debug libraries... no
View results
$ node test.js
Welcome to the world of beautiful web typography — only with Richtypo.
Beautiful <span class="amp">&amp;</span> Awesome Web Typography with<span class="slaquo"> </span> <span class="hlaquo">“</span>Richtypo”
@meritt
meritt / beautify.coffee
Last active Dec 18, 2015
Twitter Streaming API v1.1 + node.js + socket.io
View beautify.coffee
twitter = require 'twitter-text'
module.exports = (tweet) ->
# Преобразуем только ссылки, хештеги и аккаунты оставляем текстом
text = twitter.autoLinkUrlsCustom tweet.text, target: '_blank'
# Заменяем сжатые ссылки на нормальные
if tweet.entities.urls? and tweet.entities.urls.length > 0
for entity in tweet.entities.urls
text = text.replace entity.url, entity.expanded_url
View digitale.html
<div style="width:100%;padding:7px 0 11px;background:#09c;color:#fff;font-size:18px;text-align:center">Приглашаем на нашу конференцию по маркетингу &laquo;<a href="http://digitaleconf.ru/?code=serenity" style="color:#fff">Digitale</a>&raquo; с 10% скидкой. <span id="d3"></span></div><script>!function(t){"use strict";try{var e=function(t,e){t=Math.abs(t)%100;var n=t%10;return t>10&&20>t?e[2]:n>1&&5>n?e[1]:1==n?e[0]:e[2]},n=new Date,a=new Date(2013,5,3),r=parseInt((a-n)/86400000,10)+1;if(r>0){t.getElementById("d3").innerHTML="До конференции осталось "+r+" "+e(r,["день","дня","дней"])+"."}}catch(c){}}(document);</script>
@meritt
meritt / dd-files.js
Created Dec 17, 2012
Examples of code for article «Improve the user experience of work with web forms»
View dd-files.js
var file = document.querySelector('[type=file]');
var dropzone = document.querySelector('.wrapper');
file.addEventListener('change', function() {
previewImages(this.files);
this.value = '';
}, false);
dropzone.addEventListener('dragover', function(event) {
event.preventDefault();