Skip to content

Instantly share code, notes, and snippets.

View vasuadari's full-sized avatar
🤔
Thinking

Vasu Adari vasuadari

🤔
Thinking
View GitHub Profile
alert('here');

The introduction to Reactive Programming you've been missing

(by @andrestaltz)

So you're curious in learning this new thing called (Functional) Reactive Programming (FRP).

Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:

Rx.Observable.prototype.flatMapLatest(selector, [thisArg])

Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.

@vasuadari
vasuadari / 0_reuse_code.js
Last active August 29, 2015 14:06
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@vasuadari
vasuadari / Chat
Created November 3, 2015 06:17
Chatting
Hey there?
@vasuadari
vasuadari / n_queen.rb
Last active April 10, 2016 19:27
NQueen
#! /usr/bin/env ruby
# Author: Vasu Adari(vasuakeel@gmail.com)
# Problem: Solve NQueen using Backtracking algorithm.
def safe?(array, row, col)
col.times.any? { |i| array[row][i] } && return
(size = array.size).times do |i|
((row - i) < 0) || ((col - i) < 0) ? next : array[row - i][col - i] && return
(row + i) >= size ? next : array[row + i][col - i] && return
end
true
@vasuadari
vasuadari / install_docker.sh
Last active April 4, 2020 20:28
Init script to install docker on ec2
#! /bin/bash
apt-get update
apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
@vasuadari
vasuadari / bootstrap_bastion.sh
Created September 5, 2017 10:14
Bootstraps bastion on Linux
#!/bin/bash -e
# Bastion Bootstrapping
# NOTE: This requires GNU getopt. On Mac OS X and FreeBSD you must install GNU getopt and mod the checkos function so that it's supported
# Configuration
PROGRAM='Linux Bastion'
##################################### Functions Definitions
function checkos () {
@vasuadari
vasuadari / install_docker.sh
Last active June 18, 2020 22:09
install_docker_on_ubuntu_18_04
#! /bin/bash
apt-get update
apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
@vasuadari
vasuadari / .vimrc
Created July 17, 2018 14:06
VIM plugins
set nocompatible " be iMproved, required
filetype off " required
" Leader
let mapleader = "-"
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
@vasuadari
vasuadari / regex101.md
Last active January 8, 2019 10:38
Regex 101

Letters

match   abcdefg
match   abcde
match   abc

The 123s