Skip to content

Instantly share code, notes, and snippets.

@agocorona
agocorona / Transient.cont.hs
Last active April 26, 2023 08:00
Optimized, simplified continuation monad that implement all the Transient effects (except Web, logging and distributed computing) with mock up implementation of some of them (https://github.com/transient-haskell/transient) Parallelism, concurrency, reactive, streaming, non-determinism, backtracking exceptions, state, early termination
{-# LANGUAGE MultiParamTypeClasses, ExistentialQuantification, ScopedTypeVariables, FlexibleInstances, FlexibleContexts, UndecidableInstances #-}
module TransientCont where
-- some imports
import Control.Applicative
import Control.Monad.IO.Class
import Control.Monad.Trans
@nybblr
nybblr / 1-easy.js
Last active July 13, 2022 03:40
3 examples of using Async Generators and Async Iteration in JavaScript!
// Create a Promise that resolves after ms time
var timer = function(ms) {
return new Promise(resolve => {
setTimeout(resolve, ms);
});
};
// Repeatedly generate a number starting
// from 0 after a random amount of time
var source = async function*() {
@btroncone
btroncone / rxjs_operators_by_example.md
Last active July 16, 2023 14:57
RxJS 5 Operators By Example
@kachayev
kachayev / css-parser.md
Last active November 12, 2022 04:20
Parsing CSS file with monadic parser in Clojure
@tylersticka
tylersticka / gulpfile.js
Created July 17, 2014 21:53
Simple Knockout template inclusion with Gulp
// include gulp + template plugin
var gulp = require('gulp');
var template = require('gulp-template');
// include the koTemplates module locally
var koTemplates = require('./koTemplates');
// create the 'templates' task
gulp.task('templates', function () {
// single-page app, so just pipe through index
gulp.src('./src/templates/index.html')
@mshwery
mshwery / app.js
Last active May 6, 2024 05:27
Gulp + Browserify + requiring .html templates + Knockout web components
var ko = require('knockout');
ko.components.register('simple-name', require('./components/simple-name/simple-name.js'));
ko.applyBindings({ userName: ko.observable() });
\documentclass[oneside,12pt]{article}
\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage{
listings,titlesec,sectsty,setspace,caption,
enumerate,tabularx,
graphicx,fancyhdr,framed,
microtype,ragged2e,
@learncodeacademy
learncodeacademy / gist:5f84705f2229f14d758d
Last active February 24, 2021 14:48
Getting Started with Vagrant, SSH & Linux Server Administration
@elclanrs
elclanrs / retext.css
Last active September 13, 2021 10:25
Markdown theme for ReText
body {
color: #333;
font: normal 16px/1.3 Arial, sans-serif;
max-width: 6.5in;
margin: 0 auto;
}
a:link, a:visited {
color: #1B70D1;
text-decoration: none;
@staltz
staltz / introrx.md
Last active May 6, 2024 01:44
The introduction to Reactive Programming you've been missing