This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function MyCustomType(value) { | |
this.property = value; | |
} | |
MyCustomType.prototype.method = function() { | |
return this.property; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(root, fn) -> | |
glob 'views/**/*.hbs', {}, (error, files) -> | |
for file in files | |
source = fs.readFileSync "#{root}/#{file}", 'utf8' | |
update = false | |
for filename, version of options.version | |
if source.indexOf(filename) > -1 | |
update = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div style="width:100%;padding:7px 0 11px;background:#09c;color:#fff;font-size:18px;text-align:center">Приглашаем на нашу конференцию по маркетингу «<a href="http://digitaleconf.ru/?code=serenity" style="color:#fff">Digitale</a>» с 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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ node test.js | |
Welcome to the world of beautiful web typography — only with Richtypo. | |
Beautiful <span class="amp">&</span> Awesome Web Typography with<span class="slaquo"> </span> <span class="hlaquo">“</span>Richtypo” |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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 |