Skip to content
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

Codespaces #27

Open
wants to merge 137 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
137 commits
Select commit Hold shift + click to select a range
25351c8
added branch for codespaces
lynnlangit Sep 10, 2020
5d7fd28
cleaning
lynnlangit Sep 10, 2020
575fee4
basic Java verification
lynnlangit Sep 10, 2020
dfe7703
basic verification
lynnlangit Sep 10, 2020
68e3b8c
cleaning
lynnlangit Sep 10, 2020
0461775
testing java
lynnlangit Sep 10, 2020
46e1cdb
update container creation
lynnlangit Sep 10, 2020
cc00d27
Create README.md
lynnlangit Sep 10, 2020
e4169b1
Merge branch 'codespaces' of https://github.com/TeachingKidsProgrammi…
lynnlangit Sep 10, 2020
320e4f6
added source files
lynnlangit Sep 10, 2020
97190e1
hello Turtle
lynnlangit Sep 10, 2020
f3bd140
creating Hello Turtle
lynnlangit Sep 10, 2020
241dfe8
clean up - remove unused files
lynnlangit Sep 10, 2020
aecf7f1
still clearning
lynnlangit Sep 10, 2020
3b1f6d8
cleaning and fixing namespace errors
lynnlangit Sep 10, 2020
e6f43ff
updaing namespaces - b1 of 4
lynnlangit Sep 10, 2020
7b1b17a
updaing namespaces
lynnlangit Sep 10, 2020
e46ed03
update QuickTortoise
lynnlangit Sep 10, 2020
0db4bb3
update settings
lynnlangit Sep 10, 2020
3d45c02
namespaces moves
lynnlangit Sep 10, 2020
9a3f26c
adding hello worlds
lynnlangit Sep 10, 2020
fbb3a48
removed comments
lynnlangit Sep 10, 2020
3c2bc6a
reorg
lynnlangit Sep 10, 2020
18312c4
added first Tortoise test java file
lynnlangit Sep 10, 2020
695d2b4
remove folder
lynnlangit Sep 10, 2020
4c520af
move and rename Graphics folder
lynnlangit Sep 10, 2020
624af11
move resources into TKP-library
lynnlangit Sep 10, 2020
593c29a
updated settings.json
lynnlangit Sep 10, 2020
6da25f3
fixing namespaces
lynnlangit Sep 10, 2020
afdea51
namespaces - simpler
lynnlangit Sep 10, 2020
01f0f6a
updating namespaces
lynnlangit Sep 10, 2020
baa29f9
reorg folders
lynnlangit Sep 11, 2020
a9483e4
rename to teachingextentions
lynnlangit Sep 11, 2020
cb4e8b8
fixing namespaces
lynnlangit Sep 11, 2020
3164bb6
fixing namespaces
lynnlangit Sep 11, 2020
7875a3a
adding utility java files
lynnlangit Sep 11, 2020
44ff44e
update ArrayUtils
lynnlangit Sep 11, 2020
9dae389
update teachingextensions namespaces
lynnlangit Sep 12, 2020
f619d98
fixing import statements
lynnlangit Sep 12, 2020
e6b2ea2
fixing imports in animals
lynnlangit Sep 12, 2020
683c809
fixing imports in utils
lynnlangit Sep 12, 2020
955a0d1
fixing PuzzleUtils
lynnlangit Sep 12, 2020
8e77650
fixing imports for ApprovalUtils
lynnlangit Sep 12, 2020
9869264
fixing imports for panels
lynnlangit Sep 12, 2020
60dee35
fixing imports
lynnlangit Sep 12, 2020
63ee098
imports
lynnlangit Sep 12, 2020
714a1b7
rename to teachingkidsprogramming
lynnlangit Sep 12, 2020
f255049
faking MakeALogo
lynnlangit Sep 12, 2020
b29c9e9
added reporters
lynnlangit Sep 12, 2020
aa2121f
Add files via upload
lynnlangit Sep 12, 2020
1f487f3
adding reporters
lynnlangit Sep 12, 2020
584c513
fixing reporter namespaces
lynnlangit Sep 12, 2020
11ac023
namespaces for lessons sections 0 & 1
lynnlangit Sep 13, 2020
c68ab3e
fixing namespaces for lessons
lynnlangit Sep 13, 2020
67621ff
fixing reporters
lynnlangit Sep 13, 2020
f1f6bcf
update ContextAware.java
lynnlangit Sep 13, 2020
7c388da
fixing reporter namespaces
lynnlangit Sep 13, 2020
d73d30e
fixing grader namespaces
lynnlangit Sep 13, 2020
84e9ce8
quizes import statement updates
lynnlangit Sep 13, 2020
c18f1d1
namespace updates for quizes
lynnlangit Sep 13, 2020
13c6cb3
update classpath
lynnlangit Sep 13, 2020
a1f0863
updated settings.json
lynnlangit Sep 13, 2020
f06145f
Create junit-4.13.jar
lynnlangit Sep 13, 2020
93257c9
added junit to classpath
lynnlangit Sep 13, 2020
82c1a8b
more imports fixes
lynnlangit Sep 13, 2020
963af81
adding approval lite utils
lynnlangit Sep 13, 2020
25434f5
more namespaces
lynnlangit Sep 13, 2020
a4b0f83
Create javax.servlet-api-3.1.0.jar
lynnlangit Sep 13, 2020
54ae9d2
updating classpath
lynnlangit Sep 13, 2020
b0bf688
update FileApproval
lynnlangit Sep 13, 2020
4a907aa
added correct version of velocity
lynnlangit Sep 13, 2020
59589b8
update classpath for velocity version
lynnlangit Sep 13, 2020
3d0aa4a
remove unused imports
lynnlangit Sep 13, 2020
7c737fc
scarey fixes of reporters and testableU
lynnlangit Sep 13, 2020
d204641
updating CleanUp
lynnlangit Sep 13, 2020
c1c9546
commenting out Approvals sections
lynnlangit Sep 13, 2020
79a46c2
fake VelolocityParsingError
lynnlangit Sep 13, 2020
cad228a
updating VP Error
lynnlangit Sep 13, 2020
ee087d6
zero errors - now what?
lynnlangit Sep 13, 2020
e59a61b
removing unused imports
lynnlangit Sep 13, 2020
1c2a470
testing MessageBox
lynnlangit Sep 13, 2020
9cf71f8
test harness for GUI issue
lynnlangit Sep 13, 2020
d1040b3
building test harness
lynnlangit Sep 13, 2020
cacbd58
building test files for TKPJava
lynnlangit Sep 14, 2020
5ca3281
Create hamcrest-core-1.3.jar
lynnlangit Sep 14, 2020
e3a131d
update classpath with hamcrest
lynnlangit Sep 14, 2020
3d050a7
remove incorrect tkp path
lynnlangit Sep 14, 2020
15daab9
do not install maven
lynnlangit Sep 14, 2020
c758fcf
clean test harness
lynnlangit Sep 14, 2020
3da4dc1
Create desktop-lite-debian.sh
lynnlangit Sep 15, 2020
6385b61
remove base.Dockerfile
lynnlangit Sep 15, 2020
28a6e45
Merge branch 'codespaces' of https://github.com/TeachingKidsProgrammi…
lynnlangit Sep 15, 2020
8e34728
testing VNC DOCKERFILE updates
lynnlangit Sep 15, 2020
ebd42e3
testing VNC - failed
lynnlangit Sep 15, 2020
5f154a5
Create metals.lock.db
lynnlangit Sep 15, 2020
13af7d5
testing X11 default
lynnlangit Sep 17, 2020
0fca081
revert
lynnlangit Sep 17, 2020
2cbabc1
Update DOCKERFILE
jamesrcounts Sep 19, 2020
c5c9bf5
Update desktop-lite-debian.sh
jamesrcounts Sep 19, 2020
96fb77b
Update desktop-lite-debian.sh
jamesrcounts Sep 19, 2020
28c0c77
Updated docker file
jamesrcounts Sep 21, 2020
5aa458f
Update devcontainer.json
jamesrcounts Sep 21, 2020
e6044ed
Got past basic failures
jamesrcounts Sep 22, 2020
a8c76f5
build and run devcontainer locally
jamesrcounts Sep 22, 2020
6c3a742
Typo in comment
jamesrcounts Sep 22, 2020
cfeb651
clean up imports
lynnlangit Sep 22, 2020
d46efb0
Merge branch 'codespaces' of https://github.com/TeachingKidsProgrammi…
lynnlangit Sep 22, 2020
2434bd9
testing
lynnlangit Sep 22, 2020
f1b93ff
removing port 5901 in config
lynnlangit Sep 23, 2020
f2271e3
Fix misnamed methods
jamesrcounts Sep 24, 2020
c431175
updating test file
lynnlangit Sep 24, 2020
f842fb9
typo in comments
lynnlangit Sep 24, 2020
4e5b7d1
get rid of vnc password
jamesrcounts Sep 25, 2020
5dd898e
Fix yellow window of death
jamesrcounts Sep 25, 2020
1718ba8
reset test file
lynnlangit Sep 25, 2020
39e7bcf
update test file
lynnlangit Sep 28, 2020
75b9708
removed comments from devcontainer
lynnlangit Nov 9, 2020
86febf2
deleted maven install script
lynnlangit Nov 9, 2020
21f015b
Add files via upload
lynnlangit Feb 18, 2021
fa7b5cd
added lesson plans
lynnlangit Feb 18, 2021
bdcf800
Update About.md
lynnlangit Feb 18, 2021
8cb134a
Update About.md
lynnlangit Feb 18, 2021
8872158
added TKP worksheets
lynnlangit Feb 18, 2021
aa0a900
Merge branch 'codespaces' of https://github.com/TeachingKidsProgrammi…
lynnlangit Feb 18, 2021
369726c
fixing md in TKP lessons
lynnlangit Feb 18, 2021
74b639f
Update course100.md
lynnlangit Feb 18, 2021
c117f29
Update course100.md
lynnlangit Feb 18, 2021
a6aa9c5
Create DatingGame.zip
lynnlangit Feb 18, 2021
d24e303
Create datingGameSQL.md
lynnlangit Feb 18, 2021
ebf70c1
added TKP Spanish lessons
lynnlangit Feb 18, 2021
3ed3686
adding RESULTS
lynnlangit Feb 18, 2021
37d3849
Update RESULTS.md
lynnlangit Feb 18, 2021
4a06aa3
remove ref to Penflip
lynnlangit Feb 18, 2021
6b36028
update Virtual Proctor URL
lynnlangit Feb 18, 2021
5c1bdfe
fix typos
lynnlangit Feb 18, 2021
7e98433
fixed source paths
lynnlangit Sep 3, 2021
35dbe1b
Update course100.md
lynnlangit Nov 15, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
24 changes: 24 additions & 0 deletions .devcontainer/DOCKERFILE
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
ARG VARIANT=11
FROM mcr.microsoft.com/vscode/devcontainers/java:${VARIANT}

ARG INSTALL_ZSH="true"
ARG UPGRADE_PACKAGES="false"
ARG USERNAME=vscode
ARG USER_UID=1000
ARG USER_GID=$USER_UID

COPY library-scripts/*.sh /tmp/library-scripts/
RUN apt-get update \
&& /bin/bash /tmp/library-scripts/common-debian.sh "${INSTALL_ZSH}" "${USERNAME}" "${USER_UID}" "${USER_GID}" "${UPGRADE_PACKAGES}" \
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* /tmp/library-scripts

COPY library-scripts/desktop-lite-debian.sh /tmp/library-scripts/
RUN apt-get update && \
export DEBIAN_FRONTEND=noninteractive && \
bash /tmp/library-scripts/desktop-lite-debian.sh

ENV DBUS_SESSION_BUS_ADDRESS="autolaunch:" DISPLAY=":1" LANG="en_US.UTF-8" LANGUAGE="en_US.UTF-8"
ENTRYPOINT ["/usr/local/share/desktop-init.sh"]
CMD ["sleep", "infinity"]

#RUN if [ ! -d "/docker-java-home" ]; then ln -s "${JAVA_HOME}" /docker-java-home; fi
26 changes: 26 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "Java",
"build": {
"dockerfile": "DOCKERFILE",
"args": {
"VARIANT": "11",
"INSTALL_MAVEN": "false",
}
},

"settings": {
"terminal.integrated.shell.linux": "/bin/bash",
"java.home": "/docker-java-home"
},

"extensions": [
"vscjava.vscode-java-pack"
],

"runArgs": ["--init", "--security-opt", "seccomp=unconfined"],
"forwardPorts": [6080],
"overrideCommand": false,

"postCreateCommand": "java -version",

}
167 changes: 167 additions & 0 deletions .devcontainer/library-scripts/common-debian.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
INSTALL_ZSH=${1:-"true"}
USERNAME=${2:-"vscode"}
USER_UID=${3:-1000}
USER_GID=${4:-1000}
UPGRADE_PACKAGES=${5:-"true"}

set -e

if [ "$(id -u)" -ne 0 ]; then
echo -e 'Script must be run a root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.'
exit 1
fi

if [ "${USERNAME}" = "none" ] || [ "${USERNAME}" = "root" ]; then
USERNAME=root
USER_UID=0
USER_GID=0
fi

MARKER_FILE="/usr/local/etc/vscode-dev-containers/common"
if [ -f "${MARKER_FILE}" ]; then
echo "Marker file found:"
cat "${MARKER_FILE}"
source "${MARKER_FILE}"
fi

export DEBIAN_FRONTEND=noninteractive

apt-get-update-if-needed()
{
if [ ! -d "/var/lib/apt/lists" ] || [ "$(ls /var/lib/apt/lists/ | wc -l)" = "0" ]; then
echo "Running apt-get update..."
apt-get update
else
echo "Skipping apt-get update."
fi
}

if [ "${PACKAGES_ALREADY_INSTALLED}" != "true" ]; then
apt-get-update-if-needed

PACKAGE_LIST="apt-utils \
git \
openssh-client \
gnupg2 \
iproute2 \
procps \
lsof \
htop \
net-tools \
psmisc \
curl \
wget \
rsync \
ca-certificates \
unzip \
zip \
nano \
vim-tiny \
less \
jq \
lsb-release \
apt-transport-https \
dialog \
libc6 \
libgcc1 \
libgssapi-krb5-2 \
libicu[0-9][0-9] \
liblttng-ust0 \
libstdc++6 \
zlib1g \
locales \
sudo \
ncdu \
man-db"

if [[ ! -z $(apt-cache --names-only search ^libssl1.1$) ]]; then
PACKAGE_LIST="${PACKAGE_LIST} libssl1.1"
fi

LIBSSL=$(dpkg-query -f '${db:Status-Abbrev}\t${binary:Package}\n' -W 'libssl1\.0\.?' 2>&1 || echo '')
if [ "$(echo "$LIBSSL" | grep -o 'libssl1\.0\.[0-9]:' | uniq | sort | wc -l)" -eq 0 ]; then
if [[ ! -z $(apt-cache --names-only search ^libssl1.0.2$) ]]; then
# Debian 9
PACKAGE_LIST="${PACKAGE_LIST} libssl1.0.2"
elif [[ ! -z $(apt-cache --names-only search ^libssl1.0.0$) ]]; then
# Ubuntu 18.04, 16.04, earlier
PACKAGE_LIST="${PACKAGE_LIST} libssl1.0.0"
fi
fi

echo "Packages to verify are installed: ${PACKAGE_LIST}"
apt-get -y install --no-install-recommends ${PACKAGE_LIST} 2> >( grep -v 'debconf: delaying package configuration, since apt-utils is not installed' >&2 )

PACKAGES_ALREADY_INSTALLED="true"
fi

if [ "${UPGRADE_PACKAGES}" = "true" ]; then
apt-get-update-if-needed
apt-get -y upgrade --no-install-recommends
apt-get autoremove -y
fi

if [ "${LOCALE_ALREADY_SET}" != "true" ]; then
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
locale-gen
LOCALE_ALREADY_SET="true"
fi

if id -u $USERNAME > /dev/null 2>&1; then
if [ "$USER_GID" != "$(id -G $USERNAME)" ]; then
groupmod --gid $USER_GID $USERNAME
usermod --gid $USER_GID $USERNAME
fi
if [ "$USER_UID" != "$(id -u $USERNAME)" ]; then
usermod --uid $USER_UID $USERNAME
fi
else
groupadd --gid $USER_GID $USERNAME
useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME
fi

if [ "${USERNAME}" != "root" ] && [ "${EXISTING_NON_ROOT_USER}" != "${USERNAME}" ]; then
echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME
chmod 0440 /etc/sudoers.d/$USERNAME
EXISTING_NON_ROOT_USER="${USERNAME}"
fi

RC_SNIPPET="$(cat << EOF
export USER=\$(whoami)
export PATH=\$PATH:\$HOME/.local/bin
if [[ \$(which code-insiders 2>&1) && ! \$(which code 2>&1) ]]; then
alias code=code-insiders
fi
EOF
)"

if [ "${RC_SNIPPET_ALREADY_ADDED}" != "true" ]; then
echo "${RC_SNIPPET}" >> /etc/bash.bashrc
RC_SNIPPET_ALREADY_ADDED="true"
fi

if [ "${INSTALL_ZSH}" = "true" ] && [ ! -d "/root/.oh-my-zsh" ] && [ "${ZSH_ALREADY_INSTALLED}" != "true" ]; then
apt-get-update-if-needed
apt-get install -y zsh
curl -fsSLo- https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh | bash 2>&1
echo "${RC_SNIPPET}" >> /etc/zsh/zshrc
echo -e "DEFAULT_USER=\$USER\nprompt_context(){}" >> /root/.zshrc
cp -fR /root/.oh-my-zsh /etc/skel
cp -f /root/.zshrc /etc/skel
sed -i -e "s/\/root\/.oh-my-zsh/\/home\/\$(whoami)\/.oh-my-zsh/g" /etc/skel/.zshrc
if [ "${USERNAME}" != "root" ]; then
cp -fR /etc/skel/.oh-my-zsh /etc/skel/.zshrc /home/$USERNAME
chown -R $USER_UID:$USER_GID /home/$USERNAME/.oh-my-zsh /home/$USERNAME/.zshrc
fi
ZSH_ALREADY_INSTALLED="true"
fi

mkdir -p "$(dirname "${MARKER_FILE}")"
echo -e "\
PACKAGES_ALREADY_INSTALLED=${PACKAGES_ALREADY_INSTALLED}\n\
LOCALE_ALREADY_SET=${LOCALE_ALREADY_SET}\n\
EXISTING_NON_ROOT_USER=${EXISTING_NON_ROOT_USER}\n\
RC_SNIPPET_ALREADY_ADDED=${RC_SNIPPET_ALREADY_ADDED}\n\
ZSH_ALREADY_INSTALLED=${ZSH_ALREADY_INSTALLED}" > "${MARKER_FILE}"

echo "Done!"
Loading