Skip to content

Instantly share code, notes, and snippets.

@fatum12
fatum12 / ttc2ttf.pe
Last active April 24, 2024 02:45
Unpack .ttc and .dfont to .ttf using FontForge
#!/usr/local/bin/fontforge
# Usage: fontforge -script ttc2ttf.pe /path/to/font.ttc
fonts = FontsInFile($1)
n = SizeOf(fonts)
i = 0
while (i < n)
Open($1 + "(" + fonts[i] + ")", 1)
index = ToString(i + 1)
@anburocky3
anburocky3 / Vite-Tailwind-Github-Integration.md
Last active April 24, 2024 02:44
Tailwind, Vite integration with Github-Pages deployment steps

TailwindCss-Vite

  1. Create project using the below commands.
npm create vite@latest my-project-name
> Vanilla
> JavaScript
import React, {
createContext,
useState,
useCallback,
useContext,
useEffect,
} from 'react';
import AsyncStorage, {
useAsyncStorage,
@sonnny
sonnny / pico_bluetooth_gamepad.txt
Created January 5, 2024 13:50
demo of pico w bluetooth using an nes gamepad, demo of pio irq, send signal to program from pio
demo of nes gamepad using pico w bluetooth
source from https://codeberg.org/chipfire/rppico-bt-gamepad
/****************************
* bt_gamepad.c
**********************/
/**
* Copyright (c) 2023 Raspberry Pi (Trading) Ltd.
*
@quangpd
quangpd / Setup xampp multi PHP version
Created April 23, 2019 07:08
Setup xampp multi PHP version
1. Install XAMPP with the PHP Version you want to run mainly, e.g. PHP 7.2 => resides by default in Installpath\xampp\php
2. Copy other php Versions in Installpath\xampp\, eg PHP 5.4 in => Installpath\xampp\php5
If you are lazy like me, just grab the other php folder from old xampp installations, => beneficial since the used dlls are already in the right place
3 Make sure every php version on her own has a working php.ini.
use individual error logs per version:
error_log="D:\xampp\php5\logs\php_error_log"
error_log="D:\xampp\php\logs\php_error_log"
@anonymous1184
anonymous1184 / Ini.ahk
Last active April 24, 2024 02:42
Automatic configuration file handling.
; Version: 2023.04.20.1
; Usages and examples: https://redd.it/s1it4j
Ini(Path, Sync := true) {
return new Ini_File(Path, Sync)
}
class Ini_File {
@piousdeer
piousdeer / example.nix
Last active April 24, 2024 02:41
Create mutable files with home-manager and Nix
{
home.file."test-file" = {
text = "Hello world";
force = true;
mutable = true;
};
}
@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active April 24, 2024 02:39
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized

Docker Hub 镜像加速器

国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务。

Dockerized 实践 https://github.com/y0ngb1n/dockerized

配置加速地址

Ubuntu 16.04+、Debian 8+、CentOS 7+

Hex ChainId (Decimal) Network
0x1 1 Ethereum Main Network (Mainnet)
0x3 3 Ropsten Test Network
0x4 4 Rinkeby Test Network
0x5 5 Goerli Test Network
0x2a 42 Kovan Test Network
0xAA36A7 11155111 Sepolia Testnet
0x89 137 Polygon Main Network
0x13881 80001 Mumbai Test Network
0xA86A 43114 Avalanche C-Chain Main Network