Skip to content

Instantly share code, notes, and snippets.

View Atadzhan's full-sized avatar

Atadzhan K Atadzhan

  • Belgrad, Serbia
View GitHub Profile
@Atadzhan
Atadzhan / cognito.yaml
Created June 28, 2022 07:30 — forked from singledigit/cognito.yaml
Create a Cognito Authentication Backend via CloudFormation
AWSTemplateFormatVersion: '2010-09-09'
Description: Cognito Stack
Parameters:
AuthName:
Type: String
Description: Unique Auth Name for Cognito Resources
Resources:
# Creates a role that allows Cognito to send SNS messages
SNSRole:
@Atadzhan
Atadzhan / ci_jobs.groovy
Created June 23, 2022 09:34 — forked from tknerr/ci_jobs.groovy
Example JobDSL for a multibranchPipelineJob which keeps only the last 10 builds
// define the bitbucket project + repos we want to build
def bitbucket_project = 'myproj'
def bitbucket_repos = ['myrepo1', 'myrepo2']
// create a pipeline job for each of the repos and for each feature branch.
for (bitbucket_repo in bitbucket_repos)
{
multibranchPipelineJob("${bitbucket_repo}-ci") {
// configure the branch / PR sources
branchSources {
@Atadzhan
Atadzhan / delete-evicted-pods-all-namespaces.sh
Created June 16, 2022 12:08 — forked from svx/delete-evicted-pods-all-namespaces.sh
Delete evicted pods from all namespaces (also ImagePullBackOff and ErrImagePull)
#!/bin/sh
# based on https://gist.github.com/ipedrazas/9c622404fb41f2343a0db85b3821275d
# delete all evicted pods from all namespaces
kubectl get pods --all-namespaces | grep Evicted | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod
# delete all containers in ImagePullBackOff state from all namespaces
kubectl get pods --all-namespaces | grep 'ImagePullBackOff' | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod
# delete all containers in ImagePullBackOff or ErrImagePull or Evicted state from all namespaces
@Atadzhan
Atadzhan / create_static_site.MD
Created June 15, 2022 07:17 — forked from p10rahulm/create_static_site.MD
Create Static Site using Godaddy and Google Cloud Storage in 15 minutes

Steps to create a static Site using Godaddy and Google Cloud Storage

Create a static html site

  • Can use this boilerplate to modify: http://www.initializr.com/
  • Make all your subpages and make sure to link them
  • Check your index.html works
export PROJECT=$(gcloud config get-value project)
export PROJECT_1=${PROJECT}
export LOCATION_1=us-west1-a
export CLUSTER_1=cluster1
export CTX_1="gke_${PROJECT_1}_${LOCATION_1}_${CLUSTER_1}"
export PROJECT_2=${PROJECT}
export LOCATION_2=us-central1-a
export CLUSTER_2=cluster2
export CTX_2="gke_${PROJECT_2}_${LOCATION_2}_${CLUSTER_2}"
@Atadzhan
Atadzhan / Jenkinsfile
Created March 10, 2022 08:15 — forked from merikan/Jenkinsfile
Some Jenkinsfile examples
Some Jenkinsfile examples
pipeline {
  agent any
     environment {
        AWS_REGION  = 'eu-west-1'
        GITCOMMIT="${env.GIT_COMMIT}"


    }
 //  options { 
@Atadzhan
Atadzhan / Python3 Virtualenv Setup.md
Created January 27, 2022 06:45 — forked from pandafulmanda/Python3 Virtualenv Setup.md
Setting up and using Python3 Virtualenv on Mac

Python3 Virtualenv Setup

Requirements
  • Python 3
  • Pip 3
$ brew install python3