This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[gd_resource type="Theme" load_steps=12 format=3 uid="uid://7bvxnk5n5imx"] | |
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_6h42l"] | |
content_margin_left = 10.5 | |
content_margin_top = 8.75 | |
content_margin_right = 10.5 | |
content_margin_bottom = 8.75 | |
bg_color = Color(0.117647, 0.117647, 0.117647, 1) | |
draw_center = false | |
border_color = Color(1, 1, 1, 0.137255) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// a simple event loop with Fibers (PHP 8 >= 8.1.0) | |
// in a style slightly inspired by Python's asyncio | |
// this will not immediately increase the throughput of your code | |
// since the functions are still executed sequentially in the event loop | |
// unless you can combine it with a non-blocking stream/socket | |
// to create the impression of io parallelism |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env -S bash -c "docker run -p 8080:8080 -it --rm \$(docker build --progress plain -f \$0 . 2>&1 | tee /dev/stderr | grep -oP 'sha256:[0-9a-f]*')" | |
# syntax = docker/dockerfile:1.4.0 | |
FROM node:20 | |
WORKDIR /root | |
RUN npm install sqlite3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
import os | |
import requests | |
from abc import ABC, abstractmethod | |
parser = argparse.ArgumentParser( | |
description=""" | |
Generates testing files for JS libraries that are popular with htmx. | |
Run --setup first to download libraries for local use. | |
A separate file for each library will be generated - timing is done with console.time and console.timeEnd. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
function $debug(...args) { | |
console.log('debug', ...args); | |
} | |
function $on(eventName, callback) { | |
document.currentScript.parentElement.addEventListener(eventName, callback); | |
} | |
function $send(element, name, detail) { | |
let event = new CustomEvent(name, { detail: detail, bubbles: true }); | |
element?.dispatchEvent(event); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://askubuntu.com/questions/1254364/how-to-control-fans-on-an-asus-laptop/1398098#1398098 | |
cat << EOF >>~/.bashrc | |
alias fan-turbo='cd /sys/devices/platform/asus-nb-wmi; sudo sh -c "echo 1 >> fan_boost_mode"; sudo sh -c "echo 1 >> throttle_thermal_policy"; source ~/.bashrc; cd ~;' | |
alias fan-performance='cd /sys/devices/platform/asus-nb-wmi; sudo sh -c "echo 0 >> fan_boost_mode"; sudo sh -c "echo 0 >> throttle_thermal_policy"; source ~/.bashrc; cd ~;' | |
alias fan-silent='cd /sys/devices/platform/asus-nb-wmi; sudo sh -c "echo 2 >> fan_boost_mode"; sudo sh -c "echo 2 >> throttle_thermal_policy"; source ~/.bashrc; cd ~;' | |
EOF | |
source ~/.bashrc |
OlderNewer