Skip to content

Instantly share code, notes, and snippets.

View sergeyklay's full-sized avatar

Serghei Iakovlev sergeyklay

View GitHub Profile
@tom--
tom-- / Random bytes, ints, UUIDs in PHP.md
Last active November 4, 2024 19:12
PHP random bytes, integers and UUIDs

Random bytes, ints, UUIDs in PHP

Simple and safe random getters to copy-paste

string randomBytes( int $length )

int randomInt ( int $min , int $max )

string randomUuid ( void )
@meatballhat
meatballhat / 00-intro.md
Last active February 25, 2016 23:26
Ubuntu Precise edge opt-in examples

Welcome to our new Ubuntu Precise infrastructure for public repositories

What should I do?

  • If your current .yml file is just using our existing sudo enabled Precise builds, then look here.
  • If you're using a simple os: matrix, then look here
  • If you're currently using our containerized Precise builds but would like to try the new virtualized platform, then look here
  • If you're using a more complex matrix:, look here

You can also review the files below for some additional details on the build routing but the items outlined above should get you going.

@ctechols
ctechols / compinit.zsh
Last active June 14, 2025 03:54
Speed up zsh compinit by only checking cache once a day.
# On slow systems, checking the cached .zcompdump file to see if it must be
# regenerated adds a noticable delay to zsh startup. This little hack restricts
# it to once a day. It should be pasted into your own completion file.
#
# The globbing is a little complicated here:
# - '#q' is an explicit glob qualifier that makes globbing work within zsh's [[ ]] construct.
# - 'N' makes the glob pattern evaluate to nothing when it doesn't match (rather than throw a globbing error)
# - '.' matches "regular files"
# - 'mh+24' matches files (or directories or whatever) that are older than 24 hours.
autoload -Uz compinit
@colinvh
colinvh / pep-440-semver.md
Last active February 29, 2024 13:25
440 Semantic

PEP-440-Compatible Semantic Versioning

This document attempts to refine Python's PEP 440 to include the principles of Semantic Versioning.

Specification

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

@PurpleBooth
PurpleBooth / README-Template.md
Last active June 18, 2025 21:40
A template to make good README.md

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.

Prerequisites

@DavertMik
DavertMik / Meetup.md
Last active January 21, 2016 05:25
Codeception Kyiv Meetup

Codeception Kyiv Meetup on July 1st, 20:00 Bierstube Pub. http://lh.com.ua/bierstube.html

Мы проводим первый митап разработчиков и пользователей Codeception. Обсудим новый релиз 2.1, поговорим о том как лучше тестировать PHP проекты и просто пообщаемся.

Встреча будет проходить 1 июля в 20:00 в пабе Бирштубе на Льва Толстого. http://lh.com.ua/bierstube.html Приходите, будем рады увидеть всех кто интересуется темой тестирования в PHP.

спрашивать столик на фамилию Шупило

@edelooff
edelooff / integrity_example.py
Created June 5, 2015 18:44
Catching and handling IntegrityError in SQLAlchemy
import sys
import sqlalchemy as sa
from sqlalchemy.exc import IntegrityError
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
base = declarative_base()
print 'SQLAlchemy version {}'.format(sa.__version__)
@voxxit
voxxit / USING-VAULT.md
Last active July 7, 2022 03:02
Consul + Vault + MySQL = <3
git clone https://gist.github.com/dd6f95398c1bdc9f1038.git vault
cd vault
docker-compose up -d
export VAULT_ADDR=http://192.168.99.100:8200

Initializing a vault:

vault init
@mcandre
mcandre / docker-push-tag-alias.md
Created May 18, 2015 17:22
How to create new tag aliases for docker images
$ docker tag <image>:<original tag> <image>:<alias>
$ docker push <image>:<alias>
@vt0r
vt0r / GnuPG-2.2.md
Last active February 13, 2024 09:03 — forked from mattrude/GnuPG-2.1.md
Build/install instructions for GnuPG 2.2.x on Ubuntu and similar distros (formerly for 2.1.x)

GnuPG 2.2.x Build Instructions

Below are my build instructions for GnuPG 2.2.10, released on August 30th, 2018. These instructions are built for a headless Ubuntu 18.04 LTS server (and have also been tested on Ubuntu 14.04/16.04).

If you prefer, you may use the below install script to install GnuPG 2.2.x by running the following commands:

curl -OL "https://gist.githubusercontent.com/vt0r/a2f8c0bcb1400131ff51/raw/e0d2011d7b89bfe5b83c3f29f21949fb21354dd9/install-gnupg22.sh" && sudo -H bash ./install-gnupg22.sh

Install the needed dependencies