Skip to content

Instantly share code, notes, and snippets.

View Frontear's full-sized avatar
🚫
Hiatus due to school.

Ali Rizvi Frontear

🚫
Hiatus due to school.
View GitHub Profile
@Frontear
Frontear / benchmarks.md
Last active July 12, 2024 00:19
Lix/Nix/Nix-Super Benchmarks

Benchmarking Nix (and its derivatives)

The configuration used for testing was my own, and can be found at Frontear/dotfiles. To test in much the same way, the following command was used to run 10 isolated benchmarks:

# This was run within the root of my repo.
# To obtain working versions of the other nix* derivatives, use `nix shell` so that there is no overhead in processing the store.

for i in $(seq 1 10); do
 time nix eval '.#nixosConfigurations.LAPTOP-3DT4F02.config.system.build.toplevel.drvPath' --no-eval-cache
@Frontear
Frontear / flake.nix
Last active April 21, 2024 05:42
little devshell to try and build a flutter environment
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = { self, ... } @ inputs:
let
# https://ayats.org/blog/no-flake-utils
eachSystem = function: inputs.nixpkgs.lib.genAttrs [
"x86_64-linux"
@Frontear
Frontear / Makefile
Created March 11, 2024 19:04
Makefile template for C
PROJECT_NAME := TEMPLATE
CC ?= gcc
CFLAGS := -Wall -Wextra
OUT_PATH := ${PWD}/out
BIN_PATH := ${OUT_PATH}/bin
OBJ_PATH := ${OUT_PATH}/obj
SRC_PATH := ${PWD}/src
@Frontear
Frontear / configuration.nix
Created October 27, 2023 23:22
My first attempt at running NixOS
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running `nixos-help`).
{ config, lib, pkgs, ... }: {
imports = [
#<nixos-hardware/dell/inspiron/14-5420>
# Include the results of the hardware scan.
./hardware-configuration.nix
];
@Frontear
Frontear / frontear.gpg
Last active October 29, 2024 02:03
My public GPG key
-----BEGIN PGP PUBLIC KEY BLOCK-----
mDMEZu9eABYJKwYBBAHaRw8BAQdAppXGjFNdtjDM/eH/TV3BdA0Zi0T7+7T39liO
rCCvxJi0IEFsaSBSaXp2aSA8Y29udGFjdEBmcm9udGVhci5kZXY+iI4EExYKADYW
IQRqJd6+QdsMFTq1uzRSkOGLhwUagwUCZu9eAAIbAQQLCQgHBBUKCQgFFgIDAQAC
HgUCF4AACgkQUpDhi4cFGoPkIAD+IhIUFpj8SiseOunSWXezMOffn0ftj/+bt9gx
/3fTP6EA/i5P8itODExmG3ezlt7vMVNOprhMjtAJhG3njDuQtwgHtCZBbGkgUml6
dmkgPHBlcm0taXRlcmF0ZS0wYkBpY2xvdWQuY29tPoiOBBMWCgA2FiEEaiXevkHb
DBU6tbs0UpDhi4cFGoMFAmbvXgACGwEECwkIBwQVCgkIBRYCAwEAAh4FAheAAAoJ
EFKQ4YuHBRqDTOYBAM3mwFMV8N4xJ3n9Xx6HO5uEyukIILBJxNZKEZCu5G4gAQC6
@Frontear
Frontear / chars.txt
Created March 23, 2023 20:40
A program made for vanessa to parse hollywood u characters from a dataset file
Action Hero + Action Hero = Action Hero
Action Hero + anything = Action Hero
Agent + Agent = Agent or Reality TV
Agent + anything = Agent or Reality TV
Agent + Reality TV = Agent or Reality TV
Celeb Athlete + Stunt = Martial Artist
Celebutante + anything = Celebutante or Model
Celebutante + Celebutante = Model or Celebutante
Composer + Composer = Composer
Composer + Model or Celebutante = Fairy Tale
@Frontear
Frontear / Setting Up MSYS2 as Default Terminal.md
Created February 12, 2023 02:26 — forked from Philanatidae/Setting Up MSYS2 as Default Terminal.md
Instructions to remind myself how to set up MSYS2 as my default terminal in Windows.

Setting Up MSYS2 as Default Terminal

  1. Download and install MSYS2: https://www.msys2.org/.
  2. Open MSYS2 and run pacman -Syu to update packages.
  3. Open file explorer and go to C:\msys64.
  4. Open all the INI files for the systems (clang32.ini, clang64.ini, mingw32.ini, mingw64.ini, msys2.ini) and uncomment the MSYS2_PATH_TYPE=inherit line. This allows the Windows $PATH variable to be included in the shells.
  5. Download and install Windows Terminal from the Windows store.
  6. Open the settings for Windows Terminal and click "Open JSON".
  7. Copy and paste the following objects into the "list" array under "profiles":
{
@Frontear
Frontear / jflags.sh
Created December 8, 2022 22:08
A command to find all the JVM flags for a respective JVM installation on a local system.
#!/bin/sh
# -version is just a filler command so that we can execute the process.
java -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+PrintFlagsFinal -version > flags.txt
@Frontear
Frontear / main.py
Created September 3, 2022 07:20
An attempt to try and rewrite the metadata for media downloaded via Google Takeout
import re
import os
import sys
import json
from pathlib import Path
#from tinytag import TinyTag
#import ffmpeg
#from PIL import Image
#from PIL.ExifTags import TAGS
@Frontear
Frontear / jvm_descriptor_generator.py
Last active October 11, 2021 20:21
A python script designed to output jvm descriptors with respect to the standards set by mixin.
"""
Implement the descriptor spec defined in Java 16: https://docs.oracle.com/javase/specs/jvms/se16/html/jvms-4.html#jvms-4.3
It is given respect to mixin standards, found at: https://github.com/SpongePowered/Mixin
package com.github.frontear;
class Main {
private int num;
private String str;