Skip to content

Instantly share code, notes, and snippets.

View memoryleak's full-sized avatar

Haydar Ciftci memoryleak

View GitHub Profile
#!/usr/bin/env bash
docker compose ls | awk '{print $3}' | grep "docker-compose.yml" | xargs -I% -P0 bash -c "docker compose -f % pull"
docker system prune -a -f
---
# See: https://crontab.guru/
schedule: '*/15 4 * * *'
# Default: never
# Possible values: on-success | on-failure | always | never
notify: on-failure
tasks:
- name: "Print hello" # Optional
Message from syslogd@hcidesk at Apr 10 17:05:36 ...
kernel:[Hardware Error]: Corrected error, no action required.
Message from syslogd@hcidesk at Apr 10 17:05:36 ...
kernel:[Hardware Error]: CPU:1 (19:21:2) MC15_STATUS[-|CE|MiscV|-|PCC|-|-|-|-]: 0x8b4900dd5c8d48ec
Message from syslogd@hcidesk at Apr 10 17:05:36 ...
kernel:[Hardware Error]: IPID: 0x0000000000000000
Message from syslogd@hcidesk at Apr 10 17:05:36 ...
@memoryleak
memoryleak / proxmox-devops.sh
Last active April 5, 2023 15:13
Proxmox Create Terraform and Packer Role
pveum role add DevOps -privs "Datastore.AllocateSpace,Datastore.Audit,Pool.Allocate,Sys.Audit,VM.Allocate,VM.Audit,VM.Clone,VM.Config.CDROM,VM.Config.Cloudinit,VM.Config.CPU,VM.Config.Disk,VM.Config.HWType,VM.Config.Memory,VM.Config.Network,VM.Config.Options,VM.Console,VM.Monitor,VM.PowerMgmt,Sys.Console,Sys.Modify,VM.Migrate"
pveum user add terraform@pve --password <password>
pveum user add packer@pve --password <password>
pveum aclmod / -user terraform@pve -role DevOps
pveum aclmod / -user packer@pve -role DevOps
@memoryleak
memoryleak / all.sh
Last active September 5, 2022 13:33
# Use network installation
url --mirrorlist="https://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch"
repo --name="updates" --mirrorlist=https://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f$releasever&arch=$basearch
repo --name="fedora-cisco-openh264" --metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-cisco-openh264-$releasever&arch=$basearch
repo --name="microsoft-teams" --baseurl=https://packages.microsoft.com/yumrepos/ms-teams
repo --name="microsoft-vscode" --baseurl=https://packages.microsoft.com/yumrepos/vscode
repo --name="microsoft-dotnet" --baseurl=https://packages.microsoft.com/yumrepos/microsoft-fedora$releasever-prod
repo --name="microsoft-edge" --baseurl=https://packages.microsoft.com/yumrepos/edge
repo --name="sublime-text" --baseurl=https://download.sublimetext.com/rpm/stable/$basearch
@memoryleak
memoryleak / fio.sh
Created July 29, 2022 14:47
Disk Performance test
#!/usr/bin/env bash
if [ $# -eq 0 ]
then
echo "Please provide path to test file."
exit 1
fi
LOGFILE="./benchmark.log" #filename of the logfile
TESTFILE="$1"
BUILD_PROJECT=Fedora
BUILD_VERSION=36
BUILD_VARIANT=KDE
BUILD_ARCH=x86_64
BUILD_OUTPUT_DIR=build
BUILD_SRC_DIR=src
BUILD_KICKSTART=kickstart-kde
BUILD_BOOT_ISO=https://mirror.datacenter.by/pub/fedoraproject.org/linux/releases/$(BUILD_VERSION)/Everything/$(BUILD_ARCH)/os/images/boot.iso
BUILD_NUMBER:=$(shell date +%Y-%m-%d-%H%M%S)
[ 219.475789] usb 3-6.1: new high-speed USB device number 52 using xhci_hcd
[ 221.594117] i915 0000:00:02.0: [drm] *ERROR* Link Training Unsuccessful
[ 221.739789] i915 0000:00:02.0: [drm] *ERROR* Link Training Unsuccessful
[ 222.873945] i915 0000:00:02.0: [drm] *ERROR* Link Training Unsuccessful
[ 222.974092] i915 0000:00:02.0: [drm] *ERROR* Link Training Unsuccessful
[ 224.079678] i915 0000:00:02.0: [drm] *ERROR* Link Training Unsuccessful
[ 224.224297] i915 0000:00:02.0: [drm] *ERROR* Link Training Unsuccessful
[ 225.486946] usb usb2-port3: Cannot enable. Maybe the USB cable is bad?
[ 226.521134] i915 0000:00:02.0: [drm] *ERROR* Link Training Unsuccessful
[ 226.623250] i915 0000:00:02.0: [drm] *ERROR* Link Training Unsuccessful
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGvJ25JhuiTrwdLjH42dX05QIJxGzQkXUU6hGhSgh1eS Machine
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEhbXSjNMNDK3efxxGn0iPqqiJ8gr77DGGh4x30PS4DQ HaydarCiftci
@memoryleak
memoryleak / create-monterey-iso.sh
Last active November 12, 2024 11:41
Create a Mac OS Monterey ISO file from the official installation DMG file
#!/usr/bin/env bash
sudo hdiutil create -o /tmp/Monterey -size 16g -volname Monterey -layout SPUD -fs HFS+J
sudo hdiutil attach /tmp/Monterey.dmg -noverify -mountpoint /Volumes/Monterey
sudo /Applications/Install\ macOS\ Monterey.app/Contents/Resources/createinstallmedia --volume /Volumes/Monterey --nointeraction
hdiutil eject -force /Volumes/Install\ macOS\ Monterey
hdiutil convert /tmp/Monterey.dmg -format UDTO -o ~/Downloads/Monterey
mv -v ~/Downloads/Monterey.cdr ~/Downloads/Monterey.iso
sudo rm -fv /tmp/Monterey.dmg