Skip to content

Instantly share code, notes, and snippets.

@GetVladimir
GetVladimir / Force-RGB-Color-on-M1-Mac.md
Last active March 19, 2024 07:55
Force RGB Color on M1 Mac

Force RGB Color on M1 Mac

How to Force RGB Color Output instead of YPbPr on your M1 Apple Silicon Mac for an External Monitor.

This step-by-step video tutorial will guide you through the procedure of forcing RGB color output on your M1 Mac.

Force RGB Color on M1 Mac

Here is the direct link to the video tutorial: https://www.youtube.com/watch?v=Z1EqH3fd0V4

The video also has Closed Captions (Subtitles) that you can enable, to make it easier to follow if needed.

@PurpleVibe32
PurpleVibe32 / vmwk17key-5000keys-unchecked.txt
Created February 21, 2023 19:28
5000k+ vmware workstation pro 17 (untested)
4U612-DN31H-MJEJ0-0V0Z4-978HD
5G44H-ACH50-0J4C9-1VC5P-CY0QD
JC000-8G047-MJDF1-0H3E6-8QR5F
JV2NU-0XL5N-0J4Q8-0T0E6-8GH56
JZ6E0-4R1E0-HJ1Q0-1R8NH-3AK28
0Z48K-4X29Q-MJE80-113GK-C7K3A
HF4H0-46K80-MJ8D9-1KAZP-CKK12
NY69H-2N05P-HJ170-1V1ZM-CG222
4C45A-D8J0H-HJ5T0-1T25H-92A76
0Z4H2-0WK9K-4JE10-0T9G6-9C8M4
@paulirish
paulirish / what-forces-layout.md
Last active March 19, 2024 07:51
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@xiaohk
xiaohk / how-to-make-taps-happy.md
Last active March 19, 2024 07:50
how-to-make-taps-happy

How To Make ACM TAPS Happy?

Here are some tips and tricks to make ACM TAPS stop complaining about your LaTeX source submission.

1. Only use ACM permitted packages

Remove all packages that are not listed in this webpage.

2. Add short description for \caption commands

import csv
import glob
import gzip
import json
import os
SNAPSHOT_DIR = 'openalex-snapshot'
CSV_DIR = 'csv-files'
FILES_PER_ENTITY = int(os.environ.get('OPENALEX_DEMO_FILES_PER_ENTITY', '0'))
@allsey87
allsey87 / python_plugin.rs
Last active March 19, 2024 07:47
Integrating RustPython into a Bevy App
use bevy::prelude::{AppBuilder, Entity, With, World};
use bevy::ecs::system::IntoExclusiveSystem;
use rustpython_vm::{self as vm, builtins::PyCode, PyRef, scope::Scope};
pub(crate) struct PythonPlugin;
pub(crate) struct Script(pub String);
fn compile(world: &mut World) {
let interpreter = world
@bhimrazy
bhimrazy / concurrent_task_executor.py
Created March 10, 2024 17:05
This Python code defines a function concurrent_task_executor that allows executing tasks concurrently on a list of data objects using ThreadPoolExecutor from the concurrent.futures module. It includes a progress bar using tqdm to track the completion of tasks. The function is useful for processing data in parallel, improving efficiency when deal…
import concurrent.futures
from typing import Any, Callable, List
from tqdm import tqdm
def concurrent_task_executor(task: Callable[[Any], None], data_list: List[Any], max_workers: int = 32, description: str = None) -> None:
"""
Execute tasks concurrently on a list of data objects using ThreadPoolExecutor.
Args:
task (Callable): The function to apply to each data object.
@abelcallejo
abelcallejo / README.md
Last active March 19, 2024 07:46
Create bootable Linux USB using Mac

Creating bootable Linux USB using Mac

mac

CentOS, Ubuntu, Slackware, etc. Whatever Linux-based OS it is, you can create a bootable USB for it by using a Mac.

1. Prepare the .iso file

Download it, copy it, whatever it takes to prepare that Linux-based OS .iso file

2. Convert the .iso file into a .img.dmg

@mbostock
mbostock / .block
Last active March 19, 2024 07:45
Wrapping Long Labels
license: gpl-3.0
@susielu
susielu / README.md
Last active March 19, 2024 07:45
Circle Pack Labels

Circle Pack Labels

A technique to hack the current d3.layout.pack to add labels by adding a label node into the circle pack data before it is processed. By using the sizes of the children, you add a node to your nested data and create a space using the pack algorithm for the label. You will need to do some filtering to display the labels differently from other nodes at that level, but feel free to use this example as a guide.

I am planning on looking at the d3 code to see how easy it would be to make a build in label layer for this layout. But for now you can follow along with this block if you need circle pack labels today!

Really fun dataset on flight delays that I plan on investigating further: Airline on-time performance data provided by the Department of Transportation's Bureau of Transportation Statistics

Before