Skip to content

Instantly share code, notes, and snippets.

@mixin pseudo($width, $height, $content: '') {
position: absolute;
content: $content;
width: $width;
height: $height;
}
@mixin font($alias, $name) {
@font-face {
font-family: $alias;
// Original
function aclean(arr) {
// этот объект будем использовать для уникальности
var obj = {};
for (var i = 0; i < arr.length; i++) {
// разбить строку на буквы, отсортировать и слить обратно
var sorted = arr[i].toLowerCase().split('').sort().join(''); // (*)
obj[sorted] = arr[i]; // сохраняет только одно значение с таким ключом
@gadzhimari
gadzhimari / 1-vacancy.md
Created February 4, 2017 16:57 — forked from arikon/1-vacancy.md
Вакансия в команду разработки портальной библиотеки блоков Яндекса

Привет!

В портал Яндекса входит больше сотни сервисов. Часть из них достаточно известны — Главная страница (Морда), Поиск, Почта, Карты, Маркет и т.д., но большая часть менее известны или даже практически незаметны. Среди них различные промо-проекты (например, Яндекс.Браузер) и спец-проекты (например, Зимние Игры — 2014).

Для того, чтобы ускорить и упростить создание и поддержку такого количества сервисов, мы сделали, а теперь развиваем и поддерживаем портальную библиотеку общих блоков — Лего.

Развитием портальной библиотеки и инфраструктуры вокруг неё занимается отдельная команда. В команде Лего работает около 20 человек (разработчиков, тестировщиков, технических писателей и менеджеров). Кроме этого, в портальную библиотеку контрибьютят разработчики сервисов Яндекса.

Среди основных задач команды Лего можно выделить следующие:

@gadzhimari
gadzhimari / dustin-moskovitz-best-books.md
Created February 7, 2017 15:05 — forked from cjbarber/dustin-moskovitz-best-books.md
Dustin Moskovitz's Book Recommendations (Co-Founder of Asana and Facebook)

Dustin Moskovitz is a cofounder of Asana, and was a co-founder of Facebook. Here are some of his favorite books.

Many thanks to Dustin for this list.

On Consciousness

Douglas R. Hofstadter

Godel, Escher, Bach: An Eternal Golden Braid

@gadzhimari
gadzhimari / js-task-1.md
Created July 26, 2017 18:01 — forked from codedokode/js-task-1.md
Задания на яваскрипт (простые)
@gadzhimari
gadzhimari / calcCurrentSlide.js
Last active November 29, 2017 09:38
Calculation formula of prev and next slide
const images = ['1.jpg', '2.jpg', '3.jpg'];
const total = images.length;
const next = (current + 1) % total;
const prev = (current + (total - 1)) % total;
@gadzhimari
gadzhimari / treeWalker.js
Last active January 14, 2018 10:55
Tree Walker
/* Replace all text nodes which has parent div element to wrapped by p tag.
Example
Before
<body>
<p>Boom</p>
text
<div>Bam</div>
</body>
After
@gadzhimari
gadzhimari / combineReducers.js
Created January 14, 2018 19:56
Calculate total price in different currencies
const selected = [
{ price: 20 },
{ price: 45 },
{ price: 67 },
{ price: 1305 }
];
const reducers = {
rubles: function(state, item) {
const newPrice = state.rubles + item.price;
const deepFreeze = (obj) => {
// Retrieve the property names defined on obj
const propNames = Object.getOwnPropertyNames(obj);
// Freeze properties before freezing self
propNames.forEach(function(name) {
const prop = obj[name];
// Freeze prop if it is an object
if (typeof prop == 'object' && prop !== null) {
@gadzhimari
gadzhimari / dotfiles.md
Last active February 24, 2018 18:25
Dotfiles syncing through bare git repository

Note: No extra tooling, no symlinks, files are tracked on a version control system, you can use different branches for different computers, you can replicate you configuration easily on new installation.

git init --bare $HOME/.dotfiles
alias config='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
dotfiles config --local status.showUntrackedFiles no
  • The first line creates a folder ~/.dotfiles which is a Git bare repository that will track our files.
  • Then we create an alias config which we will use instead of the regular git when we want to interact with our configuration repository.
  • We set a flag - local to the repository - to hide files we are not explicitly tracking yet. This is so that when you type config status and other commands later, files you are not interested in tracking will not show up as untracked.
  • Also you can add the alias definition by hand to your .zshrc or use the the fourth line provided for convenience.