Skip to content

Instantly share code, notes, and snippets.

View nirbhabbarat's full-sized avatar
🎯
Focusing

Nirbhab Barat nirbhabbarat

🎯
Focusing
  • Gurgaon
View GitHub Profile
@nirbhabbarat
nirbhabbarat / php7.4-fpm-alpine
Created November 1, 2020 10:07 — forked from jpswade/php7.4-fpm-alpine
PHP 7.4 PHP-FPM Alpine with core extensions gd
FROM php:7.4-fpm-alpine
# @see https://hub.docker.com/r/jpswade/php7.4-fpm-alpine
MAINTAINER Agent Software <dev@agentsoftware.net>
# Install gd, iconv, mbstring, mysql, soap, sockets, zip, and zlib extensions
# see example at https://hub.docker.com/_/php/
RUN apk add --update \
$PHPIZE_DEPS \
freetype-dev \
git \
@nirbhabbarat
nirbhabbarat / json2csv.php
Created November 1, 2020 10:07 — forked from jpswade/json2csv.php
convert from a multi-dimensional json object to a flat csv table
<?php
/**
* @param string $jsonFilename
* @param string $csvFilename
* @return bool|int
*/
function json2csv($jsonFilename, $csvFilename)
{
$json = file_get_contents($jsonFilename);
FROM php:7.3-apache
MAINTAINER James Wade <jpswade@gmail.com>
# Install gd, iconv, mbstring, mcrypt, mysql, soap, sockets, zip, and zlib extensions
# see example at https://hub.docker.com/_/php/
RUN apt-get update && apt-get install -y \
libbz2-dev \
libfreetype6-dev \
libgd-dev \
libjpeg62-turbo-dev \
@nirbhabbarat
nirbhabbarat / setup_selenium.sh
Created November 1, 2020 10:08 — forked from jpswade/setup_selenium.sh
Setup Selenium
brew install selenium-server-standalone
brew cask install chromedriver
selenium-server -p 4444
#!/usr/bin/env bash
set -e
VERSION_INGRESS=0.13.0
[[ -d ~/Sites/ingress-nginx ]] || git clone git@github.com:kubernetes/ingress-nginx.git ~/Sites/ingress-nginx
cd ~/Sites/ingress-nginx
sh test/e2e/wait-for-nginx.sh || echo "ERROR: This will attempt to deploy a newer version, which does not work..."
kubectl set image \
deployments \
--namespace ingress-nginx \
--selector app=ingress-nginx \
@nirbhabbarat
nirbhabbarat / devops_best_practices.md
Created November 1, 2020 10:09 — forked from jpswade/devops_best_practices.md
Devops Best Practices Checklist

Find the original here article here: Devops Best Practices

DevOps started out as "Agile Systems Administration". In 2008, Andrew Shafer did a talk called "Agile Infrastucture" addressing issues around involving more of the company in the same disciplines as programmers.

In 2009, Patrick Debois created "DevOpsDays" conference to help to bring it to light. However, it wouldn't begin to trend until about 2010, when people would begin to describe it as a standalone discipline.

Today, DevOps goes beyond just developers, systems administration and infrastructure, its about [dev, ops, agile, cloud

@nirbhabbarat
nirbhabbarat / getS3BucketSize.py
Created November 4, 2020 16:51 — forked from joehack3r/getS3BucketSize.py
Example Python for get S3 Bucket Size
#!/usr/bin/env python
# This is how I used to write Python scripts. I'm trying to improve:
# https://github.com/joehack3r/aws/blob/master/scripts/s3/getS3BucketSize.py
import argparse
import boto
# Arguments
parser = argparse.ArgumentParser(description='Calcualte S3 bucket size in GB')