Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Mark Burke markdavidburke

🎯
Focusing
View GitHub Profile
@ShvaykaD
ShvaykaD / upgrade-postgresql-service-centos-7.md
Created May 4, 2020
Upgrading PostgreSQL service from 9.x or 10.x to 11 version on CentOS 7
View upgrade-postgresql-service-centos-7.md
@kasuken
kasuken / profiles.json
Created Jun 23, 2019
Windows Terminal settings and files
View profiles.json
{
"globals" :
{
"alwaysShowTabs" : true,
"defaultProfile" : "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"initialCols" : 120,
"initialRows" : 30,
"keybindings" :
[
{
@Ray33
Ray33 / gist:ba189a729d81babc99d7cef0fb6fbcd8
Last active Jul 22, 2022 — forked from SamCyanide/gist:780afff4c3e1a9e105264c2a476e037c
Amazon Elastic Network Adapter (ENA) on CentOS 7
View gist:ba189a729d81babc99d7cef0fb6fbcd8
sudo su
yum --enablerepo=extras install epel-release
yum -y install patch dkms kernel-devel perl
yum update
#Required for kernel num 5:
yum --enablerepo=elrepo-kernel -y install kernel-ml-devel
reboot
@DRN88
DRN88 / send-aws-sns-sms.sh
Last active Dec 18, 2021
Send aws sns sms messages with bash. Zabbix
View send-aws-sns-sms.sh
#!/bin/bash
#
# 1, Create AWS IAM user with a policy allowing only AWS SNS Publish command
# 2, Install awscli with 'yum -y install awscli' on zabbix server
# 3, Add /bin/bash shell for zabbix user: usermod -s /bin/bash zabbix
# 4, Deploy this script to: /etc/zabbix/send-aws-sns-sms.sh
# 5, Edit this script and define the required variables
# 6, Run the script manually to test
# 7, Use the script in Zabbix. Create a new Media Type -> Script
# Use zabbix documentation for the script parameter setup
@Nyr
Nyr / openvpn-useradd-bulk.sh
Last active Dec 18, 2021
Simple script for adding users in bulk to an openvpn-install setup
View openvpn-useradd-bulk.sh
#!/bin/bash
# Fast way for adding lots of users to an openvpn-install setup
# See the main openvpn-install project here: https://github.com/Nyr/openvpn-install
# openvpn-useradd-bulk is NOT supported or maintained and could become obsolete or broken in the future
# Created to satisfy the requirements here: https://github.com/Nyr/openvpn-install/issues/435
if readlink /proc/$$/exe | grep -qs "dash"; then
echo "This script needs to be run with bash, not sh"
exit 1
@jabez007
jabez007 / Install-Barnyard.sh
Created Feb 12, 2018
A simple Bash script for install Snort and Barnyard on Cent OS 7 from source
View Install-Barnyard.sh
!/bin/bash
# Set the internal field separator
IFS=$'\n'
##
# Install pre-reqs
##
yum install libtool autoconf git
@eldondevcg
eldondevcg / README.md
Last active Nov 18, 2020
Cross account bucket access for IAM roles
View README.md

For: https://www.reddit.com/r/aws/comments/5jf7fb/permissions_for_lambda_accessing_s3_buckets_in/

This is a little tricky, because it requires several different moving parts, specifically,

  • the lambda task that you want to execute the copy must have IAM access to the bucket in the other account. This is not something that was obvious to me to begin with, although my use case was more complicated.
  • the bucket policy on the destination account must be set to permit your lambda function to write to that bucket. For my special use cases, I have to upload a new bucket policy daily to the receiving buckets. Alternatively, the destination accounts could probably give your a cross-account IAM role to upload the bucket policy yourself.
  • You will likely want to write your objects with the bucket-owner-full-control acl, http://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html otherwise, the bucket owner may not be able to download them.
@freewayz
freewayz / aws-boto-s3-download-directory.py
Created Oct 6, 2016
Download files and folder from amazon s3 using boto and pytho local system
View aws-boto-s3-download-directory.py
#!/usr/bin/env python
import boto
import sys, os
from boto.s3.key import Key
from boto.exception import S3ResponseError
DOWNLOAD_LOCATION_PATH = os.path.expanduser("~") + "/s3-backup/"
if not os.path.exists(DOWNLOAD_LOCATION_PATH):
@tmaiaroto
tmaiaroto / Dockerfile
Last active Jun 30, 2022
WordPress on Amazon ECS
View Dockerfile
FROM alpine:3.3
MAINTAINER Tom Maiaroto <tom@outdoorsy.co>
# Install packages
RUN apk --update --repository http://dl-3.alpinelinux.org/alpine/edge/main add \
freetype-dev \
libjpeg-turbo-dev \
libpng-dev \
libwebp-dev \
php7 \
@abrahamrhoffman
abrahamrhoffman / centos7ksiso.md
Last active Mar 11, 2022
CentOS 7 Kickstart File & How to build an (auto install) ISO
View centos7ksiso.md

CentOS 7 Kickstart File - HOWTO Build ISO

There is so much documentation online from RedHat and CentOS about this topic - it's sad that I am writing this. But the real state of documentation on this topic (CentOS 7 + KS + ISO = Bootable DVD) is almost non-existent.

I found this: http://smorgasbork.com/component/content/article/35-linux/151-building-a-custom-centos-7-kickstart-disc-part-1

Which I greatly appreciate and +1, but the documentation is half-baked and there are numerous errors.

Finally... FINALLY! After four days of banging my head, I got this to work. Hopefully someone else will be able to do this in a few hours, instead of blowing their weekend like me. :(