Skip to content

Instantly share code, notes, and snippets.

Working from home

Yurii Habrusiev yuriihabrusiev

Working from home
Block or report user

Report or block yuriihabrusiev

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
romainl /
Last active Oct 11, 2019
Linting your code, the vanilla way

Linting your code, the vanilla way

You may want a lint plugin to lint your code in Vim but you probably don't need it. At least try the built-in way before jumping on the plugin bandwagon.

Defining makeprg

autocmd FileType <filetype> setlocal makeprg=<external command>

This autocommand tells Vim to use <external command> when invoking :make % in a <filetype> buffer. You can add as many similar lines as needed for other languages.

dhh / comments_channel.rb
Last active Sep 26, 2016
On-boarding a specialized broadcast method in the channel itself
View comments_channel.rb
# Channel
class CommentsChannel < ApplicationCable::Channel
def self.broadcast_comment(comment)
broadcast_to comment.message, comment: CommentsController.render(
partial: 'comments/comment', locals: { comment: comment }
def follow(data)
listochkin /
Last active Feb 1, 2019
Andrey Listochkin as Backend Secret

Привет всем!

Сегодня 27 сентября 2015 годя я заканчиваю вести твиттер Backend Secret. Возможно, неделя получилась несколько малоактивной - изнь вносила свои коррективы. Тем не менее, мне очень понравилось общаться со всем вами. Я решил сделать темой недели разработку API и несколько разбавить разговоры о темах, связанных с Девопсом.

Для начала я поделился отличным видео от Dan Gebhardt об эволюции REST API. Я считаю, что это - одно из лучших видео по теме.

Ден - один из соавторов спецификации json-api - сегодня это стандарт де факто для REST API и я надеюсь, что вслед за Rails, Node, Python, PHP, Ember и Backbone он придет и на другие платформы.

Затем мы поговорили о том, какие технологии вы бы выбрали сегодня для разработки API-серверов. Больше всего люди рекомендовали Django REST и Ruby on Rails, но упоминались так же и Node, и Go. В целом все согласились, что самым лучшим вариантом будет та технология и платформа, с которой уже знако

addyosmani /
Last active Oct 17, 2019 — forked from 140bytes/LICENSE.txt
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

LeCoupa / nodejs-cheatsheet.js
Last active Oct 17, 2019
Complete Node.js CheatSheet --> UPDATED VERSION -->
View nodejs-cheatsheet.js
/* *******************************************************************************************
* ******************************************************************************************* */
// 0. Synopsis.
kumarn33 /
Last active Jul 29, 2018
Server setup script
# This script has to be run as a root user
echo "* Updating system"
apt-get update
apt-get -y upgrade
echo "* Installing packages"
apt-get -y install build-essential libmagickcore-dev imagemagick libmagickwand-dev libxml2-dev libxslt1-dev git-core nginx redis-server curl nodejs htop
id -u deploy &> /dev/null
if [ $? -ne 0 ]
ardcore / atom-events
Last active Nov 24, 2018 events
View atom-events
jbenet /
Last active Oct 10, 2019
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

mplewis /
Last active Jul 23, 2019
Flask + uWSGI + nginx Primer. I've been having trouble with serving a Flask app via uWSGI and nginx, so I thought I'd put together some of the basics to help out others.

Flask + uWSGI + nginx Primer

I've been having trouble with serving a Flask app via uWSGI and nginx, so I thought I'd put together some of the basics to help out others.

How this shit works

  • Flask is managed by uWSGI.
  • uWSGI talks to nginx.
cobyism /
Last active Oct 19, 2019
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](

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).

You can’t perform that action at this time.