-
Async w/ RxJS: Slides showing a bit why RxJS is useful in comon scenarios
- Reactive.io learn seaction: Tutorial to learn a bit about reactive programming
- Reactive Koans
| #!/usr/bin/env bash | |
| # Docker extended commands | |
| # | |
| # `./docker` bash command wrapper to add additional functionality to the docker command, w/ autocompletion support (docker v1.6) | |
| # | |
| # Installation: Add this directly to `~/.bashrc` (or whatever your bash startup file is called) or save to a file and | |
| # source it within `~/.bashrc`. | |
| # | |
| # Usage: | |
| # docker wipe <container(s)/id(s)>: Gracefully stops and removes a container(s) |
| #!/usr/bin/perl | |
| # | |
| # Json Wrapper: Wraps Stdin input into json template for logging purposes. | |
| # | |
| # The idea is to use this script to wrap logs from cli commands so they can be used | |
| # for rsyslog @cee log processing. | |
| # | |
| # Author: Inaki Anduaga <[email protected]> | |
| # | |
| # Usage: <COMMAND> | ./jsonWrap.pl <MODE> <CHANNEL> <KEY1:VAL1> <KEY2:VAL2> ... |
Async w/ RxJS: Slides showing a bit why RxJS is useful in comon scenarios
| /** | |
| * Github Webhook event types | |
| * https://developer.github.com/v3/activity/events/types/ | |
| */ | |
| module IWebhook { | |
| interface IUser { | |
| login: string, | |
| id: number, | |
| avatar_url: string, |
| /** | |
| * Criteria: Every closing parenthesis ) must have a unique opening ( parenthesis before it | |
| * | |
| * For every closing parenthesis, we search for the first opening parenthesis and remove it, and keep going | |
| */ | |
| def balance(chars: List[Char]): Boolean = | |
| (chars.indexOf(')'), chars.indexOf('(')) match { | |
| case (leftMostClosing, leftMostOpening) if leftMostClosing == -1 && leftMostOpening != -1 => false // no closing / some opening => fail | |
| case (leftMostClosing, leftMostOpening) if leftMostClosing == -1 && leftMostOpening == -1 => true // no closing or opening => ok | |
| case (leftMostClosing, leftMostOpening) if leftMostClosing != 1 && leftMostOpening == -1 => false // closing but no opening => fail |
| /** | |
| * 1. Write a product function that calculates the product of the values of a function for the points on a given interval | |
| */ | |
| def product(f: Double => Double)(a: Double, b: Double): Double = { | |
| def loop(a: Double, acc: Double): Double = | |
| if(a > b) acc else loop(a+1, f(a) * acc) | |
| loop(a, 1) | |
| } |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Typescript Intro</title> | |
| <meta charset="utf-8"> | |
| <style> | |
| @import url(https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz); | |
| @import url(https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic); | |
| @import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700,400italic); |
| import "jest"; | |
| describe("DOM image manipulation", () => { | |
| test("applies class to image on applyFilterToImage", () => { | |
| document.body.innerHTML = ` | |
| <div id="some-dom-id"> | |
| <div class="image-wrapper"> | |
| <img class="image selected" src="testImage"> | |
| <img class="image" src="testImage2"> | |
| <img class="image" src="testImage3"> |
| // Some CSS styles for our component | |
| import "./gallery.scss"; | |
| /** | |
| * DOM mutations. Include all DOM manipulation for this component here | |
| */ | |
| export const mutations = { | |
| select: (index: number) => { | |
| mutations.clearSelected(); | |
| const images = elements.images(); |
ui/src/
/entrypoints/main.ts
/store/configureStore.ts
/rootReducer.ts
/components/gallery/
/actions.ts
/gallery.scss
/dom.ts
/middleware.ts