Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Denis Izmaylov DenisIzmaylov

🎯
Focusing
View GitHub Profile
View NOTICES.md
@DenisIzmaylov
DenisIzmaylov / README.md
Created Jan 22, 2016 — forked from magnetikonline/README.md
IE 7/8/9/10/11 Virtual machines from Microsoft - Linux w/VirtualBox installation notes.
View README.md
View circular-json-stringify.js
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 Nov 6, 2016
Key difference between OOP and FP in JavaScript
View OOP-and-FP.md

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() {
View gist:fd0d39a3d0b86e913192

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 Aug 28, 2020
Easy i18n translation in your ES6 apps
View i18n-data.json
{
"ru": {
"Your original english text": "Твой оригинальный русский текст"
}
}
View es-code-style.md

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 Sep 12, 2016
How to update io.js to Node 4 and npm 3
View RECIPE.md

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
You can’t perform that action at this time.