Skip to content

Instantly share code, notes, and snippets.

@StevenACoffman
StevenACoffman / Homoglyphs.md
Last active April 14, 2025 09:22
Unicode Look-alikes

Unicode Character Look-Alikes

Original Letter Look-Alike(s)
a а ạ ą ä à á ą
c с ƈ ċ
d ԁ ɗ
e е ẹ ė é è
g ġ
h һ
@vasanthk
vasanthk / System Design.md
Last active April 14, 2025 09:19
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@SevenW
SevenW / HTTPWebSocketsHandler.py
Last active April 14, 2025 09:19
HTTPWebSocketsHandler extends SimpleHTTPServer with WebSockets enabling the use of HTTP and WebSockets throught the same port
'''
The MIT License (MIT)
Copyright (C) 2014, 2015 Seven Watt <info@sevenwatt.com>
<http://www.sevenwatt.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
@Myndex
Myndex / GitHubFlavoredMarkdown.md
Last active April 14, 2025 09:18 — forked from joshuapekera/markdown
GitHub Flavored Markdown Cheat Sheet
@Karang
Karang / postmortem.md
Created April 14, 2025 09:08
CG Spring Challenge 2025

General algorithm

I used a DFS with a cache. DFS is implemented with a stack and a while loop, no function call. I used 2 stacks, one for the generated boards containing only the board as an int32 and one for the parent board with the hash being accumulated, the number of children and the permutation (used for symetries).

Board representation & SWAR

I used 3 bit per cell in a board fitted into a 32bit integer. I never decode that representation into an array, instead I use SWAR (SIMD within a register) to do computations, shuffling and tests. During move generation, two operations are quite useful: add_saturate and zmask. The first one adds each of the 9 cells of two input board, if the result overflows it is clamped to 7 (maximum representable value in 3 bits). The second set the top bit of each cell to one if the cell is zero, otherwise it clears all bits of the cell.

@syneart
syneart / meld_hotfix_sonoma.sh
Last active April 14, 2025 09:19
Meld v3.21.0 (r4) hot-fix for macOS on Intel CPU / Apple Silicon CPU with Rosetta
### Test on https://github.com/yousseb/meld/releases/tag/osx-20
### OSX - 3.21.0 (r4) Sonoma
### !!! Note: You need put the Meld.app r4 build to the /Applications path first.
#!/bin/zsh
#Fix libpng16.16.dylib not found
install_name_tool -change /usr/local/opt/libpng/lib/libpng16.16.dylib @executable_path/../Frameworks/libpng16.16.dylib /Applications/Meld.app/Contents/Frameworks/libfreetype.6.20.0.dylib
#Fix libbrotlidec.1.dylib not found
@burkeholland
burkeholland / prd.md
Created April 10, 2025 19:50
TheUrlist PRD

Project Requirements Document: The Urlist Website

The following table outlines the detailed functional requirements of The Urlist website.

Requirement ID Description User Story Expected Behavior/Outcome
FR001 Creating a New URL List As a user, I want to be able to start a new, empty list so I can begin adding URLs. The system should provide a clear way for the user to initiate the creation of a new list, potentially presenting an empty list view or an "add new list" button.
FR002 A
@dirkjanfaber
dirkjanfaber / README.md
Last active April 14, 2025 09:10
Solar yield forecasting using forecast.solar

This subflow uses the http request node to fetch solar forecasts for geographical positions, using the API from https://forecast.solar/. Please check their website and consider getting a paid account.

Solar forecast flow

Do note that, on a free account, you are limited in the number of requests to do. Also note that the data only gets updated once every 15 minutes, so there is no reason to query more often. There is rate limiting built in the subflow not to perform requests more than once every 15 minutes.

Configuration

Solar forecast properties

@gregberns
gregberns / Yoneda.md
Created November 29, 2021 07:47
Introduction to Yoneda and Coyoneda

Introduction to Yoneda and Coyoneda

Yoneda (and its duel Coyoneda) is well known in the Category Theory field and has been ported over to functional languages such as Haskell. Each have their uses - sometimes in similar scenarios, also in very different ways.

This will be a newbie's explanation of the concept, using Haskell to illustrate, without any Category Theory.

From what I've read, the Yonedas are not 'daily-drivers' (not used everyday), but rather can be pulled out when the time is right.

Uses: Both Yoneda's can be used to help speed up a program where there are many fmap with long lists or big trees involved. Coyoneda can be used if you want to create an 'interface' and build up calculations, then pass those calculations to an 'executor' to run them.

@ehbc221
ehbc221 / Python 3 Virtualenv
Last active April 14, 2025 09:05
Install Python 3 and create a virtual environment for projects
# Install Python 3
$ sudo apt-get install python3
# Install python3-virtualenv
$ sudo apt-get install python3-virtualenv
# You can checkout you virtualenv version
$ virtualenv --version
# Create you virtualenv in the folder you that want to