Skip to content

Instantly share code, notes, and snippets.

View igrybkov's full-sized avatar

Illia Grybkov igrybkov

View GitHub Profile
@igrybkov
igrybkov / pre-commit
Created July 30, 2016 22:29 — forked from tmaiaroto/pre-commit
A Go Commit Hook for Less Future Headaches
#!/bin/bash
#
# Check a "few" things to help write more maintainable Go code.
#
# OK, it's fairly comprehensive. So simply remove or comment out
# anything you don't want.
#
# Don't forget to install (go get) each of these tools.
# More info at the URLs provided.
#
@igrybkov
igrybkov / create-swapfile-ondigital-ocean.sh
Last active May 17, 2016 15:20 — forked from moviendome/create-swapfile-ondigital-ocean.sh
Create Swap File on a Digital Ocean Ubuntu 14.04 droplet
sudo fallocate -l 6G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
swapon -s
free -m
@igrybkov
igrybkov / README.md
Created February 3, 2016 21:27 — forked from chadrien/README.md
Debug PHP in Docker with PHPStorm and Xdebug

Debug your PHP in Docker with Intellij/PHPStorm and Xdebug

  1. For your local dev, create a Dockerfile that is based on your production image and simply install xdebug into it. Exemple:
FROM php:5

RUN yes | pecl install xdebug \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \