Skip to content

Instantly share code, notes, and snippets.

@SamGajdos
SamGajdos / parse.php
Created May 25, 2024 18:10
This script, as a filter, reads the source code in IPPcode20 (similar to assembly language) from standard input, checks the lexical and syntactic correctness of the code, and outputs an XML representation of the program to standard output.
<?php
# 1. Projekt z predmetu IPP, parse.php
# Autor: Samuel Gajdos
# Rok: 2020
//Pre chybne vypisy
ini_set('display_errors', 'stderr');
//definicia hodnot chyb
const erLS = 23;
@SamGajdos
SamGajdos / check.yml
Last active November 10, 2022 19:15
Playbook to execute sanity check against an OCP cluster.
---
- name: Run and check command "{{command}}"
ansible.builtin.shell: ./check_oc_command.py "{{check}}" "$({{command}})" "{{command}}"
async: 500
poll: 0
args:
executable: /bin/bash
register: script_output
failed_when: "'FAILED' in script_output"