Skip to content

Instantly share code, notes, and snippets.

View rowanu's full-sized avatar

rowan rowanu

View GitHub Profile
@NZKoz
NZKoz / aa_instructions.md
Created May 2, 2012 03:07
Back Up All Your Gmail
  • Install getmail (aptitude install getmail4)
  • Set Up Your Imap Server (tl;dr)
  • getmail
  • ruby date_based_archive.rb ~/Maildir/.Archive
@wolfeidau
wolfeidau / sam.md
Created May 9, 2018 16:57
Install sam from scratch on osx with homebrew.

To setup sam local on an OSX system which is using homebrew.

Check if pip installed.

pip --version

If this returns.

@buggy
buggy / index.ts
Created December 3, 2019 02:28
Generate SAM Project Using Amplify Transformers
import * as fs from "fs";
import * as yaml from "js-yaml";
import GraphQLTransform from "graphql-transformer-core";
import DynamoDBModelTransformer from "graphql-dynamodb-transformer";
import ModelAuthTransformer from "graphql-auth-transformer";
import ModelConnectionTransformer from "graphql-connection-transformer";
import SearchableModelTransformer from "graphql-elasticsearch-transformer";
import VersionedModelTransformer from "graphql-versioned-transformer";
import FunctionTransformer from "graphql-function-transformer";
@wolfeidau
wolfeidau / cognito.yml
Last active January 28, 2020 04:22
Cognito CFN stack with domain verification
AWSTemplateFormatVersion: 2010-09-09
Description: 'authentication: Resources for hosting authentication using AWS Cognito, a @wolfeidau template'
Parameters:
AppName:
Description: Name of application, used in signup emails and naming of aws resources.
Type: String
AllowedPattern: '^[a-zA-Z0-9]*$'
@icodeforlove
icodeforlove / JSONP.js
Created December 4, 2011 23:17
simple JSONP support
/**
* simple JSONP support
*
* JSONP.get('https://api.github.com/gists/1431613', function (data) { console.log(data); });
* JSONP.get('https://api.github.com/gists/1431613', {}, function (data) { console.log(data); });
*
* gist: https://gist.github.com/gists/1431613
*/
var JSONP = (function (document) {
var requests = 0,
#!/bin/bash
# This is a script that unsubscribes an email address from AWS junk mail.
# If the script breaks it might be the magic numbers that needs to change.
# Send the form while tracing the request in your browser to find the new values.
# https://pages.awscloud.com/communication-preferences
unsubscribe_aws_email() {
curl "https://pages.awscloud.com/index.php/leadCapture/save2" \
-H "Accept: application/json" \
@widged
widged / d3lib.md
Created October 4, 2013 03:29
d3 libraries

chartFactory

/affini-tech/ChartFactory

Based on D3.JS and Dimple, ChartFactory provide the ability to build quickly D3.JS charts without coding any lines of javascript. Just define your dashboard in a JSON and voila !

charts: [
        {id:'chart1',
         width:800,height:250,

xAxis:{type:'Category',field: "Month",orderRule:'Date'},

@mojodna
mojodna / 0_register_planet.sql
Last active May 18, 2022 17:51
Sample OSM Athena queries
--
-- This will register the "planet" table within your AWS account
--
CREATE EXTERNAL TABLE planet (
id BIGINT,
type STRING,
tags MAP<STRING,STRING>,
lat DECIMAL(9,7),
lon DECIMAL(10,7),
nds ARRAY<STRUCT<ref: BIGINT>>,
@carolineschnapp
carolineschnapp / gist:5397337
Last active January 20, 2023 10:11
Sample JavaScript file added with ScriptTag resource. This sample file is meant to teach best practices. Your app will load jQuery if it's not defined. Your app will load jQuery if jQuery is defined but is too old, e.g. < 1.7.
/* Sample JavaScript file added with ScriptTag resource.
This sample file is meant to teach best practices.
Your app will load jQuery if it's not defined.
Your app will load jQuery if jQuery is defined but is too old, e.g. < 1.7.
Your app does not change the definition of $ or jQuery outside the app.
Example: if a Shopify theme uses jQuery 1.4.2, both of these statements run in the console will still return '1.4.2'
once the app is installed, even if the app uses jQuery 1.9.1:
jQuery.fn.jquery => "1.4.2"
$.fn.jquery -> "1.4.2"
*/
@kapilt
kapilt / arn_db.json
Last active February 28, 2023 00:29
all aws resource arns
{
"a4b": {
"profile": "arn:{Partition}:a4b:{Region}:{Account}:profile/{Resource_id}",
"room": "arn:{Partition}:a4b:{Region}:{Account}:room/{Resource_id}",
"device": "arn:{Partition}:a4b:{Region}:{Account}:device/{Resource_id}",
"skillgroup": "arn:{Partition}:a4b:{Region}:{Account}:skill-group/{Resource_id}",
"user": "arn:{Partition}:a4b:{Region}:{Account}:user/{Resource_id}",
"addressbook": "arn:{Partition}:a4b:{Region}:{Account}:address-book/{Resource_id}",
"conferenceprovider": "arn:{Partition}:a4b:{Region}:{Account}:conference-provider/{Resource_id}",
"contact": "arn:{Partition}:a4b:{Region}:{Account}:contact/{Resource_id}",