Skip to content

Instantly share code, notes, and snippets.

Kevin McMahon kevinmcmahon

Block or report user

Report or block kevinmcmahon

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View reinvent-2019-workshops.md

re:Invent 2019 Workshops

A list of public repositories, content, and web from re:Invent 2019 Workshops. Many of the links are subject to be moved or completely removed at any point in time in the future.

Session ID Session Name Repo/Site
SVS203 Build a serverless ride-sharing web application https://webapp.serverlessworkshops.io/
SVS340 Serverless image processing workflows at scale with AWS Step Functions https://image-processing.serverlessworkshops.io/
AIM362 Build, train & debug, and deploy & monitor with Amazon SageMaker http://bit.ly/aim362-workshop
GPSTEC406 AWS Alien Attack workshop https://alienattack.workshop.aws/
@kevinmcmahon
kevinmcmahon / S3-Static-Sites.md
Created Dec 7, 2019 — forked from bradwestfall/S3-Static-Sites.md
Use S3 and CloudFront to host Static Single Page Apps (SPAs) with HTTPs and www-redirects. Also covers deployments.
View S3-Static-Sites.md

S3 Static Sites

What this will cover

  • Host a static website at S3
  • Redirect www.website.com to website.com
  • Website can be an SPA (requiring all requests to return index.html)
  • Free AWS SSL certs
  • Deployment with CDN invalidation

Resources

View gist:df2617d6bc86884db4b7982dcf97ca0c
export YARN="$(yarn global bin):$HOME/.config/yarn/global/node_modules/.bin"
@kevinmcmahon
kevinmcmahon / organize-photos.py
Created Feb 8, 2016 — forked from cliss/organize-photos.py
Photo management script. This script will copy photos from "~/Pictures/iPhone Incoming" into a tree the script creates, with folders representing month and years, and photo names timestamped. Completely based on the work of the amazing Dr. Drang; see here: http://www.leancrew.com/all-this/2013/10/photo-management-via-the-finder/ You can see more…
View organize-photos.py
#!/usr/bin/python
import sys
import os, shutil
import subprocess
import os.path
from datetime import datetime
######################## Functions #########################
View keybase.md

Keybase proof

I hereby claim:

  • I am kevinmcmahon on github.
  • I am kevinmcmahon (https://keybase.io/kevinmcmahon) on keybase.
  • I have a public key whose fingerprint is 4491 805E 5D79 BCF4 468D FB6D F491 8BE2 AAF0 7673

To claim this, I am signing this object:

View gist:c0811c3209ea5003a9d5
struct Notifications {
struct ListColorDidChange {
static let name = "ListDidUpdateColorNotification"
static let colorUserInfoKey = "ListDidUpdateColorUserInfoKey"
static let URLUserInfoKey = "ListDidUpdateURLUserInfoKey"
}
}
View AndroidBus.java
package com.example.common;
import android.os.Handler;
import android.os.Looper;
import com.squareup.otto.Bus;
public class AndroidBus extends Bus {
private final Handler mainThread = new Handler(Looper.getMainLooper());
@kevinmcmahon
kevinmcmahon / gist:3613612
Created Sep 3, 2012
Initialization of Location Services
View gist:3613612
- (void)initializeLocationServices {
// Check to ensure location services are enabled
if(![CLLocationManager locationServicesEnabled]) {
[self showAlertWithMessage:@"You need to enable location services to use this app."];
return;
}
if(![CLLocationManager regionMonitoringAvailable]) {
[self showAlertWithMessage:@"This app requires region monitoring features which are unavailable on this device."];
return;
View Android Check if Service is Running
private boolean isServiceRunning() {
ActivityManager manager = (ActivityManager) getSystemService(ACTIVITY_SERVICE);
for (RunningServiceInfo service : manager.getRunningServices(Integer.MAX_VALUE)){
if("com.example.MyNeatoIntentService".equals(service.service.getClassName())) {
return true;
}
}
return false;
}
@kevinmcmahon
kevinmcmahon / Macros.h
Created Apr 6, 2012
Objective-C Macros
View Macros.h
/*
The MIT License (MIT)
Copyright (c) 2012 Kevin McMahon
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION W
You can’t perform that action at this time.