Skip to content

Instantly share code, notes, and snippets.

View olen2006's full-sized avatar
🐙
https://youtu.be/TulBh6klMuU

General Zod olen2006

🐙
https://youtu.be/TulBh6klMuU
  • Solar System, Earth
View GitHub Profile
@epicserve
epicserve / example.com.import.txt
Last active March 11, 2023 14:04
Example Terraform file for importing DNS Records from DigitalOcean
digitalocean_domain.example example.com
digitalocean_record.example example.com,<DO ID>
digitalocean_record.fd-gmail-txt example.com,<DO ID>
digitalocean_record.fd-mx["alt1.aspmx.l.google.com."] example.com,<DO ID>
digitalocean_record.fd-mx["alt2.aspmx.l.google.com."] example.com,<DO ID>
digitalocean_record.fd-mx["aspmx.l.google.com."] example.com,<DO ID>
digitalocean_record.fd-mx["aspmx2.googlemail.com."] example.com,<DO ID>
digitalocean_record.fd-mx["aspmx3.googlemail.com."] example.com,<DO ID>
digitalocean_record.fd-ns["1"] example.com,<DO ID>
digitalocean_record.fd-ns["2"] example.com,<DO ID>
@velotiotech
velotiotech / download-consul-linux-64bit
Created June 11, 2020 08:53
Velotio - HashiCorp Consul Part 1 - Download Consul
$ wget https://releases.hashicorp.com/consul/1.4.3/consul_1.4.3_linux_amd64.zip -O consul.zip
--2019-03-10 00:14:07-- https://releases.hashicorp.com/consul/1.4.3/consul_1.4.3_linux_amd64.zip
Resolving releases.hashicorp.com (releases.hashicorp.com)... 151.101.37.183, 2a04:4e42:9::439
Connecting to releases.hashicorp.com (releases.hashicorp.com)|151.101.37.183|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 34777003 (33M) [application/zip]
Saving to: ‘consul.zip’
consul.zip 100%[============================>] 33.17M 4.46MB/s in 9.2s
@arcanosam
arcanosam / install_Python381.sh
Last active October 29, 2020 05:56
my Python 3.8.1 build script on CentOS 7
#!/bin/bash
# original source/tip: https://www.workaround.cz/howto-compile-install-latest-python-37-38-centos-7-8/
wget https://www.python.org/ftp/python/3.8.1/Python-3.8.1.tgz -P /tmp/
tar xzfv /tmp/Python-3.8.1.tgz -C /tmp
cd /tmp/Python-3.8.1
@shadiakiki1986
shadiakiki1986 / example_1.txt
Last active October 4, 2023 08:53
aws cli cloudtrail + jq examples
# list latest 10 event names and the next token
aws cloudtrail lookup-events \
--max-items 10 \
--lookup-attributes AttributeKey=EventSource,AttributeValue=ec2.amazonaws.com \
--lookup-attributes AttributeKey=ReadOnly,AttributeValue=false \
--starting-token "eyJOZXh0VG9rZW4iOiBudWxsLCAiYm90b190cnVuY2F0ZV9hbW91bnQiOiAxMH0=" | \
jq '.Events[].EventName,.NextToken'
"ModifyInstanceAttribute"
@afloesch
afloesch / jenkins-in-docker.md
Last active April 23, 2024 11:15
Jenkins in Docker (docker-in-docker)

Jenkins in Docker (docker-in-docker)

Testing Jenkins flows on your local machine, or running Jenkins in production in a docker container can be a little tricky with a docker-in-docker scenario. You could install Jenkins to avoid any docker-in-docker issues, but then you have Jenkins on your machine, and the local environment is likely going to be a fairly different from the actual production build servers, which can lead to annoying and time-consuming issues to debug.

Build environment differences are precisely why there is a strong argument to be made to run build processes strictly in docker containers. If we follow the philosophy that every build step or action should run in a docker container, even the Jenkins server itself, then we get massive benefits from things like, total control over the build environment, easily modify the build environment without the possibility of adversely effecting other jobs, explicit and strongly controlled tool versions,

@lesstif
lesstif / nginx-with-tls13-compile.sh
Last active November 23, 2023 16:39
openssl 1.1 & nginx compile script for TLS 1.3 support on RHEL/CentOS 7
#!/bin/bash
## nginx
NGINX=nginx-1.19.4.tar.gz
if [ ! -f "${NGINX}" ];then
wget https://nginx.org/download/${NGINX}
fi
ND=$(basename $NGINX .tar.gz)
@joshuaaguilar20
joshuaaguilar20 / my.cnf
Last active June 29, 2020 06:54
MariaDB 10:2 Server Config file
root@c836246fc87c:/etc/mysql# cat my.cnf
# MariaDB database server configuration file.
#
# You can copy this file to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
@npearce
npearce / install-docker.md
Last active April 19, 2024 12:35
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command

UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.

Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/

Docker CE Install

sudo amazon-linux-extras install docker
sudo service docker start
@dansmith65
dansmith65 / Install-AWSCLI.ps1
Last active December 9, 2022 12:28
Install version 1 of AWS CLI via PowerShell
# https://docs.aws.amazon.com/cli/latest/userguide/awscli-install-windows.html
$dlurl = "https://s3.amazonaws.com/aws-cli/AWSCLI64PY3.msi"
$installerPath = Join-Path $env:TEMP (Split-Path $dlurl -Leaf)
$ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest $dlurl -OutFile $installerPath
Start-Process -FilePath msiexec -Args "/i $installerPath /passive" -Verb RunAs -Wait
Remove-Item $installerPath
$env:Path += ";C:\Program Files\Amazon\AWSCLI\bin"
@duluca
duluca / awc-ecs-access-to-aws-efs.md
Last active December 9, 2023 11:36
Step-by-step Instructions to Setup an AWS ECS Cluster

Configuring AWS ECS to have access to AWS EFS

If you would like to persist data from your ECS containers, i.e. hosting databases like MySQL or MongoDB with Docker, you need to ensure that you can mount the data directory of the database in the container to volume that's not going to dissappear when your container or worse yet, the EC2 instance that hosts your containers, is restarted or scaled up or down for any reason.

Don't know how to create your own AWS ECS Cluster? Go here!

New Cluster

Sadly the EC2 provisioning process doesn't allow you to configure EFS during the initial config. After your create your cluster, follow the guide below.

New Task Definition for Web App

If you're using an Alpine-based Node server like duluca/minimal-node-web-server follow this guide: