Skip to content

Instantly share code, notes, and snippets.

View CTimmerman's full-sized avatar

Cees Timmerman CTimmerman

View GitHub Profile
@PaulStSmith
PaulStSmith / HelloWorld.java
Last active March 17, 2025 01:24 — forked from lolzballs/HelloWorld.java
Hello World Enterprise Edition
import java.io.FileDescriptor;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintStream;
/**
* Main class for the HelloWorld application.
*/
public class HelloWorld {

Common Media Query breakpoints:

Breakpoint Description
< 481px Mobile devices
481px — 768px iPads, Tablets
769px — 1024px Small screens, laptops
1025px — 1200px Desktops, large screens
1201px and greater Extra large screens, TV

Bootstrap breakpoints:

@jph00
jph00 / epi_sir_basic.ipynb
Created September 12, 2021 12:59
Basic SIR epidemic model
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@supermarsx
supermarsx / FixRealtekPoppingSound.ps1
Last active February 13, 2024 05:24
Fix popping sound on some Realtek sound cards, realtek audio crackling patch
# Enable Realtek driver power management, this is the default value
REG ADD "HKCU\Software\Realtek\RAVCpl64\PowerMgnt" /v "Enabled" /t REG_DWORD /d 1 /f
# Disable Realtek driver power management, sometimes fixes realtek popping sound
REG ADD "HKCU\Software\Realtek\RAVCpl64\PowerMgnt" /v "Enabled" /t REG_DWORD /d 0 /f
# Replace XXXX with the corresponding key that has "Realtek" in the "DriverDesc", find using regedit
REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Class\{4d36e96c-e325-11ce-bfc1-08002be10318}\XXXX\PowerSettings" /v "IdlePowerState" /t REG_BINARY /d "ffffffff" /f
REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Class\{4d36e96c-e325-11ce-bfc1-08002be10318}\XXXX\PowerSettings" /v "PerformanceIdleTime" /t REG_BINARY /d "ffffffff" /f
# Example if class is in 0000
@CTimmerman
CTimmerman / SolarHydrogenFusionPower.md
Last active December 5, 2024 05:26
Water & Power

Heat and power

I have district heating from a combined heat and power plant, which should be 80+% efficient. A solar air to water heat pump could be more efficient at 29% * usually 200% but sometimes 400% (For reference, traditional gas boilers only go up to 94%.) = 58% to 116%, the latter might require ground instead of air. CO2 is a relatively safe refrigerant.

According to ChatGPT: The efficiency of a typical modern steam turbine in a power plant is around 30-40%. Fuel cells can achieve efficiencies in the range of 40% to 60% or even higher for solid oxide fuel cells (SOFCs). Those and molten carbonate fuel cells (MCFCs) are used in combined hea

@CTimmerman
CTimmerman / Windows_sucks.md
Last active April 2, 2025 21:58
Windows sucks, too.

Windows sucks, too!

Audio

Apps

@CTimmerman
CTimmerman / fail.md
Last active May 25, 2025 15:26
Tech fails

If you don't learn from the past you're doomed to repeat it.

Audio

  • Dell
  • Latitude 5501 sounds even worse than my MSI MS-16P7 due to ratting its plastic case. Interviews sound like a poor phone connection. Iron Maiden - Can I Play With Madness on the other hand is tolerable and even has some bass, almost enough for Robbie Williams - Angels, which sounds like a not-quite-tuned FM radio for the vocals (too little power), particularly noticable on U2 - Discotheque. Without "audio enhancements" disabled, its audio jack adds a rumble to videos like this. Worst audio hardware I've ever used, especially playing this. Then again, using my
function _draw()
cls(8)
srand(5)
-- Iterate every 8 square pixels of the screen.
-- The `.5` is to make sure the points are at the center of each pixel.
-- We'll draw one wall of the maze in each square.
for y=.5,129,8 do
for x=.5,129,8 do
-- Progress in the rotation cycle. One rotation is [0..1]
@CTimmerman
CTimmerman / coal_vs_coal_ash_energy_content.md
Last active May 15, 2025 17:35
Coal ash contains more energy than was gained from burning the coal.

Coal ash contains more energy than was gained from burning the coal.

https://www.world-nuclear.org/information-library/facts-and-figures/heat-values-of-various-fuels.aspx

Natural uranium, in FNR                28,000,000 MJ/kg [so 28e9 J/g]
Hard black coal (IEA definition)            >23.9 MJ/kg
Hard black coal (Australia & Canada)        c. 25 MJ/kg [so 25e3 J/g and 207.25 g/mol according to https://pubchem.ncbi.nlm.nih.gov/compound/1-Anthrylmethanolate]
Sub-bituminous coal (IEA definition)    17.4-23.9 MJ/kg
Sub-bituminous coal (Australia & Canada)    c. 18 MJ/kg
Lignite/brown coal (IEA definition)         <17.4 MJ/kg
@nhymxu
nhymxu / README-python-framework-benchmark.md
Last active April 3, 2025 09:58
Flask vs Falcon vs FastAPI benchmark
gunicorn run:app --workers=9
gunicorn run:app --workers=9 --worker-class=meinheld.gmeinheld.MeinheldWorker

Macbook Pro 2015 Python 3.7

Framework Server Req/s Max latency +/- Stdev