Skip to content

Commit

Permalink
move examples and slides
Browse files Browse the repository at this point in the history
  • Loading branch information
szabgab committed Jun 30, 2021
1 parent ef795b3 commit 587996a
Show file tree
Hide file tree
Showing 15 changed files with 20 additions and 21 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions crystal/http_client.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,11 @@

![](examples/http_client/http_client.cr)

## Parse URL (URI)
{id: parse-url}
{i: URI}

![](examples/http_client/parse_url.cr)



4 changes: 2 additions & 2 deletions crystal/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,14 +181,14 @@ crystal tool format --check
* Interpolation works on numbers as well
* The `+` operator is numerical addition or string concatenation

![](examples/add_numbers.cr)
![](examples/intro/add_numbers.cr)

## Add mixed strings and Integers
{id: add-mixed-strings-and-integers}

`Error: no overload matches 'Int32#+' with type String`

![](examples/add_mixed.cr)
![](examples/intro/add_mixed.cr)


## Numeric Operators
Expand Down
2 changes: 1 addition & 1 deletion crystal/logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@

* 7 levels of logging, default is `info` and higher to the `STDOUT`

![](examples/logging.cr)
![](examples/logging/logging.cr)


23 changes: 5 additions & 18 deletions crystal/other.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,25 +72,18 @@ shards install
./bin/ameba
```

## Parse URL (URI)
{id: parse-url}
{i: URI}

![](examples/parse_url.cr)


## Ternary operator and or to set default value
{id: default-value}
{i:||}
{i: ?:}

![](examples/default.cr)
![](examples/other/default.cr)

## Gravatar
{id: gravatar}
{i: Digest::MD5.hexdigest}

![](examples/gravatar.cr)
![](examples/other/gravatar.cr)

## Try Crystal
{id: try}
Expand Down Expand Up @@ -176,20 +169,14 @@ require "some_name" # Find it somewhere (standard library, src directory

* Variable names that start with upper-case letter are constants

![](examples/constants.cr)
![](examples/other/constants.cr)

## Multiple assignments
{id: multiple-assignments}

![](examples/multiple_assignments.cr)

![](examples/assign.cr)

## Here documents
{id: here-documents}
{i: <<-}
![](examples/other/multiple_assignments.cr)

![](examples/here_document.cr)
![](examples/other/assign.cr)

## Int methods: Times
{id: times}
Expand Down
4 changes: 4 additions & 0 deletions crystal/strings.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,5 +143,9 @@
![](examples/strings/printf.cr)
![](examples/strings/printf.out)

## Here documents
{id: here-documents}
{i: <<-}

![](examples/strings/here_document.cr)

0 comments on commit 587996a

Please sign in to comment.