Skip to content

Instantly share code, notes, and snippets.

View jamesy0ung's full-sized avatar

James Young jamesy0ung

View GitHub Profile

Phase 1: Prepare Kernel (Linux aarch64 Build VM)

  1. Download & Extract Kernel:

    wget https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.6.85.tar.xz
    tar xvJf linux-6.6.85.tar.xz
    cd linux-6.6.85
  2. Configure & Compile Kernel:

0000000000001694 T _OSAtomicAdd32
0000000000001694 T _OSAtomicAdd32Barrier
00000000000016b8 T _OSAtomicAdd64
00000000000016b8 T _OSAtomicAdd64Barrier
0000000000001614 T _OSAtomicAnd32
0000000000001614 T _OSAtomicAnd32Barrier
0000000000001644 T _OSAtomicAnd32Orig
0000000000001644 T _OSAtomicAnd32OrigBarrier
0000000000001674 T _OSAtomicCompareAndSwap32
0000000000001674 T _OSAtomicCompareAndSwap32Barrier

Chapter 1

  • Exercise 1-1: Run the ``hello, world'' program on your system. Experiment with leaving out parts of the program, to see what error messages you get.
  • Exercise 1-2: Experiment to find out what happens when prints's argument string contains \c, where c is some character not listed above.
  • Exercise 1-3: Modify the temperature conversion program to print a heading above the table.
  • Exercise 1-4: Write a program to print the corresponding Celsius to Fahrenheit table.
  • Exercise 1-5: Modify the temperature conversion program to print the table in reverse order, that is, from 300 degrees to 0.
  • Exercise 1-6: Verify that the expression getchar() != EOF is 0 or 1.
  • Exercise 1-7: Write a program to print the value of EOF.
  • Exercise 1-8: Write a program to count blanks, tabs, and newlines.
# Ensure the script is running as Administrator
If (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {
Write-Output "Please run this script as an Administrator!"
Exit
}
# Define the registry paths to clean
$graphicsDriversPath = "HKLM:\SYSTEM\CurrentControlSet\Control\GraphicsDrivers"
$subKeys = @("Configuration", "Connectivity", "ScaleFactors")
#include <iostream>
#include <limits>
#include <string>
#include <array>
#include <cmath>
void readInput(const std::string& prompt, double& variable, bool& isKnown) {
std::cout << prompt;
std::string input;
std::getline(std::cin, input);
#include <string>
#include <iostream>
#include <thread>
#include <random>
#include <atomic>
#include <vector>
#include <iomanip>
#include <chrono>
#include <algorithm>
#include <array>
#include <string>
#include <iostream>
#include <thread>
#include <random>
#include <atomic>
#include <vector>
#include <iomanip>
#include <chrono>
#include <algorithm>
#include <array>
#include <iostream>
const int c = { 299792458 };
float findWavelength(float frequency)
{
return(c / (frequency * 1000000)); // Convert MHz to Hz and use meters for wavelength
}
float findDipoleLeg(float wavelength)
#include <iostream>
#include <climits>
long long int f0 = { 0 };
long long int f1 = { 1 };
long long int fn = {};
int main()
{
std::cout << "Printing fibbonacci sequence\n";
@jamesy0ung
jamesy0ung / oculusDebloater.bat
Created October 19, 2024 01:32
Meta/Oculus debloater
@echo off
echo Disabling Oculus packages...
adb shell pm disable-user --user 0 com.oculus.explore
if %errorlevel% neq 0 echo Failed to disable com.oculus.explore
adb shell pm disable-user --user 0 com.oculus.socialplatform
if %errorlevel% neq 0 echo Failed to disable com.oculus.socialplatform
adb shell pm disable-user --user 0 com.meta.curio.toybox