Skip to content

Instantly share code, notes, and snippets.

@ehsan18t
ehsan18t / processor-boost-mode.md
Last active January 19, 2025 06:01
Enable Processor Boost Mode Control in Advanced Power Settings

Enable Processor Boost Mode Control in Windows

Disable Turbo Boost to Reduce Power Consumption and Heat

Why Do We Need It?

The thing is if your laptop cpu is getting really hot and you are trying to undervolt it then chances are 99% that there are no method to do so. I have also tried to do undervolt my Ryzen 7 5800H but no luck. Because the bios doesn't allow that much control over the cpu. I don't know the specific reasons for the manufactures to restrict such a great thing. But with this you can disable the Turbo Boost. While this might sounds stupid but trust me you won't see a massive difference in performance after turned it off.

When You should Do It?

Direct copy of pre-encoded file:

$ ffmpeg -i filename.mp4 -codec: copy -start_number 0 -hls_time 10 -hls_list_size 0 -f hls filename.m3u8

@matthewzring
matthewzring / markdown-text-101.md
Last active January 19, 2025 05:58
A guide to Markdown on Discord.

Markdown Text 101

Want to inject some flavor into your everyday text chat? You're in luck! Discord uses Markdown, a simple plain text formatting system that'll help you make your sentences stand out. Here's how to do it! Just add a few characters before & after your desired text to change your text! I'll show you some examples...

What this guide covers:

@ayhc
ayhc / miyota9075.md
Last active January 19, 2025 05:54
List of watches with the Miyota 9075 GMT movement
@antonbabenko
antonbabenko / amz_content_sha256.js
Created November 19, 2024 16:11
Lambda@Edge (origin-request) for CloudFront OAC with Lambda Function URL integration for POST/PUT
'use strict';
const crypto = require('crypto');
exports.handler = (event, context, callback) => {
const request = event.Records[0].cf.request;
const headers = request.headers;
const method = request.method;
const body = Buffer.from(request.body.data, 'base64').toString();
@bradtraversy
bradtraversy / mysql_cheat_sheet.md
Last active January 19, 2025 05:47
MySQL Cheat Sheet

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

import kotlinx.cinterop.memScoped
import kotlinx.cinterop.allocArrayOf
import kotlinx.cinterop.addressOf
import kotlinx.cinterop.usePinned
import platform.Foundation.NSData
import platform.Foundation.create
import platform.posix.memcpy
public fun ByteArray.toData(): NSData = memScoped {
NSData.create(bytes = allocArrayOf(this@toData),

Preact + Material-UI example

Preact is a fast 3kB alternative to React with the same modern API.

This example uses shows how to use Material UI 4 with Preact X and Preact CLI 3.

How to use

git clone blah preact-mui
@Maharshi-Pandya
Maharshi-Pandya / contemplative-llms.txt
Last active January 19, 2025 05:42
"Contemplative reasoning" response style for LLMs like Claude and GPT-4o
You are an assistant that engages in extremely thorough, self-questioning reasoning. Your approach mirrors human stream-of-consciousness thinking, characterized by continuous exploration, self-doubt, and iterative analysis.
## Core Principles
1. EXPLORATION OVER CONCLUSION
- Never rush to conclusions
- Keep exploring until a solution emerges naturally from the evidence
- If uncertain, continue reasoning indefinitely
- Question every assumption and inference
@Knoph1
Knoph1 / Knoph's FreeCampCode.hmtl
Last active January 19, 2025 05:37
Knoph's FreeCampCode
<html>
<body>
<main>
<h1>CatPhotoApp</h1>
<section>
<h2>Cat Photos</h2>
<!-- TODO: Add link to cat photos -->
<p>See more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a> in our gallery.</p>
<a href="https://freecatphotoapp.com"><img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back."></a>
</section>