Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View rajivr's full-sized avatar

Rajiv M Ranganath rajivr

View GitHub Profile
@rajivr
rajivr / machine.js
Created August 26, 2021 11:05
Generated by XState Viz: https://xstate.js.org/viz
const iteratorMachine = Machine({
id: 'IteratorMachine',
initial: 'fetching',
context: {
// ** state machine global **
// immutable
transaction: '',
_marker: '',
snapshot: '',
@rajivr
rajivr / machine.js
Created August 25, 2021 11:44
Generated by XState Viz: https://xstate.js.org/viz
const iteratorMachine = Machine({
id: 'IteratorMachine',
initial: 'fetching',
context: {
global_immutable: {
transaction: '',
_marker: '',
snapshot: '',
options_mode: '',
@rajivr
rajivr / ghci
Created September 22, 2019 03:41
*Main> :t (return 1)
(return 1) :: forall {m :: * -> *} {a}. (Monad m, Num a) => m a
*Main> :t show
show :: forall {a}. Show a => a -> String
*Main> :t ((return 1) . show)
((return 1) . show) :: forall {c} {a}. (Num c, Show a) => a -> c
*Main> :t (.)
(.) :: forall {b} {c} {a}. (b -> c) -> (a -> b) -> a -> c
@rajivr
rajivr / Dockerfile
Created May 20, 2017 14:57
Example of using Xvfb, Selenium, Firefox ESR on `baseimage-amzn`
# Example of using Xvfb, Selenium, Firefox ESR on `baseimage-amzn`
#
# Build and run Docker container
#
# ```
# $ docker build -t xvfb-firefox-esr-selenium-webdriver .
# $ docker run --rm \
# -v /tmp:/tmp -v /dev/shm:/dev/shm \
# --privileged -ti xvfb-firefox-esr-selenium-webdriver /sbin/my_init -- /bin/bash -l
# ```