Skip to content

Instantly share code, notes, and snippets.

View starise's full-sized avatar
Damn fine coffee

Andrea Brandi starise

Damn fine coffee
View GitHub Profile
html {
font-size: 100%;
overflow-y: scroll;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
body {
color: #000;
font-family: Georgia, Palatino, 'Palatino Linotype', Times, 'Times New Roman', serif;

Keybase proof

I hereby claim:

  • I am starise on github.
  • I am andreabrandi (https://keybase.io/andreabrandi) on keybase.
  • I have a public key whose fingerprint is B3FE C538 AED1 D500 3AE5 9711 B3A9 CC06 BF3B 6C60

To claim this, I am signing this object:

@starise
starise / Comparison - Todo Sizes.md
Created September 20, 2022 20:46 — forked from ryansolid/Comparison - Todo Sizes.md
Looking at how frameworks scale using their official TodoMVC Example and Vite

Based on Evan You's comparison which included Svelte and Vue. https://github.com/yyx990803/vue-svelte-size-analysis

For Preact, React, and Solid I took their official TodoMVC and ran them through Vite (2.3.6) to get vendor. For the components I grabbed the unminified source, ran it through Terser Repl, removed the imports, and ran through Brotli.

I wanted to use hooks for React and Preact since those are much smaller but all the official demos use classes. Adding Hooks adds library weight to Preact but it is worth it for this comparison(Preact with classes was 1.60kb and 3.81kb). Honestly I couldn't find a good hooks implementation for React/Preact that was small so I made one myself based on Solid.

Preact React Solid Svelte Vue
component size (brotli) 1.21kb 1.23kb 1.26kb 1.88kb 1.10kb
@starise
starise / create_mount_qcow2.md
Last active July 20, 2022 11:29
Create and mount a qcow2 disk image

How to create a qcow2 disk image

$ qemu-img create -f qcow2 ./disk.img 2G

Connect the image to a virtual device

# Enable QEMU Disk Network Block Device Server
@starise
starise / howto_conventional_commit.md
Last active April 14, 2022 21:06
Prepare a new project to be conventional commit ready

Conventional Commit

Prepare a repository to be conventional commit ready with:

  • commitlint - Lint commit messages
  • husky - Modern native git hooks made easy
  • commitizen - Prompt to fill out required fields at commit time

commitlint

<!DOCTYPE html>
<html lang=X-LANG>
<meta charset=X-ENCODING>
<title>X-TITLE</title>
<link rel="stylesheet" href="X-STYLESHEET">
<p>X-CONTENT
@starise
starise / service.sh
Created February 15, 2021 15:50 — forked from n1trux/service.sh
arch linux service wrapper
#!/bin/sh
###########################################################################
# /usr/bin/service
#
# A convenient wrapper for the /etc/init.d init scripts.
#
# This script is a modified version of the /sbin/service utility found on
# Red Hat/Fedora systems (licensed GPLv2+).
#
@starise
starise / paperclips.js
Created October 17, 2017 13:03 — forked from brfreeman36/paperclips.js
Paperclips
var loop = setInterval(function(){
clipClick(1);
buyingWire();
letsQuantumCompute();
runTournament();
}, 2)
function buyingWire(){
//if (wireCost < wireBasePrice && wire < 1000000 || wire < 1){ // Not working well for early game
@starise
starise / windir.sh
Created September 24, 2017 11:42 — forked from Plazmaz/windir.sh
This is a simple function for converting windows paths (C:\Users\Test\t.txt) to their WSL equivalent (/mnt/c/Users/Test/t.txt)
# !/bin/bash
function windir() {
echo "/mnt/$1" | sed -e 's/\\\\/\//g' -e 's/\b\(.\):/\L\1/g'
}
@starise
starise / enable-bash.ps1
Created September 24, 2017 10:21 — forked from yuntsewu/enable-bash.ps1
On Windows 10, right click and press "Run with PowerShell" will install "Windows Subsystem for Linux" on your system. After it completes, Win+R -> bash will prompt you for the initialization.
if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs; exit }
# Create AppModelUnlock if it doesn't exist, required for enabling Developer Mode
$RegistryKeyPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock"
if (-not(Test-Path -Path $RegistryKeyPath)) {
New-Item -Path $RegistryKeyPath -ItemType Directory -Force
}
# Add registry value to enable Developer Mode
New-ItemProperty -Path $RegistryKeyPath -Name AllowDevelopmentWithoutDevLicense -PropertyType DWORD -Value 1