AI, startup hacks, and engineering miracles from your friends at Faraday

Finding public S3 objects

There's lot of concern over public objects in S3 buckets. Now Amazon gives you a way to lock down entire buckets - but what if you legitimately have a mix of public and private objects?

Ruby script to find public S3 objects

First get 2 gems:

source '' do
  gem 'aws-sdk'
  gem 'thread'

Then the script itself:

# find_public_s3_objects.rb
require 'aws-sdk-s3'
require 'thread/pool'
BUCKET = ARGV[0] or raise("expected bucket")
s3 = 'us-east-1')
count = 0
pool = Thread.pool 8
mutex =
s3.bucket(BUCKET).objects.each do |object|
  pool.process do
    grants = object.acl.grants
    mutex.synchronize do
      count += 1
      if count % 100 == 0
        $stderr.write "#{count}..."
    if { |x| x.grantee.uri }.any? { |x| x =~ /AllUsers/ }
      mutex.synchronize do
        puts object.key

Then you run it like this:

bundle exec ruby find_public_s3_objects.rb my-bucket-name

It's much faster than the bash-based example on StackOverflow.

Meet Dealbot, the open-source sales cadence automation system for Pipedrive

Dealbot illustration

We've just released Dealbot, our lightweight sales automation system for Pipedrive, as open source. Over the coming weeks we'll introduce Dealbot's features along with its cadence ecosystem in a series of blog posts.

Here's the secret behind the most successful sales development teams out there:

They're using cadences.

A cadence is a named, prescribed schedule of activities like phone calls and emails that you can use to engage and qualify your leads.

7x7 cadence

SalesLoft's classic 7x7 cadence

Using the cadence approach to outreach is one of those cases where a good tool makes all the difference.

Dealbot applies cadences to your deals in Pipedrive

Paid services like SalesLoft and Outreach are the gold standard for cadence management. But these tools might be overboard for your team, and can be expensive.

Faraday's Dealbot provides everything you need to get started using cadences with your Pipedrive CRM in an open-source package that can be hosted at Heroku for free.

Here's how to get started quickly

  1. Create a free Pipedrive account if you don't already have one.

  2. Click the magic button:

  3. Fill out the required config fields and click "Deploy for Free." Don't close the tab! You'll get an email telling you what to do next.

Stay tuned

Over the next few weeks we'll dive into Dealbot features, use cases, cadences, and technology. In the meantime, check out the Dealbot site for more, or sign up below for future Dealbot blog posts.

How to migrate your Hubspot blog to GitHub Pages, Jekyll, or somewhere else

Hubspot can be a great tool depending on the size/structure of your business, but it's not for everybody. If you find yourself wanting to move your blog off of Hubspot's COS, you've probably already found Hubspot's export documentation—and probably (like me) found the resulting data lacking.

(If you haven't done this, here's a spoiler: Hubspot exports each post as a separate html file, fully rendered complete with all of your template code. This isn't very helpful if you've built a new template somewhere else that you want to insert your old post content in.)

Here's how to migrate your blog

There's two pieces of info you need before you get started:

  1. Hubspot API key — You can get this here
  2. Hubspot blog ID — From your Hubspot dashboard, choose Content → Blog and choose the blog you want to export from the dropdown at the top. You'll find the blog's numeric ID in the URL. (The URL will have 2 numbers in it: you want the second, likely larger, number, as the first is your Hubspot account ID.)

Next, you should download this gist by clicking the "Download ZIP" button and unzip it somewhere. You should review the code here to make sure I'm not doing anything nefarious to your Hubspot data.

Then, to perform the export, you'll run the following commands in your shell (assuming you have a modern Ruby with Bundler installed):

$ cd path-to-gist
$ bundle
$ HUBSPOT_API_KEY=XXX HUBSPOT_BLOG_ID=YYY bundle exec ruby export_hubspot_blog_posts.rb

There should now be a blog directory in there with a markdown file for each post you exported.

Customizing for your migration target

By default the script assumes you're trying to move to Github Pages or some other Jekyll-powered blog host. If you're trying to go somewhere else with your post content, you may find the script to be a good starting point. Inside the loop, you have easy access to all of the data you need to generate a corresponding new post within the new blog.

Moving posts to GitHub Pages/Jekyll

Just copy the blog directory over to your blog repo. You'll probably want to make sure all these posts get put inside a layout by putting something like this in your _config.yml:

      path: "blog"
      layout: "post"

And that's it!


If you have ideas to make this better (or have found an error) please tweet us at @faradayio.