This file contains hidden or 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
| WITH binary_coercible_data_types AS ( | |
| SELECT pg_catalog.format_type(castsource, NULL) AS "st", | |
| pg_catalog.format_type(casttarget, NULL) AS "tt" | |
| FROM pg_catalog.pg_cast c LEFT JOIN pg_catalog.pg_proc p | |
| ON c.castfunc = p.oid | |
| LEFT JOIN pg_catalog.pg_type ts | |
| ON c.castsource = ts.oid | |
| LEFT JOIN pg_catalog.pg_namespace ns | |
| ON ns.oid = ts.typnamespace | |
| LEFT JOIN pg_catalog.pg_type tt |
This file contains hidden or 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
| import subprocess | |
| from os.path import isfile,join | |
| from os import listdir,environ | |
| from stat import S_ISREG, ST_CTIME, ST_MODE | |
| import time | |
| import os | |
| import glob | |
| import sys | |
| import argparse | |
| from pathlib import Path |
This file contains hidden or 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
| import subprocess | |
| from os.path import isfile,join | |
| from os import listdir,environ | |
| import time | |
| import os | |
| import sys | |
| import argparse | |
| ##add exceptions | |
| ##prints are only for debugging |
This file contains hidden or 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_directory_files(directory,max_files_per_dir,max_age,max_size): | |
| root_dir_file_counter=0 | |
| current_time_in_seconds=time.time() | |
| for root, directories, filenames in os.walk(directory): | |
| file_counter = 0 | |
| for file in filenames: | |
| path=root+"/"+file | |
| file_age_in_seconds= current_time_in_seconds - os.path.getctime(path) | |
| file_size = str(os.path.getsize(path)) |
This file contains hidden or 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
| import subprocess | |
| import os | |
| import sys | |
| from datetime import datetime | |
| DIR="/var/log" | |
| MAX_DIR_SIZE=4 | |
| SCRIPT_FILES_LOCATION="/var/log/b-logcleaner/" | |
| SELF_CLEANUP_TIME=59 #files older than 6 minutes | |
| #ako se poqvi nova direktoriq !!!! |
This file contains hidden or 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
| import sys | |
| import subprocess | |
| def check_conn_using_key(remote_ip,remote_port,remote_user,timeout): | |
| """Checks if ssh exists on local machine, if an ssh server exists on the | |
| remote machine and if a connection could be made.Accepted Parameters are | |
| remote ip,remote port,remote user,timeout""" | |
| timeout=str(timeout) | |
| try: | |
| ssh_check_cmd="ssh "+remote_user+"@"+remote_ip+" -p"+remote_port+" -o ConnectTimeout=5 -o PasswordAuthentication=no -o PubkeyAuthentication=yes exit" |
This file contains hidden or 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
| import psutil | |
| import subprocess | |
| import os | |
| import argparse | |
| import sys | |
| import configparser | |
| from collections import OrderedDict | |
| from pyzabbix.api import ZabbixAPI,ZabbixAPIException | |
This file contains hidden or 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
| <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> | |
| <CodeBlocksConfig version="1"> | |
| <editor> | |
| <colour_sets> | |
| <ACTIVE_COLOUR_SET> | |
| <str> | |
| <![CDATA[modnokai night shift v2]]> | |
| </str> | |
| </ACTIVE_COLOUR_SET> | |
| <ACTIVE_LANG> |
This file contains hidden or 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
| /* | |
| Trigger pin to pin 12 | |
| Echo pin to pin 13 | |
| Buzzer to pin 8 | |
| GND pin of buzzer and sensor to GND | |
| */ | |
| int temp=0; | |
| int HZ=400; | |
| void setup() { |