]> git.bundesbrandschatzamt.de Git - emacsconfig.git/commitdiff
Update aws-snippets
authorAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Fri, 12 Jan 2018 15:02:47 +0000 (16:02 +0100)
committerAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Fri, 12 Jan 2018 15:02:47 +0000 (16:02 +0100)
Signed-off-by: Andreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
14 files changed:
elpa/aws-snippets-20180111.001/aws-snippets-autoloads.el [new file with mode: 0644]
elpa/aws-snippets-20180111.001/aws-snippets-pkg.el [new file with mode: 0644]
elpa/aws-snippets-20180111.001/aws-snippets.el [new file with mode: 0644]
elpa/aws-snippets-20180111.001/snippets/eshell-mode/ami-ls [new file with mode: 0644]
elpa/aws-snippets-20180111.001/snippets/eshell-mode/aws-autoscaling-describe-auto-scaling-groups [new file with mode: 0644]
elpa/aws-snippets-20180111.001/snippets/eshell-mode/aws-ec2-get-instances [new file with mode: 0644]
elpa/aws-snippets-20180111.001/snippets/eshell-mode/aws-ec2-get-snapshots [new file with mode: 0644]
elpa/aws-snippets-20180111.001/snippets/eshell-mode/aws-filters [new file with mode: 0644]
elpa/aws-snippets-20180111.001/snippets/shell-mode/.yas-parents [new file with mode: 0644]
snippets/eshell-mode/ami-ls [deleted file]
snippets/eshell-mode/aws-autoscaling-describe-auto-scaling-groups [deleted file]
snippets/eshell-mode/aws-ec2-get-instances [deleted file]
snippets/eshell-mode/aws-ec2-get-snapshots [deleted file]
snippets/eshell-mode/aws-filters [deleted file]

diff --git a/elpa/aws-snippets-20180111.001/aws-snippets-autoloads.el b/elpa/aws-snippets-20180111.001/aws-snippets-autoloads.el
new file mode 100644 (file)
index 0000000..26b0e80
--- /dev/null
@@ -0,0 +1,29 @@
+;;; aws-snippets-autoloads.el --- automatically extracted autoloads
+;;
+;;; Code:
+(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path))))
+\f
+;;;### (autoloads nil "aws-snippets" "aws-snippets.el" (23126 10835
+;;;;;;  780604 640000))
+;;; Generated autoloads from aws-snippets.el
+
+(autoload 'aws-snippets-initialize "aws-snippets" "\
+
+
+\(fn)" nil nil)
+
+(eval-after-load 'yasnippet '(aws-snippets-initialize))
+
+;;;***
+\f
+;;;### (autoloads nil nil ("aws-snippets-pkg.el") (23126 10835 781783
+;;;;;;  534000))
+
+;;;***
+\f
+;; Local Variables:
+;; version-control: never
+;; no-byte-compile: t
+;; no-update-autoloads: t
+;; End:
+;;; aws-snippets-autoloads.el ends here
diff --git a/elpa/aws-snippets-20180111.001/aws-snippets-pkg.el b/elpa/aws-snippets-20180111.001/aws-snippets-pkg.el
new file mode 100644 (file)
index 0000000..db005b7
--- /dev/null
@@ -0,0 +1,3 @@
+(define-package "aws-snippets" "0.1.0"
+  "Yasnippets for AWS"
+  '((yasnippet "0.8.0")))
diff --git a/elpa/aws-snippets-20180111.001/aws-snippets.el b/elpa/aws-snippets-20180111.001/aws-snippets.el
new file mode 100644 (file)
index 0000000..8406cda
--- /dev/null
@@ -0,0 +1,77 @@
+;;; aws-snippets.el --- Yasnippets for AWS
+
+;; Copyright (C) 2018 Andreas Gerler
+;; keywords: snippets
+;; Version: 0.1.0
+;; Package-Requires: ((yasnippet "0.8.0"))
+
+;; Permission is hereby granted, free of charge, to any person obtaining
+;; a copy of this software and associated documentation files (the
+;; "Software"), to deal in the Software without restriction, including
+;; without limitation the rights to use, copy, modify, merge, publish,
+;; distribute, sublicense, and/or sell copies of the Software, and to
+;; permit persons to whom the Software is furnished to do so, subject to
+;; the following conditions:
+
+;; The above copyright notice and this permission notice shall be
+;; included in all copies or substantial portions of the Software.
+
+;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+;; NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+;; LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+;; OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+;; WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+;;; Code:
+
+(defvar aws-snippets-dir (file-name-directory (or (buffer-file-name)
+                                                 load-file-name)))
+(defconst aws-snippets--default-regions
+  '("us-east-1" "eu-west-1" "ap-southeast-1"))
+
+(defcustom aws-snippets-regions aws-snippets--default-regions
+  "List of AWS regions for selections."
+  :type '(choice (string :tag "Region")
+                 (repeat :tag "List of Regions"
+                         (string :tag "Region")))
+  :set #'(lambda (symbol new)
+           (let ((old (and (boundp symbol)
+                           (symbol-value symbol))))
+             (set-default symbol new)
+             ))
+  :group 'aws-snippets
+  )
+
+
+(defconst aws-snippets--default-profiles
+  '("test" "prod"))
+
+(defcustom aws-snippets-profiles aws-snippets--default-profiles
+  "List of AWS profiles for selections."
+  :type '(choice (string :tag "Profile")
+                 (repeat :tag "List of Profiles"
+                         (string :tag "Profiles")))
+  :set #'(lambda (symbol new)
+           (let ((old (and (boundp symbol)
+                           (symbol-value symbol))))
+             (set-default symbol new)
+             ))
+  :group 'aws-snippets
+  )
+
+;;;###autoload
+(defun aws-snippets-initialize ()
+  (let ((snip-dir (expand-file-name "snippets" aws-snippets-dir)))
+    (add-to-list 'yas-snippet-dirs snip-dir t)
+    (yas-load-directory snip-dir)))
+
+;;;###autoload
+(eval-after-load 'yasnippet
+   '(aws-snippets-initialize))
+
+(require 'yasnippet)
+
+(provide 'aws-snippets)
+;;; aws-snippets.el ends here
diff --git a/elpa/aws-snippets-20180111.001/snippets/eshell-mode/ami-ls b/elpa/aws-snippets-20180111.001/snippets/eshell-mode/ami-ls
new file mode 100644 (file)
index 0000000..1c36339
--- /dev/null
@@ -0,0 +1,5 @@
+# -*- mode: snippet -*-
+# name: ami-ls
+# key: ami-ls
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} ec2 describe-images --owners \$`(if (string-equal major-mode "eshell-mode")(message "{")(message "("))` aws --profile=$1  ec2 describe-security-groups --group-names 'Default' --query 'SecurityGroups[0].OwnerId' --output text `(if (string-equal major-mode "eshell-mode")(message "}")(message ")"))` --query "reverse(sort_by(Images, &CreationDate)[].{CreationDate:CreationDate,Name:Name,ImageId:ImageId,Public:Public,Description:Description})" --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
diff --git a/elpa/aws-snippets-20180111.001/snippets/eshell-mode/aws-autoscaling-describe-auto-scaling-groups b/elpa/aws-snippets-20180111.001/snippets/eshell-mode/aws-autoscaling-describe-auto-scaling-groups
new file mode 100644 (file)
index 0000000..d9c19e9
--- /dev/null
@@ -0,0 +1,5 @@
+# -*- mode: snippet -*-
+# name: aws-autoscaling-describe-auto-scaling-groups
+# key: asg-ls
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} autoscaling describe-auto-scaling-groups --query 'AutoScalingGroups[].{Name: AutoScalingGroupName, Desired: DesiredCapacity,Min: MinSize, Max: MaxSize}' --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
diff --git a/elpa/aws-snippets-20180111.001/snippets/eshell-mode/aws-ec2-get-instances b/elpa/aws-snippets-20180111.001/snippets/eshell-mode/aws-ec2-get-instances
new file mode 100644 (file)
index 0000000..1314c89
--- /dev/null
@@ -0,0 +1,5 @@
+# -*- mode: snippet -*-
+# name: aws-ec2-get-instances
+# key: ec2-ls
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 describe-instances --query 'Reservations[].Instances[].[join(\`,\`,Tags[?Key==\`Name\`].Value),join(\`,\`,Tags[?Key==\`Schedule\`].Value),InstanceId, State.Name, PublicDnsName, InstanceType,Placement.AvailabilityZone,LaunchTime]' --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
diff --git a/elpa/aws-snippets-20180111.001/snippets/eshell-mode/aws-ec2-get-snapshots b/elpa/aws-snippets-20180111.001/snippets/eshell-mode/aws-ec2-get-snapshots
new file mode 100644 (file)
index 0000000..3da8d1d
--- /dev/null
@@ -0,0 +1,5 @@
+# -*- mode: snippet -*-
+# name: aws-ec2-get-snapshots
+# key: snap-ls
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 describe-snapshots --query 'Snapshots[].[join(\`,\`,Tags[?Key==\`Name\`].Value),StartTime,Description,SnapshotId,VolumeId,VolumeSize,Progress]' --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
diff --git a/elpa/aws-snippets-20180111.001/snippets/eshell-mode/aws-filters b/elpa/aws-snippets-20180111.001/snippets/eshell-mode/aws-filters
new file mode 100644 (file)
index 0000000..9016ee7
--- /dev/null
@@ -0,0 +1,5 @@
+# -*- mode: snippet -*-
+# name: aws-filters
+# key: awsfil
+# --
+--filters "Name=${1:$$(yas-choose-value '("tag:Name" "tag:Project" "tag:Type" "tag:Cluster" "instance.group-id" "ip-address" "private-ip-address" "network-interface.subnet-id" "description"))},Values=$2" $0
\ No newline at end of file
diff --git a/elpa/aws-snippets-20180111.001/snippets/shell-mode/.yas-parents b/elpa/aws-snippets-20180111.001/snippets/shell-mode/.yas-parents
new file mode 100644 (file)
index 0000000..2de397c
--- /dev/null
@@ -0,0 +1 @@
+eshell-mode
diff --git a/snippets/eshell-mode/ami-ls b/snippets/eshell-mode/ami-ls
deleted file mode 100644 (file)
index 2c6ad30..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-# -*- mode: snippet -*-
-# name: ami-ls
-# key: ami-ls
-# --
-aws --profile=${1:$$(yas-choose-value bba-aws-profiles)} ${2:--region=${3:$$(yas-choose-value bba-aws-regions)}} ec2 describe-images --owners \$`(if (string-equal major-mode "eshell-mode")(insert-string "{")(insert-string "("))` aws --profile=$1  ec2 describe-security-groups --group-names 'Default' --query 'SecurityGroups[0].OwnerId' --output text `(if (string-equal major-mode "eshell-mode")(insert-string "}")(insert-string ")"))` --query "reverse(sort_by(Images, &CreationDate)[].{CreationDate:CreationDate,Name:Name,ImageId:ImageId,Public:Public,Description:Description})" --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
diff --git a/snippets/eshell-mode/aws-autoscaling-describe-auto-scaling-groups b/snippets/eshell-mode/aws-autoscaling-describe-auto-scaling-groups
deleted file mode 100644 (file)
index 11b8045..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-# -*- mode: snippet -*-
-# name: aws-autoscaling-describe-auto-scaling-groups
-# key: aws-autoscaling-describe-auto-scaling-groups
-# --
-aws --profile=${1:$$(yas-choose-value bba-aws-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" bba-aws-regions)}} autoscaling describe-auto-scaling-groups --query 'AutoScalingGroups[].{Name: AutoScalingGroupName, Desired: DesiredCapacity,Min: MinSize, Max: MaxSize}' --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
diff --git a/snippets/eshell-mode/aws-ec2-get-instances b/snippets/eshell-mode/aws-ec2-get-instances
deleted file mode 100644 (file)
index 16511ae..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-# -*- mode: snippet -*-
-# name: aws-ec2-get-instances
-# key: ec2-ls
-# --
-aws --profile=${1:$$(yas-choose-value bba-aws-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" bba-aws-regions)}} ec2 describe-instances --query 'Reservations[].Instances[].[join(\`,\`,Tags[?Key==\`Name\`].Value),join(\`,\`,Tags[?Key==\`Schedule\`].Value),InstanceId, State.Name, PublicDnsName, InstanceType,Placement.AvailabilityZone,LaunchTime]' --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
diff --git a/snippets/eshell-mode/aws-ec2-get-snapshots b/snippets/eshell-mode/aws-ec2-get-snapshots
deleted file mode 100644 (file)
index 91cbdaf..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-# -*- mode: snippet -*-
-# name: aws-ec2-get-snapshots
-# key: snap-ls
-# --
-aws --profile=${1:$$(yas-choose-value bba-aws-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" bba-aws-regions)}} ec2 describe-snapshots --query 'Snapshots[].[join(`,`,Tags[?Key==`Name`].Value),StartTime,Description,SnapshotId,VolumeId,VolumeSize,Progress]' --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
diff --git a/snippets/eshell-mode/aws-filters b/snippets/eshell-mode/aws-filters
deleted file mode 100644 (file)
index 9ba8ff7..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-# -*- mode: snippet -*-
-# name: aws-filters
-# key: awsfil
-# --
---filters "Name=${1:$$(yas-choose-value '("tag:Name" "tag:Project" "tag:Type" "tag:Cluster" "instance.group-id" "private-ip-address" "network-interface.subnet-id" "description"))},Values=$2" $0
\ No newline at end of file