Skip to content

Instantly share code, notes, and snippets.

View DenisIzmaylov's full-sized avatar
🎯
Focusing

Denis Izmaylov DenisIzmaylov

🎯
Focusing
View GitHub Profile
@DenisIzmaylov
DenisIzmaylov / NOTICES.md
Last active March 17, 2016 09:31
IE8 Fallbacks
@DenisIzmaylov
DenisIzmaylov / README.md
Created January 22, 2016 15:00 — forked from magnetikonline/README.md
IE 7/8/9/10/11 Virtual machines from Microsoft - Linux w/VirtualBox installation notes.
@DenisIzmaylov
DenisIzmaylov / circular-json-stringify.js
Last active February 3, 2019 17:27
Circular JSON Stringify
function circularJSONStringify(obj) {
const cache = [];
const result = JSON.stringify(obj, (key, value) => {
if (typeof value === 'object' && value !== null) {
if (cache.indexOf(value) !== -1) {
// Circular reference found, discard key
return;
}
// Store value in our collection
cache.push(value);
@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() {
@DenisIzmaylov
DenisIzmaylov / gist:fd0d39a3d0b86e913192
Created November 10, 2015 15:58
Deploy to dokku from codeship.com

After migrating from heroku to dokku, we had to also chance codeship so we deploy to dokku. I followed the following steps to successfully deploy to dokku.

  1. Save the public key of the codeship project. It is found in Project Settings > General Settings.
  2. Copy the public key to a file /tmp/codeship_projectname.pub.
  3. Make sure when pasting, all the contents are in a single line and not multiple lines.
  4. Add the public key to dokku using the following command in console. Reference.
cat /tmp/codeship_projectname.pub | ssh root@yourdokkuinstance "sudo sshcommand acl-add dokku [description]"
@DenisIzmaylov
DenisIzmaylov / i18n-data.json
Last active May 3, 2021 21:12
Easy i18n translation in your ES6 apps
{
"ru": {
"Your original english text": "Твой оригинальный русский текст"
}
}
@DenisIzmaylov
DenisIzmaylov / es-code-style.md
Last active June 10, 2016 22:38
ES Code Style

Code Style

Use Airbnb Code Style as Basic rules. This document only override some given rules.

TODO:

  • Make it as shareable cards (Twitter, FB, LinkedIn, VK)
  • Explain the reasons
  • Allow to discuss for every rule
@DenisIzmaylov
DenisIzmaylov / RECIPE.md
Last active September 12, 2016 22:39
How to update io.js to Node 4 and npm 3

How to update io.js to Node 4 and npm 3

The recipe described below works fine in OS X El Capitan and Homebrew tool.

Fine tested with node@4.1 and npm@3.3.4.

io.js -> Node.js 4

brew unlink iojs