Skip to content

Instantly share code, notes, and snippets.

View aa6my's full-sized avatar
😈
curiosity

aa6mys aa6my

😈
curiosity
View GitHub Profile
@aa6my
aa6my / readme.md
Created June 20, 2022 03:09 — forked from johnyvelho/readme.md
Installing Supervisor on Elastic Beanstalk - 2021 - Linux AMI 2 - Laravel Worker Setup
  • Create the following folder structure in your root project directory: .ebextensions/supervisor

  • Place the supervisor.config under .ebextensions/

  • Place the setup.sh under .ebextensions/supervisor/

  • Run "chmod +x .ebextensions/supervisor/setup.sh"

  • Place the supervisord.conf under .ebextensions/supervisor/

@aa6my
aa6my / 001-README.MD
Created August 27, 2021 02:14
Elastic Beanstalk + New Relic + PHP Agent

#Elastic Beanstalk + New Relic PHP

Elastic Beanstalk environment variables

Add an environment variable called "NR_INSTALL_KEY" and set the value as your New Relic license key.

Add newrelic.config to .ebextensions folder

Copy the config file into .ebextensions as newrelic.config.

package main
import (
"database/sql"
"strconv"
"log"
"net/http"
"fmt"
"bytes"
"gopkg.in/gin-gonic/gin.v1"
@aa6my
aa6my / windows-10.md
Created April 10, 2021 01:55 — forked from BeKnowDo/windows-10.md
Windows 10 sucks...but we can make it less sucky. This is how I setup local development for Win10

Install Chocolately

Install ConEmu

  • Install via chocolately choco install conemu -y

Install Nginx

  • Install via chocolately choco install nginx -y ** The -y argument is to skip any confirmation messages...just install it. It's fine ;)
@aa6my
aa6my / send-receive-sqs.php
Created July 15, 2020 14:34 — forked from fbrnc/send-receive-sqs.php
Sending and receiving messages from/to AWS SQS via PHP
<?php
// curl -sS https://getcomposer.org/installer | php
// php composer.phar require aws/aws-sdk-php
// export AWS_ACCESS_KEY_ID=...
// export AWS_SECRET_ACCESS_KEY=...
$queueUrl = '<INSERT_URL_OF_EXISTING_QUEUE_HERE>';
@aa6my
aa6my / fix_quotes.sh
Created May 12, 2020 02:53 — forked from kamermans/fix_quotes.sh
Replace fancy-quotes / curly-quotes / smart-quotes with standard ASCII single- and double-quotes in bash
#!/bin/bash
# Replaces annoying "fancy" quotes created by programs like Microsoft Word and everything in MacOS
# with normal ASCII single-quotes (') or double-quotes (")
# This script does NOT replace the GRAVE ACCENT (`) since it is commonly used in Markdown and as a bash command
# See: https://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
SINGLE=$(echo -ne '\u00B4\u2018\u2019')
DOUBLE=$(echo -ne '\u201C\u201D')
sed -i "s/[$SINGLE]/'/g; s/[$DOUBLE]/\"/g" $1
@aa6my
aa6my / POSH Stuff
Created May 6, 2020 13:49 — forked from easel/POSH Stuff
Windows Terminal Configuration
Install-Module posh-git -Scope CurrentUser
Install-Module oh-my-posh -Scope CurrentUser
Install-Module -Name PSReadLine -AllowPrerelease -Scope CurrentUser -Force -SkipPublisherCheck
Then run "notepad $PROFILE" and add these lines to the end:
Import-Module posh-git
Import-Module oh-my-posh
Set-Theme Paradox
@aa6my
aa6my / dump_route53_records.md
Created April 22, 2020 03:37 — forked from porjo/dump_route53_records.md
Export route53 records to CSV

Retrieve hosted zones with aws route53 list-hosted-zones then enter the zone Id below:

aws route53 list-resource-record-sets --hosted-zone-id "/hostedzone/xxxxxxxxxxx" | \
   jq -r '.ResourceRecordSets[] | [.Name, .Type, (.ResourceRecords[]? | .Value), .AliasTarget.DNSName?]  | @tsv'
@aa6my
aa6my / README.md
Created January 16, 2020 03:37 — forked from simov/README.md
Run `node` scripts using `nvm` and `crontab` without hardcoding the node version

Run node scripts using nvm and crontab without hardcoding the node version

cronjob.env.sh

#!/bin/bash

# NVM needs the ability to modify your current shell session's env vars,
# which is why it's a sourced function