Skip to content

Instantly share code, notes, and snippets.

@aeishan
aeishan / README-Template.md
Last active February 8, 2025 01:59 — forked from DomPizzie/README-Template.md
myMonitoringTool.c README.md

myMonitoringTool.c

Displays the current memory usage, the differnece in CPU usage from one instance to the next, and the amount of cores on the computer using graphs and drawings, while also printing their curret values in real-time.

Description

Displays the current memory usage, the differnece in CPU usage from one instance to the next, and/or the amount of cores on the computer. Graphs are used to display the memory usage and difference in CPU usage nicely to show the trends of boht of them, and the cores are printed in rows of 4 depicting them accurately. The total memory being used is also printed, alongside the difference in CPU memory, and the maximum frequency at which the cores can run at. This is all dependent on user input. Users can also determine how many samples they'd like to see, and how long of a delay should occur between each sample. By default, samples is set to 20 and tdelay is set to 500000 microseconds (0.5 seconds).

Getting Started

@krassimird
krassimird / gist:5737539dd44404009498579b036ed459
Created February 8, 2025 01:15
From Git, extract SHA, description, files affected, inserted and deleted lines
git log 71b3556377e040cadcfacc67d86842cc483f6b9d..HEAD --reverse --pretty=format:"%H|%s" --shortstat | awk '
/file[s]* changed/ {
# Extract number of changed files
match($0, /[0-9]+ file[s]* changed/);
files = (RSTART > 0) ? substr($0, RSTART, RLENGTH) + 0 : 0;
# Extract number of insertions (default to 0 if missing)
match($0, /[0-9]+ insertion[s]*\(\+\)/);
insertions = (RSTART > 0) ? substr($0, RSTART, RLENGTH) + 0 : 0;
@DolphinOfficial
DolphinOfficial / PostShutdownFullLog.txt
Created February 8, 2025 01:15
Text file created by Roblox
-- AH POST-SERVER LOGS --
-- ServerID: c219cd1d-eb94-4a24-b8f3-938765cd56a9
-- Server started: February 08, 2025 01:12 AM UTC | Server uptime: 163 seconds
------------------ LOADB LOGS ------------------
{
}
@go4ble
go4ble / test.yaml
Last active February 8, 2025 01:15
test.yaml
client_id: 2g677plegrsh2bf4p4gh9lodpm
client_secret: 167ejdhpe9da5roh6m3aq4tc1f1edbr06783vslnq28tuo08dfav
user_pool_id: us-east-2_rhaXqF96q
@DolphinOfficial
DolphinOfficial / PostShutdownFullLog.txt
Created February 8, 2025 01:14
Text file created by Roblox
-- AH POST-SERVER LOGS --
-- ServerID: 1c88e249-da27-4f8e-9277-47c6d3a3fb27
-- Server started: February 08, 2025 12:49 AM UTC | Server uptime: 1485 seconds
------------------ LOADB LOGS ------------------
{
}
@yclwll
yclwll / javdb-top250.md
Created February 8, 2025 01:13 — forked from jinjier/javdb-top250.md
JavDB top 250 movies list. [Updated on 2025/01]
@iharabukhouski
iharabukhouski / point_to_point.cpp
Created February 8, 2025 01:13
nccl point-to-point
#include <cuda_runtime.h>
#include <nccl.h>
// #include <stdio.h>
#include <iostream>
int main() {
std::cout << "hi" << std::endl;
int n = 32 * 1024 * 1024;
@iharabukhouski
iharabukhouski / broadcast.cpp
Created February 8, 2025 01:12
nccl broadcast
#include <cuda_runtime.h>
#include <nccl.h>
#include <iostream>
int main() {
int n = 2;
int dtype = sizeof(float);
int size = n * dtype;
@okaybeydanol
okaybeydanol / nestedDotNotationPaths.ts
Created February 8, 2025 01:11
TypeScript: Extract Nested Object Keys as Dot-Notation Strings (With and Without Infer)
/**
* Recursively extracts nested keys of an object as dot-notation strings.
* Useful for representing nested object paths in a string format.
*
* Example:
* type Theme = { colors: { primary: string; secondary: { light: string; dark: string } } };
* type Paths = NestedDotNotationPaths<Theme['colors']>;
* "primary" | "secondary.light" | "secondary.dark"
*/
export type NestedDotNotationPaths<T> = T extends object
@HugsLibRecordKeeper
HugsLibRecordKeeper / output_log.txt
Created February 8, 2025 01:11
Rimworld output log published using HugsLib
Log uploaded on Friday, February 7, 2025, 5:11:09 PM
Loaded mods:
Prepatcher(zetrith.prepatcher): 0Harmony(2.3.3), 0PrepatcherAPI(1.2.0), 0PrepatcherDataAssembly(1.0.0), PrepatcherImpl(1.0.0), Prestarter(1.0.0)
Harmony(brrainz.harmony)[mv:2.3.0.0]: 0Harmony(2.3.3), HarmonyMod(2.3.0)
Fishery - Modding Library(bs.fishery): 0PrepatcherAPI(1.2.0), 1Fishery(0.6.1), System.Runtime.CompilerServices.Unsafe(av:6.0.0,fv:6.0.21.52210)
Core(Ludeon.RimWorld): (no assemblies)
Royalty(Ludeon.RimWorld.Royalty): (no assemblies)
Ideology(Ludeon.RimWorld.Ideology): (no assemblies)
Biotech(Ludeon.RimWorld.Biotech): (no assemblies)
Anomaly(Ludeon.RimWorld.Anomaly): (no assemblies)