Skip to content

Instantly share code, notes, and snippets.

View dy's full-sized avatar
🙌
you're doing good

Dmitry Iv. dy

🙌
you're doing good
View GitHub Profile
@dy
dy / get-polyfills.json
Created February 11, 2015 12:44
Get polyfills
"polyfill": "curl \"http://cdn.polyfill.io/v1/polyfill.min.js?features=WeakMap,WeakSet&flags=always,gated&unknown=polyfill\" -A \"xxx\" > polyfill.js"
@dy
dy / mobile_requirements.md
Last active August 29, 2015 14:16
Kudago mobile banners requirements
Screen width Banner size
≤ 320px 320px × 50px
320px .. 728px 728px × 60px
≥ 728px 1024px × 100px
@dy
dy / gistodo.md
Created March 29, 2015 07:48
merits
  • A
  • B
  • C
@dy
dy / gulpfile.js
Created May 29, 2015 16:38
Static site generator with gulp
var gulp = require('gulp');
var rename = require('gulp-rename');
var map = require('map-stream');
var frontMatter = require('gulp-front-matter');
var nunjucks = require('nunjucks');
var marked = require('gulp-marked');
var plumber = require('gulp-plumber');
var fs = require('fs');
var extend = require('xtend/mutable');
@dy
dy / coloroid.js
Created September 22, 2015 00:13
Coloroid table
/*
Coloroid table
Some negative angle typos are fixed
A λ ф tg ф ctg ф xλ yλ zλ xλ yλ eλ
10 570.83 59.0 0.6009 0.775745 0.946572 0.002032 0.44987 0.54895 1.724349
11 572.64 55.3 0.6924 0.805130 0.933804 0.001910 0.46248 0.53641 1.740845
12 574.38 51.7 0.7898 0.832782 0.920395 0.001808 0.47451 0.52444 1.754986
13 576.06 48.2 1.1180 0.8941 0.858841 0.906482 0.001764 0.48601 0.51298 1.767088
//Painting
.underline(@height: 20px, @color: @black){
@pattern: "0000000000000000000000000000000000000001";
.png(@stream: @pattern, @w: 1, @h: unit(@height), @color: @color);
}
.underline{
.underline(@color: fade(@black, 10%));
background-position: 0 -2px;
&:hover{
@dy
dy / patronimics.json
Last active December 31, 2015 11:19
Cyrillic patronimics postfixes table.Complexity is O(C).
{ "":"ович овна",
"й":"евич евна",
"а":"ич ична",
"в":"вович|вич вовна|вна",
"ь":"евич евна",
"я":"ич ична",
"ий":"иевич|ьевич иевна|ьевна",
"ла":"лович ловна",
"ма":"мич минична",
"ов":"ович овна",
@dy
dy / gist:8560514
Created January 22, 2014 15:19
Insert image placeholder onerror
<img src="{{ im.url }}" onerror="this.setAttribute('src','{% static 'img/placeholder.jpg' %}' )"/>
@dy
dy / gauss-gradient.css
Created January 18, 2016 00:09
CSS gauss gradient
.grad {
background: linear-gradient(
to right,
rgba(0,0,0,0) 0%,
rgba(0,0,0,0.01) 8.333%,
rgba(0,0,0,0.05) 16.666%,
rgba(0,0,0,0.13) 25%,
rgba(0,0,0,0.32) 33.333%,
rgba(0,0,0,0.62) 41.666%,
rgba(0,0,0,1) 50%,
@dy
dy / gulpfile.js
Created April 6, 2016 21:16
amaze
var gulp = require('gulp');
var imagemin = require('gulp-imagemin');
var pngquant = require('imagemin-pngquant');
gulp.task('images', function() {
return gulp.src('compress_images/north/img/**/*')
// Pass in options to the task
.pipe(imagemin({optimizationLevel: 5}))
.pipe(gulp.dest('compress_images/north/img_result'));
});