Skip to content

Instantly share code, notes, and snippets.

View hellozimi's full-sized avatar
⌨️
Making stuff!

Simon Andersson hellozimi

⌨️
Making stuff!
View GitHub Profile
@CrazyCoder
CrazyCoder / XTH-generator.html
Last active December 10, 2025 21:36
Batch XTH file generator for Xteink X4
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>批量XTH文件生成器</title>
<style>
* {
box-sizing: border-box;
margin: 0;
@CrazyCoder
CrazyCoder / XTC-XTG-XTH-XTCH.md
Last active December 12, 2025 17:40
XTC/XTG/XTH/XTCH Format Technical Specification (for Xteink X4)

This document is generated by AI, and there may be issues with the specific details.

XTC/XTG/XTH/XTCH Format Technical Specification

Document Information

  • Version: 1.0
  • Date: 2025-01-XX
  • Purpose: Public technical specification for format conversion
  • Target Platform: ESP32 E-Paper Display Devices
@kamilogorek
kamilogorek / _screenshot.md
Last active November 6, 2025 06:15
Clutter-free VS Code Setup
image
@thehesiod
thehesiod / freeze_time.sql
Created May 20, 2020 09:41
fake/mock now on postgres DB
-- inspiration from https://dba.stackexchange.com/questions/69988/how-can-i-fake-inet-client-addr-for-unit-tests-in-postgresql/70009#70009
CREATE SCHEMA if not exists override;
create table if not exists override.freeze_time_param_type
(
param_type text not null primary key
);
insert into override.freeze_time_param_type values ('enabled'), ('timestamp'), ('tick') on conflict do nothing;
@var23rav
var23rav / MoveFile.go
Last active November 22, 2024 02:38
GoLang: os.Rename() give error "invalid cross-device link" for Docker container with Volumes. MoveFile(source, destination) will work moving file between folders
import (
"fmt"
"io"
"os"
)
/*
GoLang: os.Rename() give error "invalid cross-device link" for Docker container with Volumes.
MoveFile(source, destination) will work moving file between folders
*/

Fixing macOS 10.14, 10.15, 12

Dark main menu without the rest of dark mode

  1. Set Light mode
  2. defaults write -g NSRequiresAquaSystemAppearance -bool Yes
  3. Log out and log back in
  4. Set Dark mode
@iwuvjhdva
iwuvjhdva / capture_zap_output.go
Created October 26, 2017 13:21
Capture Golang Zap logger output for unit tests
import (
"bufio"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
)
/*
Global Logger variable is a Zap logger.
@StevenACoffman
StevenACoffman / Docker Best Practices.md
Last active July 16, 2025 13:09
Docker Best Practices

Mistakes to Avoid: Docker Antipatterns

Whichever route you take to implementing containers, you’ll want to steer clear of common pitfalls that can undermine the efficiency of your Docker stack.

Don’t run too many processes inside a single container

The beauty of containers—and an advantage of containers over virtual machines—is that it is easy to make multiple containers interact with one another in order to compose a complete application. There is no need to run a full application inside a single container. Instead, break your application down as much as possible into discrete services, and distribute services across multiple containers. This maximizes flexibility and reliability.

Don’t install operating systems inside Docker containers

It is possible to install a complete Linux operating system inside a container. In most cases, however, this is not necessary. If your goal is to host just a single application or part of an application in the container, you need to install only the essential

@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active January 18, 2026 01:11
GLSL Noise Algorithms

Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
@adamawolf
adamawolf / Apple_mobile_device_types.txt
Last active January 16, 2026 20:41
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
arm64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S