<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Alexey Okhrimenko on Medium]]></title>
        <description><![CDATA[Stories by Alexey Okhrimenko on Medium]]></description>
        <link>https://medium.com/@obenjiro?source=rss-806e35e87b8d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*UjGJ1sHT15wWf4Z98mwvbA.png</url>
            <title>Stories by Alexey Okhrimenko on Medium</title>
            <link>https://medium.com/@obenjiro?source=rss-806e35e87b8d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 16:25:14 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@obenjiro/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[В мире стало на одного Google Developer Expert больше! :)]]></title>
            <link>https://medium.com/@obenjiro/%D0%B2-%D0%BC%D0%B8%D1%80%D0%B5-%D1%81%D1%82%D0%B0%D0%BB%D0%BE-%D0%BD%D0%B0-%D0%BE%D0%B4%D0%BD%D0%BE%D0%B3%D0%BE-google-developer-expert-%D0%B1%D0%BE%D0%BB%D1%8C%D1%88%D0%B5-a80cc65c3782?source=rss-806e35e87b8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/a80cc65c3782</guid>
            <category><![CDATA[gde]]></category>
            <category><![CDATA[angular]]></category>
            <dc:creator><![CDATA[Alexey Okhrimenko]]></dc:creator>
            <pubDate>Sat, 29 Aug 2020 11:05:14 GMT</pubDate>
            <atom:updated>2020-09-01T14:26:09.499Z</atom:updated>
            <content:encoded><![CDATA[<h3>В мире стало на одного Google Developer Expert больше! :)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*csOwX27HKvmMmj0i0oFKEg.png" /></figure><p>С радостью делюсь с вами новостью, что я получил официальное звание <strong>Angular GDE</strong>. Это дает новые возможности, но вместе с этим приходит еще и большая ответственность.</p><p>Что такое GDE? Google Developers Experts — это глобальная сеть технических экспертов, влиятельных лиц и лидеров мнений, которые активно поддерживают разработчиков, компании и технические сообщества, выступая на мероприятиях и публикуя контент. Эти профессионалы активно вносят свой вклад и поддерживают экосистемы разработчиков и стартапов по всему миру, помогая им создавать и запускать инновационные приложения.</p><p>Около 700 экспертов представляют 18+ технологий Google по всему миру! В моем случае эта технология — Angular. Звание GDE не означает, что я работаю с Google или что Google занес мне денег :) Это лишь означает что Google признает мою экспертизу в Angular.</p><p><strong>GDE получают:</strong></p><p>1) Признание со стороны Google</p><p>2) Возможность общаться с разработчиками Angular и другими командами Google</p><p>3) Доступ к закрытым группам GDE экспертов</p><p>4) Пригланения на мероприятия (aka поездка на Google I/O)</p><p><strong>Вот некоторые из отмеченных Google-ом вещей:</strong></p><p><em>- Работал с Angular (2.x) самых ранних версий (еще до того как это стало популярным) </em><a href="https://youtu.be/72O1NdWT_58"><em>https://youtu.be/72O1NdWT_58</em></a></p><p><em>- Создал одно из самых больший русскоговорящих Angular коммьюнити насчитывающих более 5 тысяч разработчиками </em><a href="https://t.me/angular_ru"><em>https://t.me/angular_ru</em></a></p><p><em>- Организовал вместе с Tinkoff более 17 Angular митапов в Москве и регионах. На них помогал людям с подготовкой докладов </em><a href="https://www.youtube.com/channel/UCpDTAtunmHBcI6CsJoUV7ww/videos"><em>https://www.youtube.com/channel/UCpDTAtunmHBcI6CsJoUV7ww/videos</em></a></p><p><em>- Со-организовал первый в России NgGirls </em><a href="https://ng-girls.org/moscow-2019/"><em>https://ng-girls.org/moscow-2019/</em></a></p><p><em>- В сотрудничестве с JetBrains, разыграл более 20 лицензий на продукты InteliJ среди разработчиков Angular.</em></p><p><em>- Выступил с более чем 30 докладами (включая доклады по Angular) </em><a href="https://github.com/Semigradsky/events/blob/master/speakers.md#by-the-count-of-talks-more-than-one"><em>https://github.com/Semigradsky/events/blob/master/speakers.md#by-the-count-of-talks-more-than-one</em></a></p><p><em>- Сделал (с помощью комьюнити) русскоязычную документацию Angular </em><a href="https://angular24.ru/"><em>https://angular24.ru/</em></a></p><p><em>- Разработал довольно популярный плагин (его установили уже более 1700 разрабочиков) для автоматического рефакторинга Angular компонентов </em><a href="https://marketplace.visualstudio.com/items?itemName=obenjiro.arrr"><em>https://marketplace.visualstudio.com/items?itemName=obenjiro.arrr</em></a></p><p><em>- Автор русскоязычных статей на Medium </em><a href="https://medium.com/@obenjiro"><em>https://medium.com/@obenjiro</em></a></p><p><em>- Автор русскоязычных статей на Habr </em><a href="https://habr.com/ru/users/obenjiro/posts/"><em>https://habr.com/ru/users/obenjiro/posts/</em></a></p><p><em>- Автор русскоязычного Telegram канала </em><a href="https://t.me/obenjiro_notes"><em>https://t.me/obenjiro_notes</em></a></p><p><em>- Автор англоязычного Twitter блога </em><a href="https://twitter.com/obenjiro"><em>https://twitter.com/obenjiro</em></a></p><p><em>- Автор англоязычный статей на dev.to </em><a href="https://dev.to/obenjiro"><em>https://dev.to/obenjiro</em></a></p><p>Но на этом я не планирую останавливаться. Уже сейчас я активно работаю над улучшением качества русскоязычной документации Angular, разрабатываю Granula (альтернативная реализация Angular) и Reagain (инструмент для статического анализа кодовой базы). Так-же постараюсь сделать Angular коммьюнити самым большым, мягким и пушистым в мире :)</p><p><strong>Подписывайтесь на мой Telegram канал </strong><a href="https://t.me/obenjiro_notes"><strong>https://t.me/obenjiro_notes</strong></a><strong> или Twitter блог </strong><a href="https://twitter.com/obenjiro"><strong>https://twitter.com/obenjiro</strong></a><strong> чтобы всегда быть в курсе самых последних моих разработок и статей ;)</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a80cc65c3782" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ARRR или как рефакторить компоненты?]]></title>
            <link>https://medium.com/@obenjiro/arrr-%D0%B8%D0%BB%D0%B8-%D0%BA%D0%B0%D0%BA-%D1%80%D0%B5%D1%84%D0%B0%D0%BA%D1%82%D0%BE%D1%80%D0%B8%D1%82%D1%8C-%D0%BA%D0%BE%D0%BC%D0%BF%D0%BE%D0%BD%D0%B5%D0%BD%D1%82%D1%8B-dba0f9d8aa41?source=rss-806e35e87b8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/dba0f9d8aa41</guid>
            <category><![CDATA[clean-code]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[refactoring]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Alexey Okhrimenko]]></dc:creator>
            <pubDate>Tue, 18 Aug 2020 10:49:15 GMT</pubDate>
            <atom:updated>2020-08-18T11:03:13.180Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/520/1*SfIgKdstgT12Zix_oSrZTA.png" /></figure><p>🛠 Накопилось куча legacy кода написанного на Angular и React? Решили декомпозировать компонент и устали только об одной мысли об этом?</p><p>Попробуйте ARRR (Angular) и Glean (React) — плагины для VSCode позволяющие экспортировать кусок кода в новый компонент со своими HTML, CSS, TS и spec файлами.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*cRgGpwVRq9gRO9tmkLTORw.gif" /></figure><p>☠️ Давайте рефARRRкторить!</p><p><strong>Для Angular (ARRR)</strong></p><p>[ссылка] <a href="https://marketplace.visualstudio.com/items?itemName=obenjiro.arrr">https://marketplace.visualstudio.com/items?itemName=obenjiro.arrr</a></p><p>[repo] <a href="https://github.com/obenjiro/vscode-arrr">https://github.com/obenjiro/vscode-arrr</a></p><p><strong>Для React (Glean)</strong></p><p>[ссылка] <a href="https://marketplace.visualstudio.com/items?itemName=wix.glean">https://marketplace.visualstudio.com/items?itemName=wix.glean</a></p><p>[repo] <a href="https://github.com/wix/vscode-glean">https://github.com/wix/vscode-glean</a></p><p>Подписывайтесь на мой twitter (<a href="https://twitter.com/obenjiro">https://twitter.com/obenjiro</a>) и telegram канал (<a href="https://t.co/uXPEN2i2JT?amp=1">https://t.co/uXPEN2i2JT?amp=1</a>) чтобы не упустить новые статьи.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dba0f9d8aa41" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[PifuHD: 3D Аватар из 1 картинки (ну почти)]]></title>
            <link>https://medium.com/@obenjiro/pifuhd-3d-%D0%B0%D0%B2%D0%B0%D1%82%D0%B0%D1%80-%D0%B8%D0%B7-1-%D0%BA%D0%B0%D1%80%D1%82%D0%B8%D0%BD%D0%BA%D0%B8-%D0%BD%D1%83-%D0%BF%D0%BE%D1%87%D1%82%D0%B8-357b361313e2?source=rss-806e35e87b8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/357b361313e2</guid>
            <category><![CDATA[3d]]></category>
            <category><![CDATA[browsers]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[ar]]></category>
            <dc:creator><![CDATA[Alexey Okhrimenko]]></dc:creator>
            <pubDate>Tue, 07 Jul 2020 07:42:57 GMT</pubDate>
            <atom:updated>2020-07-07T07:42:57.761Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*aS-8zpPovCvNiogxNDzW7g.png" /></figure><p>Недавно прошла <a href="https://gdg-devparty.ru/">GDG DevParty Russia</a> на которой помимо докладов о <a href="https://youtu.be/UB2XK7Cf-Ms?list=PLGlZ_ld11os-nnB5CG_p6brIUWMGXU5Tr">MagicString</a> был доклад <a href="https://twitter.com/Lik04ka">Василики Климовой</a> о возможностях WebGL в браузере <a href="https://youtu.be/MZA8F479JHQ?list=PLGlZ_ld11os-nnB5CG_p6brIUWMGXU5Tr">“Потанцуем?”</a>. В нем она рассказывала о том как создав 3D автар можно его анимировать его прямо в браузере. Проблема в том что создается аватар с помощью огромного устройства под названием <a href="https://www.shapify.me/">Shapify Booth</a>. Круто если у вас есть доступ и деньги на такого рода развлечения, но что если нет? :)</p><p>Благодоря достижениям Machine Learning у нас появился альтернативный вариант. Facebook Reaserch опубликовали работу под названием <a href="https://shunsukesaito.github.io/PIFuHD/">PifuHD</a>. С помощью нее мы можем создать 3D аватар из 1 картинки 😱</p><p>Для того чтобы сделать это найдите 1 фотографию в полный рост.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/956/1*Hg6Ejpb0pUMxEM6pf2jDtw.jpeg" /></figure><p>Далее откройте Google Colab (<a href="https://colab.research.google.com/drive/11z58bl3meSzo6kFqkahMa35G5jmh2Wgt">по ссылке</a>) (желательно это делать в Google Chrome) и следуйте инструкциям. Если запутаетесь посмотрите видео.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FLWDGR5v3-3o%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DLWDGR5v3-3o&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FLWDGR5v3-3o%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/18769f03d1a9a70a2184fcc24724bacd/href">https://medium.com/media/18769f03d1a9a70a2184fcc24724bacd/href</a></iframe><p>Буквально через 5–10 минут у вас будет свой 3D аватар из картинки</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y0WJqcrTcXA9KTFEhcO93Q.png" /></figure><p>Но, это еще не все. Сшив 2 фотографии в одну (front &amp; back), тем самым подготовив текстуру для нашего автара</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*80KjWXZgsLjOcBlGDCA3pg.png" /></figure><p>и посмотрев пару видео о простом способе текстурирования 3D модели в <a href="https://www.blender.org/">Blender</a></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fvideoseries%3Flist%3DPL5T6FDwtwmh72INWqvM6rdOGjA_YFoS3V&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DkERzhJKYvGo&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FkERzhJKYvGo%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/f5a599e0f1751558a70c3419dad9e872/href">https://medium.com/media/f5a599e0f1751558a70c3419dad9e872/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FWFN8zn_7PZk%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DWFN8zn_7PZk&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FWFN8zn_7PZk%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/3e90b42ad1358b1ed83d61e0c0a69d2d/href">https://medium.com/media/3e90b42ad1358b1ed83d61e0c0a69d2d/href</a></iframe><p>Мы можем создать тестурированную модель.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DZvSPIYsMbty5xfn1UJmXw.png" /></figure><p>Экспортировав все это в FBX формат и создав архив в котором будет лежать fbx файл и файл текстуры мы можем импортировать этот архив в <a href="https://www.mixamo.com/#/">Mixamo</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eT2lfWNbdBhkOEClC4QBLA.png" /></figure><p>В котором мы можем выбрав подходящую анимацию отравить ее в <a href="https://www.adobe.com/ru/products/aero.html">Adobe Aero</a> где уже подставим нашу модель в подходящую среду получить вот такую анимацию 😅</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F-9D0AQ0wTEs%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D-9D0AQ0wTEs&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F-9D0AQ0wTEs%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/9181dc1d1a7ec3e242d04860fab50277/href">https://medium.com/media/9181dc1d1a7ec3e242d04860fab50277/href</a></iframe><p>Ну а немного потренировавшись наконец-то разобраться со своим внутренним “я”</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F6B9r0nFIzps%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D6B9r0nFIzps&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F6B9r0nFIzps%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/93ef727f9b1dc9e09a8142f68d272c3d/href">https://medium.com/media/93ef727f9b1dc9e09a8142f68d272c3d/href</a></iframe><p>Безусловно пока качество моделей оставляет желать лучшего, иногда даже очевидная картинка дает огромное кол-во артефактов. Особенно плохо у PifuHD с руками.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/356/1*fmb-M3-17eI2cerN9lAXSQ.png" /><figcaption>Friday 13</figcaption></figure><p>Конечно текстурирование и анимация займет у вас явно больше 10 минут особенно в первый раз (у меня ушло 6 часов), но немного потренировавшись вы сможете сделать очень много крутых анимаций и возможно даже простую игру :)</p><p>Могу только представить что нас ждем в будущем. Подписывайтесь на мой канал <a href="https://t.me/obenjiro_notes">https://t.me/obenjiro_notes</a> и Telegram чат TensorflowJS чтобы всегда быть в курсе новинок ML <a href="https://t.me/tensorflow_js">https://t.me/tensorflow_js</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=357b361313e2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Конспект второго ShowAndTell]]></title>
            <link>https://medium.com/@obenjiro/%D0%BA%D0%BE%D0%BD%D1%81%D0%BF%D0%B5%D0%BA%D1%82-%D0%B2%D1%82%D0%BE%D1%80%D0%BE%D0%B3%D0%BE-showandtell-34f277fc444?source=rss-806e35e87b8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/34f277fc444</guid>
            <category><![CDATA[browsers]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[tensorflowjs]]></category>
            <category><![CDATA[animation]]></category>
            <category><![CDATA[tensorflow]]></category>
            <dc:creator><![CDATA[Alexey Okhrimenko]]></dc:creator>
            <pubDate>Fri, 19 Jun 2020 19:11:35 GMT</pubDate>
            <atom:updated>2020-06-19T19:11:35.553Z</atom:updated>
            <content:encoded><![CDATA[<p>Конспект второго ShowAndTell провел <a href="https://twitter.com/jason_mayes">@jason_mayes</a> являющийся Developer Advocate #TensorFlowJS. На нем показали очень интересные демо приложений с использованием машинного обучения написанных на #javascript #machinelearning</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F8poKOxl6j8U%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D8poKOxl6j8U&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F8poKOxl6j8U%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/441722c1c94386d9f1cc06d62d336d3e/href">https://medium.com/media/441722c1c94386d9f1cc06d62d336d3e/href</a></iframe><p>1. Первыми выступали John Cohn (@johncohnvt) из MIT AI lab и Va barbosa из IBM. Они создали приложение под названием Veremin. Приложение определяет положение кистей человека и конвертирует эти данные в музыкальные тона.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2r_eTOeshuB_z5eY0pPXww.png" /></figure><p><a href="https://github.com/vabarbosa/veremin]">https://github.com/vabarbosa/veremin</a></p><p><a href="https://ibm.biz/veremin">veremin | a video theremin based on PoseNet</a></p><p>2. Следующим выступал Cyril Diagne (@cyrildiagne). Он создал приложение под названием Face Doodle, которое позволяет в реальном времени добавлять на лицо маски. Рисовать можно на любых частях лица и все рисунки будут двигаться не зависимо друг от друга.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/721/1*g2w--6m4Q0JE0ol7OOu6nQ.png" /></figure><p><a href="https://github.com/cyrildiagne/ar-facedoodle">cyrildiagne/ar-facedoodle</a></p><p>В его твиттер аккаунте есть очень много крутых демо с AR. Обязательно посмотрите :)</p><p>3. Третьим выступал FollowTheDarkside (@eatora22), он создал много крутых креативных и интерактивных Demo с помощью #P5.js и #TensorFlowJS. В них можно танцевать, играть с вируальными музыкальными инструментами и многое многое другое :)</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FEM-WnZZYXTc%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DEM-WnZZYXTc&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FEM-WnZZYXTc%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/d580f531179c0ef1e72cd280f087c5bd/href">https://medium.com/media/d580f531179c0ef1e72cd280f087c5bd/href</a></iframe><p>4. Следующим был Jaume Sanchez (@thespite). Он создал расширение для Three.js на основе FaceMesh, позволяющее добавлять маски поверх лица. В одном из демо он показывает как можно использовать 3D модель лица в качестве маски.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*LscxotdAt52D0uPLB3_Ijg.png" /></figure><p><a href="https://github.com/spite/FaceMeshFaceGeometry">https://github.com/spite/FaceMeshFaceGeometry</a></p><p>5. UX-дизайнер из Хабаровска Олеся Чернявская (@monolesan) презентовала несколько проектов. Первый из них называется Fix Posture и он помогает сохранять правильную осанку перед компьютером, заблюривая изображение если человек сидит неровно.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jCZCnJf17tDo7oXG7Zr9Yw.png" /></figure><p><a href="https://fix-posture.glitch.me/">https://fix-posture.glitch.me</a></p><p>Следующий ее проект называется Make me Big и он изменяет размер шрифта в зависимости от того, как далеко человек находится от экрана.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aw5YPS_NMvGNeJlXPmyOmw.png" /></figure><p><a href="https://glitch.com/~make-me-big">Make Me Big</a></p><p>6. Следующим выступал Alexandre Devaux. Он создал приложение под названием Holography, которое создает голограммы отсканированных людей из частиц.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MzZSrx4bG-K9utXYZinIKQ.png" /></figure><p><a href="https://github.com/nosy-b/holography">nosy-b/holography</a></p><p>7. Следующей выступала Amruta Purandare (@prenalys). Она презентовала несколько проектов. Первый, под названием Computational Music, преобразует жесты рук в музыку в реальном времени.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ITLAkB7Yzj2rqYYV_jO02Q.png" /></figure><p><a href="https://pamruta.com/2020/05/25/computational-music/">https://pamruta.com/2020/05/25/computational-music/</a></p><p>Второе приложение Video Tagging определяет вид животных показанный на видео.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KkcRXI5gZaQi2L3V4-yHWA.png" /></figure><p><a href="https://pamruta.com/2020/03/21/video-tagging/">Video Tagging</a></p><p>Третье приложение Activity Recognition определяет вид деятельности спортсменов.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TwZ3VNy17eqCPBzd27lJIA.png" /></figure><p><a href="https://pamruta.com/2020/04/03/activity-recognition/">Activity Recognition</a></p><p>8. Последней по номеру но не по крутости демо, выступала Shan Huang (@yemount). Она создала приложение под названием Pose Animator, которое в реальном времени превращает векторные иллюстрации в анимацию, на основе распознавания человека перед камерой при помощи PoseNet и FaceMesh. Интерактивные анимационные персонажи никогда не были так к нам близки :D</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s4iwl9mjJiPLdGhHuzydIg.png" /></figure><p><a href="https://github.com/yemount/pose-animator/">yemount/pose-animator</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=34f277fc444" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Русскоязычная документация по Angular]]></title>
            <link>https://medium.com/@obenjiro/%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%BE%D1%8F%D0%B7%D1%8B%D1%87%D0%BD%D0%B0%D1%8F-%D0%B4%D0%BE%D0%BA%D1%83%D0%BC%D0%B5%D0%BD%D1%82%D0%B0%D1%86%D0%B8%D1%8F-%D0%BF%D0%BE-angular-6a28af74ad71?source=rss-806e35e87b8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/6a28af74ad71</guid>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[documentation]]></category>
            <category><![CDATA[magic-string]]></category>
            <category><![CDATA[markdown]]></category>
            <dc:creator><![CDATA[Alexey Okhrimenko]]></dc:creator>
            <pubDate>Thu, 30 Apr 2020 12:24:02 GMT</pubDate>
            <atom:updated>2020-04-30T12:24:02.893Z</atom:updated>
            <content:encoded><![CDATA[<p>Русская версия документация Angular теперь доступна для всех на сайте <a href="https://angular24.ru/">angular24.ru</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XmlChmllCAxVumXWf8d0Yg.png" /></figure><p>Это результат 6 месяцев работы, нескольких безуспешных попыток написать все необходимые remark плагины, кастомного парсера и цепочки из двух Magic Strings, позволяющих делать перевод Markdown файлов без потери форматирования.</p><p>Стоило ли так мучаться? Да.</p><p>✨ Во-первых, удалось сделать расширяемую утилиту для перевода markdown файлов без потери форматирования, что до сих пор не особо успешно решалось. Чтобы убедится в этом, возьмите markdown файл с примерами кода, таблицами и кусками html.</p><p>✨ Во-вторых, теперь можно будет перевести документацию Angular на все 103 языка, которые поддерживает Google Translate.</p><p>✨ В-третьих, удалось выдернуть код документации Angular в отдельный schematics, который позволит вам добавить документацию Angular в свой проект (с поддержкой поиска, service workers и offline режима).</p><p>Я не смогу рассказать обо всем этом в одной статье, поэтому сейчас вы узнаете, чем сможете помочь, и о том, какие статьи вас ожидают в будущем.</p><h4>Чем вы можете помочь?</h4><p>Документация пока не совершенна, ибо была переведена с помощью Google Translate, и именно тут вы можете помочь. Как? Есть 2 варианта:</p><p>1) Увидев не очень красиво сформулированное или ошибочное предложение, выделите его — появится всплывающее меню из нескольких вариантов:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9XWXbTkuNs7TC4e-OlHVWQ.gif" /></figure><p>Нажмите “предложить перевод” и введите в появившемся окне вариант перевода. Для вас автоматически сформируется Github Issue — единственное, что вам нужно будет сделать это залогинится на Github и нажать Submit New Issue.</p><p>Если захотите посмотреть оригинал данной страницы, то при выделении выберите пункт “Открыть оригинал” и страница автоматически откроется в оригинальном английском варианте. Того же эффекта вы сможете добиться, если поменяете “24.ru” на “.io” в браузерной строке. Также простой заменой в адресной строке “.io” на “24.ru” вы можете перейти с англоязычной версии документации на русскоязычную.</p><p>2) Если чувствуете себя достаточно уверенно с Markdown и Github, можете:</p><p>- перейти напрямую в репозиторий <a href="https://github.com/obenjiro/angular-ru-docs">angular-ru-docs</a></p><p>- переключиться на бранч <strong>angular-v9-final</strong></p><p>- взять любой .md файл из директории <strong>aio/content</strong>, поправить его и сделать pull request в бранч <strong>angular-v9-final</strong></p><h4>Еще больше статей по теме</h4><p>Теперь коротко о том какие статьи ждут вас в ближайшем будущем:</p><p>1️⃣ Что такое Magic String и настолько ли они волшебные?</p><p>2️⃣ Double Magic String — микропарсер и утилита по переводу markdown.</p><p>3️⃣ Особенности Google Translate, нюансы и хаки. Как переводить бесплатно в браузере?</p><p>4️⃣ Добавь в свой проект документацию Angular, делай как core команда Angular :)</p><p>Надеюсь, этот список вас заинтриговал :)</p><p>Подписывайтесь на мой Telegram канал <a href="https://t.me/obenjiro_notes">@obenjiro_notes</a> и Twitter <a href="https://twitter.com/obenjiro">obenjiro</a>, чтобы не пропустить следующие статьи по теме и много всего другого интересного.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6a28af74ad71" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Конспект первого ShowAndTell по Tensroflow.js]]></title>
            <link>https://medium.com/@obenjiro/%D0%BA%D0%BE%D0%BD%D1%81%D0%BF%D0%B5%D0%BA%D1%82-%D0%BF%D0%B5%D1%80%D0%B2%D0%BE%D0%B3%D0%BE-showandtell-%D0%BF%D0%BE-tensroflow-js-77eca1546b3a?source=rss-806e35e87b8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/77eca1546b3a</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[browsers]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[tensorflow]]></category>
            <category><![CDATA[tensorflowjs]]></category>
            <dc:creator><![CDATA[Alexey Okhrimenko]]></dc:creator>
            <pubDate>Wed, 15 Apr 2020 09:40:56 GMT</pubDate>
            <atom:updated>2020-04-15T09:40:56.441Z</atom:updated>
            <content:encoded><![CDATA[<iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fz05bjEEgVQc%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dz05bjEEgVQc&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fz05bjEEgVQc%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/7a5bbe632c4b820c8a0f2845d54983ba/href">https://medium.com/media/7a5bbe632c4b820c8a0f2845d54983ba/href</a></iframe><p>Первый ShowAndTell провел @jason_mayes являющийся Developer Advocate #TensorFlowJS. На нем показали очень интересные демо приложений с использованием машинного обучения написанных на #javascript</p><p>1. Первым был Max Bittker @MaxBittker, он создал удивительный сайт под названием ShaderBooth. Написав WebGL шейдер для разпонанного TF.js лица или воспользовавшись готовым вы можете добавить x-ray как у супермена, или разукрасить свое лицо</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VeakKA7ZqY-Nu5Cfni4nFA.png" /></figure><p><a href="https://shaderbooth.com/">Shaderbooth</a></p><p>2. Следующим презентующий это Junya Ishihara @jishiha. Он создал расширения, которые позволяют использовать машинное обучение в Scratch. Из-за своей простоты и расширяемости, Scratch является очень мощным инструментом для обучения. Демо включают в себя примеры отслеживания лица и рук в реальном времени.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*3GGCikxizgdkaq675YM5Mg.png" /></figure><p><a href="https://github.com/champierre/posenet2scratch">champierre/posenet2scratch</a></p><p>3. Так-же Junya Ishihara @jishiha показал самый крутой пример который я видел в последнее время. Он был сделан японскими школьниками! Они разработали в Scratch с помощью Tf.js и Lego робота для сортировки мусора. Вы подносите мусор к роботу и он распознает метал это или стекло и открывает соответсвующий контейнер</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FOoY73tdFLp4%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DOoY73tdFLp4&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FOoY73tdFLp4%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/fa15e325ff1fc5267f5224934d272ce5/href">https://medium.com/media/fa15e325ff1fc5267f5224934d272ce5/href</a></iframe><p>4. Бен @bfarrellforever презентовал приложение, которое позволяет примерить на себе костюм супергероя. Оно было создано для детского мероприятия, проспонсированного Adobe. По раскрашенным шаблонам приложение в реальном времени отображает костюм на человеке.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LPEdKMVjGCgIQV60V71Tqg.png" /></figure><p><a href="https://github.com/bengfarrell/paperdoll">https://github.com/bengfarrell/paperdoll</a></p><p>5. Лиззи из Twilio создала приложение, которое позволяет определять, насколько позитивным был ваш год. Для этого оно определяет “показатель позитивности” для каждого сообщения из датасета, чтобы определить, каким оно было, позитивным, нейтральным, или негативным.</p><p><a href="https://www.twilio.com/blog/how-positive-was-your-year-with-tensorflow-js-and-twilio">Sentiment Analysis on your Year with TensorFlow.js</a></p><p>6. Маниш @manishr41883690 создал приложение, которое в реальном времени считает количество приседаний. Не забывайте заниматься спортом на карантине :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PBO3BLJiMi8erJ5fSONSHg.png" /></figure><p><a href="https://github.com/androidfanatic/tfjs-squats-counter-html">androidfanatic/tfjs-squats-counter-html</a></p><p>7. Роджерио @_rchaves_ создал приложение, которое определяет когда вы касаетесь своего лица. Его также можно обучать в реальном времени, добавляя новые данные в модель при помощи кнопок. Хороший способ потренироваться не трогать свое лицо.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xQSE_IXg05DeRxbdQMPWuw.png" /></figure><p><a href="https://rogeriochaves.github.io/stop-touching-your-face/">Stop Touching Your Face</a></p><p>8. Джимми @MLBlock3 создал визуальную среду для изучения machine learning. Приложение содержит несколько заранее обученных моделей, взаимодействие с которыми может происходить в режиме drag-and-drop.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6DH4Jig-lOIEqTHlP4izHw.png" /></figure><p><a href="https://mlblock.org/">ML Block</a></p><p>9. Джейсон @jason_mayes создал приложение, которое удаляет человека с изображения в реальном времени. Я мечтаю о том чтобы это было интегрировано в Zoom по умолчанию :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/911/1*yEbSk8rGG7TENBlG1QHzFg.png" /></figure><p><a href="https://github.com/jasonmayes/Real-Time-Person-Removal">jasonmayes/Real-Time-Person-Removal</a></p><p>10. Так-же он сделал приложение, которое позволяет оценить размеры различных частей тела. Помогает примерить одежду, ее не касаясь. Предложил данный feature request разработчикам из Lamoda :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oYrNFQu9bmFJQt9B1G5tRg.png" /></figure><p><a href="https://www.youtube.com/watch?v=kFtIddNLcuM">https://www.youtube.com/watch?v=kFtIddNLcuM</a></p><p>11. Еще одним интересным примером использования TensorflowJS является проект Йи Вена @yiwen_lin, который в реальном времени отображает лицо пользователя в потоке частиц. Демо на стыке исскуства и науки</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*913JmpPjWyn9YpmLE3t6cg.png" /></figure><p><a href="https://yiwenl.github.io/Sketches/exps/66/">https://yiwenl.github.io/Sketches/exps/66/</a></p><p>12. Последним выступающим был Gant Laborde @gantlaborde, который презентовал один из своих проектов под названием NSFW JS. Приложение помогает фильтровать контент “для взрослых” 😳 на стороне клиента.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/1*EIU6BnJoHh1ofuEuTU9z5g.png" /></figure><p><a href="https://github.com/infinitered/nsfwjs">GitHub - infinitered/nsfwjs: NSFW detection on the client-side via TensorFlow.js</a></p><p>13. Так-же у @gantlaborde есть InspiroBot, приложение, которое генерирует бесконечно количество мотивирующих картинок. К примеру :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/650/1*z9ioRkdfGyIAy9FEvGz3rg.jpeg" /></figure><p><a href="http://inspirobot.me/">I Am InspiroBot</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=77eca1546b3a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[План побега (JS to TS) — Простой проект — Часть №1]]></title>
            <link>https://medium.com/@obenjiro/%D0%BF%D0%BB%D0%B0%D0%BD-%D0%BF%D0%BE%D0%B1%D0%B5%D0%B3%D0%B0-js-to-ts-%D0%BF%D1%80%D0%BE%D1%81%D1%82%D0%BE%D0%B9-%D0%BF%D1%80%D0%BE%D0%B5%D0%BA%D1%82-%D1%87%D0%B0%D1%81%D1%82%D1%8C-1-438eb91ee74?source=rss-806e35e87b8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/438eb91ee74</guid>
            <category><![CDATA[lebab]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Alexey Okhrimenko]]></dc:creator>
            <pubDate>Sun, 01 Sep 2019 11:29:47 GMT</pubDate>
            <atom:updated>2022-09-30T06:04:52.609Z</atom:updated>
            <content:encoded><![CDATA[<h3>План побега (JS to TS) — Простой проект — Часть №1</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dOLHm1Sn55LL2_O3q2Iq7g.png" /></figure><p>Давайте рассмотрим простой пример плана побега из старого JS в новый современный TypeScript. Данный план может не подойти к вашему проекту, но вы можете использовать его как хорошую отправную точку.</p><p>0) Скачайте проект и перейдите на commit с чистым JS</p><pre>git clone <a href="https://github.com/obenjiro/unicorn-runner.git">https://github.com/obenjiro/unicorn-runner.git</a><br>git checkout fccc2f57470dde0f76850522c3e7e6abe8157789</pre><p>Перед нами проект написанный на чистом JS ES5, не имеющий ни системы модулей ни сборщиков. Все это мы с вами исправим и переведем этот проект на TypeScript :)</p><p>1) Переместите все JS файлы в папку <strong><em>`src`</em></strong></p><p>2) Если у вас очень старая кодовая база (ES3/ES5), воспользуйтесь Lebab (<a href="https://github.com/lebab/lebab">https://github.com/lebab/lebab</a>). Lebab это проект который помогает автоматически трансформировать старый ES3/ES5 код в новый ES2015 (aka ES6) c некоторыми фичами из ES2016.</p><pre>npx lebab --replace src/ --transform let,class,arrow,arrow-return,commonjs,template,obj-method,obj-shorthand ,for-of,for-each,arg-rest,arg-spread</pre><p>3) Переименуйте расширение JS файлов в расширение TS файлов</p><pre>for file in src/**/*.js; do mv &quot;$file&quot; &quot;${file%.*}.ts&quot;; done</pre><p>4) Создайте webpack конфигурацию</p><pre>npx webpack-cli init</pre><p>5) Создайте <strong>tsconfig.json</strong> в папке вашего проекта. Это очень простой и не “злобный” конфиг который будет пропускать множество ошибок с типами. Этого вполне хватит для начала.</p><pre>{<br>  &quot;compilerOptions&quot;: {<br>    &quot;allowSyntheticDefaultImports&quot;: true,<br>    &quot;resolveJsonModule&quot;: true,<br>    &quot;downlevelIteration&quot;: true,<br>    &quot;lib&quot;: [&quot;es2015&quot;, &quot;dom&quot;],<br>    &quot;module&quot;: &quot;es6&quot;,<br>    &quot;target&quot;: &quot;es5&quot;,<br>    &quot;allowJs&quot;: true,<br>    &quot;strict&quot;: false<br>  },<br>  &quot;include&quot;: [<br>    &quot;src/**/*&quot;<br>  ],<br>  &quot;exclude&quot;: [<br>    &quot;node_modules&quot;<br>  ]<br>}</pre><p>6) Если у вас нет имортов (файлы просто обьединяли в глобальной области видимости)</p><pre>find src/ -name &quot;*.ts&quot; -exec sed -i &#39;&#39; &quot;s/^function/export function/g;s/^class/export class/g&quot; {} \;</pre><p>7) Исправьте проблемы недостающих Import и не объявленных Property. В любой сложной ситуации приводите все к Any, вы всегда сможете это исправить позже. Используйте инструменты рефакторинга WebStorm или VScode. Делайте пока <strong>npm run build</strong> не начнет работать.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4ZHhUU468Y3IniVosQl20A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R3I4lynw0ITx7sHMFF9iMQ.png" /></figure><p>8) PROFIT!</p><h4>Пример</h4><p>До <a href="https://github.com/obenjiro/unicorn-runner/tree/fccc2f57470dde0f76850522c3e7e6abe8157789">https://github.com/obenjiro/unicorn-runner/tree/fccc2f57470dde0f76850522c3e7e6abe8157789</a></p><p>После <a href="https://github.com/obenjiro/unicorn-runner/tree/88157915758c4c270fa64ccd4fd2427a68bcba7a">https://github.com/obenjiro/unicorn-runner/tree/88157915758c4c270fa64ccd4fd2427a68bcba7a</a></p><h4>Немного о второй части</h4><p>В следующей части я покажу как добавить недостающих типов в наш Typescript проект и сделать tsconfig.json файл немного строже. Подписывайтесь и не забывайте ставить лайк :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=438eb91ee74" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Configure Angular 2 CLI (webpack.beta.17)]]></title>
            <link>https://medium.com/@obenjiro/configure-angular-2-cli-webpack-beta-14-5a7052ce6156?source=rss-806e35e87b8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/5a7052ce6156</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[angular2]]></category>
            <category><![CDATA[webpack]]></category>
            <category><![CDATA[angular-cli]]></category>
            <dc:creator><![CDATA[Alexey Okhrimenko]]></dc:creator>
            <pubDate>Sun, 18 Sep 2016 01:52:30 GMT</pubDate>
            <atom:updated>2016-10-08T23:59:31.186Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>UPD: this article is updated to match webpack.beta.17+</strong></p><p>Yesterday Angular-CLI beta 14 was released. With new shiny webpack inside of it. And they did amazing job at making it imposible to configure webpack. The ammount of time they spend to prevent any configuration is astonishing.</p><p>If you want configuration you DOOMED (at least for now, Angular team promised to do something about it in the future).</p><p>But for those who still want to configure webpack build config (for example to add AutoPrefixer), the only way is to clone angular-cli repository locally, modify it and npm link it. You will have problems on each and every update, but you will get access to webpack configuration.</p><h3>Step 1 — Configure Angular CLI</h3><p>First of all remove Angular CLI (if it’s installed).</p><pre>npm uninstall -g angular-cli<br>npm cache clean</pre><p>Then clone repo somewhere and npm link it.</p><pre>git clone https://github.com/angular/angular-cli.git<br>cd angular-cli</pre><p>We have a problem here, git clone will get us whole repository and switch to “default” branch automaticly. But default branch sometimes is broken or have inconsistent changes of whatever. So we have to switch to latest tag (for now it’s beta 17 — make sure that you use latest tag)</p><pre>git checkout v1.0.0-beta.17</pre><h3>Short path</h3><p>Copy this git-patch file (<a href="https://www.dropbox.com/s/9pawe5jo2soplqw/angular-cli-patch.diff?dl=0">https://www.dropbox.com/s/9pawe5jo2soplqw/angular-cli-patch.diff?dl=</a>1) to angular-cli folder, apply it and install npm dependencies</p><pre>git apply angular-cli-patch.diff<br>npm install</pre><p>If you did this, then you can skip “<em>Long path</em>” and go directly to “<em>Last actions with Custom Angular CLI</em>”</p><h3>Long path</h3><p>If you have decided to do things manually, you need to modify the config. Open angular-cli in your editor of choice and go to <em>/packages/angular-cli/models/webpack-build-common.ts</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lrn7-T3a4AC9UaD2M0V0Tw.png" /></figure><p>Here you have a common webpack config that used for every task. Let’s add AutoPrefixer. Since Angular CLI already using PostCSS loader we don’t need to configure it. So we can go straight to adding AutoPrefixer. Let’s install it and other dependencies.</p><pre>npm install # this one will install default deps<br>npm install autoprefixer --save-dev</pre><p>Then at the top of the file (<em>webpack-build-common.ts) </em>require AutoPrefixer.</p><pre>const autoprefixer = require(&#39;autoprefixer&#39;);</pre><p>And at the bottom of the file (inside ‘plugins’ section — line 105) add this:</p><pre>new webpack.LoaderOptionsPlugin({<br>    options: {<br>        postcss: function () {<br>            return [autoprefixer];<br>        }<br>    }<br>}),</pre><p>Now we need to apply some changes to a different file. Open<em> /packages/angular-cli/models/webpack-config.ts </em>and replace <strong>webpackMerge</strong> with <strong>this.betterWebpackMerge</strong> everywere except at the top of the file (where we importing webpackMerge).</p><p>At line 5 import webpack.</p><pre>import * as webpack from &#39;webpack&#39;;</pre><p>One last thing. We need to add implementation of betterWebpackMerge at line 61.</p><pre>betterWebpackMerge(baseConfig: any, targetConfig: any, targetTypeScriptConfig?: any) {<br>    let basePlugins = (baseConfig &amp;&amp; baseConfig.plugins) || [];<br>    let targetPlugins = (targetConfig &amp;&amp; targetConfig.plugins) || [];<br>    let targetTypeScriptPlugins = (targetTypeScriptConfig &amp;&amp; targetTypeScriptConfig.plugins) || [];</pre><pre>let baseOptionsPlugins = basePlugins<br>      .filter((plugin: any) =&gt; plugin instanceof webpack.LoaderOptionsPlugin)<br>      .map((plugin: any) =&gt; plugin.options.options );<br>    let targetOptionsPlugins = targetPlugins<br>      .filter((plugin: any) =&gt; plugin instanceof webpack.LoaderOptionsPlugin)<br>      .map((plugin: any) =&gt; plugin.options.options );<br>    let targetTypeScriptOptionsPlugins = targetTypeScriptPlugins<br>      .filter((plugin: any) =&gt; plugin instanceof webpack.LoaderOptionsPlugin)<br>      .map((plugin: any) =&gt; plugin.options.options );</pre><pre>let mergedConfig = webpackMerge(<br>      baseConfig,<br>      targetConfig,<br>      targetTypeScriptConfig<br>    );</pre><pre>if (<br>      baseOptionsPlugins.length &gt; 0 ||<br>      targetOptionsPlugins.length &gt; 0 ||<br>      targetTypeScriptOptionsPlugins.length &gt; 0<br>    ) {<br>      let mergedBase = baseOptionsPlugins.reduce((base: any, next: any) =&gt; {<br>        Object.assign(base, next);<br>        return base;<br>      }, {});<br>      let mergedTarget = targetOptionsPlugins.reduce((base: any, next: any) =&gt; {<br>        Object.assign(base, next);<br>        return base;<br>      }, {});<br>      let mergedTargetTypeScript = targetTypeScriptOptionsPlugins.reduce((base: any, next: any) =&gt; {<br>        Object.assign(base, next);<br>        return base;<br>      }, {});</pre><pre>if (mergedConfig.plugins) {<br>        mergedConfig.plugins = mergedConfig.plugins.filter((plugin: any) =&gt; {<br>          return !(plugin instanceof webpack.LoaderOptionsPlugin);<br>        });<br>        mergedConfig.plugins.push(new webpack.LoaderOptionsPlugin({<br>            options: Object.assign(mergedBase, mergedTarget, mergedTargetTypeScript)<br>        }));<br>      }<br>    }</pre><pre>return mergedConfig;<br>  }</pre><h3>Last actions with Custom Angular CLI</h3><p>Now we need to do two more things, we need to build angular cli source code.</p><pre>npm run build</pre><p>And then we need to navigate to builded code and link it as global package.</p><pre>cd dist/angular-cli/<br>npm link</pre><p>That’s it. Now we have “custom” Angular CLI with AutoPrefixer.</p><h3>Step 2 — Use “custom” Angular CLI</h3><p>Let’s create a new project (if you have one already you can skip project creation part) and link your local angular-cli installation inside of the project (this step is mandatory).</p><pre>cd ~ # here you can go to any folder you want your project to be<br>ng new foo  # you can skip this step if you have a project already<br>cd foo<br>npm link angular-cli</pre><p><em>npm link</em> is required because …</p><blockquote>npm link angular-cli is needed because by default the globally installed angular-cli just loads the local angular-cli from the project which was fetched remotely from npm. npm link angular-cli symlinks the global angular-clipackage to the local angular-cli package. Now the angular-cli you cloned before is in three places: The folder you cloned it into, npm’s folder where it stores global packages and the angular-cli project you just created.</blockquote><p>Now to the last step, lets modify our css files and add ‘user-select’ rule and see what happens. If you just created a project go to <em>/foo/src/app/app.component.css</em> and add this:</p><pre>h1 {<br> user-select: none;<br>}</pre><p>Now you can start a web server.</p><pre>ng serve</pre><p>And navigate to <a href="http://localhost:4200/">http://localhost:4200</a>. If you open developer tools you will see AutoPrefixed styles. Well done, now we can save some keystrokes for our Angular 2 project :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/868/1*uFEBx5GVIR4WkhMF_lUNow.png" /></figure><h3>One downside</h3><p>This aproach have only one downside, each time new version of Angular CLI will appear you will have to rebase it inside of you local copy or repeat Step1 again. So be aware.</p><p>PS: Don’t forget to like article if it was usefull or comment if something is not working as described. I will be happy to help.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5a7052ce6156" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[You can ‘throw’ anything in JavaScript]]></title>
            <link>https://medium.com/@obenjiro/you-can-throw-anything-in-javascript-c5f32842fbeb?source=rss-806e35e87b8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/c5f32842fbeb</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[Alexey Okhrimenko]]></dc:creator>
            <pubDate>Sat, 21 May 2016 12:06:33 GMT</pubDate>
            <atom:updated>2016-05-21T12:10:10.155Z</atom:updated>
            <content:encoded><![CDATA[<p>At one of the last <a href="https://medium.com/@DenisIzmaylov/sixth-node-js-meetup-in-moscow-a618884835c0#.3ubyowwxg">Moscow Node.js meet up</a> there was one claim that I really need to address.</p><p>The claim was that you can throw a ‘null’ in JavaScript. And it’s true. It’s not a claim - it’s actully a fact. Let me explain.</p><p>Usually to throw an error you doing it either by passing a string, creating Error object or inhereting from Error prorotype and creating new type of Error</p><pre>throw &#39;some error&#39; // don&#39;t do that</pre><pre>throw new Error(&#39;some error&#39;)  // you can skip &#39;new&#39; here</pre><pre>// &#39;better&#39; way to do this ( for Babel or TypeScript )</pre><pre>class MyError {<br>    constructor(message) {<br>        this.name = ‘MyError’;<br>        this.message = message;<br>        this.stack = new Error().stack; // Optional<br>    }<br>}</pre><pre>MyError.prototype = Object.create(Error.prototype);<br>throw new MyError(‘some error’)</pre><p>Anyway, back to the point. If you write ‘throw null’ it will actually output ‘null’ in the console</p><pre>throw null; // outputs &#39;null&#39; in the console</pre><p>Your thouth here may be that JavasScript just converts null to string. Well, this can be easly tested with this code</p><pre>try {<br>    throw null;<br>} catch (e) { <br>    console.log(e === null) // outputs &#39;true&#39;<br>}</pre><p>Wow! And to make matter worse you can actully pass anything. null, undefined, number (including NaN), string, boolean or any object (RegEx, Date, etc. )</p><pre>try {<br>    throw null;<br>} catch (e) { <br>    console.log(null === e) // outputs ‘true’<br>}<br>try {<br>    throw NaN;<br>} catch (e) { <br>    console.log(isNaN(e)) // outputs ‘true’<br>}<br>try {<br>    throw 13;<br>} catch (e) { <br>    console.log(typeof e) // outputs ‘number’<br>}<br>try {<br>    throw true;<br>} catch (e) { <br>    console.log(typeof e) // outputs ‘boolean’<br>}<br>try {<br>    throw /\w+/;<br>} catch (e) { <br>    console.log(e instanceof RegExp) // outputs ‘true’<br>}</pre><p>It’s cool, but plz don’t ever do that :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c5f32842fbeb" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>