--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-elb-describe-instance-health
+# key: aws-elb-describe-instance-health
+# --
+aws --profile=${1:$$(yas-choose-value '("prod" "test"))} ${2:--region=${3:$$(yas-choose-value bba-aws-regions)}} elb describe-instance-health --load-balancer-name ${4:`(yank)`} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-elb-describe-load-balancer
+# key: aws-elb-describe-load-balancer
+# --
+aws --profile=${1:$$(yas-choose-value '("prod" "test"))} ${2:--region=${3:$$(yas-choose-value bba-aws-regions)}} elb describe-load-balancers --load-balancer-name ${4:`(yank)`} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-elb-describe-load-balancer-attributes
+# key: aws-elb-describe-load-balancer-attributes
+# --
+aws --profile=${1:$$(yas-choose-value '("prod" "test"))} ${2:--region=${3:$$(yas-choose-value bba-aws-regions)}} elb describe-load-balancer-attributes --load-balancer-name ${4:`(yank)`} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-elb-get-list
+# key: aws-elb-get-list
+# --
+aws --profile=${1:$$(yas-choose-value '("prod" "test"))} ${2:--region=${3:$$(yas-choose-value bba-aws-regions)}} elb describe-load-balancers --query "reverse(sort_by(LoadBalancerDescriptions, &CreatedTime)[].[LoadBalancerName, CreatedTime])" --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
|--------------+-------------+------------------------------------------------------|
| babel-sh | babel-shell | skeleton to generate a sh file out of an org file |
| blog | blog | skeleton for a blog entry |
+| results | :res | add results parameter. for src block. |
| sqlmysql | sqlmysql | properties to connect to MySQL via org |
| sqlora | sqlora | properties to connect to Oracle via org and Perl DBI |
-| <sclient | srcclient | SRC snippet executable on a shell session |
-| <srcsh | srcsh | SRC snippet with NAME and lots of parameters |
-| <srcshtable | srcshtable | SRC snippet with org list for HOSTS loop. |
-| <ssession | srcsession | create a shell session and connect to a host via ssh |
+| srcclient | <sclient | SRC snippet executable on a shell session |
+| srcsh | <srcsh | SRC snippet with NAME and lots of parameters |
+| srcshtable | <srcshtable | SRC snippet with org table for HOSTS loop. |
+| srcshlist | <srcshlist | SRC snippet with org list for HOSTS loop. |
+| srcsession | <ssession | create a shell session and connect to a host via ssh |
| table2 | table2 | create org table with name and Amount Summary |
| title | title | skeleton for TITLE |
|--------------+-------------+------------------------------------------------------|
--- /dev/null
+# -*- mode: snippet -*-
+# name: listsrcsh
+# key: <srcshlist
+# If you want to reference the output in other src blocks you need a name.
+# --
+#+NAME: ${1:`(replace-regexp-in-string "[: ]" "_" (replace-regexp-in-string "[][]" "" (replace-regexp-in-string ".*/" "" (org-display-outline-path nil nil nil t))))`}
+- $0
+
+${2:#+NAME: ${3:`(replace-regexp-in-string "[: ]" "_" (replace-regexp-in-string "[][]" "" (replace-regexp-in-string ".*/" "" (org-display-outline-path nil nil nil t))))`-src}}
+#+BEGIN_SRC sh ${4::session ${5:client}} :var HOSTS=$1 :cache ${6:$$(yas-choose-value '("yes" "no"))} :results ${7:$$(yas-choose-value '("verbatim drawer" "table" "list"))}
+ for i in \$\{HOSTS\}; do
+ echo "----------------------------------------"
+ echo \$\{i\}
+ echo "----------------------------------------"
+ ssh -x \$\{i\}
+ done
+#+END_SRC
--- /dev/null
+# -*- mode: snippet -*-
+# name: results
+# key: :res
+# add results parameter to src block
+# --
+:results ${1:$$(yas-choose-value '("verbatim drawer" "table" "list" "silent"))} $0
\ No newline at end of file
# If you want to reference the output in other src blocks you need a name.
# --
#+NAME: ${1:`(replace-regexp-in-string "[: ]" "_" (replace-regexp-in-string "[][]" "" (replace-regexp-in-string ".*/" "" (org-display-outline-path nil nil nil t))))`}
-- $0
+| $0 |
${2:#+NAME: ${3:`(replace-regexp-in-string "[: ]" "_" (replace-regexp-in-string "[][]" "" (replace-regexp-in-string ".*/" "" (org-display-outline-path nil nil nil t))))`-src}}
-#+BEGIN_SRC sh ${4::session ${5:client}} :var HOSTS=$1 :cache ${6:$$(yas-choose-value '("yes" "no"))} :results ${7:$$(yas-choose-value '("verbatim drawer" "table" "list"))}
+#+BEGIN_SRC sh ${4::session ${5:client}} :var HOSTS=$1[,0] :cache ${6:$$(yas-choose-value '("yes" "no"))} :results ${7:$$(yas-choose-value '("verbatim drawer" "table" "list"))}
for i in \$\{HOSTS\}; do
echo "----------------------------------------"
echo \$\{i\}
-
echo "----------------------------------------"
+ ssh -x \$\{i\}
done
#+END_SRC
--- /dev/null
+# -*- mode: snippet -*-
+# name: header
+# key: <header
+# --
+# -*- mode: snippet -*-
+# name: ${1:`(insert (buffer-name))`}
+# key: ${2:`(insert (buffer-name))`}
+# --
+$0
\ No newline at end of file