This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Must be run on an Amazon Linux AMI that matches AWS Lambda's runtime which can be found at: | |
# https://docs.aws.amazon.com/lambda/latest/dg/current-supported-versions.html | |
# | |
# As of May 21, 2019, this is: | |
# Amazon Linux AMI 2018.03.0 (ami-0756fbca465a59a30) | |
# | |
# You need to prepend PATH with the folder containing these binaries in your Lambda function | |
# to ensure these newer binaries are used. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT users.`firstname` AS first, | |
users.`lastname` AS last, | |
user_details.`birthday` AS birthday | |
FROM users | |
LEFT OUTER JOIN user_details ON user_details.user_id = users.id | |
WHERE | |
STR_TO_DATE(DATE_FORMAT(birthday,'%m-%d'),'%m-%d') >= STR_TO_DATE(DATE_FORMAT(now(),'%m-%d'),'%m-%d') | |
AND | |
STR_TO_DATE(DATE_FORMAT(birthday,'%m-%d'),'%m-%d') < STR_TO_DATE(DATE_FORMAT(now()+INTERVAL 7 DAY,'%m-%d'),'%m-%d'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "sinatra/base" | |
require "sinatra/namespace" | |
require "multi_json" | |
require "api/authentication" | |
require "api/error_handling" | |
require "api/pagination" | |
module Api | |
class Base < ::Sinatra::Base |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
States must be sent as their full capitalized name or in their 2-letter abbreviation, | |
those from the following list are valid: | |
'AL' => 'Alabama', | |
'AK' => 'Alaska', | |
'AZ' => 'Arizona', | |
'AR' => 'Arkansas', | |
'CA' => 'California', | |
'CO' => 'Colorado', | |
'CT' => 'Connecticut', | |
'DE' => 'Delaware', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AWSTemplateFormatVersion: "2010-09-09" | |
Resources: | |
Table: | |
Type: AWS::DynamoDB::Table | |
Properties: | |
AttributeDefinitions: | |
- AttributeName: PK | |
AttributeType: S | |
- AttributeName: SK | |
AttributeType: S |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/etc/postfix/main.cf: | |
mydestination = localhost.localdomain, localhost, list.domain.com | |
virtual_maps = hash:/etc/postfix/virtual | |
alias_maps = hash:/etc/aliases | |
/etc/postfix/virtual: | |
@list.domain.com rails_mailer | |
/etc/aliases: | |
rails_mailer: "|/path/to/app/lib/mail_handler.rb http://www.example.com/emails 298cc9dceb1f3cac91fef8b42be624c07843fc8e" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source "http://rubygems.org" | |
gem 'httpi', :git => 'git://github.com/bensie/httpi.git', :branch => 'ntlm' | |
gem 'savon' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2013/12/30 17:45:48 Packer Version: 0.5.0 ccaf00c29e16752ffab552a1f04999590062b48a | |
2013/12/30 17:45:48 Packer Target OS/Arch: darwin amd64 | |
2013/12/30 17:45:48 Built with Go Version: go1.2 | |
2013/12/30 17:45:48 Detected home directory from env var: /Users/james | |
2013/12/30 17:45:48 Attempting to open config file: /Users/james/.packerconfig | |
2013/12/30 17:45:48 File doesn't exist, but doesn't need to. Ignoring. | |
2013/12/30 17:45:48 Packer config: &{PluginMinPort:0 PluginMaxPort:0 Builders:map[amazon-ebs:packer-builder-amazon-ebs amazon-chroot:packer-builder-amazon-chroot docker:packer-builder-docker googlecompute:packer-builder-googlecompute virtualbox-iso:packer-builder-virtualbox-iso vmware-iso:packer-builder-vmware-iso amazon-instance:packer-builder-amazon-instance digitalocean:packer-builder-digitalocean openstack:packer-builder-openstack qemu:packer-builder-qemu virtualbox-ovf:packer-builder-virtualbox-ovf vmware-vmx:packer-builder-vmware-vmx] Commands:map[build:packer-command-build fix:packer-command-fix insp |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0.000059 main(2): ALWAYS INCLUDE THE FOLLOWING LINES WHEN SENDING DEBUG MESSAGES TO THE MAILING LIST: | |
0.000095 main(2): gphoto2 2.5.2 | |
0.000105 main(2): gphoto2 has been compiled with the following options: | |
0.000111 main(2): + gcc (C compiler used) | |
0.000115 main(2): + popt (mandatory, for handling command-line parameters) | |
0.000120 main(2): + exif (for displaying EXIF information) | |
0.000125 main(2): + no cdk (for accessing configuration options) | |
0.000129 main(2): + no aa (for displaying live previews) | |
0.000134 main(2): + jpeg (for displaying live previews in JPEG format) | |
0.000138 main(2): + no readline (for easy navigation in the shell) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSData *jpeg = [AVCaptureStillImageOutput jpegStillImageNSDataRepresentation:imageDataSampleBuffer] ; | |
CGImageSourceRef source ; | |
source = CGImageSourceCreateWithData((CFDataRef)jpeg, NULL); | |
//get all the metadata in the image | |
NSDictionary *metadata = (NSDictionary *) CGImageSourceCopyPropertiesAtIndex(source,0,NULL); | |
//make the metadata dictionary mutable so we can add properties to it | |
NSMutableDictionary *metadataAsMutable = [[metadata mutableCopy]autorelease]; |
NewerOlder