Skip to content

Instantly share code, notes, and snippets.

View brandonwestcott's full-sized avatar

Brandon Westcott brandonwestcott

View GitHub Profile
@brandonwestcott
brandonwestcott / gist:a350fd01651d98dc733d3e2a20eef3d6
Created April 22, 2020 00:21
Delete all S3 objects AWS CLI
aws s3api put-bucket-lifecycle-configuration --bucket $bucket --lifecycle-configuration '{"Rules":[{"Expiration":{"Days":1},"ID":"empty","Filter":{"Prefix":""},"Status":"Enabled","NoncurrentVersionExpiration":{"NoncurrentDays":1},"AbortIncompleteMultipartUpload":{"DaysAfterInitiation":1}}]}'

Keybase proof

I hereby claim:

  • I am brandonwestcott on github.
  • I am brandonwestcott (https://keybase.io/brandonwestcott) on keybase.
  • I have a public key ASCiZE5-qscalk75Apyo52aiTqfKmDPjVgyLdAXSf6awQwo

To claim this, I am signing this object:

Option 1. Always include child relations. If those relations have relations, it will continue to chain.
~~~ php
class Providers extends AppModel {
public $hasMany = array(
'ProviderPractices' => array(
'to' => 'ProviderPractices',
'fieldName' => 'provider_practice_set',
'embedded' => 'provider_practice_set',