-
Notifications
You must be signed in to change notification settings - Fork 0
Chore - Intro code examples #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
hhandoko
wants to merge
14
commits into
master
Choose a base branch
from
chore/intro_code_examples
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
c254c98
Add `Loop` runnable code as reference
hhandoko a960e27
Add links to source code for reference
hhandoko 4220c83
Fix code example to utilise `max` parameter
hhandoko fbfb76f
Split code into `exercises` and `references`
hhandoko a577375
Break long paragraph in intro to make it easier to read
hhandoko 375b0cf
Replace ordered list with regular numbering instead of MD auto-parsed…
hhandoko 8017189
Replace unordered list symbol to `-` for consistency
hhandoko 37e0f47
Fix MD rendering for source code links
hhandoko b0d1290
Simplify and replace link into footnote-style
hhandoko 9803b09
Revert and add air quotes ;)
hhandoko f70c2f7
Add generated diff output
hhandoko 9e8a620
Scrub filesystem path
hhandoko e776285
Add links to diff preview
hhandoko 74e41e2
Fix link to `Loop1.java` file
hhandoko File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
| @@ -1,2 +1,266 @@ | ||
| *.class | ||
| *.log | ||
| # Created by https://www.gitignore.io/api/osx,vim,code,linux,emacs,windows,eclipse,intellij+all | ||
|
|
||
| ### Code ### | ||
| # Visual Studio Code - https://code.visualstudio.com/ | ||
| .settings/ | ||
| .vscode/ | ||
| tsconfig.json | ||
| jsconfig.json | ||
|
|
||
| ### Eclipse ### | ||
|
|
||
| .metadata | ||
| bin/ | ||
| tmp/ | ||
| *.tmp | ||
| *.bak | ||
| *.swp | ||
| *~.nib | ||
| local.properties | ||
| .loadpath | ||
| .recommenders | ||
|
|
||
| # External tool builders | ||
| .externalToolBuilders/ | ||
|
|
||
| # Locally stored "Eclipse launch configurations" | ||
| *.launch | ||
|
|
||
| # PyDev specific (Python IDE for Eclipse) | ||
| *.pydevproject | ||
|
|
||
| # CDT-specific (C/C++ Development Tooling) | ||
| .cproject | ||
|
|
||
| # Java annotation processor (APT) | ||
| .factorypath | ||
|
|
||
| # PDT-specific (PHP Development Tools) | ||
| .buildpath | ||
|
|
||
| # sbteclipse plugin | ||
| .target | ||
|
|
||
| # Tern plugin | ||
| .tern-project | ||
|
|
||
| # TeXlipse plugin | ||
| .texlipse | ||
|
|
||
| # STS (Spring Tool Suite) | ||
| .springBeans | ||
|
|
||
| # Code Recommenders | ||
| .recommenders/ | ||
|
|
||
| # Scala IDE specific (Scala & Java development for Eclipse) | ||
| .cache-main | ||
| .scala_dependencies | ||
| .worksheet | ||
|
|
||
| ### Eclipse Patch ### | ||
| # Eclipse Core | ||
| .project | ||
|
|
||
| # JDT-specific (Eclipse Java Development Tools) | ||
| .classpath | ||
|
|
||
| ### Emacs ### | ||
| # -*- mode: gitignore; -*- | ||
| *~ | ||
| \#*\# | ||
| /.emacs.desktop | ||
| /.emacs.desktop.lock | ||
| *.elc | ||
| auto-save-list | ||
| tramp | ||
| .\#* | ||
|
|
||
| # Org-mode | ||
| .org-id-locations | ||
| *_archive | ||
|
|
||
| # flymake-mode | ||
| *_flymake.* | ||
|
|
||
| # eshell files | ||
| /eshell/history | ||
| /eshell/lastdir | ||
|
|
||
| # elpa packages | ||
| /elpa/ | ||
|
|
||
| # reftex files | ||
| *.rel | ||
|
|
||
| # AUCTeX auto folder | ||
| /auto/ | ||
|
|
||
| # cask packages | ||
| .cask/ | ||
| dist/ | ||
|
|
||
| # Flycheck | ||
| flycheck_*.el | ||
|
|
||
| # server auth directory | ||
| /server/ | ||
|
|
||
| # projectiles files | ||
| .projectile | ||
| projectile-bookmarks.eld | ||
|
|
||
| # directory configuration | ||
| .dir-locals.el | ||
|
|
||
| # saveplace | ||
| places | ||
|
|
||
| # url cache | ||
| url/cache/ | ||
|
|
||
| # cedet | ||
| ede-projects.el | ||
|
|
||
| # smex | ||
| smex-items | ||
|
|
||
| # company-statistics | ||
| company-statistics-cache.el | ||
|
|
||
| # anaconda-mode | ||
| anaconda-mode/ | ||
|
|
||
| ### Intellij+all ### | ||
| # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm | ||
| # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 | ||
|
|
||
| # User-specific stuff: | ||
| .idea/**/workspace.xml | ||
| .idea/**/tasks.xml | ||
| .idea/dictionaries | ||
|
|
||
| # Sensitive or high-churn files: | ||
| .idea/**/dataSources/ | ||
| .idea/**/dataSources.ids | ||
| .idea/**/dataSources.xml | ||
| .idea/**/dataSources.local.xml | ||
| .idea/**/sqlDataSources.xml | ||
| .idea/**/dynamic.xml | ||
| .idea/**/uiDesigner.xml | ||
|
|
||
| # Gradle: | ||
| .idea/**/gradle.xml | ||
| .idea/**/libraries | ||
|
|
||
| # CMake | ||
| cmake-build-debug/ | ||
|
|
||
| # Mongo Explorer plugin: | ||
| .idea/**/mongoSettings.xml | ||
|
|
||
| ## File-based project format: | ||
| *.iws | ||
|
|
||
| ## Plugin-specific files: | ||
|
|
||
| # IntelliJ | ||
| /out/ | ||
|
|
||
| # mpeltonen/sbt-idea plugin | ||
| .idea_modules/ | ||
|
|
||
| # JIRA plugin | ||
| atlassian-ide-plugin.xml | ||
|
|
||
| # Cursive Clojure plugin | ||
| .idea/replstate.xml | ||
|
|
||
| # Crashlytics plugin (for Android Studio and IntelliJ) | ||
| com_crashlytics_export_strings.xml | ||
| crashlytics.properties | ||
| crashlytics-build.properties | ||
| fabric.properties | ||
|
|
||
| ### Intellij+all Patch ### | ||
| # Ignores the whole idea folder | ||
| # See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360 | ||
|
|
||
| .idea/ | ||
|
|
||
| ### Linux ### | ||
|
|
||
| # temporary files which can be created if a process still has a handle open of a deleted file | ||
| .fuse_hidden* | ||
|
|
||
| # KDE directory preferences | ||
| .directory | ||
|
|
||
| # Linux trash folder which might appear on any partition or disk | ||
| .Trash-* | ||
|
|
||
| # .nfs files are created when an open file is removed but is still being accessed | ||
| .nfs* | ||
|
|
||
| ### OSX ### | ||
| *.DS_Store | ||
| .AppleDouble | ||
| .LSOverride | ||
|
|
||
| # Icon must end with two \r | ||
| Icon | ||
|
|
||
| # Thumbnails | ||
| ._* | ||
|
|
||
| # Files that might appear in the root of a volume | ||
| .DocumentRevisions-V100 | ||
| .fseventsd | ||
| .Spotlight-V100 | ||
| .TemporaryItems | ||
| .Trashes | ||
| .VolumeIcon.icns | ||
| .com.apple.timemachine.donotpresent | ||
|
|
||
| # Directories potentially created on remote AFP share | ||
| .AppleDB | ||
| .AppleDesktop | ||
| Network Trash Folder | ||
| Temporary Items | ||
| .apdisk | ||
|
|
||
| ### Vim ### | ||
| # swap | ||
| [._]*.s[a-v][a-z] | ||
| [._]*.sw[a-p] | ||
| [._]s[a-v][a-z] | ||
| [._]sw[a-p] | ||
| # session | ||
| Session.vim | ||
| # temporary | ||
| .netrwhist | ||
| # auto-generated tag files | ||
| tags | ||
|
|
||
| ### Windows ### | ||
| # Windows thumbnail cache files | ||
| Thumbs.db | ||
| ehthumbs.db | ||
| ehthumbs_vista.db | ||
|
|
||
| # Folder config file | ||
| Desktop.ini | ||
|
|
||
| # Recycle Bin used on file shares | ||
| $RECYCLE.BIN/ | ||
|
|
||
| # Windows Installer files | ||
| *.cab | ||
| *.msi | ||
| *.msm | ||
| *.msp | ||
|
|
||
| # Windows shortcuts | ||
| *.lnk | ||
|
|
||
| # End of https://www.gitignore.io/api/osx,vim,code,linux,emacs,windows,eclipse,intellij+all | ||
This file contains hidden or 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,43 @@ | ||
| # Created by https://www.gitignore.io/api/sbt,java,scala | ||
|
|
||
| ### Java ### | ||
| # Compiled class file | ||
| *.class | ||
|
|
||
| # Log file | ||
| *.log | ||
|
|
||
| # BlueJ files | ||
| *.ctxt | ||
|
|
||
| # Mobile Tools for Java (J2ME) | ||
| .mtj.tmp/ | ||
|
|
||
| # Package Files # | ||
| *.jar | ||
| *.war | ||
| *.ear | ||
| *.zip | ||
| *.tar.gz | ||
| *.rar | ||
|
|
||
| # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml | ||
| hs_err_pid* | ||
|
|
||
| ### SBT ### | ||
| # Simple Build Tool | ||
| # http://www.scala-sbt.org/release/docs/Getting-Started/Directories.html#configuring-version-control | ||
|
|
||
| dist/* | ||
| target/ | ||
| lib_managed/ | ||
| src_managed/ | ||
| project/boot/ | ||
| project/plugins/project/ | ||
| .history | ||
| .cache | ||
| .lib/ | ||
|
|
||
| ### Scala ### | ||
|
|
||
| # End of https://www.gitignore.io/api/sbt,java,scala |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know nobody really looks into
.gitignorebut I generally dislike generated bloat like this. As a developer I want to understand what files are being created in the project directory and why. If those are my custom tools, I would ignore them at~/.gitignorelevel.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps I'll add some comments with a bit of explanation.
My goal here was to ignore all system / OS-specific files (like OSX's
.DStore) and editor / IDE config files which gets generated automatically and often accidentally committed.I'm covering three main OS (Win, OSX, *nix) and common editors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the
.gitignorestarts mentioning files that you didn't even know existed, there is a risk of accidentally not committing a file. And the pursuit of ignoring all system files is pointless because you never know what strange tools and temp files people are going to have. That's why Git has a user-specific~/.gitignorefile.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense... I'll revert.