Skip to content

Instantly share code, notes, and snippets.

Dmitry Vapelnik dvapelnik

Block or report user

Report or block dvapelnik

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
dvapelnik / .bashrc
Created Jun 13, 2017 — forked from vsouza/.bashrc
Golang 1.5 setup in Mac OSX with HomeBrew. Set `GOPATH` and `GOROOT` variables in zshell or bash.
View .bashrc
# Set variables in .bashrc file
# don't forget to change your path correctly!
export GOPATH=$HOME/golang
export GOROOT=/usr/local/opt/go/libexec
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin
dvapelnik / Symfony2 GraphvizDumper demo
Created Dec 26, 2016 — forked from fgm/Symfony2 GraphvizDumper demo
Demonstrate how to use the GraphViz Dumper in a Symfony 2.4 project.
View Symfony2 GraphvizDumper demo
* @file
* gvdump.php
* @author: Frédéric G. MARAND <>
* @copyright (c) 2014 Ouest Systèmes Informatiques (OSInet).
* @license MIT
yum -y groupinstall "Development Tools"
rpm -Uvh epel-release-5*.rpm
rpm -Uvh remi-release-5*.rpm
yum -y install python-devel screen
yum --enablerepo=remi install libcurl-devel -y
mkdir /opt/miner
cd /opt/miner
dvapelnik / .gitconfig
Created Oct 31, 2016
Pretty git branch graphs
View .gitconfig
# Look
lg1 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all
lg = !"git lg1"
dvapelnik /
Created Oct 27, 2016 — forked from kelvinn/
Example of using Apache Bench (ab) to POST JSON to an API
# post_loc.txt contains the json you want to post
# -p means to POST it
# -H adds an Auth header (could be Basic or Token)
# -T sets the Content-Type
# -c is concurrent clients
# -n is the number of requests to run in the test
ab -p post_loc.txt -T application/json -H 'Authorization: Token abcd1234' -c 10 -n 2000
dvapelnik / ogp.html
Created Oct 25, 2016
OpenGraph Protocol by @maggg
View ogp.html
<!-- Для Фейсбука, Вконтакта, Одноклассников и Гуглплюса -->
<meta property="og:type" content="website">
<meta property="og:site_name" content="Название сайта">
<meta property="og:title" content="Заголовок">
<meta property="og:description" content="Описание.">
<meta property="og:url" content="">
<meta property="og:locale" content="ru_RU">
<meta property="og:image" content="">
<meta property="og:image:width" content="968">
<meta property="og:image:height" content="504">
View y-factorial.php
// Source:
function Y($F)
$func = function ($f) {
return $f($f);
return $func(
function ($f) use ($F) {
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:


start new with session name:

tmux new -s myname
dvapelnik /
Created Dec 20, 2015 — forked from kevinSuttle/
List of Usable HTML Meta and Link Tags

Copied from

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
dvapelnik /
Created Jul 5, 2015
make file container with some filesystem
# Make file container with 100Gb size
dd if=/dev/zero of=container.ext4 bs=1M count=102400
# Format with ext4 fs
mkfs ext4 -F container.ext4
# Make mount-directory
sudo mkdir -p /mnt/container_dir
You can’t perform that action at this time.