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
romainl / vanilla-linter.md
Last active Aug 7, 2019
Linting your code, the vanilla way
View vanilla-linter.md

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
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 }
)
end
def follow(data)
stop_all_streams
@listochkin
listochkin / backend-secret.md
Last active Feb 1, 2019
Andrey Listochkin as Backend Secret
View backend-secret.md

Привет всем!

Сегодня 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
addyosmani / README.md
Last active Aug 12, 2019 — forked from 140bytes/LICENSE.txt
108 byte CSS Layout Debugger
View README.md

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
LeCoupa / nodejs-cheatsheet.js
Last active Aug 20, 2019
Complete Node.js CheatSheet --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
View nodejs-cheatsheet.js
/* *******************************************************************************************
* THE UPDATED VERSION IS AVAILABLE AT
* https://github.com/LeCoupa/awesome-cheatsheets
* ******************************************************************************************* */
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
@kumarn33
kumarn33 / server_setup.sh
Last active Jul 29, 2018
Server setup script
View server_setup.sh
# 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
ardcore / atom-events
Last active Nov 24, 2018
atom.io events
View atom-events
application:open-your-keymap
application:open-your-stylesheet
autocomplete:attach
autoflow:reflow-paragraph
bookmarks:clear-bookmarks
bookmarks:jump-to-next-bookmark
bookmarks:jump-to-previous-bookmark
bookmarks:toggle-bookmark
bookmarks:view-all
check:correct-misspelling
@jbenet
jbenet / simple-git-branching-model.md
Last active Aug 20, 2019
a simple git branching model
View simple-git-branching-model.md

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
mplewis / flask-uwsgi-nginx-primer.md
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.
View flask-uwsgi-nginx-primer.md

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
cobyism / gh-pages-deploy.md
Last active Aug 20, 2019
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).
View gh-pages-deploy.md

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.