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 / easyfix.md
Created August 30, 2021 13:37
Websites and Apps Architecture Diagram

1

@gridhead
gridhead / zeb_py_usage.md
Created August 28, 2021 15:57
Zeb Py Usage
  1. git clone https://github.com/zebpay/zeb_py.git
  2. cd zeb_py
  3. virtualenv venv
  4. source venv/bin/activate
  5. python3 setup.py install
  6. pip3 install requests pycrypto
  7. Add from zebpay_client import zebpay_rest_client in your module to use functions
@gridhead
gridhead / gitblit-noarch.Dockerfile
Last active August 22, 2021 16:11
GitBlit Dockerfile
FROM centos:latest
LABEL maintainer "Akashdeep Dhar <[email protected]>"
RUN ["dnf", "install", "java", "wget", "-y"]
RUN ["wget", "https://github.com/gitblit/gitblit/releases/download/v1.9.1/gitblit-1.9.1.tar.gz"]
RUN ["tar", "-xvzf", "gitblit-1.9.1.tar.gz"]
RUN ["rm", "gitblit-1.9.1.tar.gz"]
WORKDIR /gitblit-1.9.1
EXPOSE 8080 8443 9418 29418
ENTRYPOINT ["sh", "/gitblit-1.9.1/gitblit.sh"]
@gridhead
gridhead / etherpad-noarch.Dockerfile
Created August 22, 2021 13:11
Etherpad Dockerfile
FROM docker.io/library/node:latest
LABEL maintainer "Akashdeep Dhar <[email protected]>"
WORKDIR /data
RUN git clone --branch master https://github.com/ether/etherpad-lite.git .
EXPOSE 9001
ENTRYPOINT ["sh", "/data/src/bin/run.sh", "--root"]
@gridhead
gridhead / calc-anohana-the-flower-we-saw-that-day-s01eXX.csv
Last active December 5, 2021 15:41
Calculation Size Decrease (1080p30 to 720p30 with H.265 MKV Handbrake preset)
We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 7 columns, instead of 2 in line 6.
#,Filename,Source Spec,Destination Spec,Source Size (MB),Destination Size (MB),Percentage Change (%)
1,Anohana The Flower We Saw That Day (2011) S01E01,Video 1920x1080 (H.265 Main 10) / Audio MPEG-4 AAC 100kbps,Video 1280x720 (H.265 Main) / Audio MPEG-4 AAC 160kbps,223,156,-42.95
2,Anohana The Flower We Saw That Day (2011) S01E02,Video 1920x1080 (H.265 Main 10) / Audio MPEG-4 AAC 100kbps,Video 1280x720 (H.265 Main) / Audio MPEG-4 AAC 160kbps,257,183,-40.44
3,Anohana The Flower We Saw That Day (2011) S01E03,Video 1920x1080 (H.265 Main 10) / Audio MPEG-4 AAC 100kbps,Video 1280x720 (H.265 Main) / Audio MPEG-4 AAC 160kbps,247,175,-41.14
4,Anohana The Flower We Saw That Day (2011) S01E04,Video 1920x1080 (H.265 Main 10) / Audio MPEG-4 AAC 100kbps,Video 1280x720 (H.265 Main) / Audio MPEG-4 AAC 160kbps,218,152,-43.42
5,Anohana The Flower We Saw That Day (2011) S01E05,Video 1920x1080 (H.265 Main 10) / Audio MPEG-4 AAC 100kbps,Video 1280x720 (H.265 Main) / Audio MPEG-4 AAC 160kbps,212,149,-42.28
6,Anohana The Flower We
@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
    
@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 / 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 / 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