Skip to content

Instantly share code, notes, and snippets.

@eegilbert
eegilbert / readme.md
Created July 9, 2018 08:29 — forked from maxivak/readme.md
Multiple networks in LXC container

Network for LXC container

Host device as bridge

  • persisted in host's /etc/network/interfaces the container's veth virtual ethernet interface can share the network link on the physical interface of the host (eth0). So the container resides on the same ethernet segment and talks to the same dhcp server as the host does.

Additonal bridge device

  • setup manually with brctl
@eegilbert
eegilbert / flag_per_function.py
Created June 26, 2018 11:20 — forked from frenchtoast747/flag_per_function.py
Flag per function - Argparse
import argparse
class c1(object):
def cleanup(self):
print 'c1'
class c2(object):
def cleanup(self):
"""
The idea here is to have one demo of each common argparse format
type. This is useful for me to be able to copy/paste into a new
script and have something to quickly edit and trim down to get
the functionality I need.
Expect this file to grow/change as I need new options.
This is, however, a working example. I hate examples that don't
actually build/run, and this isn't one of them. Since there are
@eegilbert
eegilbert / White label Route 53 nameservers.md
Created June 16, 2018 12:35
AWS Route 53 white label nameserver setup
@eegilbert
eegilbert / whiptailmenu.bash
Created June 5, 2018 14:05 — forked from wafsek/whiptailmenu.bash
A Example of whiptail menu with functions
#! /bin/bash
# This program is just an example of how to make a whiptail menu and some basic commands.
# Copyright (C) 2016 Baljit Singh Sarai
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
admin account info" filetype:log
!Host=*.* intext:enc_UserPassword=* ext:pcf
"# -FrontPage-" ext:pwd inurl:(service | authors | administrators | users) "# -FrontPage-" inurl:service.pwd
"AutoCreate=TRUE password=*"
"http://*:*@www” domainname
"index of/" "ws_ftp.ini" "parent directory"
"liveice configuration file" ext:cfg -site:sourceforge.net
"parent directory" +proftpdpasswd
Duclassified" -site:duware.com "DUware All Rights reserved"
duclassmate" -site:duware.com
@eegilbert
eegilbert / README.md
Created January 25, 2018 09:36 — forked from leonardofed/README.md
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.

For more about AWS and AWS Certifications and updates to this Gist you should follow me @leonardofed


#!/bin/bash
#Set colour prompt using the name, platform or instance id and avzone
if [ ! -f "/opt/aws/AWS-INSTID" ]; then
curl -s --fail http://169.254.169.254/latest/meta-data/instance-id > /opt/aws/AWS-INSTID
fi
export INSTID=`cat /opt/aws/AWS-INSTID`
if [ ! -f "/opt/aws/AWS-AVZONE" ]; then
curl -s --fail http://169.254.169.254/latest/meta-data/placement/availability-zone > /opt/aws/AWS-AVZONE
@eegilbert
eegilbert / keybase.md
Created November 10, 2017 14:53
keybase.md

Keybase proof

I hereby claim:

  • I am eegilbert on github.
  • I am erric (https://keybase.io/erric) on keybase.
  • I have a public key ASB0WkGxC7SgguPdq7ixH7EOrV_T633ZZjyp4cQ1sa5P3Qo

To claim this, I am signing this object:

@eegilbert
eegilbert / terraform-app.sh
Created November 2, 2017 00:28 — forked from kzap/terraform-app.sh
Wrapper for terraform that lets you specify an environment and calls an $ENV.tfvars file, uses a $ENV.tfstate file and sets the env variable
#!/bin/bash
#
# terraform-app
#
# This to terraform the servers for the Galleon App
# By storing the date now, we can calculate the duration of provisioning at the
# end of this script.
start_seconds="$(date +%s)"