Skip to content

Instantly share code, notes, and snippets.

View akrishnakumar-splunk's full-sized avatar
📄
Going from point A to point B

Aditya Krishnakumar akrishnakumar-splunk

📄
Going from point A to point B
  • Splunk
  • Ahmedabad, Gujarat, India
View GitHub Profile
@matthewpalmer
matthewpalmer / pod.yaml
Last active April 24, 2024 00:00
Example Kubernetes pod for the multi-container sidecar design pattern
# Example YAML configuration for the sidecar pattern.
# It defines a main application container which writes
# the current date to a log file every five seconds.
# The sidecar container is nginx serving that log file.
# (In practice, your sidecar is likely to be a log collection
# container that uploads to external storage.)
# To run:
@bradtraversy
bradtraversy / myscript.sh
Last active May 2, 2024 13:59
Basic Shell Scripting
#! /bin/bash
# ECHO COMMAND
# echo Hello World!
# VARIABLES
# Uppercase by convention
# Letters, numbers, underscores
NAME="Bob"
# echo "My name is $NAME"
@martezr
martezr / centos7ks.cfg
Last active October 11, 2019 23:10
CentOS 7 Kickstart File
#version=RHEL7
# Action
install
cdrom
lang en_US.UTF-8
keyboard us
text
firewall --service=ssh
@brianredbeard
brianredbeard / get_token.md
Last active October 3, 2022 02:18
aws, sts, and bash

About

AWS provides a mechanism for temporarily assuming another role within their API system. While it is not a technically hard process it can be convoluted and hard to understand. This document aims to both make it easier to follow along with as well as give an in depth explanation of some of the underpinnings of the Bourne Again Shell (aka BASH) which can make this easier to utilize on a day to day basis.

Explanation

Below is an overexplained version of the following process:

  1. Using credentials stored in ~/.aws/credentials as a "profile" which are then understood by the AWS command line tools
  2. Using those AWS credentials, temporarily assume a role using the AWS Security Token Service (STS) to get temporary
@barbietunnie
barbietunnie / udemy-courses-download-using-cookies.md
Last active May 5, 2024 04:06
Downloading Udemy videos with youtube-dl

How to download your Udemy course videos using youtube-dl

$ youtube-dl --list-extractors | grep udemy

Steps

  1. Get link to the course to download. e.g. https://www.udemy.com/course-name/
  2. Login into udemy website, save the cookie from chrome using Chrome (Cookie.txt)[1] export extension. Save it to file udemy-cookies.txt
  3. Get the link of the video that you want to download. usually in format. Use the command provided below where you have to replace the {course_link} and {path_to_cookies_file} with respective paths.
$ youtube-dl {course_link} --cookies {path_to_cookies_file}
@SamEureka
SamEureka / splunk-nginx.md
Last active October 30, 2019 17:26
Splunk w/ NGINX SSL Reverse Proxy

Installing Splunk w/NGINX SSL Reverse Proxy

The steps outlined here make many assumptions about both your operating environment and your understanding of the Linux OS and services running on Linux. I am using the current LTS Ubuntu distribution 16.04 running in the cloud on a DigitalOcean Droplet. These steps should work just fine if followed closely and in order... but you know sh!& never works out the way you plan in Linux. I offer some troubleshooting advice, Google and Stack are your friends ask them for help.
  1. SSH into your pre-configured server running NGINX SSL Reverse Proxy ssh <username>@<server-url-or-IP> **See guide here

  2. Download Splunk Enterprise using WGET `wget -O splunk-6.5.1-f74036626f0c-linux-2.6-amd64.deb 'https://www.splunk.com/bin/splunk/DownloadActivityServlet?architecture=x86_64&platform=linux&version=6.5.1&product=splunk&filename=splunk-6.5.1-f7

@SamEureka
SamEureka / nginx-ssl-proxy.md
Last active August 12, 2021 22:43
NGINX SSL Reverse Proxy, w/ fail2ban, letsencrypt, and iptables-persistent

Installing NGINX SSL Reverse Proxy, w/ fail2ban, letsencrypt, and iptables-persistent.

The steps outlined here make many assumptions about both your operating environment and your understanding of the Linux OS and services running on Linux. I am using the current LTS Ubuntu distribution 16.04 running in the cloud on a DigitalOcean Droplet. These steps should work just fine if followed closely and in order... but you know sh!& never works out the way you plan in Linux. I offer some troubleshooting advice, Google and Stack are your friends ask them for help.
(Entered on your local workstation)
  1. ssh-add <path-to-ssh-key> and enter key passphrase when prompted. // ex path... /users/you/.ssh/id_rsa_digital-ocean
  2. ssh root@<server-url-or-IP> // should login without prompting for passphrase
(Entered on your remote server)
  1. adduser and follow prompts
@chrismytton
chrismytton / yaml2json.sh
Created October 19, 2016 15:32
Shell function to convert YAML to JSON
yaml2json () {
ruby -r yaml -r json -e 'puts YAML.load($stdin.read).to_json'
}
@mpneuried
mpneuried / Makefile
Last active May 4, 2024 13:46
Simple Makefile to build, run, tag and publish a docker containier to AWS-ECR
# import config.
# You can change the default config with `make cnf="config_special.env" build`
cnf ?= config.env
include $(cnf)
export $(shell sed 's/=.*//' $(cnf))
# import deploy config
# You can change the default deploy config with `make cnf="deploy_special.env" release`
dpl ?= deploy.env
include $(dpl)
@leonardofed
leonardofed / README.md
Last active May 3, 2024 01:24
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.