Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Mohan Balasundaram tuxfight3r

🏠
Working from home
View GitHub Profile
@tuxfight3r
tuxfight3r / aws-eks-lab.sh
Created Apr 14, 2019 — forked from mtulio/aws-eks-lab.sh
Basic EKS lab to setup an new cluster
View aws-eks-lab.sh
#!/bin/bash
# Basic EKS client Setup and management
# Doc: https://docs.aws.amazon.com/eks/latest/userguide/getting-started.html
OS_NAME=linux
OS_ARCH=amd64
OS_DIST=$(cat /etc/os-release |grep ^NAME |awk -F'=' '{print$2}')
KUBECTL_URL=https://amazon-eks.s3-us-west-2.amazonaws.com/1.10.3/2018-07-26/bin/${OS_NAME}/${OS_ARCH}/kubectl
@tuxfight3r
tuxfight3r / kubectl.md
Created Feb 21, 2019 — forked from so0k/kubectl.md
Playing with kubectl output
View kubectl.md

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
@tuxfight3r
tuxfight3r / memory_layout.md
Created Feb 21, 2019 — forked from CMCDragonkai/memory_layout.md
Linux: Understanding the Memory Layout of Linux Executables
View memory_layout.md

Understanding the Memory Layout of Linux Executables

Required tools for playing around with memory:

  • hexdump
  • objdump
  • readelf
  • xxd
  • gcore
@tuxfight3r
tuxfight3r / audit.rules
Created Feb 14, 2019 — forked from Neo23x0/audit.rules
Linux Auditd Best Practice Configuration
View audit.rules
# IMPORTANT!
# This gist has been transformed into a github repo
# You can find the most recent version there:
# https://github.com/Neo23x0/auditd
# ___ ___ __ __
# / | __ ______/ (_) /_____/ /
# / /| |/ / / / __ / / __/ __ /
# / ___ / /_/ / /_/ / / /_/ /_/ /
# /_/ |_\__,_/\__,_/_/\__/\__,_/
@tuxfight3r
tuxfight3r / aws_create_site.yml
Created Jan 30, 2019 — forked from ruzickap/aws_create_site.yml
Ansible playbook which creates instances and tag volumes
View aws_create_site.yml
---
- name: Create Instance in AWS
hosts: localhost
connection: local
gather_facts: false
vars:
aws_access_key: "xxxxxx"
aws_secret_key: "xxxxxx"
security_token: "xxxxxx"
@tuxfight3r
tuxfight3r / vm-resize-hard-disk.md
Created Dec 1, 2018 — forked from christopher-hopper/vm-resize-hard-disk.md
Resize a Hard Disk for a Virtual Machine provisioned using Vagrant from a Linux base box to run using VirutalBox.
View vm-resize-hard-disk.md

Resize a Hard Disk for a Virtual Machine

Our Virtual Machines are provisioned using Vagrant from a Linux base box to run using VirutalBox. If the Hard Disk space runs out and you cannot remove files to free-up space, you can resize the Hard Disk using some VirtualBox and Linux commands.

Some assumptions

The following steps assume you've got a set-up like mine, where:

@tuxfight3r
tuxfight3r / gist:5d05b058a8c5204b9549c6246d431ceb
Last active Jul 20, 2018 — forked from fernandoaleman/gist:5083680
How to update VirtualBox Guest Additions with vagrant
View gist:5d05b058a8c5204b9549c6246d431ceb
# Start the old vagrant
$ vagrant init centos/7
$ vagrant up
$ vagrant ssh
vagrantup:~$ sudo yum -y install wget kernel-devel kernel-headers gcc
vagrantup:~$ sudo yum -y update & reboot
vagrantup:~$ sudo wget -c http://download.virtualbox.org/virtualbox/5.2.12/VBoxGuestAdditions_5.2.12.iso \
-O VBoxGuestAdditions_5.2.12.iso
@tuxfight3r
tuxfight3r / one-liners.md
Created Mar 12, 2018 — forked from KL-7/one-liners.md
Ruby one-liners
View one-liners.md

One-liners

Reverse every line:

Input file:

$ cat foo
qwe
123
bar
View perl-one-liners
Useful One-Line Scripts for Perl Dec 03 2013 | version 1.10
-------------------------------- ----------- ------------
Compiled by Peteris Krumins (peter@catonmat.net, @pkrumins on Twitter)
http://www.catonmat.net -- good coders code, great reuse
Latest version of this file is always at:
http://www.catonmat.net/download/perl1line.txt
@tuxfight3r
tuxfight3r / 0pydmesg.py
Last active Feb 7, 2018 — forked from dopuskh3/pydmesg
python / bash based dmesg human readable timestamps
View 0pydmesg.py
#!/usr/bin/env python
# coding=utf8
# Took from https://gist.github.com/542780 and fixed regex.
#
# Copyright (C) 2010 Saúl ibarra Corretgé <saghul@gmail.com>
#
"""
pydmesg: dmesg with human-readable timestamps
"""
You can’t perform that action at this time.