Skip to content

Instantly share code, notes, and snippets.

View zot24's full-sized avatar
🦑
boom!

zot24

🦑
boom!
View GitHub Profile
@zot24
zot24 / kubectl.md
Created January 9, 2019 20:50 — forked from so0k/kubectl.md
Playing with kubectl output

Kubectl output options

Let's look at some basic kubectl output options.

Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).

We can start with:

kubectl get no
@zot24
zot24 / gist:bd5223c16eefb8145ecaaa2120009ea7
Created February 18, 2018 11:43 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@zot24
zot24 / s3.tf
Created August 9, 2017 13:18 — forked from onnimonni/s3.tf
s3 replicated bucket with terraform
# Create all variables used in this Terraform run
variable "aws_access_key" {}
variable "aws_access_secret_key" {}
variable "aws_bucket_name" {}
variable "aws_region_main" {
default = "eu-west-1"
}
variable "aws_region_replica" {
default = "eu-central-1"
}
@zot24
zot24 / README-Template.md
Created June 1, 2017 23:37 — forked from PurpleBooth/README-Template.md
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

@zot24
zot24 / configure_proxy_protocol.md
Created June 1, 2017 21:19 — forked from pablitoc/configure_proxy_protocol.md
Configuring Proxy Protocol

##Install AWS CLI Tools##

  1. Install AWS CLI Tools. You can also use the EC2 API Tool if you are more comfortable with them. But this write-up uses the EC2 CLI.
  2. Create a user via Amazon IAM or download the security accessID and securitykey you will need it to query Amazon CLI.
  3. using Terminal cd into .aws directory cd ~/.aws edit or create new file named config paste the following contents inside.
    `[default]`
    `aws_access_key_id = ACCESS_ID`
    `aws_secret_access_key = SECRET_ID`
    `output = json OR bson OR text`
    `region = PREFERRED_AWS_REGION`

Save the file as "config"

@zot24
zot24 / Jenkinsfile
Created May 2, 2017 19:16 — forked from amaksoft/Jenkinsfile
My example Jenkins Pipeline setup for Android app project
#!/usr/bin/groovy
/*
* Copyright (c) 2016, Andrey Makeev <amaksoft@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
@zot24
zot24 / Jenkinsfile.groovy
Created May 2, 2017 18:30 — forked from frekele/Jenkinsfile.groovy
Jenkinsfile to tag the sources used by current build
node {
repositoryAccess = 'https://'
repositoryAccessSeparator = '/'
echo "repository host: ${repositoryHost}" // github.com
echo "repository path: ${repositoryPath}" // <user>/<repository>.git
echo "repository jenkins credentials id: ${credentialsId}" // jenkins credentials for the jenkins git account who have commit access
echo "repository branch: ${branch}" // master or another branch
echo "repository commiter username: ${repositoryCommiterUsername}" // Jenkins account email
echo "repository commiter name: ${repositoryCommiterEmail}" // Jenkins
@zot24
zot24 / git-extract-file.markdown
Created April 19, 2017 11:02 — forked from ssp/git-extract-file.markdown
Extract a single file from a git repository

How to extract a single file with its history from a git repository

These steps show two less common interactions with git to extract a single file which is inside a subfolder from a git repository. These steps essentially reduce the repository to just the desired files and should performed on a copy of the original repository (1.).

First the repository is reduced to just the subfolder containing the files in question using git filter-branch --subdirectory-filter (2.) which is a useful step by itself if just a subfolder needs to be extracted. This step moves the desired files to the top level of the repository.

Finally all remaining files are listed using git ls, the files to keep are removed from that using grep -v and the resulting list is passed to git rm which is invoked by git filter-branch --index-filter (3.). A bit convoluted but it does the trick.

1. copy the repository to extract the file from and go to the desired branch

@zot24
zot24 / jenkins_haproxy_config.cfg
Created September 15, 2016 14:10 — forked from xelwarto/jenkins_haproxy_config.cfg
Jenkins CI haproxy configuration example
global
chroot /var/lib/haproxy
crt-base /etc/pki/tls/certs
daemon
group haproxy
log 127.0.0.1 local0
maxconn 2000
pidfile /var/run/haproxy.pid
stats socket /var/lib/haproxy/stats
tune.ssl.default-dh-param 2048
@zot24
zot24 / install.sh
Created March 22, 2016 14:25 — forked from solar/install.sh
install memcached from source with supervisord
#!/bin/sh
version="1.4.15"
priority="10415"
libevent="/usr/local/libevent/2.0.20-stable/"
supervisordir="/etc/supervisord.d"
# create user
sudo groupadd memcached
sudo useradd -r -g memcached -s /sbin/nologin -M -d /var/run/memcached memcached