Skip to content

Instantly share code, notes, and snippets.

View mrichman's full-sized avatar

Mark Richman mrichman

View GitHub Profile
@mrichman
mrichman / cognito.yaml
Created August 12, 2023 02:04 — forked from singledigit/cognito.yaml
Create a Cognito Authentication Backend via CloudFormation
AWSTemplateFormatVersion: '2010-09-09'
Description: Cognito Stack
Parameters:
AuthName:
Type: String
Description: Unique Auth Name for Cognito Resources
Resources:
# Creates a role that allows Cognito to send SNS messages
SNSRole:
@mrichman
mrichman / rds-init.sh
Created March 31, 2021 11:07 — forked from sivasamysubramaniam/rds-init.sh
A workaround to get all data loaded into AWS RDS MySQL. When a read replica is restored from a snapshot, the replica won't wait for all the data to be transferred from Amazon Simple Storage Service (Amazon S3) to the Amazon Elastic Block Store (Amazon EBS) volume that's associated with the replica DB instance. The replica DB instance is availabl…
#!/bin/bash
host=$1
user=$2
password=$3
echo '' > $0.queue
databases=$(mysql -h $host -u $user -p$password -e "show databases" -sN | grep -v information_schema | grep -v mysql | grep -v sys)
for database in $databases; do
for table in $(mysql -h $host -u $user -p"$password" -N -B -e "show tables from \`$database\`"); do
@mrichman
mrichman / Cloud9_bootstrap.yaml
Created July 8, 2020 19:05 — forked from richardhboyd/Cloud9_bootstrap.yaml
StepFunction that bootstraps a Cloud9 environment
AWSTemplateFormatVersion: "2010-09-09"
Transform: AWS::Serverless-2016-10-31
Parameters:
BucketName:
Description: "Region-specific assets S3 bucket name (e.g. ee-assets-prod-us-east-1)"
Type: String
Default: "cf-templates-1xnac3rwgtxo7-us-west-2"
EBSVolumeSize:
Description: "Size of EBS Volume (in GB)"
Type: Number
@mrichman
mrichman / modifyConnectionStrings.ps1
Created February 27, 2017 14:53 — forked from jwcarroll/modifyConnectionStrings.ps1
Set Connection String Powershell Function
Function Set-ConnectionString{
[CmdletBinding(SupportsShouldProcess=$True)]
Param(
[string]$fileName="app.config",
[string]$connectionStringName,
[string]$connectionString
)
$config = [xml](Get-Content -LiteralPath $fileName)
@mrichman
mrichman / gist:711cf979d8054cba5cc905099b8ad64f
Created October 27, 2016 01:15
Uninstall XQuartz.app from OSX Yosemite/El Capitan/Sierra
launchctl unload /Library/LaunchAgents/org.macosforge.xquartz.startx.plist && \
sudo launchctl unload /Library/LaunchDaemons/org.macosforge.xquartz.privileged_startx.plist && \
sudo rm -rf /opt/X11* /Library/Launch*/org.macosforge.xquartz.* /Applications/Utilities/XQuartz.app /etc/*paths.d/*XQuartz && \
sudo pkgutil --forget org.macosforge.xquartz.pkg && \
rm -rf ~/.serverauth* && rm -rf ~/.Xauthorit* && rm -rf ~/.cache && rm -rf ~/.rnd && \
rm -rf ~/Library/Caches/org.macosforge.xquartz.X11 && rm -rf ~/Library/Logs/X11
@mrichman
mrichman / grafana_start.md
Created October 11, 2016 01:08
OSX Start Grafana Server

grafana-server --config=/usr/local/etc/grafana/grafana.ini --homepath /usr/local/share/grafana cfg:default.paths.logs=/usr/local/var/log/grafana cfg:default.paths.data=/usr/local/var/lib/grafana cfg:default.paths.plugins=/usr/local/var/lib/grafana/plugins

ModuleBase.ReportProgress() [CLTDEPAPI10] [1]% [Installing Mobile Recruiter]
ModuleBase.ReportProgress() [CLTDEPFE1] [1]% [Installing Mobile Recruiter]
ModuleBase.ReportProgress() [CLTDEPAPI11] [1]% [Installing Mobile Recruiter]
ModuleBase.ReportProgress() [CLTDEPFE1] [5]% [Invoking installer agent at net.tcp://cltdepfe1:8890/]
ModuleBase.ReportProgress() [CLTDEPAPI11] [5]% [Invoking installer agent at net.tcp://cltdepapi11:8890/]
ModuleBase.ReportProgress() [CLTDEPAPI10] [5]% [Invoking installer agent at net.tcp://cltdepapi10:8890/]
@book{1578203120,
Author = {Janice Reynolds},
Title = {The Complete E-Commerce Book: Design, Build \& Maintain a Successful Web-based Business},
Publisher = {CRC Press},
Year = {2004},
ISBN = {1578203120},
URL = {http://www.amazon.com/dp/1578203120},
price = {\$41.95}
}