Skip to content

Instantly share code, notes, and snippets.

View thaerlabs's full-sized avatar

Thaer Abbas thaerlabs

View GitHub Profile
@thaerlabs
thaerlabs / permissions.sh
Created July 13, 2018 13:50
Permissions for Mautic
cd /var/www/mautic
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
chmod -R g+w app/cache/
chmod -R g+w app/logs/
chmod -R g+w app/config/
chmod -R g+w media/files/
chmod -R g+w media/images/
chmod -R g+w translations/
chown -R $USER:www-data .
@thaerlabs
thaerlabs / AppSync_snippets.md
Last active March 9, 2020 07:08
Snippets and utils to be used with AWS AppSync VTL Templates

Remove empty values from object to prevent DynamoDB empty string exception

#set ($values = {})

#foreach ($entry in $ctx.args.input.entrySet())
  #if( !$util.isNullOrBlank($entry.value) )
  	$util.qr($values.put($entry.key, $entry.value))
  #end
#end
@thaerlabs
thaerlabs / machine.js
Created June 28, 2021 16:10
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions