Skip to content

Instantly share code, notes, and snippets.

View pprishchepa's full-sized avatar

Pavel Prishchepa pprishchepa

View GitHub Profile
@pprishchepa
pprishchepa / Jenkinsfile
Created July 18, 2018 09:33 — forked from merikan/Jenkinsfile
Some Jenkinsfile examples
Some Jenkinsfile examples
@pprishchepa
pprishchepa / tmux.conf
Created April 18, 2018 07:44 — forked from spicycode/tmux.conf
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@pprishchepa
pprishchepa / sshtunnel.go
Created February 12, 2018 06:22 — forked from iamralch/sshtunnel.go
SSH tunnelling in Golang
package main
import (
"log"
"bufio"
"time"
"os"
"fmt"
"io"
"net"
@pprishchepa
pprishchepa / go-ssh-reverse-tunnel.go
Created February 12, 2018 06:22 — forked from codref/go-ssh-reverse-tunnel.go
Go SSH reverse tunnel implementation (SSH -R)
/*
Go-Language implementation of an SSH Reverse Tunnel, the equivalent of below SSH command:
ssh -R 8080:127.0.0.1:8080 operatore@146.148.22.123
which opens a tunnel between the two endpoints and permit to exchange information on this direction:
server:8080 -----> client:8080
@pprishchepa
pprishchepa / go-ssh-reverse-tunnel.go
Created February 12, 2018 06:22 — forked from codref/go-ssh-reverse-tunnel.go
Go SSH reverse tunnel implementation (SSH -R)
/*
Go-Language implementation of an SSH Reverse Tunnel, the equivalent of below SSH command:
ssh -R 8080:127.0.0.1:8080 operatore@146.148.22.123
which opens a tunnel between the two endpoints and permit to exchange information on this direction:
server:8080 -----> client:8080
@pprishchepa
pprishchepa / docker-compose-v3.yml
Created June 13, 2017 12:41 — forked from seeruk/docker-compose-v3.yml
Concourse CI working with Docker Compose V3 syntax.
version: "3"
services:
concourse-db:
image: postgres:9.5
environment:
- POSTGRES_DB=concourse
- POSTGRES_USER=concourse
- POSTGRES_PASSWORD=changeme
- PGDATA=/database
@pprishchepa
pprishchepa / docker-compose-v3.yml
Created June 13, 2017 12:41 — forked from seeruk/docker-compose-v3.yml
Concourse CI working with Docker Compose V3 syntax.
version: "3"
services:
concourse-db:
image: postgres:9.5
environment:
- POSTGRES_DB=concourse
- POSTGRES_USER=concourse
- POSTGRES_PASSWORD=changeme
- PGDATA=/database
@pprishchepa
pprishchepa / nginx.conf
Created November 28, 2016 13:55 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@pprishchepa
pprishchepa / countContainers.sh
Created November 28, 2016 13:54 — forked from ggtools/countContainers.sh
A simple script to count the containers on a Docker host.
#!/bin/bash
function countContainers() {
docker ps -q $1 | wc -l
}
function countCrashedContainers() {
docker ps -a | grep -v -F 'Exited (0)' | grep -c -F 'Exited ('
}