Skip to content

Instantly share code, notes, and snippets.

View dgellow's full-sized avatar
🐢
Pulu pulu 🏳️‍🌈

Sam El-Borai dgellow

🐢
Pulu pulu 🏳️‍🌈
View GitHub Profile
@viperscape
viperscape / broadcast-stream.clj
Last active August 29, 2015 14:01
many-to-many broadcast stream
(defn v-> [s v]
"pushes value onto stack, if possible, returns new head/tail"
(let [p (promise)]
(if (deliver s (cons v (list p)))
p)))
(defn v<- [s]
"returns lazy sequence of actual values, without head/tail"
(when (realized? s)
(cons (first @s)
@staltz
staltz / introrx.md
Last active April 29, 2025 08:33
The introduction to Reactive Programming you've been missing
@john2x
john2x / 00_destructuring.md
Last active April 10, 2025 15:15
Clojure Destructuring Tutorial and Cheat Sheet

Clojure Destructuring Tutorial and Cheat Sheet

(Related blog post)

Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.

Vectors and Sequences

2015-01-29 Unofficial Relay FAQ

Compilation of questions and answers about Relay from React.js Conf.

Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.

What is Relay?

Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).

@dgellow
dgellow / triangle.nim
Last active February 10, 2018 13:59 — forked from allj/triangle.nim
A colorful triangle in nim OpenGL.
import os
import opengl
import glfw/wrapper as glfw
var
win: GLFWwindow
vaoID: GLuint
vboID: GLuint
cboID: GLuint
vertexShaderID: GLuint
@bburky
bburky / coursera.sh
Last active June 30, 2016 17:30
Automatically configure a VM download Coursera courses
#!/bin/bash
# Automatically configure a VM download Coursera courses.
# This script works as a user data file for use with a cloud VM.
# This script will resume downloading if the VM is restarted.
# This script works with Debian jessie (or possibly Ubuntu with systemd).
# You must enroll in each course and accept the Honor of Code of each course
# before you can download them.
@marcocitus
marcocitus / example.sql
Last active February 24, 2024 13:17
Safe incremental rollups on Postgres and Citus
-- Create the raw events table
CREATE TABLE page_views (
site_id int,
path text,
client_ip inet,
view_time timestamptz default now(),
view_id bigserial
);
-- Allow fast lookups of ranges of sequence IDs
@norbertbuchmueller
norbertbuchmueller / pg-domain-type-demo.sql
Last active July 17, 2018 15:39
demo of the PostgreSQL domain type - a possble replacement for the PostgreSQL enum types
BEGIN;
-- note: the downside of a DOMAIN type in pg is that the type cannot be modified if it's used in
-- a composite-type column as yet (i hope we don't do that)
-- pgTAP is a suite of test functions to test SQL scripts on PostgreSQL - see https://pgtap.org/
CREATE EXTENSION IF NOT EXISTS pgtap;
-- we will have 4 pgTAP tests
SELECT plan(4);
@Rich-Harris
Rich-Harris / what-is-svelte.md
Last active March 20, 2025 20:49
The truth about Svelte

I've been deceiving you all. I had you believe that Svelte was a UI framework — unlike React and Vue etc, because it shifts work out of the client and into the compiler, but a framework nonetheless.

But that's not exactly accurate. In my defense, I didn't realise it myself until very recently. But with Svelte 3 around the corner, it's time to come clean about what Svelte really is.

Svelte is a language.

Specifically, Svelte is an attempt to answer a question that many people have asked, and a few have answered: what would it look like if we had a language for describing reactive user interfaces?

A few projects that have answered this question:

@GuillaumeDua
GuillaumeDua / 13_valuable_things_I_learned_using_CMake.md
Last active August 3, 2024 20:02
13 valuable things I learned using CMake

13 valuable things I learned using CMake

Author : Dua Guillaume
Date : 04-26-2020

Requirement : A first experience with CMake

Intro

As a modern C++ specialist, my job is to focus on software development, from a performance and quality perspective.