Skip to content

Instantly share code, notes, and snippets.

View Alex313031's full-sized avatar

Alex F. Alex313031

View GitHub Profile
@Alex313031
Alex313031 / unistd.h
Created August 30, 2025 08:54 — forked from mbikovitsky/unistd.h
Windows unistd.h replacement
#ifndef _UNISTD_H
#define _UNISTD_H 1
/* This file intended to serve as a drop-in replacement for
* unistd.h on Windows.
* Please add functionality as neeeded.
* Original file from: http://stackoverflow.com/a/826027
*/
#include <stdlib.h>
@Alex313031
Alex313031 / chudnovsky.cpp
Created August 7, 2025 17:44 — forked from komasaru/chudnovsky.cpp
C++ source code to compute pi with Chudnovsky formula and Binary Splitting Algorithm using GMP libarary.
/***************************************************************
* Computing pi by Binary Splitting Algorithm with GMP libarary.
**************************************************************/
#include <cmath>
#include <iostream>
#include <fstream>
#include <gmpxx.h>
using namespace std;
@Alex313031
Alex313031 / C++_Toddler_Chart.md
Last active July 22, 2025 02:02
C++ For Toddlers

C++ for Toddlers

  1. Lesson One: Built in data types

int is for when you want to count something.
float is for when you want to count something reallly accurately.
bool is for when you want to decide something.
void is for when you want to do something.
nullptr is for when you don't want to do something.
const is for when you want something to wander but be left alone.

target_os = "win"
target_cpu = "x64"
is_official_build = true
is_full_optimization_build = true
is_debug = false
is_component_build = false
#disable_fieldtrial_testing_config = true
enable_nacl = false
symbol_level = 0
#optimize_webui = true

πŸ’₯ Primo Build Server Bill of Materials πŸ’» πŸ’₯

βœ… Goals

Create a build server that will be used to auto-build revisions of Primo anytime a commit is pushed to the repository. It should use the most powerful CPU (by core count), and a decent hunk of RAM. Other components don't matter as much, as long as the CPU stays fed with power and nice and cool so it can toil away for us. This is a list which describes the parts, why I picked them, links to buy them, and at the end, a rough estimate of the total cost of ownership (minus electric power bills) for the machine.

πŸ’Ύ Hardware list - with descrip. and links πŸ”—

1. CPU - Ryzen Threadripper 7980X. 64Cores/128Threads @ 3.5 - 4.1Ghz.
This one is non-negotiable, otherwise, it defeats the point of the build: Compile Primo as fast

@Alex313031
Alex313031 / keys.md
Created April 6, 2024 11:46 — forked from thepwrtank18/keys.md
Windows XP/2003 Product Keys

Windows XP/2003 Product Keys

These keys have been tested to work. These are a combination of keys from Chinese websites, trial keys inside ISO's, auto-activate keys in OEM ISO's, and directly from Microsoft's website, all aggregated for your convenience.

Usage

In order to use these keys, you need the right edition of Windows XP/2003. Not just Home/Pro/Enteprise/etc, whether it's a Retail, OEM or Volume version. There's a clear cut way to check this.

If you see this, you have a Retail copy.
image

@Alex313031
Alex313031 / smutnyleszek-themerc
Created February 29, 2024 19:12 — forked from magicznyleszek/smutnyleszek-themerc
Crunchbang Openbox theme
!! --------------------------------------------------
!! Theme: smutnyleszek
!! Description: Based on waldorf CrunchBang theme
!! Author: Leszek Pietrzak <[email protected]>
!! Web: http://leszekpietrzak.com
!! --------------------------------------------------
!! --------------------------------------------------
!! Color palette:
@Alex313031
Alex313031 / vdi-file-compacting.md
Created January 4, 2024 22:47
How to compact VirtualBox's VDI file size?

Source: StackOverflow

1. Run defrag in the guest (Windows only)

2. Nullify free space:

With a Linux Guest run this:

sudo dd if=/dev/zero | pv | sudo dd of=/bigemptyfile bs=4096k
sudo rm -rf /bigemptyfile
@Alex313031
Alex313031 / cr_mem_total.ps1
Created November 30, 2020 05:34
PowerShell script to show total mem usage for chromium/chrome. --Uses process name so If you have chromium open with other chrome i.e. beta, dev, canary it will show that too.
echo "Chromium Total Working Set Usage PS1 Script @Alex313031"
(Get-Process chrome | Measure-Object WorkingSet -sum).sum /1GB
pause