Skip to content

Instantly share code, notes, and snippets.

@dvf
dvf / change-codec.md
Last active April 27, 2024 15:35
Enable High Quality mode on your headphones (Updated for macOS Catalina)

If you're using a high-end bluetooth headset on your Macbook Pro it's likely your mac is using an audio codec which favors battery efficiency over high quality. This results in a drastic degradation of sound, the SBC codec is the likely culprit, read more about it here.

Find out what codec you're using

  1. Play a song on your headphones
  2. Option (⌥) click the Bluetooth button at the top of your screen Inspect the Bluetooth Coded
  3. If you're using AAC or aptX, you can stop here—those are the highest quality codecs.

Change your codec to AAC or aptX

@CrendKing
CrendKing / !README.md
Last active April 27, 2024 15:33 — forked from mmozeiko/!README.md
Download MSVC compiler/linker & Windows SDK without installing full Visual Studio

This downloads standalone 64-bit MSVC compiler, linker & other tools, also headers/libraries from Windows SDK into portable folder, without installing Visual Studio. Has bare minimum components - no UWP/Store/WindowsRT stuff, just files & tools for 64-bit native desktop app development.

Run python.exe portable-msvc.py and it will download output into msvc folder. By default it will download latest available MSVC & Windows SDK - currently v14.32.17.2 and v10.0.22621.0.

You can list available versions with python.exe portable-msvc.py --show-versions and then pass versions you want with --msvc-version and --sdk-version arguments.

To use cl.exe/link.exe from output folder, first run setup.bat - after that PATH/INCLUDE/LIB env variables will be setup to use all the tools as usual. You can also use clang-cl.exe with these includes & libraries.

To use clang-cl.exe without running setup.bat, pass extra /winsysroot msvc argument (msvc is folder name where output is stored).

@chadaustin
chadaustin / colortest.rs
Created January 2, 2024 04:52
Detect Terminal Color and Character Attribute Support
#!/usr/bin/env -S rust-script -t nightly
#![feature(unix_sigpipe)]
use std::cmp::max;
const BASIC_COLORS: &[&str] = &[
"black", "red", "green", "yellow", "blue", "magenta", "cyan", "white",
];
fn title(t: &str) {
@Alecton4
Alecton4 / icons.all.ts
Created September 28, 2023 10:22
List of all Elastic UI Icons with `appendIconComponentCache`
// NOTE: This file exists because of a known issue with EUI.
import { ICON_TYPES } from "@elastic/eui";
import { appendIconComponentCache } from "@elastic/eui/es/components/icon/icon";
import { icon as accessibility } from "@elastic/eui/es/components/icon/assets/accessibility";
import { icon as addDataApp } from "@elastic/eui/es/components/icon/assets/app_add_data";
import { icon as advancedSettingsApp } from "@elastic/eui/es/components/icon/assets/app_advanced_settings";
import { icon as agentApp } from "@elastic/eui/es/components/icon/assets/app_fleet";
import { icon as aggregate } from "@elastic/eui/es/components/icon/assets/aggregate";
import { icon as analyzeEvent } from "@elastic/eui/es/components/icon/assets/analyzeEvent";
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active April 27, 2024 15:29
set -e, -u, -o, -x pipefail explanation
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="utf-8">
<title>Calculadora</title>
<script src="calculadora.js"></script>
</head>
<body bgcolor="beige">
<h1>Calculadora 1.0</h1>
<input type="text" id="txtValor1">
@craiglabenz
craiglabenz / chat_message_render_box.dart
Last active April 27, 2024 15:27
Demonstrates a custom RenderObject that draws chat messages like WhatsApp, where the `sentAt` timestamp is tucked into the last line if it fits
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
@NDHOMOU
NDHOMOU / hello.c
Last active April 27, 2024 15:22
mon hello world
int main()
{
printf("Hello world");
return 0;
}
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 27, 2024 15:22
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@gtx28
gtx28 / pve8arm-fresh.txt
Last active April 27, 2024 15:18
PVE8-ARM fresh install
***Pi-Mox8 setup on raspberry pi 4b (cm4 you will need to add the appropriate steps for your hw setup)
***Raspberry PI OS setup
***Install raspbian x64 lite on raspberry pi
pull the latest copy of Raspberry Pi Imager, from here https://www.raspberrypi.com/software/ and Raspberry PI OS x64 lite based on debian 11 bullseye from here: https://www.raspberrypi.com/software/operating-systems/#raspberry-pi-os-64-bit
open imager, click choose os, scroll to the bottom and select custom. open the image "2023-05-03-raspios-bullseye-arm64-lite.img.xz"