Skip to content

Commit b6bfbc6

Browse files
authored
Merge pull request #102 from corndeladmin/main
sync to main
2 parents 0582b2b + 95a6856 commit b6bfbc6

File tree

94 files changed

+6746
-749
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+6746
-749
lines changed

.cbfmt.toml

Lines changed: 0 additions & 3 deletions
This file was deleted.

.vitepress/config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export default defineConfig({
2121
sidebar: {
2222
'/bash/': sidebars.bash,
2323
'/express/': sidebars.express,
24+
'/flask/': sidebars.flask,
2425
'/git/': sidebars.git,
2526
'/javalin/': sidebars.javalin,
2627
'/html-css/': sidebars.htmlCss,

.vitepress/sidebars/flask.js

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
export const flask = [
2+
{ text: 'Introduction', link: '/flask/index' },
3+
{
4+
text: 'Data layer',
5+
items: [
6+
{
7+
text: 'Managing the database',
8+
link: '/flask/managing-the-database'
9+
},
10+
{
11+
text: 'Connecting to a database',
12+
link: '/flask/connecting-to-a-database'
13+
},
14+
{
15+
text: 'Models and repositories',
16+
collapsed: true,
17+
items: [
18+
{ text: 'Querying for data', link: '/flask/adding-a-model-layer' },
19+
{
20+
text: 'Querying with substitutions',
21+
link: '/flask/adding-a-model-layer-2'
22+
},
23+
{ text: 'Inserting data', link: '/flask/adding-a-model-layer-3' }
24+
]
25+
}
26+
]
27+
},
28+
{
29+
text: 'Creating an API',
30+
items: [
31+
{ text: 'Creating a server', link: '/flask/creating-a-server' },
32+
{
33+
text: 'Request and response',
34+
link: '/flask/request-response',
35+
collapsed: true,
36+
items: [
37+
{ text: 'Query params', link: '/flask/query-params' },
38+
{ text: 'URL params', link: '/flask/url-params' },
39+
{ text: 'Body and headers', link: '/flask/body-and-headers' }
40+
]
41+
},
42+
{ text: 'Routing and Controllers', link: '/flask/routing' },
43+
{ text: 'Sending errors', link: '/flask/sending-errors' },
44+
{ text: 'Schema validation', link: '/flask/schema-validation' }
45+
]
46+
},
47+
{
48+
text: 'Server side rendering',
49+
items: [
50+
{ text: 'Static files', link: '/flask/static-files' },
51+
{ text: 'Views and templates', link: '/flask/views-and-templates' },
52+
{ text: 'Using loops', link: '/flask/using-loops' },
53+
{ text: 'Template partials', link: '/flask/template-partials' },
54+
{ text: 'CSS and assets', link: '/flask/css-and-assets' },
55+
{ text: 'User input', link: '/flask/user-input' }
56+
]
57+
},
58+
{
59+
text: 'Web sockets',
60+
items: [
61+
{
62+
text: 'Creating a web socket server',
63+
link: '/flask/web-socket-server'
64+
},
65+
{
66+
text: 'Syncing clients',
67+
link: '/flask/syncing-clients'
68+
},
69+
{
70+
text: 'Creating a web socket client',
71+
link: '/flask/web-socket-client'
72+
}
73+
]
74+
},
75+
{
76+
text: 'Testing',
77+
items: [{ text: 'Testing with Flask' }, { text: 'Testing with pytest' }]
78+
},
79+
{
80+
text: 'Deploying',
81+
items: [
82+
{ text: 'Multiple environments', link: '/flask/multiple-environments' },
83+
{ text: 'Deploying a flask app', link: '/flask/deploying-app' },
84+
{ text: 'Staging', link: '/flask/staging-app' },
85+
{ text: 'Automated testing', link: '/flask/automated-testing' }
86+
]
87+
}
88+
]

.vitepress/sidebars/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
export { bash } from './bash.js'
22
export { express } from './express.js'
3+
export { flask } from './flask.js'
34
export { git } from './git.js'
45
export { javalin } from './javalin.js'
56
export { htmlCss } from './html-css.js'

.vitepress/sidebars/java.js

Lines changed: 48 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,40 +16,59 @@ export const java = [
1616
text: 'Operators and expressions',
1717
link: '/java/operators-and-expressions'
1818
},
19-
{ text: 'Data types', link: '/java/data-types' }
19+
{ text: 'Data types', link: '/java/data-types' },
20+
{ text: 'Logical operators', link: '/java/logical-operators' },
21+
{ text: 'Comparison operators', link: '/java/comparison-operators' },
22+
{ text: 'Conditional statements', link: '/java/conditional-statements' },
23+
{ text: 'Methods', link: '/java/functions' },
24+
{ text: 'Parameters', link: '/java/parameters' }
2025
]
2126
},
2227
{
2328
text: 'Data and iteration',
2429
collapsed: true,
2530
items: [
2631
{
27-
text: 'Arrays',
32+
text: 'Arrays and Lists',
2833
collapsed: true,
2934
items: [
30-
{ text: 'qq', link: '/java/qq' }
35+
{ text: 'Arrays', link: '/java/arrays' },
36+
{ text: 'Array techniques', link: '/java/array-techniques' },
37+
{ text: 'Lists', link: '/java/lists' },
38+
{ text: 'List techniques', link: '/java/list-techniques' },
39+
{ text: 'Map and filter', link: '/java/map-filter' }
3140
]
3241
},
3342
{
3443
text: 'Strings',
3544
collapsed: true,
3645
items: [
37-
{ text: 'qq', link: '/java/qq' }
46+
{ text: 'Formatting', link: '/java/string-formatting' },
47+
{ text: 'Split and join', link: '/java/string-split-join' }
3848
]
3949
},
4050
{
4151
text: 'Loops',
4252
collapsed: true,
4353
items: [
44-
{ text: 'qq', link: '/java/qq' }
54+
{ text: 'While loops', link: '/java/while-loops' },
55+
{ text: 'For loops', link: '/java/for-loops' },
56+
{ text: 'For-each loops', link: '/java/for-each-loops' },
57+
{ text: 'Control flow', link: '/java/loop-control-flow' },
58+
{ text: 'Nested loops', link: '/java/nested-loops' }
4559
]
4660
},
4761

4862
{
49-
text: 'Objects',
63+
text: 'Classes and Objects',
5064
collapsed: true,
5165
items: [
52-
{ text: 'qq', link: '/java/qq' }
66+
{ text: 'Object basics', link: '/java/object-basics' },
67+
{
68+
text: 'Classes and instances',
69+
link: '/java/classes-and-instances'
70+
},
71+
{ text: 'Lists of objects', link: '/java/lists-of-objects' }
5372
]
5473
}
5574
]
@@ -59,12 +78,20 @@ export const java = [
5978
text: 'Object oriented programming',
6079
collapsed: true,
6180
items: [
62-
{ text: 'qq', link: '/java/qq' },
81+
{ text: 'Instance methods', link: '/java/instance-methods' },
82+
{ text: 'Private members', link: '/java/private-members' },
83+
{ text: 'Static members', link: '/java/static-members' },
84+
{ text: 'Inheritance', link: '/java/inheritance' },
85+
{ text: 'Interfaces', link: '/java/interfaces' },
6386
{
6487
text: 'Design patterns',
6588
collapsed: true,
6689
items: [
67-
{ text: 'qq', link: '/java/qq' }
90+
{ text: 'Singleton pattern', link: '/java/singleton-pattern' },
91+
{ text: 'Adapter pattern', link: '/java/adapter-pattern' },
92+
{ text: 'Facade pattern', link: '/java/facade-pattern' },
93+
{ text: 'Mediator pattern', link: '/java/mediator-pattern' },
94+
{ text: 'Event emitter', link: '/java/event-emitter' }
6895
]
6996
}
7097
]
@@ -74,25 +101,25 @@ export const java = [
74101
text: 'Testing',
75102
collapsed: true,
76103
items: [
77-
{ text: 'qq', link: '/java/qq' }
104+
{ text: 'Unit testing', link: '/java/unit-testing' },
105+
{ text: 'Arrange, act, assert', link: '/java/arrange-act-assert' },
106+
{ text: 'Test driven development', link: '/java/tdd' }
78107
]
79108
},
80109

81110
{
82111
text: 'Building projects',
83112
collapsed: true,
84113
items: [
85-
{ text: 'Creating a Maven project', link: '/java/qq' },
86-
{ text: 'Making a CLI', link: '/java/qq' },
87-
{ text: 'Handling Errors', link: '/java/qq' },
88-
]
89-
},
90-
91-
{
92-
text: 'Asynchronous code',
93-
collapsed: true,
94-
items: [
95-
{ text: 'qq', link: '/java/qq' }
114+
{ text: 'Creating a Maven project', link: '/java/creating-projects' },
115+
{ text: 'Making a CLI', link: '/java/making-a-cli' },
116+
{ text: 'Adding subcommands', link: '/java/adding-subcommands' },
117+
{ text: 'Handling errors', link: '/java/handling-errors' },
118+
{ text: 'Reading and writing files', link: '/java/file-io' },
119+
{ text: 'Working with JSON', link: '/java/working-with-json' },
120+
{ text: 'Environment variables', link: '/java/environment-variables' },
121+
{ text: 'HTTP GET requests', link: '/java/http-get' },
122+
{ text: 'HTTP POST requests', link: '/java/http-post' }
96123
]
97124
}
98125
]

.vitepress/sidebars/javalin.js

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,23 @@ export const javalin = [
1212
link: '/javalin/connecting-to-a-database'
1313
},
1414
{
15-
text: 'Adding a model layer',
16-
link: '/javalin/adding-a-model-layer'
15+
text: 'Models and repositories',
16+
collapsed: true,
17+
items: [
18+
{ text: 'Querying for data', link: '/javalin/adding-a-model-layer' },
19+
{
20+
text: 'Querying with substitutions',
21+
link: '/javalin/adding-a-model-layer-2'
22+
},
23+
{ text: 'Inserting data', link: '/javalin/adding-a-model-layer-3' }
24+
]
1725
}
1826
]
1927
},
2028
{
2129
text: 'Creating an API',
2230
items: [
2331
{ text: 'Creating a server', link: '/javalin/creating-a-server' },
24-
{ text: 'Routing and Controllers', link: '/javalin/routing' },
2532
{
2633
text: 'Request and response',
2734
link: '/javalin/request-response',
@@ -32,7 +39,9 @@ export const javalin = [
3239
{ text: 'Body and headers', link: '/javalin/body-and-headers' }
3340
]
3441
},
42+
{ text: 'Routing and Controllers', link: '/javalin/routing' },
3543
{ text: 'Sending errors', link: '/javalin/sending-errors' },
44+
{ text: 'Schema validation', link: '/javalin/schema-validation' }
3645
]
3746
},
3847
{
@@ -45,5 +54,22 @@ export const javalin = [
4554
{ text: 'CSS and assets', link: '/javalin/css-and-assets' },
4655
{ text: 'User input', link: '/javalin/user-input' }
4756
]
57+
},
58+
{
59+
text: 'Web sockets',
60+
items: [
61+
{
62+
text: 'Creating a web socket server',
63+
link: '/javalin/web-socket-server'
64+
},
65+
{
66+
text: 'Syncing clients',
67+
link: '/javalin/syncing-clients'
68+
},
69+
{
70+
text: 'Creating a web socket client',
71+
link: '/javalin/web-socket-client'
72+
}
73+
]
4874
}
4975
]

.vitepress/sidebars/topnav.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,15 @@ export const topnav = [
8383
link: '/javalin/'
8484
}
8585
]
86+
},
87+
{
88+
text: 'Python',
89+
items: [
90+
{
91+
text: 'Flask',
92+
link: '/flask/'
93+
}
94+
]
8695
}
8796
]
8897
},

netlify.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[[headers]]
2+
for = "/*"
3+
[headers.values]
4+
Strict-Transport-Security = '''
5+
max-age=63072000;
6+
includeSubDomains;
7+
preload'''

src/bash/installation-windows.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,17 @@ wsl --install
3333
This may take some time, but you should see a success message after a few
3434
minutes.
3535

36+
::: info
37+
38+
If the above command doesn't work, you might need to specify the WSL
39+
distribution as `Ubuntu`:
40+
41+
```bash
42+
wsl --install -d Ubuntu
43+
```
44+
45+
:::
46+
3647
### Launching WSL
3748

3849
You will need to restart your computer. When it restarts, search for "Ubuntu" in

0 commit comments

Comments
 (0)