Skip to content

Instantly share code, notes, and snippets.

View iamstarkov's full-sized avatar
🔥

Vladimir Starkov iamstarkov

🔥
View GitHub Profile
@iamstarkov
iamstarkov / code.js
Last active October 5, 2017 22:30 — forked from montogeek/code.js
// some fp boilerplate
const map = fn => xs => xs.map(fn);
const reduce = (fn, init) => xs => xs.reduce(fn, init);
const concat = (a, b) => a.concat(b);
/* or in a library */
const R = require('ramda');
// async helpers
const toPromise = x => Promise.resolve(x);
@iamstarkov
iamstarkov / let.js
Last active November 11, 2016 21:10 — forked from anonymous/let.js
const toArray = iterables => {
var res = [];
for (var i = 0; i < iterables.length; i++) {
res[i] = iterables[i];
}
return res;
}
const query = selector => toArray(document.querySelectorAll(selector));
class CoffeeMachine {
constructor(power) {
this.power = power;
this.WATER_HEAT_CAPACITY = 4200;
this.waterAmount = 0;
console.log(`Создана кофемашина мощностью ${power} ватт`);
}
onReady() {
console.log('кофе готов!')
@iamstarkov
iamstarkov / arrays.jade
Created October 14, 2015 07:43
jade arrays
.grid-row
- var footerMenu = {
'Одежда': ['Верхняя одежда','Свитера','Комбинезоны','Костюмы','Майки','Нижнее бельё','Пиджаки','Рубашки и сорочки','Футболки','Шорты','Штаны'],
'Обувь': ['Ботинки','Кеды','Кроссовки','Мокасины','Обувь для дома','Сандалии','Сапоги'],
'Сумки, багаж': ['Дорожные сумки','На пояс','Повседневные сумки','Портфели','Рюкзаки','Чемоданы'],
'Что-то другое': ['Галантерея','Галстуки','Деловые аксессуары','Портфели','Рюкзаки','Чемоданы']
}
each links, heading in
div= heading
ul
var getDefinition = function(num) {
return $('.EXAMPLE').eq(num).parent().prevAll('ftdef').children('.DEF').text().trim();
}
var getExamples = function(Number) {
return $('.EXAMPLE').eq(num).parent().parent().prevAll('ftdef').children('.DEF').text().trim();
}
function getDefinition(num) {
return getDefinition(num) + getExamples(num);
@iamstarkov
iamstarkov / dabblet.css
Created December 15, 2014 20:06 — forked from anonymous/dabblet.css
Untitled
body{
width:260px;
margin:0;
padding:0 10px;
font-size:11px;
font-family:"Arial";
}
table { border-collapse: collapse; }
@iamstarkov
iamstarkov / dabblet.css
Created November 11, 2013 19:31 — forked from anonymous/dabblet.css
most flexible arrow
/**
* most flexible arrow
*/
.arrow {
width: 100px;
height: 200px;
position: relative;
overflow: hidden;
border-color: red;
@iamstarkov
iamstarkov / dabblet.css
Created August 26, 2013 09:44 — forked from NatalieLukaniuk/dabblet.css
labeled-ins-block
/* labeled-ins-block */
.labeled-ins-block {
display: block;
border-left: 0.75em solid #47ad09;
padding-left: 0.5em;
}
.labeled-ins-block:before {
position: relative;
@iamstarkov
iamstarkov / dabblet.css
Created March 29, 2013 07:11 — forked from mistakster/dabblet.css
Align vertically absolutely positioned element without known height
/**
* Align vertically absolutely positioned element without known height
*/
#has-known-height {
position: relative;
background: lightgray;
height: 300px;
}
#absolutely-positioned {
position: absolute; /* don't touch this property */
@iamstarkov
iamstarkov / dabblet.css
Created February 7, 2013 06:06 — forked from besedin-art/dabblet.css
accessible link
/**
* accessible link
*/
div {
width: 30em;
font: 1rem/1.4 Tahoma;
margin: 2em auto;
}