Skip to content

Instantly share code, notes, and snippets.

View DenisIzmaylov's full-sized avatar
🎯
Focusing

Denis Izmaylov DenisIzmaylov

🎯
Focusing
View GitHub Profile
#!/usr/bin/env node
const { resolve, dirname } = require('path')
const pify = require('pify')
const { readFile, writeFile } = pify(require('fs'))
const debug = require('debug')('mst')
const Inquirer = require('inquirer')
const ProgressBar = require('progress')
const chalk = require('chalk')
const changeCase = require('change-case')
const semver = require('semver')

Доклад «Снова ошибки»

3 августа 2017, RamblerFront& meetup #2, Москва

В коде начинающих программистов обычно много ошибок. Постепенно мы набираемся опыта, код становится надежнее, покрывается тестами, и нам кажется, что ошибки в нашем коде практически исключены.

Но фронтенд — это неконтролируемая среда и произойти может что угодно. Доклад о том, как начать использовать ошибки в свою пользу.

@sergeysova
sergeysova / gh-pages-deploy.md
Created March 7, 2017 12:23 — forked from cobyism/gh-pages-deploy.md
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/4.4.3/d3.js"></script>
<style>
svg line{
stroke: grey;
stroke-width: 2;
}
svg path{
stroke: #808080;
stroke-width: 2;
var str = 'class ಠ_ಠ extends Array {constructor(j = "a", ...c) {const q = (({u: e}) => {return { [`s${c}`]: Symbol(j) };})({});super(j, q, ...c);}}' +
'new Promise((f) => {const a = function* (){return "\u{20BB7}".match(/./u)[0].length === 2 || true;};for (let vre of a()) {' +
'const [uw, as, he, re] = [new Set(), new WeakSet(), new Map(), new WeakMap()];break;}f(new Proxy({}, {get: (han, h) => h in han ? han[h] ' +
': "42".repeat(0o10)}));}).then(bi => new ಠ_ಠ(bi.rd));';
try {
eval(str);
} catch(e) {
alert('Your browser does not support ES6!')
}
@dpp
dpp / install_docker.sh
Last active July 19, 2018 15:38
A script to install Docker on a minimal Ubuntu 16.04 machine
#!/bin/bash
apt-get update
apt-get install -y apt-transport-https ca-certificates
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
echo 'deb https://apt.dockerproject.org/repo ubuntu-xenial main' > /etc/apt/sources.list.d/docker.list
apt-get update
@A-gambit
A-gambit / REACTIVE2016-LIGHTNING-PROPOSAL.md
Last active February 22, 2024 18:24
Proposal for lightning talk at ReactiveConf 2016: Road from UndefinedLand

Proposal for a lightning talk at the Reactive 2016.

Keep calm and like/retweet it on Twitter and star this Gist to vote on this talk.

Road from UndefinedLand

Undefiend

I work at Grammarly. We like React and happily use it in our applications. However, sometimes something goes wrong and bugs creep into the code. Here comes testing. It helps make us confident about the quality of our code.

@rndD
rndD / npm
Created July 9, 2016 12:19
Npm inject для кеширования папки node_modules
#!/usr/bin/env bash
# Фейковый npm
# Нужен для кэширования папки node_modules
# Кэш находится в папке ~/.cache/npm-inject/[sha1 хэш файла package.json]/node_modules
#
# В PATH надо добавить путь папки с фейковым npm, таким образом при выполнении команды `npm install`
# bash вызовет фейковый npm c параметром `install`.
# Фейк проверяет наличие папки [sha1 хэш файла package.json] в кэше.
# Если она в кэше, создаем на неё симлинк node_modules
@DenisIzmaylov
DenisIzmaylov / NOTES.md
Last active September 18, 2024 15:50
Step By Step Guide to Configure a CoreOS Cluster From Scratch

Step By Step Guide to Configure a CoreOS Cluster From Scratch

This guide describes how to bootstrap new Production Core OS Cluster as High Availability Service in a 15 minutes with using etcd2, Fleet, Flannel, Confd, Nginx Balancer and Docker.

Content

@Lendar
Lendar / App.js
Last active October 22, 2021 20:38
Using FontFaceObserver for React app loader
import React from 'react'
import 'fontfaceobserver'
import IndexPage from './IndexPage'
import Loader from './Loader'
import { fetchUser } from '../apiclient'
import 'font-awesome-webpack'
import './Lato-font.css'
import './Roboto-font.css'