ACF Repeater fields – filter out empty rows from ImportWP

Recently I had the need a problem when importing data via Import WP into ACF Repeater fields would sometimes leave me with blank rows (ie. where there were blank entries in the imported data), or if I was editing a row, forgetting to remove any blank entries would just leave them in the system.

This is all fine if that’s what you wanted, but for my purposes, I needed to remove them.

The following is a piece of code (which you can include in your WordPress functions.php file (or custom plugin)) which gets run anytime a certain field (with the key “field_111222”) is updated (before being saved to the database).

It checks if certain sub-fields have been populated (line 3), and if neither of them have been populated, removes the row (line 4).

To use it, just update the field that the filter “watches” (last line) with the field you have, and update the field keys on line 3 to correspond to your own.

function my_pre_save($result, $group_id, $id) {
if($group_id === 'field_11223349e21') {
$result = array_filter($result, function ($row) {
return $row['field_1122334649e22'] || $row['field_66359a0549e23'] || $row['field_1122331049e24'];

return $result;
add_filter('iwp/acf/repeater/pre_save_value', 'my_pre_save', 10, 3);

Avada WordPress Theme – custom data source for Post Cards

In getting frustrated with needing to get more detailed and specific with the posts being shown in post-cards in certain circumstances, i’ve dug into the code and found a great wordpress filter which can be used to inject your own WP_Query object, instead of using the query generated based on your criteria in the builder.


To use it, you’ll need to use the wordpress ‘add_filter’ method, such as the following;

function my_filter_post_cards($args, $defaults) {
if($defaults['id'] === 'customise-the-query') {
return new WP_Query([
'posts_per_page' => $defaults['number_posts'],
'post_type' => 'suppliers'
add_filter( 'fusion_post_cards_shortcode_query_override', 'my_filter_post_cards', 0, 2 );

This lets you really customise the posts shown in the post cards element, rather than being restricted to the options shown in the builder.

Potato Salad


  • Boil potatoes & carrots, then drain and peel (once cooled)
  • Sweet & sour cucumbers (chopped)
  • Red capsicum
  • Eggs
  • Mayonaise (swiss / good maoy)

Chopped salami (optional)

Starting lead-climbing after doing the lead-course

So, you’ve done the Lead course — congratulations!

We’ve included a few helpful tips to keep in mind as you get started with the skills you’ve learnt;

  • If you are unsure of something ASK. Accidents only take one tiny mistake.
  • Never be afraid to ask for help, or why someone has done something differently. Experienced people are always happy to help.
  • Learn to lead at Arapiles, it is so much better than anywhere else. Once you have done at 20 climbs then perhaps consider different locations. Be aware that the quality of rock is quite variable at the grampians, werribee gorge, and camles hump.
  • Down climbing is a trad climbers best friend.
  • Do not even consider multipitch climbing until you have done at least 10-20 single pitch climbs and a climb takes under 2 hours from start to finish (including racking up and returning to the ground).
  • Avoid doing climbs longer than 30m when you start out. If something goes wrong you can always be lowered to the ground.
  • Climbs that are describe as “bouldery” have tough starts. Do not do these climbs unless you can get lots of gear in down low.
  • If you can’t protect the crux of the climb, DO NOT DO THE CLIMB
  • At least 3 bombproof pieces of gear for an anchor.
  • You are only safe at the top of a climb when the anchor is finished and there is no chance of falling off the edge.
  • If belaying normally from the top, the brake rope is always in the locked off position.
  • Use names when communicating with your seconder/ leader.
  • Gear at feet = More gear (a good time to put in another piece of gear/protection).
  • At crux= More gear (another good time to put some more gear in).
  • Traverse/ gear below over hang = More gear with an extender (as above).
  • Always take more gear than less. It makes you stronger and you are less likely to run out.
  • NEVER GET COMPLACENT. That’s when stuff really really goes wrong.
  • Abseiling is a dangerous activity. Always be on a safety line and triple check everything before you commit to the decent.
  • Triple checking any safety system is probably a very good idea always.
  • You are responsible for yourself and your judgement is your best friend.
  • And finally, NEVER ABSEIL THE MULDOON RAP STATION WitH ONE ROPE. You have been warned

The suggested list at the bottom is a great starting point to plenty of good climbs with good protection and a great place to hone your skills. Remember, when you are first starting out, it’s about refining your skills (placements, anchors, JUDGEMENT), as opposed to climbing hard & your ability (ie. trying the latest silly run out death climb). Get the technical side of things down-pat so that it’s second nature, and harder routes in time will be easier and more safer. Do at LEAST 20 of the climbs listed before contemplating multi-pitch climbing (which generally takes longer, is more committing and is more “in the deep-end” than the single-pitch options).

After 20 of the recommended climbs (ideally at least a few being grade 10), maybe have a look at some of the smaller multi-pitch climbs. Just make sure you can complete a single pitch, from leaving the ground to back on the ground in around 1 – 1.5 hours. This is a fairly good guide that you are becoming efficient in your climbing.

Spend 3 trips at Arapiles learning the ropes before you consider the Grampians (Summerday Valley has great beginner leads). Leave Werribee Gorge and Camels Hump for quite a few months.

Once you have done at least ten leads (that’s yourself actually leading, not just seconding) consider coming along on a lead rescue course. YOU WILL ALSO HAVE TO RUN ONE LEAD TRIP before you can come on the rescue course, but they have to be the easiest trips on the planet to run.

Suggested climbs to start with

Baked sliced potatoes


  • Potatoes
  • 1 cup cream
  • Grated parmesan cheese
  • Granulated garlic
  • Salt


  1. Sprinkle granular garlic & add some butter to the bottom of the pan
  2. Add sliced potatoes
  3. Add a good dash of milk and sprinkle on some caraway seeds
  4. Microwave for 3 mins with glad-wrap on top
  5. Grind some salt over it
  6. Finely grate some parmesan cheese
  7. Add a generous (eg 1 cup) / small tub of pure cream
  8. Bake at 150 degrees until brown
  9. Turn over and sprinkle more grated parmesan cheese, continue baking until browned again

Bitbucket Symfony Security Checker

To implement the symfony security checker as part of your bitbucket pipeline, include the following lines of code in one of the steps.

The first line downloads the Symfony CLI tool, and adds it to the path (so it can be run). The 2nd line actually runs the security-check.

- curl -sS | bash && export PATH="$HOME/.symfony/bin:$PATH"
- symfony check:security


Import/Export data from DynamoDB (small amounts)

I use this CLI command for exporting and then later importing data from/to DynamoDB (small amounts of data – eg. upto a few hundred items).

It does take a while to get data back into DynamoDB, as it’s doing it line-by-line, rather than as a batch … but gets the job done!


aws dynamodb scan --table-name source-table-name --no-paginate > data.json


cat data.json | jq -c '.Items[]' | while read -r line; do aws dynamodb put-item --table-name destination-table-name --item "$line"; done

This can be done in one line as well;

aws dynamodb scan --table-name source-table-name --no-paginate | jq -c '.Items[]' | while read -r line; do aws dynamodb put-item --table-name destination-table-name --item "$line"; done

Credit goes to;

Cleaning up old DynamoDB Auto-Scaling Resources

I’ve found a strange problem with cloud-formation roll-backs which don’t automatically remove any Auto Scaling resources you might have setup.

This means then when you next deploy, CloudFormation starts complaining about resources already existing!

To clean these up, you need the following (run from the CLI, using the AWS CLI);

List resources;

aws application-autoscaling describe-scalable-targets --service-namespace dynamodb

From there, de-register (remove) each of the ones which shouldn’t be there;

aws application-autoscaling deregister-scalable-target --service-namespace dynamodb --resource-id "table/myTableName" --scalable-dimension "dynamodb:table:ReadCapacityUnits"

aws application-autoscaling deregister-scalable-target --service-namespace dynamodb --resource-id "table/myTableName" --scalable-dimension "dynamodb:table:WriteCapacityUnits"

That’s it!

AWS Invoking Lambda functions from CLI

aws lambda invoke \
  --function-name <your function name> \
  --payload '"<your json payload>"' \ 
  --cli-binary-format raw-in-base64-out /dev/stdout

The raw-in-base64-out lets you skip having to base64 encode the payload.

The /dev/stdout bit at the end just shows the output on your screen, rather than outputting it to a file and then having to read that file.