Skip to content

Instantly share code, notes, and snippets.

View krayfaus's full-sized avatar
🌼
Overthinking modular design

Italo Oliveira krayfaus

🌼
Overthinking modular design
View GitHub Profile
@sebfisch
sebfisch / exploring-function-calls-in-roc.md
Last active July 12, 2024 17:55
Exploring function calls in Roc

Exploring function calls in Roc

This is a systematic in-depth exploration of different ways of calling functions in Roc.

Lambda expressions and function calls

In Roc, functions are values that are defined using lambda-expressions. Here are two single-argument functions on integers, one that increments a given number and another that doubles it.

inc : I64 -> I64
@HimDek
HimDek / Install Android apps or apk files in Windows using Windows Subsystem for Android (No Emulator).md
Last active August 29, 2025 17:49
This Guide will show you how to install and run apk files or Android apps in any Edition of Windows 11 using Windows Subsystem for Android. WSA or Windows Subsystem for Android is a Tool that allows Windows to run Android Apps directly without using any emulator.

Install Android apps or apk files in Windows using Windows Subsystem for Android

WSA or Windows Subsystem for Android is a Tool that allows Windows to run Android Apps directly without using any emulator. The problem is Windows Subsystem for Android is currently only available through preview via the Beta Channel of the Windows Insider Program. But if you follow my guide, you don't have to be in Windows Insider Program to try it out. The only thing you need is Windows 11 installed and some patience.

Prerequisites:

  • Windows Subsystem for Android or WSA must be Installed.

Click here to view the guide that shows how to install Windows Subsystem for Android in any Edition of Windows 11 (including Windows 11 Home) non Inider or stable release.

How to Install Android Apps or apk files in Windows Subsystem for Android:

@crosstyan
crosstyan / komorebic.ahk
Last active May 23, 2025 14:48
komorebic.ahk for AutoHotkey v2
#SingleInstance Force
WorkspaceNumber := 9
ArrayFromZero(Length){
temp := []
Loop Length {
temp.Push(A_Index-1)
}
return temp
@topherPedersen
topherPedersen / nestenum.ts
Created June 7, 2021 15:37
Nested "Enums" in TypeScript
enum Foo {
A = "ActivityCode.Foo.A",
B = "ActivityCode.Foo.B",
C = "ActivityCode.Foo.C",
}
enum Bar {
A = "ActivityCode.Bar.A",
B = "ActivityCode.Bar.B",
C = "ActivityCode.Bar.C",
// Simple example code to load a Wav file and play it with WASAPI
// This is NOT complete Wav loading code. It is a barebones example
// that makes a lot of assumptions, see the assert() calls for details
//
// References:
// http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/WAVE.html
// Handmade Hero Day 138: Loading WAV Files
#include <windows.h>
@endel
endel / aws-ec2-root-node-port-80.sh
Created December 4, 2019 18:58
Allow non-root node to use ports 80 (HTTP) and 443 (HTTPS) (AWS EC2)
# Allow non-root node to use ports 80 (HTTP) and 443 (HTTPS)
sudo setcap 'cap_net_bind_service=+ep' $(which node)
@OALabs
OALabs / dll_exports.py
Created December 1, 2019 05:12
Build dictionary of DLL exports (Windows API Names)
import os
import pefile
import json
INTERESTING_DLLS = [
'kernel32.dll', 'comctl32.dll', 'advapi32.dll', 'comdlg32.dll',
'gdi32.dll', 'msvcrt.dll', 'netapi32.dll', 'ntdll.dll',
'ntoskrnl.exe', 'oleaut32.dll', 'psapi.dll', 'shell32.dll',
'shlwapi.dll', 'srsvc.dll', 'urlmon.dll', 'user32.dll',

Best / our practise on writing styled components

📖 Documentation

👮🏻 Conventions

Know your components. Look at existing components before you create a brand new one. It is really fun to create new components but please ask yourself or the designer if we already have a component that might do the job first! Maybe you can create a variant of an existing component or just use it out of the box? It is important to evaluate the complexity of creating a variant. Sometimes it is smarter to create a new component. Discuss with your teammates!

DRY - Don't repeat yourself - Use inheritance to share style between similar components.

@antxd
antxd / index.html
Created June 28, 2019 16:01
Maintenance Page
<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<meta name="robots" content="noindex"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }