-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit fb6e295
Showing
20 changed files
with
764 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Publish to GitHub Pages | ||
|
||
# Controls when the action will run. Triggers the workflow on push or pull request | ||
# events but only for the master branch | ||
on: | ||
push: | ||
branches: [ master, main ] | ||
pull_request: | ||
branches: [ master, main ] | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
build: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v3 | ||
|
||
# Includes the AsciiDoctor GitHub Pages Action to convert adoc files to html and publish to gh-pages branch | ||
- name: asciidoctor-ghpages | ||
uses: ntijoh-te4/asciidoctor-ghpages-action@1af5baccd44ff01c9cb42030b0ee6d5aab4d5d8b | ||
with: | ||
#pdf_build: true | ||
asciidoctor_params: -r asciidoctor-kroki | ||
# adoc_file_ext: .ascii # default is .adoc | ||
source_dir: docs/ # default is . | ||
# slides_build: true | ||
#pre_build: bundle install | ||
# post_build: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.ruby-version | ||
**/.DS_STORE | ||
docs/index.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
source 'https://rubygems.org' | ||
|
||
gem 'asciidoctor' | ||
gem 'coderay' | ||
gem 'asciidoctor-kroki' | ||
gem 'asciidoctor-tabs' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
GEM | ||
remote: https://rubygems.org/ | ||
specs: | ||
asciidoctor (2.0.20) | ||
asciidoctor-kroki (0.8.0) | ||
asciidoctor (~> 2.0) | ||
asciidoctor-tabs (1.0.0.beta.6) | ||
asciidoctor (>= 2.0.0, < 3.0.0) | ||
coderay (1.1.3) | ||
|
||
PLATFORMS | ||
arm64-darwin-22 | ||
|
||
DEPENDENCIES | ||
asciidoctor | ||
asciidoctor-kroki | ||
asciidoctor-tabs | ||
coderay | ||
|
||
BUNDLED WITH | ||
2.4.19 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 ntijoh-te4 | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Verktygsboken | ||
|
||
## 1. Installation | ||
|
||
### 1.1 Ruby | ||
|
||
#### 1.1.1 Windows | ||
|
||
Om du har [Chocolatey](https://chocolatey.org/): `choco install ruby` | ||
|
||
Annars : [RubyInstaller for Windows](https://rubyinstaller.org/) | ||
|
||
#### 1.1.2 MacOs | ||
|
||
1. Installera [Homebrew](https://brew.sh/) | ||
2. `brew install ruby` | ||
|
||
### 1.2 Asciidoctor | ||
|
||
I verktygsbokens rotmapp: `bundle install` | ||
|
||
## 2. Bygga boken lokalt | ||
|
||
I verktygsbokens rotmapp: `asciidoctor -r asciidoctor-kroki -r asciidoctor-tabs docs/index.adoc` | ||
|
||
Den färdigbyggda boken finns i `docs/index.html` | ||
|
||
Öppna gärna `docs/index.html` med VS Code Live Server | ||
|
||
### 2.1 Bygga boken lokalt automagiskt vid filändring | ||
|
||
#### 2.1.1 Windows | ||
|
||
Vet ej | ||
|
||
#### 2.1.1 MacOs | ||
|
||
`brew install fswatch` | ||
`fswatch -o ./docs -e "index.html" | xargs -n1 -I{} asciidoctor -r asciidoctor-kroki -r asciidoctor-tabs docs/index.adoc` | ||
|
||
|
||
## 3. Bygga boken till GH Pages. | ||
|
||
Boken byggs automagiskt vid push till main-branchen på GitHub (kan ta några minuter). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
:imagesdir: chapters/chapter_template_folder/images | ||
|
||
|
||
= Chapter Title Goes Here | ||
|
||
Wut? | ||
|
||
image::logo.png[Sinatra Logo] |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
:imagesdir: chapters/test/images | ||
|
||
= Kombinering av verktyg | ||
|
||
== Sammanfogning | ||
|
||
== Nästning | ||
|
||
== Ihopvävning |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
:imagesdir: chapters/flow_and_state/images | ||
|
||
|
||
= Flöde och State | ||
|
||
Att programmera är att ge instruktioner till en dator, eller snarare datorns processor. | ||
|
||
En processor kan bara göra en sak åt gången, och instruktionerna utförs därför en efter en, i ett _flöde_. | ||
|
||
Under _flödets_ gång kommer variabler att skapas och dess värden uppdateras. | ||
|
||
_State_ är värdet på alla variabler i ett program, _vid ett givet tillfälle_. | ||
|
||
Programmets _state_ ändras alltså allteftersom programmet körs. | ||
|
||
Att programmera handlar därför om att skapa ett _flöde_ som bearbetar _state_ och ser till att programmet har rätt _state_ när det är klart. | ||
|
||
Man kan alltså se _flödet_ som en _serie av transformationer_ av _state_. | ||
|
||
För att konstruera programmets _flöde_ och för att transformera _state_ finns ett _begränsat_ antal verktyg som används av alla programmerare oavsett vilka program de skriver eller språk de använder. | ||
|
||
Genom att kombinera dessa verktyg på olika sätt, kan man skapa _alla_ program. | ||
|
||
Verktygen är oberoende av kod, men kan så klart implementeras i kod i valfritt programmeringsspråk. | ||
|
||
Den här boken går igenom de verktyg man behöver för att klara Programmering 1 (och antagligen bra mycket mer än så). | ||
|
||
== Flödesschema | ||
|
||
För att illutstrera verktygen används flödesscheman. | ||
|
||
Flödesscheman fungerar såhär ... |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
:imagesdir: chapters/test/images | ||
|
||
|
||
= Mål och Verktyg | ||
|
||
icon:exclamation-circle[] Här behövs text om programmerare sätter upp mål- och delmål och hur de använder verktyg för att uppnå dessa mål- och delmål. Gärna med praktiska exempel. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
:imagesdir: chapters/test/images | ||
|
||
|
||
= Verktygsbaserade Uppgifter | ||
|
||
Wut | ||
|
||
image::logo.png[Sinatra Logo] |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.