Skip to content

Instantly share code, notes, and snippets.

@matthewdfuller
matthewdfuller / awsDownloadFilesInBucket.js
Created March 20, 2015 19:36
List and download all files in a given S3 bucket
/* Installation:
* npm install aws-sdk
* npm install async
* node awsDownloadFilesInBucket.js
*/
// SETTINGS
var AWS_KEY = '';
var AWS_SECRET = '';
var BUCKET = '';
@matthewdfuller
matthewdfuller / cloudsploit_cla.txt
Last active August 7, 2019 22:54
CloudSploit CLA
To: CloudSploit, LLC (“Recipients”): I, the undersigned, hereby irrevocably assign all of my right, title and interest in and to my past, present and future contributions to the CloudSploit Open Source Project (https://github.com/cloudsploit/scans) (“Contributions”) to Recipient, and irrevocably waive and release all rights and claims in respect thereof (including all moral rights or similar rights), without the right to receive any compensation or royalties.
I hereby represent and warrant that I am the sole author of the Contributions, which are my original creations, that I have the legal right to make the assignment set forth above, and that no Contributions are subject to any claim of ownership or otherwise by my employer or any other organization with which I may be affiliated in any way.
@matthewdfuller
matthewdfuller / formatDate.js
Last active November 6, 2015 12:46
Formats a JavaScript date with leading zeros
var date = new Date();
var dateString = date.getFullYear() + '/' + ('0' + (date.getMonth()+1)).slice(-2) + '/' + ('0' + date.getDate()).slice(-2) + ' ' + ('0' + date.getHours()).slice(-2) + ':' + ('0' + date.getMinutes()).slice(-2) + ':' + ('0' + date.getSeconds()).slice(-2);
@matthewdfuller
matthewdfuller / awsSSLv3.js
Last active August 29, 2015 14:07
Queries AWS for all load balancers and iterates through each, checking if they support SSLv3 to protect against POODLE
// Created in response to the POODLE SSLv3 security vulnerability
// To use, node/npm is required, then run:
// npm install aws-sdk
// npm install async
// node awsSSLv3.js
var AWS = require('aws-sdk');
var async = require('async');
var ACCESS_KEY = 'KEY-HERE';
@matthewdfuller
matthewdfuller / callingCodes.json
Created August 18, 2014 18:52
JSON object mapping of countries to calling codes
{
"AD": "+376",
"AE": "+971",
"AF": "+93",
"AG": "+1268",
"AI": "+1 264",
"AL": "+355",
"AM": "+374",
"AN": "+599",
"AO": "+244",
@matthewdfuller
matthewdfuller / callingCodesSorted.json
Last active August 29, 2015 14:05
JSON object mapping of country calling codes sorted by code
{
"US": "+1",
"EG": "+20",
"ZA": "+27",
"GR": "+30",
"NL": "+31",
"BE": "+32",
"FR": "+33",
"ES": "+34",
"HU": "+36",
@matthewdfuller
matthewdfuller / slowdown.js
Created May 7, 2014 18:31
Demonstrate what a loss of net neutrality could mean for users by adding this simple script to your website
var SPEED = 40;
var TEXT = 'Site loading slowly? Without net neutrality, this could become the norm. Learn more at <a href="http://www.theopeninter.net/">theopeninter.net/</a>.'
var overlay = document.createElement('div');
overlay.innerHTML = '<p>' + TEXT + '</p>';
var docHeight = document.body.scrollHeight;
overlay.style.display = 'block';
overlay.style.position = "fixed";
overlay.style.left = "0px";