Skip to content

Instantly share code, notes, and snippets.

View seeker815's full-sized avatar

Sai Kothapalle seeker815

  • self
  • Bangalore, India
View GitHub Profile
@sczizzo
sczizzo / chef_dsl.rb
Created May 3, 2016 05:07
How one might implement Chef's Recipe DSL
# Basics
module Chef
class Resource
attr_reader :name
def initialize name
@name = name
end
@devynspencer
devynspencer / ansible-github.yml
Last active September 4, 2024 10:42
Example playbook for cloning a private git repository with Ansible.
---
hosts: all
tasks:
- name: add github ssh key
copy: >
src=files/id_rsa.github
dest=/root/.ssh/id_rsa.github
owner=root
group=root
@lokhman
lokhman / ubuntu-hardening.md
Last active May 4, 2025 17:51
List of things for hardening Ubuntu

WARNING

May contain out of date information. Check the comments below!

The list of actions listed below was taken mostly from Book Of Zeus with minor modifications and did the job well for Ubuntu version, which was available at that moment (May 2016). This gist was created for internal use and was never meant to be discovered by the web, although Google managed to find and index this page, which was a great surprise for me. Please check the original source for the updated information (links are provided in most of the sections), and read the comments below: they provide more details about the usage experience.

System Updates

http://bookofzeus.com/harden-ubuntu/initial-setup/system-updates/

Keeping the system updated is vital before starting anything on your system. This will prevent people to use known vulnerabilities to enter in your system.

@andreicristianpetcu
andreicristianpetcu / ansible-summary.md
Created May 30, 2016 19:25
This is an ANSIBLE Cheat Sheet from Jon Warbrick

An Ansible summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file

intro_configuration.html

First one found from of

@gwillem
gwillem / ansible-bootstrap-ubuntu-16.04.yml
Created June 16, 2016 21:59
Get Ansible to work on bare Ubuntu 16.04 without python 2.7
# Add this snippet to the top of your playbook.
# It will install python2 if missing (but checks first so no expensive repeated apt updates)
# [email protected]
- hosts: all
gather_facts: False
tasks:
- name: install python 2
raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal)
@clstokes
clstokes / assume-role-policy.json
Last active September 1, 2022 20:15
Example: Terraform IAM Role
{
"Version": "2012-10-17",
"Statement": [
{
"Action": "sts:AssumeRole",
"Principal": {
"Service": "ec2.amazonaws.com"
},
"Effect": "Allow",
"Sid": ""
@eferro
eferro / _aws_golang_examples.md
Last active August 21, 2024 05:20
golang aws: examples

AWS Golang SDK examples

top (the UNIX process inspector) cheat sheet

This is a list of the most helpful keyboard commands I use within top.

The basics

h shows help on interactive commands. Also see the top manual page

q to quit the program.

@rajankur
rajankur / amazon_ebs.md
Last active July 3, 2018 16:36
How to Attach EBS Volume in EC2 on Amazon Linux

Making an Amazon EBS Volume Available for Use

  • Right click newly created volume and attach to your instance.
  • Reboot EC2.
  • sudo file -s /dev/xvdb (where xvdb is the name of the volume)
  • if the above command shows data for the device, there is no file system on the device and you need to create one.
  • Make filesystem using sudo mkfs -t ext4 /dev/xvdb.
  • Create a mount point directory for the volume using sudo mkdir mount_point (sudo mkdir /data)
  • Mount the volume at the location: sudo mount device_name mount_point i.e. sudo mount /dev/xvdb /data
  • To mount this EBS volume on every system reboot, add an entry for the device to /etc/fstab file
@atrepca
atrepca / kafka.service
Created September 27, 2016 13:53
Kafka Systemd Service Configuration File for Ubuntu 16.04
[Unit]
Description=Apache Kafka server (broker)
Documentation=http://kafka.apache.org/documentation.html
Requires=network.target remote-fs.target
After=network.target remote-fs.target
[Service]
Type=simple
PIDFile=/var/run/kafka.pid
User=kafka