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/env bash | |
# This script adds EuroLinux 6.10 vault repos | |
if [ $EUID -ne 0 ]; then | |
echo "This script must be run as root" | |
exit 1 | |
fi | |
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/env bash | |
if [ $EUID -ne 0 ]; then | |
echo "This script must be run as root" | |
exit 1 | |
fi | |
[ -e /etc/pki/rpm-gpg/RPM-GPG-KEY-eurolinux7 ] || curl -o /etc/pki/rpm-gpg/RPM-GPG-KEY-eurolinux7 https://fbi.cdn.euro-linux.com/security/RPM-GPG-KEY-eurolinux7 |
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
cat > /etc/yum.repos.d/CentOS-Stream-AppStream.repo << EOF | |
# CentOS-Stream-AppStream.repo | |
# | |
# The mirrorlist system uses the connecting IP address of the client and the | |
# update status of each mirror to pick current mirrors that are geographically | |
# close to the client. You should use this for CentOS updates unless you are | |
# manually picking other mirrors. | |
# | |
# If the mirrorlist does not work for you, you can try the commented out | |
# baseurl line instead. |
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
import requests | |
import os | |
GH_TOKEN = os.environ['GH_TOKEN'] | |
GH_HEADERS = {"Accept": "application/vnd.github+json", | |
"Authorization": f"Bearer {GH_TOKEN}", | |
"X-GitHub-Api-Version": "2022-11-28"} | |
ORG_NAME = "TODO-FIXME-YOUR-ORG-NAME" | |
REPO_SET=set() |
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/env bash | |
# Author: Alex Baranowski | |
# License: MIT | |
set -e | |
# we only need first flag line for the cpu | |
cpu_flags=$(grep '^flags\b' /proc/cpuinfo | head -n 1) | |
echo -e "supported cpu flags:\n$cpu_flags" |
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/env bash | |
cat > /etc/yum.repos.d/CentOS-Linux-AppStream.repo << EOF | |
# CentOS-Linux-AppStream.repo | |
# | |
# The mirrorlist system uses the connecting IP address of the client and the | |
# update status of each mirror to pick current mirrors that are geographically | |
# close to the client. You should use this for CentOS updates unless you are | |
# manually picking other mirrors. | |
# | |
# If the mirrorlist does not work for you, you can try the commented out |
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/env bash | |
# Author: Alex Baranowski | |
# License: MIT | |
# Max swap files tester | |
# magic number: 33 -> in theory 32 swap file on Linux can be used 33 = 32+1 | |
echo "Deactivating all swaps that are used" | |
sudo swapoff -a |
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/python3 | |
# Copyright © 2021 Red Hat, Inc | |
# | |
# This program is free software; you can redistribute it and/or | |
# modify it under the terms of the GNU General Public License | |
# as published by the Free Software Foundation; either version 3 | |
# of the License, or (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, |
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
#include<sys/sysinfo.h> | |
#include<stdio.h> | |
// NOTE: FSHIFT might differ | |
#define FSHIFT 16 | |
#define FIXED_1 (1<<FSHIFT) /* 1.0 as fixed-point */ | |
#define LOAD_INT(x) ((x) >> FSHIFT) | |
#define LOAD_FRAC(x) LOAD_INT(((x) & (FIXED_1-1)) * 100) |
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
#include<stdio.h> | |
int main(){ | |
int i, j; | |
for (i=0; i < 100000;i++){ | |
for (j=0; j < 100000;j++){ | |
} | |
} | |
printf("Finish!"); | |
} |
NewerOlder