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
# Check all page numbers starting 1 until result is empty | |
curl "https://api.github.com/repos/ORG/REPO/collaborators?per_page=100&page=1" -H "Authorization: Token ACCESS_TOKEN" | \ | |
jq '[ .[] | select(.permissions.admin == true) | .html_url ]' |
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
# This task will stop and disable a service without failing if the service does not exist. | |
# Requires Ansible 1.4 or newer. | |
# Update Dec 2016: Have rewritten this for the latest version of ansible and put conditions for both Ubuntu and CentOS | |
- name: "disable unused services" | |
service: name={{item}} state=stopped enabled=no | |
register: command_result | |
failed_when: "unused_disable|failed and ('find' not in unused_disable.msg and 'found' not in unused_disable.msg)" | |
with_items: |
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
Given List<String< scoreDrlList, how do we build a RuleBase/KieBase? | |
Drools 4 (building a RuleBase): | |
PackageBuilder packageBuilder = new PackageBuilder(); | |
for (String scoreDrl : scoreDrlList) { | |
InputStream scoreDrlIn = getClass().getResourceAsStream(scoreDrl); | |
packageBuilder.addPackageFromDrl(new InputStreamReader(scoreDrlIn, "UTF-8")); | |
} | |
RuleBaseConfiguration ruleBaseConfiguration = new RuleBaseConfiguration(); |