Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Creating Something

Kurt breath103

💭
Creating Something
View GitHub Profile
@breath103
breath103 / athena.ts
Last active Feb 23, 2018
CloudFront logs athena table partition indexer
View athena.ts
import * as AWS from "aws-sdk";
// Athena Helper
export async function executeAthenaQuery(query: string | string[], outputLocation: string) {
const athena = new AWS.Athena();
let queryString: string;
if (typeof query === "string") {
queryString = query;
} else {
View create_cloudfront_athena_table.sql
CREATE EXTERNAL TABLE cloudfront_logs (
date date COMMENT '',
time string COMMENT '',
location string COMMENT '',
bytes bigint COMMENT '',
requestip string COMMENT '',
method string COMMENT '',
host string COMMENT '',
uri string COMMENT '',
status int COMMENT '',
View dynamoose.d.ts
// Custom made dynamoose declaration file.
declare module "dynamoose" {
export function local(url: string): void;
export function model<DataSchema, KeySchema, ModelSchema extends Model<DataSchema>>(
modelName: string,
schema: Schema,
options?: ModelOption
): ModelConstructor<DataSchema, KeySchema, ModelSchema>;
export function setDefaults(options: ModelOption): void;
@breath103
breath103 / gist:8641954
Created Jan 27, 2014
When getting SSL error from excon
View gist:8641954
p:
Error: Unable to verify certificate, please set `Excon.defaults[:ssl_ca_path] = path_to_certs`, `ENV['SSL_CERT_DIR'] = path_to_certs`, `Excon.defaults[:ssl_ca_file] = path_to_file`, `ENV['SSL_CERT_FILE'] = path_to_file` or `Excon.defaults[:ssl_verify_peer] = false` (less secure). (Excon::Errors::SocketError)
s:
export SSL_CERT_FILE=/usr/local/etc/openssl/cert.pem
@breath103
breath103 / gist:7944930
Created Dec 13, 2013
when installing ruby 2.0.0-p353 on mac..
View gist:7944930
CC=/usr/local/bin/gcc-4.2 rvm install 2.0.0 --enable-shared --enable-dtrace=false
You can’t perform that action at this time.