Skip to content

Instantly share code, notes, and snippets.

Avatar

Joe Niland joe-niland

View GitHub Profile
@joe-niland
joe-niland / sqlite-to-mysql.py
Last active May 31, 2021 — forked from rednebmas/convert.py
Convert sqlite3 dump to mysql importable statements
View sqlite-to-mysql.py
#!/usr/bin/env python3
import re
import fileinput
print("SET FOREIGN_KEY_CHECKS=0;")
def main():
for line in fileinput.input():
@joe-niland
joe-niland / aws-config
Last active Dec 11, 2020
Terragrunt assume-role
View aws-config
# typically located at ~/.aws/config
[profile source-profile]
output=json
region=ap-southeast-2
mfa_serial=arn:aws:iam::123456789123:mfa/my-name
# assumes default backend, you can also use `--backend=file` or others
credential_process=aws-vault exec aws-vault-profile --json --prompt=osascript
[profile org-stage-role]
View cloudposse-terraform-testing.md

CloudPosse Terraform Testing

(Tested in zsh shell)

Mac

  1. Set env vars:
  2. export GITHUB_TOKEN=...
  3. export GOEXE=/usr/local/bin/go
  4. Change test/src/Makefile:
View geodesic-notes.md

Notes on using Geodesic with repos created by cloudposse/reference-architectures

How to Use this Repo

AWS Setup

  1. Log in to console for root account as your IAM user name@example.com
  2. Go to https://console.aws.amazon.com/iam/home
  3. Add an MFA device to your user
  4. Generate an access key and store it securely to be added to aws-vault
View keybase.md

Keybase proof

I hereby claim:

  • I am joe-niland on github.
  • I am joen (https://keybase.io/joen) on keybase.
  • I have a public key ASBeLhrre5yxe-DJ8Ay8lIH-A_Rm3VQNcPSvMIhmxcCIhAo

To claim this, I am signing this object:

View securable-example.php
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
trait Securable extends BaseModel
{
public function usersWithAccess() {
View sendgrid php attachments
<?php
// If you are using Composer
require 'vendor/autoload.php';
use SendGrid\Mail;
$apiKey = getenv('SENDGRID_API_KEY');
$sg = new \SendGrid($apiKey);
View keybase.md

Keybase proof

I hereby claim:

  • I am joe-niland on github.
  • I am joen (https://keybase.io/joen) on keybase.
  • I have a public key whose fingerprint is 1270 0AF2 AA32 5F10 3689 C93F 5EA5 237A C5F7 EB0E

To claim this, I am signing this object: