Skip to content

Instantly share code, notes, and snippets.

View dave-malone's full-sized avatar

Dave Malone dave-malone

  • Amazon Web Services
  • Tampa, FL
View GitHub Profile

Keybase proof

I hereby claim:

  • I am dave-malone on github.
  • I am davemalone (https://keybase.io/davemalone) on keybase.
  • I have a public key ASDotKO8y-tq7bMC-oEMrF3Qt3LKvBo85-QSJ5aYDx2K5wo

To claim this, I am signing this object:

@dave-malone
dave-malone / GoSublime.sublime-settings
Created March 13, 2015 13:00
GoSublime.sublime-settings file for use with the GoSublime plugin
{
"on_save": [
{
"cmd": "gs9o_open",
"args": {
"run": ["sh", "go build . errors && go test -i && go test && go vet && golint"],
"focus_view": false
}
}
],
@dave-malone
dave-malone / a-osx-and-local-domains
Last active August 29, 2015 14:20
.local domain names on OS X
OS X has issues with any domain ending in .local. This can't be fixed by adding a value in
/etc/hosts because while the ping utility and other cli utilities use /etc/hosts first, as
expected, other applications on OS X do not.
In order to get around this problem, the DNS entry could be changed, and probably should be
so that anyone else using OS X who is trying to access this domain won't have to struggle through
this issue.
However, if the DNS entry for the service in question can not be changed, then you will need
to install a local DNS server and add a wildcard entry for .local domains to resolve to your
@dave-malone
dave-malone / temp.cnf
Created May 16, 2016 18:15 — forked from dwallraff/temp.cnf
Temp openssl conf file for Multiple SAN Self-Signed Cert
[ req ]
distinguished_name = req_distinguished_name
req_extensions = server_req_extensions
prompt = no
[ req_distinguished_name ]
C = US
ST = CA
L = San Francisco
O = Pivotal
@dave-malone
dave-malone / ops-manager.json
Created August 9, 2016 11:04
A copy of the Cloud Formation template for Pivotal Cloud Foundry on AWS with a Dedicated AWS instance tenancy setting
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "Cloudformation template for configuring Pivotal Cloud Foundry on AWS",
"Conditions": {
"CreateRDS": {
"Fn::And":[
{ "Fn::Not": [ { "Fn::Equals": [ { "Ref": "04RdsDBName"}, "" ]}]},
{ "Fn::Not": [ { "Fn::Equals": [ { "Ref": "05RdsUsername"}, "" ]}]},
{ "Fn::Not": [ { "Fn::Equals": [ { "Ref": "06RdsPassword"}, "" ]}]}
]
systemLog:
destination: file
path: /usr/local/var/log/mongodb/mongo.log
logAppend: true
storage:
dbPath: /usr/local/var/mongodb
#net:
# bindIp: 127.0.0.1
security:
authorization: enabled

cmd + , - open settings

cmd + shift + p - command palette while in command palette:

  • split right/left and move active item (to move current window into a side pane)

cmd + k, cmd + left/right arrow - switch between panes

cmd + n - new file

Check if a port is open: nc -z host.example.com 20-30

SSH tunneling: ssh -L 1234:vcsa-01.haas-43.pez.pivotal.io:443 [email protected]

Test ntp connectivity: ntpdate -d

'use strict'
console.log('Loading function')
const aws = require('aws-sdk')
const s3 = new aws.S3({ apiVersion: '2006-03-01' })
const elastictranscoder = new aws.ElasticTranscoder()
const config = {
pipeline_id: process.env.ELASTIC_TRANSCODER_PIPELINE_ID,