Skip to content

Instantly share code, notes, and snippets.

@thatryan
thatryan / sesmail.php
Created August 8, 2017 18:14
SES mail send
<?php
// Replace us-west-2 with the AWS Region you're using for Amazon SES.
define('REGION','us-east-1');
// require REQUIRED_FILE;
require '/home/ubuntu/vendor/autoload.php';
use Aws\Ses\SesClient;
use Aws\Ses\Exception\SesException;
@thatryan
thatryan / Package Control.sublime-settings
Created November 22, 2017 19:35
Installed Sublime Text 3 Packages
{
"bootstrapped": true,
"ignore_vcs_packages": true,
"in_process_packages":
[
],
"installed_packages":
[
"A File Icon",
"AdvancedNewFile",
@thatryan
thatryan / sublime.sh
Created November 23, 2017 05:51
auto sublime setup
#!/bin/sh
fancy_echo() {
local fmt="$1"; shift
printf "\n$fmt\n" "$@"
}
package_control_url="https://packagecontrol.io/Package%20Control.sublime-package"
[ui]
merge = internal:merge3
interface = curses
username = Ryan Olson <rolson@dealerinspire.com>
ignore = ~/.hgignore_global
[extensions]
color =
graphlog =
pager =
<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>[TITLE]</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
[META]
<!--START: FRAME_RSSFEEDS-->
<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>[TITLE]</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
[META]
<!--START: FRAME_RSSFEEDS-->
.banner {
$banner: &;
color: $lexus-white;
text-align: center;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 6em 0;
background-size: cover;
<?php
[21-Jun-2019 15:38:12 UTC] Array
(
[id] => 0
[createdAt] => Array
(
[date] => 2019-06-21 14:44:28.000000
[timezone_type] => 3
[timezone] => UTC
)
@thatryan
thatryan / booking.json
Created November 13, 2019 19:35
JSON test data
{
"customerType": "Residential",
"externalId": "122132345",
"source": "string",
"active": true,
"start": "2019-07-22T16:47:42.207Z",
"summary": "consequat tempor massa egestas. Sed luctus leo neque, a dignissim orci molestie tempus. Fusce tincidunt vitae quam at venenatis. Maecenas sollicitudin nisl at ultricies laoreet. Nam pulvinar, est vitae congue porta, turpis erat maximus ex, malesuada maximus nisi diam in purus. Ut fermentum diam vitae tellus dapibus viverra. Quisque non vulputate dui. Nullam ut ipsum id nunc aliquam tincidunt eget nec metus. Nulla eros magna, luctus eu placerat iaculis, viverra ut arcu.",
"address": {
"street": "923 E North St",
"unit": "string",
@thatryan
thatryan / nginx.conf
Created March 27, 2020 17:58
webp nginx
location ~* ^(/.+)\.(jpg|jpeg|jpe|png|gif)$ {
add_header Vary Accept;
if ($http_accept ~* "webp"){
set $imwebp A;
}
if (-f $request_filename.webp) {
set $imwebp "${imwebp}B";
}
if ($imwebp = AB) {
rewrite ^(.*) $1.webp;