Skip to content

Instantly share code, notes, and snippets.

View lidi's full-sized avatar

Liutauras lidi

View GitHub Profile
@lidi
lidi / ngrxintro.md
Created February 28, 2019 09:47 — forked from btroncone/ngrxintro.md
A Comprehensive Introduction to @ngrx/store - Companion to Egghead.io Series

Comprehensive Introduction to @ngrx/store

By: @BTroncone

Also check out my lesson @ngrx/store in 10 minutes on egghead.io!

Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!

Table of Contents

@lidi
lidi / introrx.md
Created September 20, 2017 09:20 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
prompt_test = True
@click.group()
@click.option('--mode', is_flag=True)
def cli(mode):
prompt_test = True if mode else False
print "prompt_test value in cli: %s" % prompt_test
@cli.command()
@click.option('--name',
@lidi
lidi / gist:b946cde1e89bd89a04e9
Last active August 29, 2015 14:01
click prompting success
# This works as expected:
# Prompting can be controlled with prompt_test
prompt_test = True # Works with correctly with both True or False
@click.command()
@click.option('--name', prompt=prompt_test, required=True)
def cli(name):
print "test %s" % name
if __name__ == '__main__':
def title_case(title, options = {})
return title if title.empty?
head, *tail = title.split(' ')
head.capitalize! << ' ' << tail.collect { |x| options[:minors] && options[:minors].downcase.split(' ').include?(x) ? x : x.capitalize! }.join(' ')
end
=====================