Skip to content

Instantly share code, notes, and snippets.

Serghei Iakovlev sergeyklay

Block or report user

Report or block sergeyklay

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
sergeyklay /
Created Aug 21, 2018
# System configuration for the beanstalkd daemon
# Available options correspond to the options to the
# beanstalkd commandline.
# Job size is left to the default. Uncomment and set it
sergeyklay /
Last active Aug 21, 2018
# beanstalkd - a simple, fast workqueue service
# chkconfig: - 57 47
# description: a simple, fast workqueue service
# processname: beanstalkd
# config: /etc/sysconfig/beanstalkd
sergeyklay /
Created Apr 25, 2018 — forked from PurpleBooth/
A template to make good

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.


sergeyklay /
Last active Jul 14, 2019 — forked from chrisroos/
Instructions for exporting/importing (backup/restore) GPG keys

GPG: Import and export instructions

Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.

Method 1

Backup the public and secret keyrings and trust database

cp ~/.gnupg/pubring.gpg /path/to/backups/
cp ~/.gnupg/secring.gpg /path/to/backups/
sergeyklay / nginx.conf
Created Dec 2, 2017 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here
View nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
sergeyklay /
Last active Aug 10, 2019
Multiple PHP versions using phpenv and php-build

Multiple PHP versions using phpenv and php-build

Setting up environment variables

Create $HOME/.php_build_configure_opts file with the following contents:

--enable-debug --with-gettext --disable-fpm
sergeyklay / CMakeLists.txt
Last active Aug 11, 2019
CMakeLists.txt for PHP-extension
View CMakeLists.txt
cmake_minimum_required(VERSION 3.6)
project(extname C)
message("Begin cmaking of PHP extension ...")
# -std=gnu99
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ggdb -O0 -Wall -std=gnu99 -fvisibility=hidden")

Sed Cheat Sheet

Sed command line options

sed [options] sed-command [input-file]
Option Description Example

Here's how to test whether a parameter is unset, or empty ("Null") or set with a value:

|                    |       parameter      |     parameter   |    parameter    |
|                    |   Set and Not Null   |   Set But Null  |      Unset      |
| ${parameter:-word} | substitute parameter | substitute word | substitute word |
| ${parameter-word}  | substitute parameter | substitute null | substitute word |
| ${parameter:=word} | substitute parameter | assign word     | assign word     |
| ${parameter=word}  | substitute parameter | substitute null | assign word     |
sergeyklay /
Last active Aug 10, 2018
Install Nginx with Nchan
#!/usr/bin/env bash
# Works fine on Ubuntu 14.0.4 LTS
You can’t perform that action at this time.