Skip to content

Instantly share code, notes, and snippets.

View Frontear's full-sized avatar

Ali Rizvi Frontear

View GitHub Profile
@Frontear
Frontear / cps109_lab3.py
Created September 29, 2020 13:15
This is the code for CPS109 Lab 3
nums = []
while True:
x = float(input("Please enter a number: "))
nums.append(x)
if x < 0.0:
break
for x in range(len(nums)):
@Frontear
Frontear / Glyph.java
Created July 17, 2021 02:46
An attempt to draw text using GLFW
package org.example;
public final class Glyph {
private final int x, y, width, height;
public Glyph(final int x, final int y, final int width, final int height) {
this.x = x;
this.y = y;
this.width = width;
this.height = height;
@Frontear
Frontear / str_obfuscate.py
Last active October 26, 2021 17:42
A simple string obfuscation/deobfuscation python program. This was used as a non-secure, educational use only "encryption" for a school assignment.
import zlib
import base64
import hashlib
SEPARATOR = "\0"
ENCODING = "UTF-8"
HASHING = hashlib.blake2b
def encrypt(data: str, key: str) -> bytes:
arr = []
@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;
@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 / 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 / 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 / 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 / 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 / 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