Skip to content

Instantly share code, notes, and snippets.

@tarruda
tarruda / micro_events.py
Last active October 12, 2025 18:34
Micro event loop library to teach the basic concepts of python coroutines and how event loop libraries might be implemented
"""
A micro event loop library implementation from scratch.
This library provides a minimal but feature-complete asynchronous event loop
implementation for educational purposes. It demonstrates the core concepts of
asynchronous programming including:
- Task scheduling and management
- I/O multiplexing with non-blocking sockets
- Timeouts and sleep functionality
@evadne
evadne / lecture.md
Last active September 15, 2025 10:56
How to Sell Elixir (2023)

How to Sell Elixir AGAIN (2023)

Presented by Evadne Wu at Code BEAM Lite in Stockholm, Sweden on 12 May 2023

Synopsis

We have celebrated 10 years of Elixir and also nearly 25 years of Erlang since the open source release in December 1998.

Most of the libraries that were needed to make the ecosystem viable have been built, talks given, books written, conferences held and training sessions provided. A new generation of companies have been built on top of the Elixir / Erlang ecosystem. In all measures, we have achieved further reach and maturity than 5 years ago.

@lbguilherme
lbguilherme / todo.cr
Created March 3, 2022 12:14
Crystal front-end app, what would it look like?
# This is a sample of what a front-end Crystal application could look like, for code review.
# The design was inspired by React and Flutter and it should be very performing and compact.
# If this is ever implemented, it will use WebAssembly to run Crystal code, together with
# some JavaScript bindings to access the DOM.
class TodoData
property text : String
property? done = false
def initialize(@text)
@PJUllrich
PJUllrich / big-o.md
Last active September 9, 2025 15:54
Big-O Time Complexities for Elixir Data Structures

Big-O Time Complexities for Elixir data structures

Map [1]

Operation Time Complexity
Access O(log n)
Search O(log n)
Insertion O(n) for <= 32 elements, O(log n) for > 32 elements [2]
Deletion O(n) for <= 32 elements, O(log n) for > 32 elements
@Informatic
Informatic / README.md
Last active September 22, 2025 00:26
openlgtv webOS hacking notes

This is just a dump of some interesting undocumented features of webOS (3.8 specifically, on early 2018 4k LG TV) and other development-related tips.

Homebrew app ideas

@andy-thomason
andy-thomason / Genomics_A_Programmers_Guide.md
Created May 14, 2019 13:32
Genomics a programmers introduction

Genomics - A programmer's guide.

Andy Thomason is a Senior Programmer at Genomics PLC. He has been witing graphics systems, games and compilers since the '70s and specialises in code performance.

https://www.genomicsplc.com

@jebright
jebright / main.dart
Created April 16, 2019 19:12
Using an Isolate in Flutter
import 'dart:async';
import 'package:flutter/material.dart';
import 'dart:isolate';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
@MichaelPolla
MichaelPolla / github-resize-pictures.md
Last active July 5, 2024 21:21
Markdown - Resize pictures in GitHub, including in comments comment

Markdown - Resize pictures in GitHub

I found that the "best" way is to use HTML, as it works both in Readme/.md files and also in comments (within Issues, Gist...)

E.g. when adding/editing a comment (within Issues, Gist...) :

  • Upload the picture by drag-and-drop in the text field
  • replace ![image](https://your-image-url.type) with <img src="https://your-image-url.type" width="100" height="100">

As mentioned by @cbestow (thanks!), it's not mandatory to set both width and height. If only one is set, the other will be adjusted accordingly to preserve the aspect ratio of the image.

@bew
bew / concurrent_rpc.cr
Last active March 9, 2024 17:57
Simple implementation of a concurrent server handling requests on STDIN
# How to use / how it works:
#
# NOTE: The server reads on STDIN, and writes on STDOUT
#
# Start the program. Now you can write something then press enter.
# The server will do something 'useful' with the input, and gives you the result.
#
# The requests/responses are handled asynchronously, and can handle multiple requests at the same time.
#
# So you can spam the input (write a lot of lines) then close the input (Ctrl-d on a terminal), and
@endgame
endgame / monoids.rb
Created January 23, 2018 23:41
Monoids in Ruby
class Monoid
attr_reader :mempty
def initialize(mempty, mappend)
@mempty = mempty
@mappend = mappend
end
def mappend(x, y)
@mappend.call(x, y)