Skip to content

Instantly share code, notes, and snippets.

View roustem's full-sized avatar

Roustem Karimov roustem

View GitHub Profile
package main
import (
"sync/atomic"
"testing"
)
var id uint64
const chanLength = 100
@roustem
roustem / .gitlab-ci.yml
Created September 29, 2018 18:28 — forked from qoomon/.gitlab-ci.yml
GitLab CI - build and push docker image to GitLab registry
stages:
- pack
### Pack ######################################################################
docker:
stage: pack
environment: production
image: docker:18
script:
[ -z "$PS1" ] && return
#
alias ea='vi ~/.bash_aliases; . ~/.bash_aliases'
alias reload='source ~/.bashrc'
alias ll='ls -al'
alias l='ls -l'
function cd {
@roustem
roustem / openssl.md
Created July 29, 2018 17:56 — forked from NoMan2000/openssl.md
Common OpenSSL Commands with Keys and Certificates

Common OpenSSL Commands with Keys and Certificates

SSL Info

Generate RSA private key with certificate in a single command

openssl req -x509 -newkey rsa:4096 -sha256 -keyout example.key -out example.crt -subj "/CN=example.com" -days 3650 -passout pass:foobar

Generate Certificate Signing Request (CSR) from private key with passphrase

openssl x509 -x509toreq -in example.crt -out example.csr -signkey example.key -passin pass:foobar

Day 0: Advanced Kubernetes Bootcamp

Stackdriver

  • Not just the log collection. It now does monitoring, debugging, tracing, and error reporting
  • 4 golden signals: latency, traffic, saturation, errors
  • Metrics collection with https://opencensus.io/
  • Anomaly detection
  • Metrics dashboard
  • Alerts
@roustem
roustem / Install PIP to user site on macOS.md
Created July 6, 2018 21:28 — forked from haircut/Install PIP to user site on macOS.md
How to install and use pip without sudo or admin on macOS

Install and use pip on macOS without sudo / admin access

Most recently tested on macOS Sierra (10.12.6)

  1. Download the installation script; curl https://bootstrap.pypa.io/get-pip.py -o ~/Downloads/get-pip.py
  2. Run the installation, appending the --user flag; python ~/Downloads/get-pip.py --user. pip will be installed to ~/Library/Python/2.7/bin/pip
  3. Make sure ~/Library/Python/2.7/bin is in your $PATH. For bash users, edit the PATH= line in ~/.bashrc to append the local Python path; ie. PATH=$PATH:~/Library/Python/2.7/bin. Apply the changes, source ~/.bashrc.
  4. Use pip! Remember to append --user when installing modules; ie. pip install <package_name> --user

Note

@roustem
roustem / cltools.sh
Created April 28, 2018 18:09 — forked from justinbellamy/cltools.sh
Install Autoconf and Automake on OS X El Capitan
#!/bin/sh
##
# Install autoconf, automake and libtool smoothly on Mac OS X.
# Newer versions of these libraries are available and may work better on OS X
#
# This script is originally from http://jsdelfino.blogspot.com.au/2012/08/autoconf-and-automake-on-mac-os-x.html
#
export build=~/devtools # or wherever you'd like to build
data "aws_ami" "bastion_ami" {
most_recent = true
filter {
name = "architecture"
values = ["x86_64"]
}
filter {
name = "name"
values = ["bastion-*"]
#
# Terraform code changes
#
# variable "instance_type" {
# type = "string"
# - default = "t2.medium"
# + default = "t2.large"
# }
resource "aws_subnet" "b5app" {
count = "${length(var.subnet_cidr["b5app"])}"
vpc_id = "${aws_vpc.b5.id}"
cidr_block = "${element(var.subnet_cidr["b5app"],count.index)}"
availability_zone = "${var.az[count.index]}"
tags {
Application = "B5"
env = "${var.env}"
type = "${var.type}"