Skip to content

Instantly share code, notes, and snippets.

View gridhead's full-sized avatar
🚀
Underpromise and overdeliver

Akashdeep Dhar gridhead

🚀
Underpromise and overdeliver
View GitHub Profile
@gridhead
gridhead / centos-stream.Dockerfile
Last active May 28, 2021 04:42
CentOS Stream (Unofficial)
FROM centos:latest
LABEL maintainer "Akashdeep Dhar <[email protected]>"
RUN dnf swap centos-linux-repos centos-stream-repos -y
RUN dnf distro-sync -y
@gridhead
gridhead / fedora-cdrsrv-amd64.Dockerfile
Last active May 28, 2021 04:42
Fedora Code Server Dockerfile
FROM fedora:latest
LABEL maintainer "Akashdeep Dhar <[email protected]>"
WORKDIR /data
RUN dnf install wget git -y
RUN wget https://github.com/cdr/code-server/releases/download/v3.10.1/code-server-3.10.1-amd64.rpm
RUN dnf remove wget -y
RUN dnf install code-server-3.10.1-amd64.rpm -y
RUN rm code-server-3.10.1-amd64.rpm
ENTRYPOINT ["code-server", "--bind-addr", "0.0.0.0:4444", "--auth", "none"]
EXPOSE 4444
@gridhead
gridhead / main.py
Last active July 8, 2022 02:09
Answer for CPE role
"""
This program runs an API server on a local address on port 5000, for users to
connect to it and have their local time converted into UTC using parameterized
GET requests by making use of Falcon, PyTZ and Werkzeug
"""
import datetime
from json import dumps
from sys import exit
@gridhead
gridhead / centos-lavagna.Dockerfile
Last active May 29, 2021 16:28
Lavagna v1.1.7 on CentOS
FROM centos:latest
LABEL maintainer "Akashdeep Dhar <[email protected]>"
WORKDIR /data
RUN dnf update -y
RUN dnf install wget java-11-openjdk-headless unzip -y
RUN wget https://repo1.maven.org/maven2/io/lavagna/lavagna/1.1.7/lavagna-1.1.7-distribution.zip
RUN unzip lavagna-1.1.7-distribution.zip
RUN dnf remove wget unzip -y
RUN rm lavagna-1.1.7-distribution.zip
ENTRYPOINT ["./lavagna-1.1.7/bin/lavagna.sh"]
@gridhead
gridhead / inventory.ini
Last active June 5, 2021 06:10
Pull Docker Images on an Fedora Podman Host Constructed From a Jinja2 Template
[web]
server1 ansible_host=192.168.0.163
server1 ansible_ssh_user=fedora
server1 ansible_ssh_pass=<your-ssh-password>
server1 ansible_sudo_pass=<your-sudo-password>
@gridhead
gridhead / config.toml
Created June 20, 2021 13:56
Portfolio Site Revamp
##########################################################################
#
# Copyright © 2019-2020 Akashdeep Dhar <[email protected]>
#
# 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,
@gridhead
gridhead / passive.py
Created July 17, 2021 17:02
Reposition the cursor to new random location every after a random duration
from random import randint
from sys import exit
from time import sleep
#from pyautogui import moveTo, FAILSAFE
import pyautogui
pyautogui.FAILSAFE = False
@gridhead
gridhead / skylake-tuning-linux.md
Created July 23, 2021 13:20 — forked from Brainiarc7/skylake-tuning-linux.md
This gist will show you how to tune your Intel-based Skylake, Kabylake and beyond Integrated Graphics Core for performance and reliability through GuC and HuC firmware usage on Linux.

Tuning Intel Skylake and beyond for optimal performance and feature level support on Linux:

Note that on Skylake, Kabylake (and the now cancelled "Broxton") SKUs, functionality such as power saving, GPU scheduling and HDMI audio have been moved onto binary-only firmware, and as such, the GuC and the HuC blobs must be loaded at run-time to access this functionality.

Enabling GuC and HuC on Skylake and above requires a few extra parameters be passed to the kernel before boot.

Instructions provided for both Fedora and Ubuntu (including Debian):

Note that the firmware for these GPUs is often packaged by your distributor, and as such, you can confirm the firmware blob's availability by running:

@gridhead
gridhead / contwork.md
Last active July 24, 2021 15:50
Contributing to Fedora Websites

Adding your code to the repository

In order to contribute your code to the repository, a working Git installation, and an account on Pagure is required.

  1. Install and configure Git, if not done already.
    1. Install Git
      1. On Fedora/CentOS/RHEL/OpenSUSE by executing the following command on a terminal.
        sudo dnf install git
        
@gridhead
gridhead / consterm.md
Last active February 25, 2023 22:33
Adventures with QEMU, KVM and Libvirt

Offloading domain TTY output to console with custom kernel/initramfs images

  1. Navigate to the /boot directory of the Fedora installation of the host to grab some kernel and initramfs images.
    cd /boot && ls -l
    
    The following is an example output for the above command.
    total 239596
    -rw-r--r--. 1 root root   234567 Jul 21 02:13 config-5.13.4-200.fc34.x86_64