This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
from boto.ec2 import connect_to_region | |
from boto.ec2.group import Group | |
def main(): | |
module = AnsibleModule( | |
argument_spec = dict( | |
ec2_id = dict(required=True), | |
group_names = dict(required=True), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def make_rules(hosts, ports, proto): | |
return [{"proto": proto, | |
"from_port": port, | |
"to_port": port, | |
"cidr_ip": host} for host in hosts for port in map(int, ports.split(","))] | |
class FilterModule(object): | |
def filters(self): | |
return {'make_rules': make_rules} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns karma.macros | |
(:require [cljs.analyzer.api :as ana-api])) | |
(defmacro ns-metas [re] | |
(mapv (fn [ns] | |
`(ns-interns ~['quote ns])) | |
(filter #(re-matches re (str %)) | |
(ana-api/all-ns)))) | |
----------------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(println (str "goog._dependencies.nameToPath count: " (count (js->clj (.. js/goog -dependencies_ -nameToPath ))))) | |
(println (str "i18 stuff: " (count (filter #(re-find #".*i18.*" (name (key %))) (js->clj (.. js/goog -dependencies_ -nameToPath )))))) | |
goog._dependencies.nameToPath count: 5314 | |
i18 stuff: 3543 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns myapp.test | |
(:require [cljs.test :as test :refer-macros [deftest is] :refer [report]])) | |
(enable-console-print!) | |
(defmethod report [:karma :begin-test-ns] [m] | |
(println "\nTesting with Karma" (name (:ns m)))) | |
(defmethod report [:karma :summary] [m] | |
(println "All done")) |
NewerOlder