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 check_task_name(candidate,setting): | |
result = Result(candidate.path) | |
with open(candidate.path, 'r') as f: | |
for (lineno, line) in enumerate(f): | |
inArray=line.split(" ") | |
try: | |
if inArray[1]=="name:" and len(inArray) > 3: | |
result.errors.append(Error(lineno+1,line)) | |
except IndexError: | |
pass |
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
#!/bin/bash | |
# Author: Marcin Stolarek | |
############################# | |
START="2018-11-02" | |
END="2018-11-06" | |
RESOURCE="Cluster" | |
MYSQL_REMOVE=$(mktemp) | |
cat << END > $MYSQL_REMOVE | |
delete from mod_shredder.shredded_job_slurm where start_time > UNIX_TIMESTAMP('$START') and end_time < UNIX_TIMESTAMP('$END') and cluster_name = '$RESOURCE'; | |
delete from mod_shredder.shredded_job where resource_name='$RESOURCE' and start_time > UNIX_TIMESTAMP('$START') and end_time < UNIX_TIMESTAMP('$END'); |
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
#!/bin/bash | |
# Author: Marcin Stolarek | |
############################# | |
START="2018-11-02" | |
END="2018-11-06" | |
RESOURCE="Cluster" | |
MYSQL_REMOVE=$(mktemp) | |
cat << END > $MYSQL_REMOVE | |
delete from mod_shredder.shredded_job_slurm where start_time > UNIX_TIMESTAMP('$START') and end_time < UNIX_TIMESTAMP('$END') and cluster_name = '$RESOURCE'; | |
delete from mod_shredder.shredded_job where resource_name='$RESOURCE' and start_time > UNIX_TIMESTAMP('$START') and end_time < UNIX_TIMESTAMP('$END'); |
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
diff --git a/classes/OpenXdmod/Shredder.php b/classes/OpenXdmod/Shredder.php | |
index 1a55a57b..951baf48 100644 | |
--- a/classes/OpenXdmod/Shredder.php | |
+++ b/classes/OpenXdmod/Shredder.php | |
@@ -810,6 +810,14 @@ class Shredder | |
$errorMessages[] = 'Job start time as after job end time.'; | |
$valid = false; | |
} | |
+ elseif ( $startTime !== null | |
+ && $endTime != null |
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
--- ./libexec/cli/image.expand.exec 2018-10-01 09:50:15.000000000 -0400 | |
+++ /cm/shared/apps/singularity/libexec/singularity/cli/image.expand.exec 2018-10-01 09:30:41.000000000 -0400 | |
@@ -112,15 +112,32 @@ | |
exit 1 | |
fi | |
+message 1 "Create loop device" | |
+SINGULARITY_LOOP_DEVICE=$(losetup -f) | |
+if [ $? -ne 0 ]; then | |
+ exit 1 |
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
if __name__ == "__main__": | |
#Test search_post | |
event={} | |
context=[] | |
print("Testin search_post function") | |
result=search_post(event,context) | |
print(result) | |
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
service: | |
address: 127.0.0.1 | |
port: 8095 | |
logfile: /var/log/snow-grafana-proxy.log | |
loglevel: info | |
service-now: | |
instance: | |
url: https://instance.service-now.com | |
user: api-user | |
password: password |
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 gist description on https://funinit.wordpress.com/2018/06/27/ansible-role-used-as-plugin-for-simple-rest-api-services/ | |
icinga2_api_uri: https://your.host:your_port/v1/objects/services/ | |
icinga2_api_user: XXX | |
icinga2_api_password: XXX | |
icinga2_validate_certs: no |
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
#!/bin/bash | |
# $1 - VM name | |
# $2 - resoure group | |
# Overcomplicated solution for https://funinit.wordpress.com/2018/05/03/resizing-vms-in-azure-sequel/ | |
# Basically change the VM disk from Premium to Standard SKU to allow resize to Basic tier | |
# Assume one VM in Resource group | |
# Assume VM has one disk | |
NAME=$1 | |
GROUP=$2 |
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 resize_vm(cmd, resource_group_name, vm_name, size, no_wait=False): | |
vm = get_vm(cmd, resource_group_name, vm_name) | |
vm.hardware_profile.vm_size = size # pylint: disable=no-member | |
return set_vm(cmd, vm, no_wait) |