Skip to content

Instantly share code, notes, and snippets.

View okram999's full-sized avatar

Niris Okram okram999

View GitHub Profile
@okram999
okram999 / get-config.groovy
Last active April 12, 2019 04:57
Get Config
//This pipeline script will perform sf:retrive, checkin code to vcs & create a PR automatically
//excuse my indentations - this was written in a hurry
/*
Author: Niristotle Okram
*/
import groovy.json.JsonSlurperClassic
import groovy.json.*
node('master') {
@okram999
okram999 / DR_system_readiness.md
Created March 23, 2019 02:14
DR_system_readiness

Pilot Lite setup

  1. RDS replication
  2. s3 bucket replication (Inter Region access need to set up)
  3. Credentials from the systems manager (Inter Region set up)
@okram999
okram999 / DR_system_readiness.md
Created March 23, 2019 02:14
DR_system_readiness

Pilot Lite setup

  1. RDS replication
  2. s3 bucket replication (Inter Region access need to set up)
  3. Credentials from the systems manager (Inter Region set up)
@okram999
okram999 / Azure Fundamentals.md
Last active March 5, 2019 14:56
Azure Fundamentals

Redundancy and Resileince

  1. Regions
  2. AZ
  3. Zones (billing purposes, group of regions)

Storage:

  1. Files
  2. Blob
  • Premium, Hot, Cold, Archieve
@okram999
okram999 / 0Auth2.PNG
Last active February 26, 2019 21:12
OAuth2
0Auth2.PNG
@okram999
okram999 / create-readonly-postgres.md
Created February 25, 2019 17:25
create-readonly-postgres

CREATE USER automation_ro WITH PASSWORD '{~q9%[,ZLu$w';

@okram999
okram999 / logs.txt
Created February 20, 2019 19:23
logs.txt
PS C:\Users\nokram> Invoke-Command -ComputerName 10.181.140.188 -ScriptBlock { Get-ChildItem C:\ } -credential Administrator
[10.181.140.188] Connecting to remote server 10.181.140.188 failed with the following error message : The WinRM client cannot process the request. Default authentication may be used with an IP address under the following
conditions: the transport is HTTPS or the destination is in the TrustedHosts list, and explicit credentials are provided. Use winrm.cmd to configure TrustedHosts. Note that computers in the TrustedHosts list might not be
authenticated. For more information on how to set TrustedHosts run the following command: winrm help config. For more information, see the about_Remote_Troubleshooting Help topic.
+ CategoryInfo : OpenError: (10.181.140.188:String) [], PSRemotingTransportException
+ FullyQualifiedErrorId : CannotUseIPAddress,PSSessionStateBroken
@okram999
okram999 / CFT-hostedZones.md
Last active February 19, 2019 22:08
CFT-hostedZones
####################################################################################
#Setting up the internal hostedzone and the recordset
  avabackendhostedzone: 
    Type: "AWS::Route53::HostedZone"
    Properties: 
      HostedZoneConfig: 
        Comment: "Hosted zone for devtest env"
      Name: "be-devtest.xyz.com"
      VPCs: 
@okram999
okram999 / nginx-ssl.md
Created February 15, 2019 21:28
enable ssl with nginx docker
@okram999
okram999 / lamda-pushES-patternMatching.js
Created February 13, 2019 14:34
A node.js lambda to push cw logs to ES and also perform pattern matching in logs with notifications
// v1.1.2
var https = require('https');
var zlib = require('zlib');
var crypto = require('crypto');
//Adding the sns module to send email
var AWS = require('aws-sdk');
var endpoint = 'xxxxxxxxxxx.us-east-1.es.amazonaws.com';
exports.handler = function(input, context) {