# 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" "description"))},Values=$2" $0
\ No newline at end of file
+--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
--- /dev/null
+# -*- mode: snippet -*-
+# name: parameter-key-value
+# key: pmk_
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+{
+ "ParameterKey": "$1",
+ "ParameterValue": "$2"
+},$0
\ No newline at end of file
# key: :res
# add results parameter to src block
# --
-:results ${1:$$(yas-choose-value '("verbatim drawer" "table" "list" "silent" "value code :wrap SRC sql"))} $0
\ No newline at end of file
+:results ${1:$$(yas-choose-value '("verbatim drawer" "table" "list" "silent" "value code :wrap SRC sql" "value code :wrap SRC json"))} $0
\ No newline at end of file
| $0 |
${2:#+NAME: ${3:`(replace-regexp-in-string "[: ]" "_" (replace-regexp-in-string "[][]" "" (replace-regexp-in-string ".*/" "" (org-display-outline-path nil t "/" t))))`-src}}
-#+BEGIN_SRC shell ${4::session ${5:client}} :var ${6:HOSTS$(upcase (yas-text))}=$1[,0] :cache ${7:$$(yas-choose-value '("yes" "no"))} ${8::res}
+#+BEGIN_SRC sh ${4::session ${5:client}} :var ${6:HOSTS$(upcase (yas-text))}=$1[,0] :cache ${7:$$(yas-choose-value '("yes" "no"))} ${8::res}
$6=($$6)
for INDEX in \$\{!$6[@]\}; do
# If you want to reference the output in other src blocks you need a name.
# --
${2:#+NAME: ${3:`(replace-regexp-in-string "[: \"]" "_" (replace-regexp-in-string "[][]" "" (replace-regexp-in-string ".*/" "" (org-display-outline-path nil t "/" t))))`-src}}
-#+BEGIN_SRC shell ${4::session ${5:client}} :var ${6:HOSTS$(upcase (yas-text))}=${1:`(yank)`}[,${7:0}] :cache ${8:$$(yas-choose-value '("yes" "no"))} ${9::res}
+#+BEGIN_SRC sh ${4::session ${5:client}} :var ${6:HOSTS$(upcase (yas-text))}=${1:`(yank)`}[,${7:0}] :cache ${8:$$(yas-choose-value '("yes" "no"))} ${9::res}
$6=($$6)
for INDEX in \$\{!$6[@]\}; do
# name: grants
# key: grants_
# --
-SELECT grantee, object_name FROM v_catalog.grants WHERE object_type = '${1:$$(yas-choose-value '("RESOURCEPOOL" "ROLE" "SCHEMA" "TABLE" "STORAGELOCATION"))}' ORDER BY grantee $0LIMIT 50;
\ No newline at end of file
+SELECT grantee, object_name, privileges_description FROM v_catalog.grants WHERE object_type = '${1:$$(yas-choose-value '("RESOURCEPOOL" "ROLE" "SCHEMA" "TABLE" "VIEW" "STORAGELOCATION"))}' ORDER BY grantee $0LIMIT 50;
\ No newline at end of file
`(upcase (file-name-nondirectory (file-name-sans-extension (buffer-file-name))))`
- --help, -h for help
- --man, -m to get this man page.
+ --help, -h for help
+ --man, -m to get this man page.
--verbose, -v be more verbose.
=head1 EXAMPLES
# parse parameters
-TEMP=\`getopt -o mhvp --long man,help,verbose,password -n '`(downcase (file-name-nondirectory (file-name-sans-extension (buffer-file-name))))`' -- "$@"\`
+TEMP=\`getopt -o mhvp: --long man,help,verbose,password: -n '`(downcase (file-name-nondirectory (file-name-sans-extension (buffer-file-name))))`' -- "$@"\`
+
+if [ $? != 0 ]; then echo "Wrong parameters..." >&2; exit 1; fi
+
+eval set -- "$TEMP"
while true; do
case "\$1" in