Skip to content

Instantly share code, notes, and snippets.

@WeeJeWel
Created November 20, 2020 09:51
Show Gist options
  • Save WeeJeWel/b18e4d21f9fc95120b550b3c1f9b65de to your computer and use it in GitHub Desktop.
Save WeeJeWel/b18e4d21f9fc95120b550b3c1f9b65de to your computer and use it in GitHub Desktop.
Copy & Paste Elastic Beanstalk Environment Variables
javascript:navigator.clipboard.writeText(encodeURIComponent(JSON.stringify(angular.element(document.querySelector('.properties-table')).scope().environmentVariables.collection.reduce((obj, item) => ({ ...obj, [item.optionName]: item.value, }), {}))))
javascript:navigator.clipboard.readText().then(vars => {$env = angular.element(document.querySelector('.properties-table')).scope(); $env.environmentVariables.getKeys().forEach(() => $env.environmentVariables.removeByIndex(0)); $env.$apply(); Object.entries(JSON.parse(decodeURIComponent(vars))).map(([ key, value ]) => $env.environmentVariables.add(key, value)); $env.$apply()});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment