Skip to content

Instantly share code, notes, and snippets.

View DenisIzmaylov's full-sized avatar
🎯
Focusing

Denis Izmaylov DenisIzmaylov

🎯
Focusing
View GitHub Profile
@koistya
koistya / css-per-component.md
Last active August 29, 2015 14:21
CSS per ReactJS Component

MyComponent.less

@import '../variables.less';

.MyComponent {
  background: @primary-color;

  &-list {
    max-width: @max-content-width;
@fizerkhan
fizerkhan / how_nodejs_works.md
Created April 23, 2015 14:08
How NodeJS works?

Node.JS

@mssio
mssio / coreos-nginx-load-balancer.md
Last active March 1, 2016 19:32
Nginx Load Balancer Service For Core OS

#Nginx Load Balancer Service For Core OS

Create a directory to manage using fleetctl for this service:

$ mkdir static

Create this file in static/nginx_lb.service

@DenisIzmaylov
DenisIzmaylov / OOP-and-FP.md
Last active November 6, 2016 12:08
Key difference between OOP and FP in JavaScript

Key difference between OOP and FP in JavaScript

In OOP we have mixed instance data and class functions:

class Animal { 
  constructor(name) {
    this.name = name;
  }
 speak() {
<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;
@DenisIzmaylov
DenisIzmaylov / INDEX.md
Last active February 23, 2017 13:48
JavaScript Best Practicies
@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).

@DJCordhose
DJCordhose / server-side-react-redux-router.js
Created September 20, 2015 11:58
React-redux-router: How to wait until all required actions have finished before rendering on the server side
export default function renderRoute(request, reply) {
const store = configureStore();
store.dispatch(match(request.path, (error, redirectLocation, routerState) => {
if (redirectLocation) {
reply.redirect(redirectLocation.pathname + redirectLocation.search);
} else if (error) {
reply(error.message).code(500);
} else if (!routerState) {
reply('Not found').code(404);
} else {
@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
#!/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')