Skip to content

Commit

Permalink
move files split chapters
Browse files Browse the repository at this point in the history
  • Loading branch information
szabgab committed Jun 30, 2021
1 parent 4ad408a commit 0874135
Show file tree
Hide file tree
Showing 24 changed files with 73 additions and 64 deletions.
2 changes: 2 additions & 0 deletions crystal/crystal.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
"logging.md",
"sqlite.md",
"time.md",
"http_client.md",
"process.md",
"other.md"
]
}
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.
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.
10 changes: 10 additions & 0 deletions crystal/http_client.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# HTTP Client
{id: http-client}

## HTTP Client example
{id: http-client-example}
{i: http/client}
{i: HTTP::Client}

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

75 changes: 11 additions & 64 deletions crystal/other.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
{id: spaceship-operator}
{i: <=>}

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

## Check if variable is nil?
{id: nil}
{i: nil}
{i: nil?}

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

## Single quotes vs double quotes
{id: single-quotes-vs-double-quotes}
Expand All @@ -24,22 +24,14 @@
## No type-checking?
{id: no-typechecking}

![](examples/assign_to_variable.cr)
![](examples/assign_to_variable.out)

## HTTP Client
{id: http-client}
{i: http/client}
{i: HTTP::Client}

![](examples/http_client.cr)

![](examples/other/assign_to_variable.cr)
![](examples/other/assign_to_variable.out)

## Divide by zero is Infinity
{id: divide-by-zero-is-infinity}
{i: Infinity}

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

## Require other files
{id: require-other-files}
Expand All @@ -52,8 +44,8 @@
## List Methods
{id: list-methods}

![](examples/methods.cr)
![](examples/methods.out)
![](examples/other/methods.cr)
![](examples/other/methods.out)


## Checking the slides
Expand All @@ -66,43 +58,6 @@

![](examples/mine.cr)

## Execute external program (system)
{id: execute-external-program-system}
{i: system}

![](examples/system.cr)

## Execute external program (backtick)
{id: execute-external-program-backtick}
{i: `}
{i: $?}
{i: success?}

* [command](https://crystal-lang.org/reference/syntax_and_semantics/literals/command.html)

![](examples/backtick.cr)

## Execute external program (Process)
{id: execute-external-program-process}
{i: exit}
{i: exit_code}
{i: exit_status}

* [Process](https://crystal-lang.org/api/Process.html)
* [Process::Status](https://crystal-lang.org/api/Process/Status.html)

![](examples/process.cr)

## Execute external program (capture)
{id: execute-external-program-capture}

![](examples/capture.cr)

## Execute external program (capture)
{id: execute-external-program-capture2}

![](examples/capture2.cr)


## Ameba Linter
{id: ameba-linter}
Expand Down Expand Up @@ -177,14 +132,14 @@ shards install
{i: switch}
{i: when}

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

## STDERR, STDOUT
{id: stderr}
{i: STDERR}
{i: STDOUT}

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

* Redirection on the command line using > out and 2> err

Expand Down Expand Up @@ -265,14 +220,6 @@ require "some_name" # Find it somewhere (standard library, src directory

![](examples/here_document.cr)

## printf
{id: printf}
{i: printf}

![](examples/printf.cr)
![](examples/printf.out)


## Int methods: Times
{id: times}

Expand All @@ -281,13 +228,13 @@ require "some_name" # Find it somewhere (standard library, src directory
## case of types
{id: case-of-types}

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


## Int64 Zero
{id: int64-zero}

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

## Resources
{id: resources}
Expand Down
41 changes: 41 additions & 0 deletions crystal/process.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Process
{id: process}

## Execute external program (system)
{id: execute-external-program-system}
{i: system}

![](examples/process/system.cr)

## Execute external program (backtick)
{id: execute-external-program-backtick}
{i: `}
{i: $?}
{i: success?}

* [command](https://crystal-lang.org/reference/syntax_and_semantics/literals/command.html)

![](examples/process/backtick.cr)

## Execute external program (Process)
{id: execute-external-program-process}
{i: exit}
{i: exit_code}
{i: exit_status}

* [Process](https://crystal-lang.org/api/Process.html)
* [Process::Status](https://crystal-lang.org/api/Process/Status.html)

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

## Execute external program (capture)
{id: execute-external-program-capture}

![](examples/process/capture.cr)

## Execute external program (capture)
{id: execute-external-program-capture2}

![](examples/process/capture2.cr)


9 changes: 9 additions & 0 deletions crystal/strings.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,12 @@
![](examples/strings/split_characters.cr)
![](examples/strings/split_characters.out)

## printf
{id: printf}
{i: printf}

![](examples/strings/printf.cr)
![](examples/strings/printf.out)



0 comments on commit 0874135

Please sign in to comment.