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
sergeyklay / tasks.json
Last active Oct 15, 2019
VSCode task for build && test Zephir extension ("bug.so")
View tasks.json
{
"version": "2.0.0",
"tasks": [
{
"label": "Full clean",
"group": "build",
"type": "shell",
"command": "zephir",
"args": [
"fullclean"
@sergeyklay
sergeyklay / c_cpp_properties.json
Last active Oct 4, 2019
c_cpp_properties.json for PHP-extension. This JSON file adds support of Zend/PHP API in VSCode.
View c_cpp_properties.json
{
"version": 4,
"env": {
"macOsGccPath": "/usr/local/bin/gcc-8",
"linuxGccPath": "/usr/bin/gcc",
"defaultClangPath": "/usr/bin/clang",
"phpSrcPath": "~/src/php/source/7.3.9",
"defaultIncludePath": [
"${workspaceFolder}",
"${workspaceFolder}/ext"
@sergeyklay
sergeyklay / minikube-vokuro.md
Last active Sep 13, 2019
Running Vökuró on Minikube (Kubernetes)
View minikube-vokuro.md

Running Vökuró on Minikube (Kubernetes)

Getting Started

Prepare project

git clone git@github.com:phalcon/vokuro.git
git checkout 4.0.x
composer install
View bash.generate.random.alphanumeric.string.sh
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1
@sergeyklay
sergeyklay / template.service
Created Jul 14, 2019 — forked from chrj/template.service
Sample service unit file for systemd
View template.service
[Unit]
Description=My service
[Service]
ExecStart=/usr/local/bin/my-service \
-argument value \
-otherargument othervalue
# Setuid/Setgid
User=nobody
@sergeyklay
sergeyklay / journalctl-cheatsheet.md
Last active Oct 15, 2019
Journalctl Cheat Sheet
View journalctl-cheatsheet.md

Journalctl Cheat Sheet

Configuration

Permissions

To see messages from other users and the system as well as performing various log operations from a regular user add it to the group:

sudo usermod -aG systemd-journal $USER
@sergeyklay
sergeyklay / version-compare.clj
Created Jun 22, 2019
Simple version compare using clojure
View version-compare.clj
(defn- normalize-verison
[version]
(let [[x y z] (map read-string (clojure.string/split version #"\."))
z (or z 0)]
(+ (* x 10000) (* y 100) z)))
(defn version-compare
[a b]
(let [left (normalize-verison a)
right (normalize-verison b)]
@sergeyklay
sergeyklay / telnet-imap
Last active May 30, 2019
Playing with Gmail via Telnet
View telnet-imap
$ telnet-ssl -z ssl imap.gmail.com 993
Trying 173.194.222.109...
Connected to gmail-imap.l.google.com.
Escape character is '^]'.
* OK Gimap ready for requests from 193.201.216.169 z8mb75199760ljk
a1 LOGIN xxxxxxxx@gmail.com my-password-here
* CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA ID XLIST CHILDREN X-GM-EXT-1 UIDPLUS COMPRESS=DEFLATE ENABLE MOVE CONDSTORE ESEARCH UTF8=ACCEPT LIST-EXTENDED LIST-STATUS LITERAL- SPECIAL-USE APPENDLIMIT=35651584
a1 OK xxxxxxxx@gmail.com authenticated (Success)
a2 LIST "" "*"
* LIST (\HasNoChildren) "/" "INBOX"
View keybase.md

Keybase proof

I hereby claim:

  • I am sergeyklay on github.
  • I am klay (https://keybase.io/klay) on keybase.
  • I have a public key whose fingerprint is EDAC 8D91 F82C 0BBD 261C 1329 1E0B 5331 219B EA88

To claim this, I am signing this object:

View http-client-example.go
package main
import (
"fmt"
"golang.org/x/net/context"
cc "golang.org/x/oauth2/clientcredentials"
"io/ioutil"
"net/http"
"os"
)
You can’t perform that action at this time.