Skip to content

Instantly share code, notes, and snippets.

View afquinterog's full-sized avatar

Andres Quintero afquinterog

View GitHub Profile
@afquinterog
afquinterog / mysql.conf
Last active July 24, 2017 21:23
Monitor mysql monit file
check process mysqld with pidfile /var/run/mysqld/mysqld.pid
start program = "/etc/init.d/mysql start"
stop program = "/etc/init.d/mysql stop"
@afquinterog
afquinterog / apache.conf
Created July 24, 2017 21:22
Monitor apache monit file
check process apache with pidfile /run/apache2.pid
start program = "/etc/init.d/apache2 start" with timeout 60 seconds
stop program = "/etc/init.d/apache2 stop"
@afquinterog
afquinterog / nginx.conf
Created July 24, 2017 21:23
Monitor nginx monit file
check process nginx with pidfile /var/run/nginx.pid
start program = "/etc/init.d/nginx start"
stop program = "/etc/init.d/nginx stop"
@afquinterog
afquinterog / Destination IAM policy
Last active June 15, 2018 23:40
S3 copy between accounts
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:ListAllMyBuckets",
"s3:GetBucketLocation"
],
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Deny",
"Principal": {
"AWS": "*"
},
"Action": "glacier:DeleteArchive",
"Resource": "arn:aws:glacier:us-east-1:847662935904:vaults/deployed-build-backups"
@afquinterog
afquinterog / gist:be0553a6b42efd0fdaae8172235f623f
Created November 19, 2018 16:22
access-to-specific-buckets
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:GetBucketLocation",
"s3:ListAllMyBuckets"
],
"Resource": "*"
@afquinterog
afquinterog / nginx.conf
Created May 20, 2019 15:26
Prerender sample configuration
location @prerender {
proxy_set_header X-Prerender-Token TOKEN;
set $prerender 0;
if ($http_user_agent ~* "baiduspider|twitterbot|facebookexternalhit|rogerbot|linkedinbot|embedly|quora link preview|showyoubot|outbrain|pinterest|slackbot|vkShare|W3C_Validator") {
set $prerender 1;
}
if ($args ~ "_escaped_fragment_") {
set $prerender 1;
}
@afquinterog
afquinterog / conf
Created May 22, 2019 23:34
docs.venturesolutions.co-policy
{
"Version": "2008-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::847662935904:user/s3-venturesolutions-user"
},
"Action": [
"s3:ListBucket",
@afquinterog
afquinterog / conf
Created May 22, 2019 23:34
docs.venturesolutions.co-policy
{
"Version": "2008-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::847662935904:user/s3-venturesolutions-user"
},
"Action": [
"s3:ListBucket",
@afquinterog
afquinterog / Vault.service
Last active June 20, 2019 13:50
Vault service
[Unit]
Description=Vault
Documentation=https://vaultproject.io/docs/
After=network.target
ConditionFileNotEmpty=/etc/vault.d/vault.hcl
[Service]
User=ubuntu
Group=ubuntu
ExecStart=/usr/local/bin/vault server -config=/etc/vault.d/vault.hcl