Skip to content

Instantly share code, notes, and snippets.


Matt Richmond bigdawggi

View GitHub Profile
bigdawggi / AWS S3 Restricted
Last active Jul 24, 2020
How to do restricted policies for programmatic (API) access to get/put objects into S3.
View AWS S3 Restricted

AWS being one of the most frustrating and difficult to use systems out there has to make everything difficult. This is something that has caused so much headache for me over the years, I'm starting to document it.

This got me started, though didn't quite fit everything I needed.

Here's how you create Policies for a bucket

Assuming the following:

  1. You created a bucket named foo and that bucket has blocked all public access.
  2. You created a user named bar that was given API access (using keys and secrets).
bigdawggi /
Created Feb 7, 2017
Composer: How to reference local git repo's branch for development.


"repositories": [
    { "type": "git", "url": "../email-library" }
"require": {
    "php": ">=5.6.4",
    "laravel/framework": "5.4.*",
    "laravel/tinker": "~1.0",
bigdawggi / ffmpeg cheatsheet.mdown
Last active Jan 20, 2017
Quick cheatsheet for ffmpeg
View ffmpeg cheatsheet.mdown

Movie Conversions with ffmpeg

NOTE About Vimeo: Looks like they want 5M for bitrate - I think that'll mean, just switching the 2M to 5M in the commands below.

This video’s bit rate is only 1984 kbit/s, which is lower than what we recommend for H.264 video. Your video might not look as nice as it should. For 1280x720 video, we recommend a data rate of at least 5000 kbit/s. Learn more about our recommended compression settings.

Convert iMovie mp4 to webm

No audio...remove "-an" if you want audio

bigdawggi / tmbr-load-template.php
Last active Mar 29, 2016
Helper function for loading a template in WP with some arbitrary data passed to it
View tmbr-load-template.php
* Allows the passing of variables to a template file when loaded. Should help
* to remove the need for unnecessarily putting data into the $_GLOBAL scope.
* Usage:
* // This example will expose two variables to the loaded template:
* // $type = 'Foo', and $url = '//'
* tmbr_load_template( 'partials/map.php', array(
* 'type' => 'Foo',
bigdawggi / post-receive
Last active Nov 15, 2015
Post Receive Hook for Git
View post-receive
echo "********************"
echo "Post receive hook: Deploying Website"
echo "********************"
# Set up some vars
export GIT_REPO=/home/git/production/example.git
export GIT_WORK_TREE=/var/www/vhosts/
echo "*** Clearing out any staging dir ***"
View Homestead.yaml
ip: ""
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/
- ~/.ssh/id_rsa
View gist:d0ddc5c564b395db83df
<link href="//" rel="stylesheet" type="text/css" >
<style type="text/css">
body {
font-family: 'Josefin Sans Std Light', serif;
font-size: 18px;
letter-spacing: 1px;
bigdawggi / basic-example
Last active Aug 29, 2015
Code structure for displaying inline contents in lightbox
View basic-example
A link with
- a rel of "lightbox"
- an href that points to the the ID of the target div
- a data-lightbox-type="inline" attribute
<a href="#popup-links" rel="lightbox" data-lightbox-type="inline">Load Inline HTML</a>
<!-- A div with a class of "hide", and an ID that matches the href of the originating link -->
<div id="popup-links" class="hide">
bigdawggi / gist:b5e241ab7ead9f626c1c
Created Jun 26, 2015
Business Structured Data Example
View gist:b5e241ab7ead9f626c1c
<script type="application/ld+json">
"@context": "",
"@type": "SportingGoodsStore",
"openingHours": "Mo,Tu,We,Th,Fr,Sa,Su 08:00-18:00",
"url": "",
"logo": "",
"address": {
"@type": "PostalAddress",
"addressLocality": "Example City",
bigdawggi / gist:9db55d2e358aaa0259e9
Last active Aug 29, 2015
Trigger events on non-DOM objects
View gist:9db55d2e358aaa0259e9
foo = {}
jQuery(foo).on('bar', function(){ alert('hey') })
You can’t perform that action at this time.