diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index ed4e2625..00000000
--- a/.gitignore
+++ /dev/null
@@ -1,8 +0,0 @@
-node_modules
-*.img
-*.pyc
-coder-base/certs
-coder-base/device.json
-
-.DS_Store
-Thumbs.db
diff --git a/INSTALL b/INSTALL
deleted file mode 100644
index fb6c4c25..00000000
--- a/INSTALL
+++ /dev/null
@@ -1,67 +0,0 @@
-
-CODER FOR RASPBERRY PI
-The easy way...
-
-Coder for Raspberry Pi is distributed as a Pi SD Card image.
-If you want to go the easy route, please check out the
-documentation at http://goo.gl/coder
-
-
-
-EVERYONE ELSE
-
-If you want to install Coder on something else, or would
-like to install it on an existing Raspberry Pi, you can
-manually install it as well.
-
-BEFORE YOU START:
- I recommend you do this as a normal user and not root.
- The official pi distro has a "coder" user that Coder runs
- under, and ports 80 and 433 are forwarded to 8080/8081.
-
-MANUAL INSTALL:
-
-1. You need to have node.js and npm installed
-
-2. Download Coder from git.
- # git clone https://github.com/googlecreativelab/coder.git
-
-3. Install the basic Coder apps.
- # cd coder-apps
- # ./install_common.sh ../coder-base
-
- Optional: Raspberry Pi additions to the code can be installed with:
- # ./install_pi.sh ../coder-base
- Note that there are a number of additional changes made to the OS.
- These additional configurations can be found in the raspbian-addons
- directory. See below.
-
-4. In coder-base run "npm install" to download all the
- needed modules.
-
-5. Edit config.js to your liking. I recommend starting
- with the settings in config.js.localhost and running
- the localhost server.
-
-6. Start Coder
- # cd coder-base
- # node localserver.js
-
-
-If you want to run Coder on an external port, you'll need
-to run server.js instead of localserver.js. This requires
-a bit of port forwarding setup in iptables. Look in
-the raspbian-addons directory to see the customizations that
-were made to the stock raspbian distro.
-
-The raspberry pi version of Coder has some other
-tweaks that allow you to change your wifi settings
-and keep your Pi password in sync with your Coder password.
-There's some convoluted system configuration involved, which is
-probably why you'd want to start with the Coder disk image,
-but the modified apps are available by running ./install_pi.sh
-after step 3. Modifications to the stock raspbian configuration
-can be found in raspbian-addons.
-
-
-
diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index 6b0b1270..00000000
--- a/LICENSE
+++ /dev/null
@@ -1,203 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
diff --git a/README.md b/README.md
deleted file mode 100644
index 4298e1e6..00000000
--- a/README.md
+++ /dev/null
@@ -1,26 +0,0 @@
-# Coder
-## A simple way to make web stuff on Raspberry Pi
-
-Coder is a free piece of software that turns a Raspberry Pi into a super simple platform that educators and parents can use to teach the basics of building for the web. New coders can craft small projects in HTML, CSS, and Javascript, right from the web browser.
-
-http://goo.gl/coder
-
-### What You'll Find Here
-
-#### coder-base
-The Coder node.js server and application files
-
-#### coder-apps
-The Coder applications that come pre-installed in the Coder distribution
-
-#### raspbian-addons
-Modifications and additions to the stock raspian configuration and init structure
-
-#### installer
-Utility for transfering the coder image to an SD Card
-
-#### findcoder-appengine
-EXPERIMENTAL: A status server that can be run to help locate multiple Coder devices in a classroom scenario
-
-
-
diff --git a/assets/css/index.css b/assets/css/index.css
new file mode 100644
index 00000000..e7d0c70a
--- /dev/null
+++ b/assets/css/index.css
@@ -0,0 +1,671 @@
+
+/*
+@font-face {
+ font-family: 'dosislight';
+ src: url('http://github.com/type/dosis-light-webfont.eot');
+ src: url('http://github.com/type/dosis-light-webfont.eot?#iefix') format('embedded-opentype'),
+ url('http://github.com/type/dosis-light-webfont.woff') format('woff'),
+ url('http://github.com/type/dosis-light-webfont.ttf') format('truetype'),
+ url('http://github.com/type/dosis-light-webfont.svg#dosislight') format('svg');
+ font-weight: normal;
+ font-style: normal;
+
+}
+*/
+@font-face {
+ font-family: 'dosisregular';
+ src: url('http://github.com/type/dosis-regular-webfont.eot');
+ src: url('http://github.com/type/dosis-regular-webfont.eot?#iefix') format('embedded-opentype'),
+ url('http://github.com/type/dosis-regular-webfont.woff') format('woff'),
+ url('http://github.com/type/dosis-regular-webfont.ttf') format('truetype'),
+ url('http://github.com/type/dosis-regular-webfont.svg#dosisregular') format('svg');
+ font-weight: normal;
+ font-style: normal;
+
+}
+/*
+@font-face {
+ font-family: 'dosismedium';
+ src: url('http://github.com/type/dosis-medium-webfont.eot');
+ src: url('http://github.com/type/dosis-medium-webfont.eot?#iefix') format('embedded-opentype'),
+ url('http://github.com/type/dosis-medium-webfont.woff') format('woff'),
+ url('http://github.com/type/dosis-medium-webfont.ttf') format('truetype'),
+ url('http://github.com/type/dosis-medium-webfont.svg#dosismedium') format('svg');
+ font-weight: normal;
+ font-style: normal;
+
+}
+*/
+@font-face {
+ font-family: 'dosissemibold';
+ src: url('http://github.com/type/dosis-semibold-webfont.eot');
+ src: url('http://github.com/type/dosis-semibold-webfont.eot?#iefix') format('embedded-opentype'),
+ url('http://github.com/type/dosis-semibold-webfont.woff') format('woff'),
+ url('http://github.com/type/dosis-semibold-webfont.ttf') format('truetype'),
+ url('http://github.com/type/dosis-semibold-webfont.svg#dosissemibold') format('svg');
+ font-weight: normal;
+ font-style: normal;
+
+}
+
+BODY, HTML {
+ width: 100%;
+ height: 100%;
+ padding: 0;
+ margin: 0;
+ font-size: 14px;
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ -webkit-font-smoothing: antialiased;
+ color: #636363;
+}
+
+A, A:hover, A:visited, A:active {
+ color: #00acc6;
+ text-decoration: underline;
+}
+
+
+.fixedbg {
+ position: fixed;
+ width: 100%;
+ height: 60px;
+ top: 0px;
+ left: 0px;
+ z-index: 7;
+ background-color: #28d8eb;
+ color: #ffffff;
+ overflow: hidden;
+}
+.fixedbar {
+ position: fixed;
+ width: 100%;
+ height: 60px;
+ top: 0px;
+ left: 0px;
+ z-index: 8;
+ color: #ffffff;
+ overflow: hidden;
+}
+
+.logo A, .logo A:hover, .logo A:visited, .logo A:active {
+ color: #ffffff;
+ text-decoration: none;
+}
+
+#slideup .logo {
+ opacity: 0;
+ position: relative;
+}
+
+#slideup {
+ position: absolute;
+ width: 100%;
+ height: 100%;
+ left: 0px;
+}
+
+#animation {
+ position: absolute;
+ top: 0px;
+ left: 0px;
+ width: 100%;
+ height: 100%;
+}
+
+.masthead {
+ background-color: #28d8eb;
+ color: #ffffff;
+ position: relative;
+ top: 0px;
+ left: 0px;
+ width: 100%;
+ text-align: center;
+ z-index: 7;
+ margin-bottom: 0px;
+ height: 250px;
+}
+.masthead H1 {
+ position: absolute;
+ margin: 0;
+ padding: 0;
+ top: 50%;
+ margin-top: -90px;
+ left: 50px;
+ margin-left: 0;
+ text-transform: uppercase;
+ line-height: 170px;
+ font-size: 170px;
+ display:block;
+ width: 500px;
+ text-align: left;
+ letter-spacing: 5px;
+ font-family: dosisregular, sans-serif;
+ font-weight: normal;
+}
+.masthead .forpi {
+ position: absolute;
+ font-size: 15px;
+ line-height: 15px;
+ color: #981738;
+ top: 112px;
+ right: 0px;
+ padding: 0;
+ margin: 0;
+ letter-spacing:0;
+ display: block;
+ opacity: 0.9;
+ font-family: dosissemibold, sans-serif;
+ font-weight:normal;
+}
+.masthead P {
+ font-size: 28px;
+ line-height: 36px;
+ width: 460px;
+ margin: 0 auto 0 auto;
+ padding: 256px 0 0 0;
+}
+
+.masthead A.new_callout,
+.masthead A.new_callout:visited,
+.masthead A.new_callout:active,
+.masthead A.new_callout:hover {
+ display: block;
+ position: absolute;
+ top:0;
+ right:60px;
+ padding: 8px;
+ border-radius: 0 0 6px 6px;
+ background-color: #ffbe00;
+ color: #fff;
+ font-family: dosissemibold, sans-serif;
+ font-weight: normal;
+ font-size: 18px;
+ line-height: 18px;
+ text-decoration: none;
+ cursor: pointer;
+}
+.masthead A.new_callout:hover {
+}
+
+.fixedbar .logo H1 {
+ position: absolute;
+ margin: 0;
+ padding: 0;
+ top: 2px;
+ color: #ffffff;
+ left: 58px;
+ text-transform: uppercase;
+ line-height: 50px;
+ font-size: 50px;
+ display:block;
+ letter-spacing: 1px;
+ font-family: dosisregular, sans-serif;
+ font-weight: normal;
+}
+.fixedbar .logo .forpi {
+ position: absolute;
+ font-size: 8px;
+ line-height: 8px;
+ color: #981738;
+ top: 31px;
+ right: -30px;
+ padding: 0;
+ margin: 0;
+ letter-spacing:0;
+ display: block;
+ font-family: dosissemibold, sans-serif;
+ font-weight: normal;
+}
+
+.button {
+ display: inline-block;
+ font-size: 23px;
+ background-color: #3cd7ea;
+ color: #ffffff;
+ border-radius: 6px;
+ line-height: 50px;
+ padding: 0 30px;
+ opacity: 0.9;
+}
+.button:hover {
+ opacity: 1;
+ cursor: pointer;
+}
+
+.button.inline {
+ display: inline-block;
+ vertical-align: middle;
+}
+
+.faq .button {
+ margin-top: 10px;
+}
+
+.helpout .button {
+ padding: 0 25px;
+}
+
+A.button, A.button:hover, A.button:visited, A.button:active {
+ color: #ffffff;
+ text-decoration: none;
+}
+
+
+.download {
+}
+.masthead .download {
+ position: relative;
+ z-index: 11;
+}
+
+.fixedbar .download {
+ position: absolute;
+ right: 25px;
+ top: 12px;
+ margin:0;
+ font-size: 16px;
+ line-height: 35px;
+}
+
+
+.links {
+ color: #000000;
+ font-size: 16px;
+ line-height: 16px;
+ position: absolute;
+ right: 60px;
+ bottom: 158px;
+ font-weight: 400;
+}
+.links A, .links A:visited, .links A:active, .links A:hover {
+ color: #000000;
+ text-decoration: none;
+ opacity: 0.5;
+ margin: 0 10px;
+}
+.links A:hover, .links A:active {
+ color: #000000;
+ opacity: 0.8;
+}
+.links A.active, .links A.active:hover {
+ color: #ffffff;
+ opacity: 1;
+}
+
+.fixedbar .links {
+ position: absolute;
+ right: 60px;
+ bottom: 24px;
+ padding: 0;
+}
+.fixedbar .links A, .fixedbar .links A:visited, .fixedbar .links A:active, .fixedbar .links A:hover {
+}
+.fixedbar .links A:hover {
+}
+
+.madewith {
+ position: absolute;
+ bottom: 20px;
+ left: 30px;
+}
+.section {
+ position: relative;
+ margin: 0 auto;
+ padding: 0 0 30px 0;
+ border-bottom: 1px solid #eaeaea;
+ clear: both;
+ width: 640px;
+}
+.section.centered {
+}
+.section p {
+ font-size: 16px;
+ line-height: 22px;
+ font-weight: 200;
+ margin: 1em 0;
+}
+.section p.last {
+ margin-bottom: 0;
+}
+.section .anchor {
+ position: absolute;
+ top: -60px;
+}
+.section.last {
+ border-bottom: 0px;
+}
+
+.section.introduction {
+ border-bottom: 0px;
+ padding-bottom: 0;
+ text-align: center;
+}
+.introcopy {
+ width: 640px;
+ margin: 0 auto;
+}
+
+.section p.download-details {
+ font-size: 12px;
+ line-height: 12px;
+ color: #949494;
+ margin-top: 10px;
+}
+.section p.download-details.inline {
+ display: inline-block;
+ vertical-align: middle;
+ margin-left: 10px;
+ color: #666666;
+ line-height: 16px;
+}
+
+.clear {
+ clear: both;
+}
+
+h2 {
+ font-weight: 200;
+ font-size: 28px;
+ line-height: 34px;
+ margin: 0 0 -4px 0;
+ padding: 34px 0 0 0;
+}
+
+.setup.switch {
+ position: absolute;
+ top: 24px;
+ right: 0px;
+}
+.setup.instructions {
+ margin-top: 24px;
+}
+
+.switch {
+ border-radius: 6px;
+ border: 2px solid #dedede;
+ display: block;
+ background-color: #efefef;
+ margin: 10px auto 24px auto;
+ width: 164px;
+ text-align:center;
+}
+
+.switch .left, .switch .right {
+ color: #aeaeae;
+ background-color: #efefef;
+ line-height: 35px;
+ font-size: 16px;
+ width: 80px;
+ display: inline-block;
+ opacity: 0.8;
+}
+.switch .left:hover, .switch .right:hover {
+ opacity: 1;
+ color: #3cd7ea;
+ cursor: pointer;
+}
+.switch .active {
+ color: #3cd7ea;
+ opacity: 1;
+ background-image: linear-gradient(top, rgb(222,222,222) 33%, rgb(239,239,239) 80%);
+ background-image: -o-linear-gradient(top, rgb(222,222,222) 33%, rgb(239,239,239) 80%);
+ background-image: -moz-linear-gradient(top, rgb(222,222,222) 33%, rgb(239,239,239) 80%);
+ background-image: -webkit-linear-gradient(top, rgb(222,222,222) 33%, rgb(239,239,239) 80%);
+ background-image: -ms-linear-gradient(top, rgb(222,222,222) 33%, rgb(239,239,239) 80%);
+}
+
+.switchpanel {
+ display: none;
+}
+.switchpanel.active {
+ display: block;
+}
+
+.setup .step {
+ display: block;
+ position: relative;
+ vertical-align: top;
+ clear: both;
+}
+.setup .step.last {
+ margin-right:0;
+}
+.step img {
+ width: 200px;
+ margin-right: 24px;
+ display: block;
+ float: left;
+ padding-bottom: 12px;
+}
+.step .stepnum {
+ font-weight: 200;
+ font-size: 28px;
+ line-height: 34px;
+}
+.step p {
+ line-height: 18px;
+ font-size: 14px;
+ text-align: left;
+ margin: 6px 0;
+}
+
+.callout {
+ font-size: 15px;
+ color: #ffffff;
+ /*background-color: #c0c0c0;*/
+ background-color: #00c200;
+ border-radius: 6px;
+ line-height: 60px;
+ margin: 24px 0 0 0;
+ text-align:center;
+}
+.callout A, .callout A:hover, .callout A:active, .callout A:visited {
+ text-decoration: underline;
+ color: #ffffff;
+}
+
+.tour {
+ position: relative;
+ margin-top: 24px;
+}
+.tournav {
+ text-align: center;
+ width: 100%;
+ position:absolute;
+ height: 24px;
+ margin-top: 10px;
+ top: 456px;
+}
+.tournav .item {
+ width: 12px;
+ height: 12px;
+ border-radius: 12px;
+ background-color: #aeaeae;
+ margin: 6px;
+ cursor: pointer;
+ display: inline-block;
+}
+.tournav .item.active {
+ background-color: #636363;
+}
+.tour .slide img {
+ height: 450px;
+ width: 640px;
+ margin-bottom: 28px;
+ cursor: pointer;
+}
+.tour .slide p {
+ min-height: 88px;
+ display: block;
+ margin-bottom: -12px;
+}
+
+.faq {
+ margin: 16px 0;
+}
+.faq.first {
+ margin-top: 30px;
+}
+.faq h3 {
+ font-weight: bold;
+ font-size: 16px;
+ margin: 0;
+ padding: 0;
+ line-height: 20px;
+ color: #636363;
+}
+.faq p {
+ font-size: 16px;
+ margin: 0;
+ padding: 0;
+ line-height: 20px;
+ color: #636363;
+}
+.faq.rollup h3 {
+ cursor: pointer;
+ color: #00acc6;
+}
+.faq.rollup p {
+ display:none;
+}
+
+.helpout {
+ display: inline-block;
+ width: 245px;
+ padding: 0;
+ position: relative;
+ text-align: left;
+ vertical-align: top;
+ margin: 30px 10px 45px 0;
+}
+.helpout h3 {
+ font-weight: bold;
+ font-size: 18px;
+ margin: 0;
+ padding: 0;
+ line-height: 24px;
+ color: #00c200;
+}
+.helpout P {
+ font-size: 18px;
+ line-height: 24px;
+ margin: 8px 0;
+}
+
+.product {
+ display: inline-block;
+ width: 178px;
+ padding: 0 0 0 135px;
+ position: relative;
+ text-align: left;
+ height: 120px;
+ vertical-align: top;
+ margin: 30px 10px 0 0;
+}
+.product.right {
+ margin-right: 0px;
+}
+.product img {
+ position: absolute;
+ left: 0px;
+ top: -10px;
+ width: 120px;
+}
+.product h3 {
+ font-weight: bold;
+ font-size: 16px;
+ margin: 0;
+ padding: 0;
+ line-height: 22px;
+ color: #00c200;
+}
+.product .cost {
+ font-size: 16px;
+ line-height: 22px;
+ margin-bottom: 0px;
+}
+.product .availability {
+ font-size: 14px;
+ line-height: 18px;
+}
+.availability a, .availability a:hover, .availability a:visited, .availability a:active {
+ display: block;
+ text-decoration: none;
+}
+.availability a:hover {
+ text-decoration: underline;
+}
+
+.footer {
+ position: relative;
+ padding-top: 30px;
+ height: 80px;
+ margin: 10px auto 0 auto;
+ width: 100%;
+ border-top: 1px solid #eaeaea;
+}
+.footer .madewith {
+ left: 60px;
+}
+.footer .links {
+ position: absolute;
+ right: 60px;
+ top: 20px;
+ font-size: 12px;
+ height: 40px;
+ padding: 0;
+ display: inline-block;
+}
+
+.footer .links A, .footer .links A:visited, .footer .links A:active, .footer .links A:hover {
+ color: #000000;
+ text-decoration: none;
+ opacity: 0.5;
+ margin: 0 20px 0 0;
+ vertical-align: top;
+ line-height: 24px;
+ font-size: 12px;
+}
+.footer .links A:hover {
+ color: #000000;
+ opacity: 0.8;
+}
+
+
+
+.plusholder {
+ display: inline-block;
+ height: 30px;
+}
+
+.playbutton {
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ margin-top: -35px;
+ margin-left: -50px;
+ -webkit-transition: all 0.3s cubic-bezier( 0.26, 0.86, 0.44, 0.985 );
+ opacity: 0.85;
+}
+#introvideo {
+ cursor: pointer;
+ position: relative;
+ margin: 25px 0 20px 0;
+ /*width: 640px;
+ height: 390px;
+ */
+ z-index: 1;
+}
+#introvideo .videoframe {
+ width: 100%;
+}
+#introvideo:hover .playbutton {
+ opacity: 1;
+ -webkit-transform: translate3d(0, -3px, 0);
+}
+.outerglow {
+ -moz-box-shadow: 0 0 10px 2px rgba(0,0,0,0.4);
+ -webkit-box-shadow: 0 0 10px 2px rgba(0,0,0,0.4);
+ box-shadow: 0 0 10px 2px rgba(0,0,0,0.4);
+ border-radius: 2px;
+}
diff --git a/assets/images/5v_adapter.png b/assets/images/5v_adapter.png
new file mode 100644
index 00000000..ee6d2bcb
Binary files /dev/null and b/assets/images/5v_adapter.png differ
diff --git a/assets/images/appsource.jpg b/assets/images/appsource.jpg
new file mode 100644
index 00000000..81b4a4f8
Binary files /dev/null and b/assets/images/appsource.jpg differ
diff --git a/assets/images/coder_projects.jpg b/assets/images/coder_projects.jpg
new file mode 100644
index 00000000..61f0cd2f
Binary files /dev/null and b/assets/images/coder_projects.jpg differ
diff --git a/assets/images/coderapps.jpg b/assets/images/coderapps.jpg
new file mode 100644
index 00000000..e8fda2a0
Binary files /dev/null and b/assets/images/coderapps.jpg differ
diff --git a/assets/images/codervideo.png b/assets/images/codervideo.png
new file mode 100644
index 00000000..46ec22c0
Binary files /dev/null and b/assets/images/codervideo.png differ
diff --git a/assets/images/download.png b/assets/images/download.png
new file mode 100755
index 00000000..ea6ee1e9
Binary files /dev/null and b/assets/images/download.png differ
diff --git a/assets/images/favicon.ico b/assets/images/favicon.ico
new file mode 100644
index 00000000..c5b0ab79
Binary files /dev/null and b/assets/images/favicon.ico differ
diff --git a/assets/images/findpi.png b/assets/images/findpi.png
new file mode 100644
index 00000000..e04d1207
Binary files /dev/null and b/assets/images/findpi.png differ
diff --git a/assets/images/friends_from_google.png b/assets/images/friends_from_google.png
new file mode 100644
index 00000000..f3f80f90
Binary files /dev/null and b/assets/images/friends_from_google.png differ
diff --git a/assets/images/friends_from_google_grey.png b/assets/images/friends_from_google_grey.png
new file mode 100644
index 00000000..bb8bf7d4
Binary files /dev/null and b/assets/images/friends_from_google_grey.png differ
diff --git a/assets/images/introvideo.jpg b/assets/images/introvideo.jpg
new file mode 100644
index 00000000..e3cf10c3
Binary files /dev/null and b/assets/images/introvideo.jpg differ
diff --git a/assets/images/introvideo_cropped.jpg b/assets/images/introvideo_cropped.jpg
new file mode 100644
index 00000000..e21e2a58
Binary files /dev/null and b/assets/images/introvideo_cropped.jpg differ
diff --git a/assets/images/introvideo_cropped_640.jpg b/assets/images/introvideo_cropped_640.jpg
new file mode 100644
index 00000000..d13e2fc9
Binary files /dev/null and b/assets/images/introvideo_cropped_640.jpg differ
diff --git a/assets/images/play.png b/assets/images/play.png
new file mode 100644
index 00000000..ad3c90e8
Binary files /dev/null and b/assets/images/play.png differ
diff --git a/assets/images/raspi_b.png b/assets/images/raspi_b.png
new file mode 100644
index 00000000..769071d5
Binary files /dev/null and b/assets/images/raspi_b.png differ
diff --git a/assets/images/sd_card.png b/assets/images/sd_card.png
new file mode 100644
index 00000000..553250ee
Binary files /dev/null and b/assets/images/sd_card.png differ
diff --git a/assets/images/sdcard.png b/assets/images/sdcard.png
new file mode 100755
index 00000000..5b71f14e
Binary files /dev/null and b/assets/images/sdcard.png differ
diff --git a/assets/images/tour_01.png b/assets/images/tour_01.png
new file mode 100644
index 00000000..c83ad340
Binary files /dev/null and b/assets/images/tour_01.png differ
diff --git a/assets/images/tour_02.png b/assets/images/tour_02.png
new file mode 100644
index 00000000..a76af5f7
Binary files /dev/null and b/assets/images/tour_02.png differ
diff --git a/assets/images/tour_03.png b/assets/images/tour_03.png
new file mode 100644
index 00000000..c445d4d3
Binary files /dev/null and b/assets/images/tour_03.png differ
diff --git a/assets/images/tour_04.png b/assets/images/tour_04.png
new file mode 100644
index 00000000..20f352d2
Binary files /dev/null and b/assets/images/tour_04.png differ
diff --git a/assets/images/tour_05.png b/assets/images/tour_05.png
new file mode 100644
index 00000000..69a16955
Binary files /dev/null and b/assets/images/tour_05.png differ
diff --git a/assets/images/tour_06.png b/assets/images/tour_06.png
new file mode 100644
index 00000000..92b32d18
Binary files /dev/null and b/assets/images/tour_06.png differ
diff --git a/assets/images/tour_07.png b/assets/images/tour_07.png
new file mode 100644
index 00000000..c3fd1e10
Binary files /dev/null and b/assets/images/tour_07.png differ
diff --git a/assets/images/tour_08.png b/assets/images/tour_08.png
new file mode 100644
index 00000000..a88cfe6e
Binary files /dev/null and b/assets/images/tour_08.png differ
diff --git a/assets/images/wifi.png b/assets/images/wifi.png
new file mode 100755
index 00000000..fa21179a
Binary files /dev/null and b/assets/images/wifi.png differ
diff --git a/assets/images/wifi_1.png b/assets/images/wifi_1.png
new file mode 100644
index 00000000..e54f333c
Binary files /dev/null and b/assets/images/wifi_1.png differ
diff --git a/assets/images/wifi_2.png b/assets/images/wifi_2.png
new file mode 100644
index 00000000..226e7560
Binary files /dev/null and b/assets/images/wifi_2.png differ
diff --git a/assets/images/wifi_3.png b/assets/images/wifi_3.png
new file mode 100644
index 00000000..ff0fb4ca
Binary files /dev/null and b/assets/images/wifi_3.png differ
diff --git a/assets/images/wifi_card.png b/assets/images/wifi_card.png
new file mode 100644
index 00000000..ea0cd8a2
Binary files /dev/null and b/assets/images/wifi_card.png differ
diff --git a/assets/images/wired.png b/assets/images/wired.png
new file mode 100755
index 00000000..e1d11236
Binary files /dev/null and b/assets/images/wired.png differ
diff --git a/assets/images/wired_1.png b/assets/images/wired_1.png
new file mode 100644
index 00000000..9458051d
Binary files /dev/null and b/assets/images/wired_1.png differ
diff --git a/assets/images/wired_2.png b/assets/images/wired_2.png
new file mode 100644
index 00000000..fb4103d2
Binary files /dev/null and b/assets/images/wired_2.png differ
diff --git a/assets/images/wired_3.png b/assets/images/wired_3.png
new file mode 100644
index 00000000..0c3c989c
Binary files /dev/null and b/assets/images/wired_3.png differ
diff --git a/assets/js/index.js b/assets/js/index.js
new file mode 100644
index 00000000..1ce308cf
--- /dev/null
+++ b/assets/js/index.js
@@ -0,0 +1,287 @@
+var animatingScroll = false;
+
+$(document).ready( function() {
+
+ $('.setup.switch .wifi').click(function(){
+ $(this).parent().children().removeClass('active');
+ $(this).addClass('active');
+ $('.setup .switchpanel').removeClass('active');
+ $('.setup .switchpanel.wifi').addClass('active');
+ });
+ $('.setup.switch .wired').click(function(){
+ $(this).parent().children().removeClass('active');
+ $(this).addClass('active');
+ $('.setup .switchpanel').removeClass('active');
+ $('.setup .switchpanel.wired').addClass('active');
+ });
+
+
+ //wifi by default
+ $('.setup.switch .wired').click();
+
+
+ $(window).scroll( function() {
+ update_nav_pos();
+ updateNav();
+ });
+ update_nav_pos();
+
+ buildAnimation();
+ updateLines();
+ $(window).on('resize', function() {
+ setTimeout( buildAnimation, 1 );
+ //size is no longer window width dependant
+ //updateVideoSize();
+ });
+
+
+ //smooth scroll anchors
+ $('a.animate').click(function(ev){
+ ev.preventDefault();
+ animatingScroll = true;
+ $('a').removeClass('active');
+ $(this).addClass('active');
+ if ( $(this).attr('data-navtarget') != null ) {
+ $("#nav_" + $(this).attr('data-navtarget')).addClass('active');
+ }
+ $('html,body').animate({
+ scrollTop: $('[name="' + $.attr(this, 'href').substr(1) + '"]').offset().top
+ }, 400, function() {
+ animatingScroll = false;
+ updateNav();
+ });
+ });
+
+
+ //open faqs on click
+ var faqdown = function() {
+ $(this).parent().find('p').slideDown();
+ $(this).unbind('click', faqdown).bind('click', faqup);
+ };
+ var faqup = function() {
+ $(this).parent().find('p').slideUp();
+ $(this).unbind('click', faqup).bind('click', faqdown);
+ };
+ $('.faq.rollup h3').bind('click', faqdown);
+
+
+ //video replace on image click
+ $('#introvideo').bind( 'click', addVideo );
+
+
+ buildTour();
+
+});
+
+
+var buildTour = function() {
+ var $tourslides = $('.tour .slide');
+ $tourslides.css('visibility','visible').hide();
+ for ( var x=0; x< $tourslides.length; x++ ) {
+ var $navitem = $('
');
+ $('.tournav').append( $navitem );
+ $($tourslides.get(x)).attr('data-slide', 'slide_' + x);
+ if ( x+1 >= $tourslides.length ) {
+ $($tourslides.get(x)).attr('data-next', 'slide_0');
+ } else {
+ $($tourslides.get(x)).attr('data-next', 'slide_' + (x+1));
+ }
+ $navitem.bind('click', function() {
+ activateSlide(this);
+ });
+ $($tourslides.get(x)).find('img').bind('click', function() {
+ activateSlide( $('.tour .slide[data-slide="' + $(this).parent().attr('data-next') + '"]' ) );
+ });
+ }
+ activateSlide( $tourslides.get(0) );
+};
+var activateSlide = function( item ) {
+ $item = $(item);
+ $slide = $('.tour .slide[data-slide="' + $item.attr('data-slide') + '"]');
+ $nav = $('.tournav .item[data-slide="' + $item.attr('data-slide') + '"]');
+
+ $('.tour .slide').hide();
+ $slide.show();
+ $('.tournav .item').removeClass('active');
+ $nav.addClass('active');
+};
+
+var vidratio = 1024/576;
+var addVideo = function() {
+ var w = $('.videoframe').width();
+ var h = $('.videoframe').height();
+ vidratio = w/h;
+ $('#introvideo').html('');
+ //$('#introvideo').html('');
+ $('#introvideo').unbind('click', addVideo);
+}
+var updateVideoSize = function() {
+ $vid = $('#videoframe');
+ if ( !$vid.get(0) ) {
+ return;
+ }
+ var w = $(window).width();
+ var h = w / vidratio;
+ $vid.attr('width', Math.floor(w) );
+ $vid.attr('height', Math.floor(h) - 1 );
+}
+
+var updateNav = function() {
+ if ( animatingScroll ) {
+ return;
+ }
+ //hilight current anchor when you scroll to it
+ var anchors = [];
+ $('a').each(function(){
+ if ( this.name != null && this.name != "" ) {
+ //console.log( "#nav_" + this.name );
+ if ( $("#nav_" + this.name).get(0) != null ) {
+ anchors[anchors.length] = { name:this.name, top: $(this).offset().top};
+ //console.log('anchor ' + this.name + ' ' + $(this).offset().top );
+ }
+ }
+ });
+
+ var $this = $(this);
+ var y = $this.scrollTop();
+ var fudge = 400;
+
+ var active = -1;
+ for ( var x=0; x= 0 ) {
+ $('#nav_' + anchors[active]['name']).addClass('active');
+ }
+};
+
+
+var update_nav_pos = function() {
+ var revealloc = $('.masthead').outerHeight();
+ var fixedheight = $('.fixedbar').outerHeight();
+ var scrollY = $(window).scrollTop();
+ var fadestart = 40;
+ var navadjust = 36;
+
+ var top = (revealloc - navadjust) - fixedheight - scrollY;
+ if ( top < 0 ) {
+ top = 0;
+ }
+ $('.fixedbar').css( {
+ 'top': top + 'px'
+ });
+
+ var revealmin = revealloc - fixedheight - fadestart;
+ var revealmax = revealloc - fixedheight;
+
+ var pos = scrollY;
+ if ( pos < revealmin ) {
+ pos = revealmin;
+ } else if ( pos > revealmax ) {
+ pos = revealmax;
+ }
+
+
+
+ revealedfraction = ((pos-revealmin) / (revealmax-revealmin));
+ $('.fixedbar .logo').css( {
+ 'opacity': revealedfraction,
+ });
+
+};
+
+var lines = [];
+var $canvas;
+var ctx;
+var buildAnimation = function() {
+ lines = [];
+ $canvas = $("#animation");
+ ctx = $canvas.get(0).getContext("2d");
+ var w = $canvas.parent().width();
+ var h = $canvas.parent().height();
+ $canvas.attr('width', w);
+ $canvas.attr('height', h);
+ //$canvas.width( w );
+ //$canvas.height( h );
+
+ for ( var x=0; x<50; x++ ) {
+
+ var tx = (Math.random() * (w+100)) - 50;
+ var bx = tx + (Math.random() * 500) - 250;
+ var line = {
+ tx: tx,
+ bx: bx,
+ ty: -20,
+ by: h - 200 + (Math.random() * 200),
+ opacity: .2,
+ direction: Math.random() > .5? 1:-1
+ };
+ lines.push( line );
+ }
+
+};
+var updateLines = function() {
+ ctx.clearRect(0, 0, $canvas.width(), $canvas.height());
+ for ( var x=0; x 1 ) {
+ line.opacity = 1;
+ }
+
+ line.bx += (Math.random() * .2) * line.direction;
+ if ( line.bx < line.tx - 250 ) {
+ line.bx = line.tx - 250;
+ line.direction=1;
+ } else if ( line.bx > line.tx + 250 ) {
+ line.bx = line.tx + 250;
+ line.direction = -1;
+ }
+
+
+ }
+ requestAnimationFrame( updateLines );
+};
+
+//requestAnimationFrame polyfill
+//http://www.paulirish.com/2011/requestanimationframe-for-smart-animating/
+(function() {
+ var lastTime = 0;
+ var vendors = ['webkit', 'moz'];
+ for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
+ window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame'];
+ window.cancelAnimationFrame =
+ window[vendors[x]+'CancelAnimationFrame'] || window[vendors[x]+'CancelRequestAnimationFrame'];
+ }
+
+ if (!window.requestAnimationFrame)
+ window.requestAnimationFrame = function(callback, element) {
+ var currTime = new Date().getTime();
+ var timeToCall = Math.max(0, 16 - (currTime - lastTime));
+ var id = window.setTimeout(function() { callback(currTime + timeToCall); },
+ timeToCall);
+ lastTime = currTime + timeToCall;
+ return id;
+ };
+
+ if (!window.cancelAnimationFrame)
+ window.cancelAnimationFrame = function(id) {
+ clearTimeout(id);
+ };
+}());
+
diff --git a/coder-base/static/common/js/jquery.min.js b/assets/js/jquery.min.js
similarity index 100%
rename from coder-base/static/common/js/jquery.min.js
rename to assets/js/jquery.min.js
diff --git a/assets/type/dosis-light-webfont.eot b/assets/type/dosis-light-webfont.eot
new file mode 100644
index 00000000..b3857557
Binary files /dev/null and b/assets/type/dosis-light-webfont.eot differ
diff --git a/assets/type/dosis-light-webfont.svg b/assets/type/dosis-light-webfont.svg
new file mode 100644
index 00000000..ce2b5d7d
--- /dev/null
+++ b/assets/type/dosis-light-webfont.svg
@@ -0,0 +1,1522 @@
+
diff --git a/assets/type/dosis-light-webfont.ttf b/assets/type/dosis-light-webfont.ttf
new file mode 100644
index 00000000..a22e7d72
Binary files /dev/null and b/assets/type/dosis-light-webfont.ttf differ
diff --git a/assets/type/dosis-light-webfont.woff b/assets/type/dosis-light-webfont.woff
new file mode 100644
index 00000000..58dad9cc
Binary files /dev/null and b/assets/type/dosis-light-webfont.woff differ
diff --git a/assets/type/dosis-medium-webfont.eot b/assets/type/dosis-medium-webfont.eot
new file mode 100755
index 00000000..29152268
Binary files /dev/null and b/assets/type/dosis-medium-webfont.eot differ
diff --git a/assets/type/dosis-medium-webfont.svg b/assets/type/dosis-medium-webfont.svg
new file mode 100755
index 00000000..96401f2a
--- /dev/null
+++ b/assets/type/dosis-medium-webfont.svg
@@ -0,0 +1,2085 @@
+
+
+
\ No newline at end of file
diff --git a/assets/type/dosis-medium-webfont.ttf b/assets/type/dosis-medium-webfont.ttf
new file mode 100755
index 00000000..4ad36dfe
Binary files /dev/null and b/assets/type/dosis-medium-webfont.ttf differ
diff --git a/assets/type/dosis-medium-webfont.woff b/assets/type/dosis-medium-webfont.woff
new file mode 100755
index 00000000..7a9a45d6
Binary files /dev/null and b/assets/type/dosis-medium-webfont.woff differ
diff --git a/assets/type/dosis-regular-webfont.eot b/assets/type/dosis-regular-webfont.eot
new file mode 100644
index 00000000..18fb6751
Binary files /dev/null and b/assets/type/dosis-regular-webfont.eot differ
diff --git a/assets/type/dosis-regular-webfont.svg b/assets/type/dosis-regular-webfont.svg
new file mode 100644
index 00000000..d8dfef1e
--- /dev/null
+++ b/assets/type/dosis-regular-webfont.svg
@@ -0,0 +1,1522 @@
+
diff --git a/assets/type/dosis-regular-webfont.ttf b/assets/type/dosis-regular-webfont.ttf
new file mode 100644
index 00000000..4b208624
Binary files /dev/null and b/assets/type/dosis-regular-webfont.ttf differ
diff --git a/assets/type/dosis-regular-webfont.woff b/assets/type/dosis-regular-webfont.woff
new file mode 100644
index 00000000..dbe81dbd
Binary files /dev/null and b/assets/type/dosis-regular-webfont.woff differ
diff --git a/assets/type/dosis-semibold-demo.html b/assets/type/dosis-semibold-demo.html
new file mode 100755
index 00000000..2107781e
--- /dev/null
+++ b/assets/type/dosis-semibold-demo.html
@@ -0,0 +1,612 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ Dosis SemiBold Specimen
+
+
+
+
+
+
+
10.Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.
+
+
+
+
11.Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.
+
+
+
+
12.Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.
+
+
+
+
13.Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.
+
+
+
+
+
+
+
+
14.Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.
+
+
+
+
16.Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.
+
+
+
+
18.Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.
+
+
+
+
+
+
+
+
+
+
20.Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.
+
+
+
24.Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.
+
+
+
+
+
+
+
+
+
30.Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.
+
+
+
+
+
+
+
+
+
+
10.Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.
+
+
+
+
11.Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.
+
+
+
+
12.Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.
+
+
+
+
13.Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.
+
+
+
+
+
+
+
+
+
14.Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.
+
+
+
+
16.Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.
+
+
+
+
18.Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.
+
+
+
+
+
+
+
+
+
20.Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.
+
+
+
24.Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.
+
+
+
+
+
+
+
+
+
30.Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam id dolor id nibh ultricies vehicula ut id elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla vitae elit libero, a pharetra augue.
Donec sed odio dui. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.
+
+
+
Pellentesque ornare sem
+
+
Maecenas sed diam eget risus varius blandit sit amet non magna. Maecenas faucibus mollis interdum. Donec ullamcorper nulla non metus auctor fringilla. Nullam id dolor id nibh ultricies vehicula ut id elit. Nullam id dolor id nibh ultricies vehicula ut id elit.
+
+
Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.
+
+
Nulla vitae elit libero, a pharetra augue. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Aenean lacinia bibendum nulla sed consectetur.
+
+
Nullam quis risus eget urna mollis ornare vel eu leo. Nullam quis risus eget urna mollis ornare vel eu leo. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec ullamcorper nulla non metus auctor fringilla.
+
+
Cras mattis consectetur
+
+
Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Aenean lacinia bibendum nulla sed consectetur. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Cras mattis consectetur purus sit amet fermentum.
+
+
Nullam id dolor id nibh ultricies vehicula ut id elit. Nullam quis risus eget urna mollis ornare vel eu leo. Cras mattis consectetur purus sit amet fermentum.
+
+
+
+
+
+
Nullam quis risus eget urna mollis ornare vel eu leo. Donec ullamcorper nulla non metus auctor fringilla. Cras mattis consectetur purus sit amet fermentum. Sed posuere consectetur est at lobortis. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
+
+
+
Maecenas sed diam eget risus varius.
+
+
Vestibulum id ligula porta felis euismod semper. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Vestibulum id ligula porta felis euismod semper. Sed posuere consectetur est at lobortis. Maecenas sed diam eget risus varius blandit sit amet non magna. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.
+
+
+
+
Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Aenean lacinia bibendum nulla sed consectetur. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Aenean lacinia bibendum nulla sed consectetur. Nullam quis risus eget urna mollis ornare vel eu leo.
+
+
Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Donec ullamcorper nulla non metus auctor fringilla. Maecenas faucibus mollis interdum. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Language Support
+
The subset of Dosis SemiBold in this kit supports the following languages:
+
+ Albanian, Danish, Dutch, English, Faroese, French, German, Icelandic, Italian, Malagasy, Norwegian, Portuguese, Spanish, Swedish
+
Glyph Chart
+
The subset of Dosis SemiBold in this kit includes all the glyphs listed below. Unicode entities are included above each glyph to help you insert individual characters into your layout.
Webfonts are supported by all major browser platforms but not all in the same way. There are currently four different font formats that must be included in order to target all browsers. This includes TTF, WOFF, EOT and SVG.
+
+
1. Upload your webfonts
+
You must upload your webfont kit to your website. They should be in or near the same directory as your CSS files.
+
+
2. Include the webfont stylesheet
+
A special CSS @font-face declaration helps the various browsers select the appropriate font it needs without causing you a bunch of headaches. Learn more about this syntax by reading the Fontspring blog post about it. The code for it is as follows:
To take advantage of your new fonts, you must tell your stylesheet to use them. Look at the original @font-face declaration above and find the property called "font-family." The name linked there will be what you use to reference the font. Prepend that webfont name to the font stack in the "font-family" property, inside the selector you want to change. For example:
Getting webfonts to work cross-browser can be tricky. Use the information in the sidebar to help you if you find that fonts aren't loading in a particular browser.
+
+
+
+
+
Troubleshooting Font-Face Problems
+
Having trouble getting your webfonts to load in your new website? Here are some tips to sort out what might be the problem.
+
+
Fonts not showing in any browser
+
+
This sounds like you need to work on the plumbing. You either did not upload the fonts to the correct directory, or you did not link the fonts properly in the CSS. If you've confirmed that all this is correct and you still have a problem, take a look at your .htaccess file and see if requests are getting intercepted.
+
+
Fonts not loading in iPhone or iPad
+
+
The most common problem here is that you are serving the fonts from an IIS server. IIS refuses to serve files that have unknown MIME types. If that is the case, you must set the MIME type for SVG to "image/svg+xml" in the server settings. Follow these instructions from Microsoft if you need help.
+
+
Fonts not loading in Firefox
+
+
The primary reason for this failure? You are still using a version Firefox older than 3.5. So upgrade already! If that isn't it, then you are very likely serving fonts from a different domain. Firefox requires that all font assets be served from the same domain. Lastly it is possible that you need to add WOFF to your list of MIME types (if you are serving via IIS.)
+
+
Fonts not loading in IE
+
+
Are you looking at Internet Explorer on an actual Windows machine or are you cheating by using a service like Adobe BrowserLab? Many of these screenshot services do not render @font-face for IE. Best to test it on a real machine.
+
+
Fonts not loading in IE9
+
+
IE9, like Firefox, requires that fonts be served from the same domain as the website. Make sure that is the case.
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/type/dosis-semibold-webfont.eot b/assets/type/dosis-semibold-webfont.eot
new file mode 100755
index 00000000..152da9d4
Binary files /dev/null and b/assets/type/dosis-semibold-webfont.eot differ
diff --git a/assets/type/dosis-semibold-webfont.svg b/assets/type/dosis-semibold-webfont.svg
new file mode 100755
index 00000000..994f5847
--- /dev/null
+++ b/assets/type/dosis-semibold-webfont.svg
@@ -0,0 +1,2033 @@
+
+
+
\ No newline at end of file
diff --git a/assets/type/dosis-semibold-webfont.ttf b/assets/type/dosis-semibold-webfont.ttf
new file mode 100755
index 00000000..feb8ad68
Binary files /dev/null and b/assets/type/dosis-semibold-webfont.ttf differ
diff --git a/assets/type/dosis-semibold-webfont.woff b/assets/type/dosis-semibold-webfont.woff
new file mode 100755
index 00000000..150a41da
Binary files /dev/null and b/assets/type/dosis-semibold-webfont.woff differ
diff --git a/assets/wiki/screen_coder_customname.png b/assets/wiki/screen_coder_customname.png
new file mode 100644
index 00000000..afdd937f
Binary files /dev/null and b/assets/wiki/screen_coder_customname.png differ
diff --git a/assets/wiki/screen_coder_name.png b/assets/wiki/screen_coder_name.png
new file mode 100644
index 00000000..cde13545
Binary files /dev/null and b/assets/wiki/screen_coder_name.png differ
diff --git a/assets/wiki/screen_sd_hostname.png b/assets/wiki/screen_sd_hostname.png
new file mode 100644
index 00000000..e1c8f93d
Binary files /dev/null and b/assets/wiki/screen_sd_hostname.png differ
diff --git a/assets/wiki/screen_sd_hostname_edit.png b/assets/wiki/screen_sd_hostname_edit.png
new file mode 100644
index 00000000..7a6c5c5d
Binary files /dev/null and b/assets/wiki/screen_sd_hostname_edit.png differ
diff --git a/assets/wiki/screen_sd_wpa.png b/assets/wiki/screen_sd_wpa.png
new file mode 100644
index 00000000..0a29c454
Binary files /dev/null and b/assets/wiki/screen_sd_wpa.png differ
diff --git a/assets/wiki/screen_sd_wpa_copy.png b/assets/wiki/screen_sd_wpa_copy.png
new file mode 100644
index 00000000..995fe579
Binary files /dev/null and b/assets/wiki/screen_sd_wpa_copy.png differ
diff --git a/assets/wiki/screen_sd_wpa_edit.png b/assets/wiki/screen_sd_wpa_edit.png
new file mode 100644
index 00000000..2b0d7e88
Binary files /dev/null and b/assets/wiki/screen_sd_wpa_edit.png differ
diff --git a/coder-apps/archive_app.sh b/coder-apps/archive_app.sh
deleted file mode 100755
index 0012ca5a..00000000
--- a/coder-apps/archive_app.sh
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/bash
-
-##
-## Copies an application from the coder-base working directory to
-## the coder-apps directory.
-##
-## sh archive_app appname base_path apps_path
-##
-## Eg.
-## sh archive_app hello_coder ../coder-base/ ./common/
-
-if [ $# != 3 ]
- then
- echo -e "\nUse:\narchive_app appname base_path apps_path\n"
- exit
-fi
-
-app=$1
-base=$2
-dest=$3
-
-mkdir "$dest/$app"
-mkdir "$dest/$app/app"
-mkdir "$dest/$app/static"
-mkdir "$dest/$app/static/js"
-mkdir "$dest/$app/static/css"
-mkdir "$dest/$app/static/media"
-mkdir "$dest/$app/views"
-touch "$dest/$app/static/media/.gitignore"
-
-cp $base/apps/$app/* $dest/$app/app/
-cp $base/views/apps/$app/* $dest/$app/views/
-cp $base/static/apps/$app/js/* $dest/$app/static/js/
-cp $base/static/apps/$app/css/* $dest/$app/static/css/
-cp $base/static/apps/$app/media/* $dest/$app/static/media/
diff --git a/coder-apps/common/auth/app/app.js b/coder-apps/common/auth/app/app.js
deleted file mode 100644
index 4f4a42f5..00000000
--- a/coder-apps/common/auth/app/app.js
+++ /dev/null
@@ -1,629 +0,0 @@
-/**
- * Coder for Raspberry Pi
- * A simple platform for experimenting with web stuff.
- * http://goo.gl/coder
- *
- * Copyright 2013 Google Inc. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-var mustache = require('mustache');
-var util = require('util');
-var fs = require('fs');
-var bcrypt = require('bcrypt-nodejs');
-
-//stores cache of password hash and device name
-var device_settings = {
- password_hash: '',
- device_name: '',
- hostname: '',
- coder_owner: '',
- coder_color: '#3e3e3e'
-};
-
-
-exports.settings={};
-//These are dynamically updated by the runtime
-//settings.appname - the app id (folder) where your app is installed
-//settings.viewpath - prefix to where your view html files are located
-//settings.staticurl - base url path to static assets /static/apps/appname
-//settings.appurl - base url path to this app /app/appname
-//settings.device_name - name the user gave to their coder "Susie's Coder"
-
-
-exports.get_routes = [
- { path:'/', handler:'index_handler'},
- { path:'/login', handler:'login_handler'},
- { path:'/logout', handler:'logout_handler'},
- { path:'/configure', handler:'configure_handler'},
- { path:'/addpassword', handler:'addpassword_handler'},
- { path:'/changepassword', handler:'changepassword_handler'},
- { path: '/api/devicename/get', handler: 'api_devicename_get_handler' },
- { path: '/api/codercolor/get', handler: 'api_codercolor_get_handler' },
- { path: '/api/coderowner/get', handler: 'api_coderowner_get_handler' }
-];
-
-
-exports.post_routes = [
- { path: '/api/login', handler: 'api_login_handler' },
- { path: '/api/logout', handler: 'api_logout_handler' },
- { path: '/api/devicename/set', handler: 'api_devicename_set_handler' },
- { path: '/api/codercolor/set', handler: 'api_codercolor_set_handler' },
- { path: '/api/coderowner/set', handler: 'api_coderowner_set_handler' },
- { path: '/api/addpassword', handler: 'api_addpassword_handler' },
- { path: '/api/changepassword', handler: 'api_changepassword_handler' }
-];
-
-exports.on_destroy = function() {
-};
-
-
-exports.isAuthenticated = function( req ) {
- if ( typeof req.session !== 'undefined' && typeof req.session.authenticated !== 'undefined' ) {
- return req.session.authenticated === true;
- }
- return false;
-};
-
-exports.isConfigured = function() {
- if ( typeof device_settings.device_name !== 'undefined' && device_settings.device_name !== '' &&
- typeof device_settings.hostname !== 'undefined' && device_settings.hostname !== '' ) {
- return true;
- } else {
- return false;
- }
-};
-
-exports.hasPassword = function() {
- if ( typeof device_settings.password_hash !== 'undefined' && device_settings.password_hash !== '' ) {
- return true;
- } else {
- return false;
- }
-};
-
-exports.getDeviceName = function() {
- return device_settings.device_name;
-};
-exports.getCoderOwner = function() {
- return device_settings.coder_owner;
-};
-exports.getCoderColor = function() {
- return device_settings.coder_color;
-};
-
-exports.authenticate = function( req, password ) {
-
- var authenticated = bcrypt.compareSync( password, device_settings.password_hash );
- if ( authenticated ) {
- req.session.authenticated = true;
- }
-
- return authenticated;
-};
-
-exports.logout = function( req ) {
-
- req.session.authenticated = false;
-};
-
-
-exports.index_handler = function( req, res ) {
-
- var firstuse = "?firstuse";
- if ( typeof( req.param('firstuse') ) === 'undefined' ) {
- firstuse = "";
- }
-
- if ( !exports.isConfigured() ) {
- res.redirect('/app/auth/configure?firstuse');
- } else if ( !exports.hasPassword() ) {
- res.redirect('/app/auth/addpassword?firstuse');
- } else if ( !exports.isAuthenticated(req) ) {
- res.redirect('/app/auth/login' + firstuse);
- } else {
- res.redirect('/app/coder' + firstuse);
- }
-};
-
-exports.addpassword_handler = function( req, res ) {
- var tmplvars = {};
- tmplvars['static_url'] = exports.settings.staticurl;
- tmplvars['app_name'] = exports.settings.appname;
- tmplvars['app_url'] = exports.settings.appurl;
- tmplvars['device_name'] = exports.settings.device_name;
- tmplvars['page_mode'] = "addpassword";
-
- //only allow this step if they have not yet set a password
- if ( !exports.hasPassword() ) {
- res.render( exports.settings.viewpath + '/index', tmplvars );
- } else {
- res.redirect('/app/auth/login');
- }
-};
-
-exports.changepassword_handler = function( req, res ) {
- var tmplvars = {};
- tmplvars['static_url'] = exports.settings.staticurl;
- tmplvars['app_name'] = exports.settings.appname;
- tmplvars['app_url'] = exports.settings.appurl;
- tmplvars['device_name'] = exports.settings.device_name;
- tmplvars['page_mode'] = "changepassword";
-
- //only allow this step if they are authenticated
- if ( exports.isAuthenticated(req) ) {
- res.render( exports.settings.viewpath + '/index', tmplvars );
- } else {
- res.redirect('/app/auth/login');
- }
-};
-
-exports.configure_handler = function( req, res ) {
- var tmplvars = {};
- tmplvars['static_url'] = exports.settings.staticurl;
- tmplvars['app_name'] = exports.settings.appname;
- tmplvars['app_url'] = exports.settings.appurl;
- tmplvars['device_name'] = exports.settings.device_name;
- tmplvars['page_mode'] = "configure";
-
- //only allow this step if they are authenticated or have not yet set a password
- if ( exports.isAuthenticated(req) || !exports.hasPassword() ) {
- res.render( exports.settings.viewpath + '/index', tmplvars );
- } else {
- res.redirect('/app/auth/login');
- }
-};
-
-exports.api_devicename_get_handler = function( req, res ) {
- res.json({
- device_name: exports.getDeviceName()
- });
-};
-exports.api_codercolor_get_handler = function( req, res ) {
- res.json({
- coder_color: exports.getCoderColor()
- });
-};
-exports.api_coderowner_get_handler = function( req, res ) {
- //only allow this step if they are authenticated or have not yet set a password
- if ( !exports.isAuthenticated(req) && exports.hasPassword() ) {
- res.json({
- status: "error",
- error: "not authenticated"
- });
- return;
- }
- res.json({
- coder_owner: exports.getCoderOwner()
- });
-};
-
-exports.api_devicename_set_handler = function( req, res ) {
-
- //only allow this step if they are authenticated or have not yet set a password
- if ( !exports.isAuthenticated(req) && exports.hasPassword() ) {
- res.json({
- status: "error",
- error: "not authenticated"
- });
- return;
- }
-
- var devicename = req.param('device_name');
- if ( !devicename || devicename === "" || !isValidDeviceName( devicename ) ) {
- res.json({
- status: 'error',
- error: "invalid device name"
- });
- return;
- }
-
- device_settings.device_name = devicename;
- device_settings.hostname = hostnameFromDeviceName( devicename );
-
- err = saveDeviceSettings();
-
- if ( !err ) {
- res.json({
- status: "success",
- device_name: device_settings.device_name,
- hostname: device_settings.hostname
- });
- } else {
- res.json({
- status: "error",
- error: "could not save device settings"
- });
- }
-
-};
-
-
-exports.api_coderowner_set_handler = function( req, res ) {
-
- //only allow this step if they are authenticated or have not yet set a password
- if ( !exports.isAuthenticated(req) && exports.hasPassword() ) {
- res.json({
- status: "error",
- error: "not authenticated"
- });
- return;
- }
-
- var owner = req.param('coder_owner');
- if ( typeof owner === 'undefined' ) {
- res.json({
- status: 'error',
- error: "invalid owner name"
- });
- return;
- }
-
- device_settings.coder_owner = owner;
-
- err = saveDeviceSettings();
-
- if ( !err ) {
- res.json({
- status: "success",
- coder_owner: device_settings.coder_owner
- });
- } else {
- res.json({
- status: "error",
- error: "could not save device settings"
- });
- }
-
-};
-
-exports.api_codercolor_set_handler = function( req, res ) {
-
- //only allow this step if they are authenticated or have not yet set a password
- if ( !exports.isAuthenticated(req) && exports.hasPassword() ) {
- res.json({
- status: "error",
- error: "not authenticated"
- });
- return;
- }
-
- var color = req.param('coder_color');
- if ( typeof color === 'undefined' || !isValidColor( color ) ) {
- res.json({
- status: 'error',
- error: "invalid color"
- });
- return;
- }
-
- device_settings.coder_color = color;
-
- err = saveDeviceSettings();
-
- if ( !err ) {
- res.json({
- status: "success",
- coder_color: device_settings.coder_color
- });
- } else {
- res.json({
- status: "error",
- error: "could not save device settings"
- });
- }
-
-};
-
-exports.api_addpassword_handler = function( req, res ) {
-
- //only allow this step if they have not yet set a password
- if ( exports.hasPassword() ) {
- res.json({
- status: "error",
- error: "not authenticated"
- });
- return;
- }
-
- var pass = req.param('password');
- if ( !pass || pass === "" || !isValidPassword( pass ) ) {
- res.json({
- status: 'error',
- error: getPasswordProblem( pass )
- });
- return;
- }
-
- var spawn = require('child_process').spawn;
- var err=0;
- //device_settings.device_name = devicename;
- var erroutput = "";
- var output = "";
- //var setpipass = process.cwd() + '/sudo_scripts/setpipass';
- //var setpass = spawn( '/usr/bin/sudo', [setpipass] );
- //setpass.stdout.on( 'data', function( d ) {
- // output += d;
- //});
- //setpass.stderr.on( 'data', function( d ) {
- // erroutput += d;
- //});
-
- //setpass.addListener( 'exit', function( code, signal ) {
- var completed = function( code, signal ) {
- err = code;
-
-
- if ( err ) {
- res.json({
- status: "error",
- error: erroutput
- });
- return;
- }
-
- //TODO - Load hashed password
- var s = bcrypt.genSaltSync(10);
- var h = bcrypt.hashSync( pass, s );
- util.log("PASSWORD INITIALIZED");
- device_settings.password_hash = h;
- err = saveDeviceSettings();
-
- if ( !err ) {
- res.json({
- status: "success"
- });
- } else {
- res.json({
- status: "error",
- error: "Could not save device settings."
- });
- }
-
- };
-
- completed();
-
- //setpass.stdin.write(pass + '\n');
- //setpass.stdin.write(pass + '\n');
- //setpass.stdin.end();
-
-};
-
-
-
-exports.api_changepassword_handler = function( req, res ) {
-
- //only allow this step if they are authenticated
- if ( !exports.isAuthenticated(req) ) {
- res.json({
- status: "error",
- error: "not authenticated"
- });
- return;
- }
-
- var oldpass = req.param('oldpassword');
- var pass = req.param('password');
-
- //Make sure old pass is set and matches
- if ( typeof oldpass === 'undefined' || oldpass === ""
- || !bcrypt.compareSync( oldpass, device_settings.password_hash ) ) {
- res.json({
- status: 'error',
- error: "old password was incorrect"
- });
- return;
- }
-
- if ( !pass || pass === "" || !isValidPassword( pass ) ) {
- res.json({
- status: 'error',
- error: getPasswordProblem( pass )
- });
- return;
- }
-
- var spawn = require('child_process').spawn;
- var err=0;
- //device_settings.device_name = devicename;
- var erroutput = "";
- var output = "";
- var setpipass = process.cwd() + '/sudo_scripts/setpipass';
- var setpass = spawn( '/usr/bin/sudo', [setpipass] );
- setpass.stdout.on( 'data', function( d ) {
- output += d;
- });
- setpass.stderr.on( 'data', function( d ) {
- erroutput += d;
- });
-
- setpass.addListener( 'exit', function( code, signal ) {
- err = code;
-
-
- if ( err ) {
- res.json({
- status: "error",
- error: erroutput
- });
- return;
- }
-
- //TODO - Load hashed password
- var s = bcrypt.genSaltSync(10);
- var h = bcrypt.hashSync( pass, s );
- util.log("PASSWORD INITIALIZED");
- device_settings.password_hash = h;
- err = saveDeviceSettings();
-
- if ( !err ) {
- res.json({
- status: "success"
- });
- } else {
- res.json({
- status: "error",
- error: "Could not save device settings."
- });
- }
-
- });
- setpass.stdin.write(pass + '\n');
- setpass.stdin.write(pass + '\n');
- setpass.stdin.end();
-
-};
-
-
-exports.login_handler = function( req, res ) {
- var tmplvars = {};
- tmplvars['static_url'] = exports.settings.staticurl;
- tmplvars['app_name'] = exports.settings.appname;
- tmplvars['app_url'] = exports.settings.appurl;
- tmplvars['device_name'] = exports.settings.device_name;
- tmplvars['page_mode'] = "login";
-
-
- //TODO - should this log you out automatically?
- req.session.authenticated = false;
- res.render( exports.settings.viewpath + '/index', tmplvars );
-};
-
-exports.logout_handler = function( req, res ) {
- var tmplvars = {};
- tmplvars['static_url'] = exports.settings.staticurl;
- tmplvars['app_name'] = exports.settings.appname;
- tmplvars['app_url'] = exports.settings.appurl;
- tmplvars['device_name'] = exports.settings.device_name;
- tmplvars['page_mode'] = "logout";
-
- req.session.authenticated = false;
- res.render( exports.settings.viewpath + '/index', tmplvars );
-};
-
-exports.api_login_handler = function( req, res ) {
- if ( typeof req.body.password !== 'undefined' && req.body.password !== "" ) {
- var authenticated = exports.authenticate( req, req.body.password );
- if ( authenticated === true ) {
- res.json( { status: 'success'} );
- return;
- }
- }
- res.json( {
- status: 'error',
- error: 'invalid password'
- } );
-};
-exports.api_logout_handler = function( req, res ) {
- req.session.authenticated = false;
-
- res.json( { status: 'success'} );
-};
-
-var saveDeviceSettings = function() {
- err = fs.writeFileSync( process.cwd() + "/device.json", JSON.stringify(device_settings, null, 4), 'utf8' );
- fs.chmodSync(process.cwd() + '/device.json', '600');
- return err;
-};
-
-var reloadDeviceSettings = function() {
- var settings = {
- password_hash: '',
- device_name: '',
- hostname: '',
- coder_owner: '',
- coder_color: ''
- };
-
- var loadedsettings = JSON.parse(fs.readFileSync( process.cwd() + "/device.json", 'utf-8' ));
- settings.password_hash = ( typeof loadedsettings.password_hash !== 'undefined' && loadedsettings.password_hash !== '' ) ? loadedsettings.password_hash : settings.password_hash;
- settings.device_name = ( typeof loadedsettings.device_name !== 'undefined' && loadedsettings.device_name !== '' ) ? loadedsettings.device_name : settings.device_name;
- settings.hostname = ( typeof loadedsettings.hostname !== 'undefined' && loadedsettings.hostname !== '' ) ? loadedsettings.hostname : settings.hostname;
- settings.coder_owner = ( typeof loadedsettings.coder_owner !== 'undefined' && loadedsettings.coder_owner !== '' ) ? loadedsettings.coder_owner : settings.coder_owner;
- settings.coder_color = ( typeof loadedsettings.coder_color !== 'undefined' && loadedsettings.coder_color !== '' ) ? loadedsettings.coder_color : settings.coder_color;
-
- device_settings = settings;
-}
-reloadDeviceSettings();
-
-
-var isValidDeviceName = function( name ) {
- if ( !name || name === '' ) {
- return false;
- }
- //starts with an ascii word char. can contain word char's spaces and '
- if ( !name.match(/^[a-zA-Z0-9][\w ']*$/) ) {
- return false;
- }
- //ends in an ascii word char
- if ( !name.match(/[a-zA-Z0-9]$/) ) {
- return false;
- }
- return true;
-};
-var hostnameFromDeviceName = function( name ) {
- var hostname = name;
- hostname = hostname.toLowerCase();
- hostname = hostname.replace(/[^a-z0-9\- ]/g, '');
- hostname = hostname.replace(/[\- ]+/g,'-');
- return hostname;
-};
-
-var getPasswordProblem = function( pass ) {
- if ( !pass || pass === '' ) {
- return "the password is empty";
- }
- if ( pass.length < 6 ) {
- return "the password should contain at least 6 characters";
- }
- if ( !pass.match(/[a-z]/) ||
- !pass.match(/[A-Z0-9\-\_\.\,\;\:\'\"\[\]\{\}\!\@\#\$\%\^\&\*\(\)\\].*[A-Z0-9\-\_\.\,\;\:\'\"\[\]\{\}\!\@\#\$\%\^\&\*\(\)\\]/) ) {
- return "your password must contain a lower case letter and at least two upper case letters or numbers";
- }
-};
-
-var isValidPassword = function( pass ) {
- if ( !pass || pass === '' ) {
- return false;
- }
- //at least 6 characters
- if ( pass.length < 6 ) {
- return false;
- }
- //contains lower case
- if ( !pass.match(/[a-z]/) ) {
- return false;
- }
- //contains two upper case or numbers
- if ( !pass.match(/[A-Z0-9\-\_\.\,\;\:\'\"\[\]\{\}\!\@\#\$\%\^\&\*\(\)\\].*[A-Z0-9\-\_\.\,\;\:\'\"\[\]\{\}\!\@\#\$\%\^\&\*\(\)\\]/) ) {
- return false;
- }
- return true;
-};
-
-var isValidColor = function( color ) {
- if ( !color || color === '' ) {
- return false;
- }
- color = color.toLowerCase();
- if ( !color.match(/^\#[a-f0-9]{6}$/) ) {
- return false;
- }
- return true;
-}
-
-
-
-
diff --git a/coder-apps/common/auth/app/meta.json b/coder-apps/common/auth/app/meta.json
deleted file mode 100644
index 521059b3..00000000
--- a/coder-apps/common/auth/app/meta.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "created": "2013-03-05",
- "modified": "2013-08-18",
- "color": "#1abc9c",
- "author": "Jason Striegel",
- "name": "Auth",
- "hidden": true
-}
\ No newline at end of file
diff --git a/coder-apps/common/auth/static/css/index.css b/coder-apps/common/auth/static/css/index.css
deleted file mode 100644
index 2a1c6d98..00000000
--- a/coder-apps/common/auth/static/css/index.css
+++ /dev/null
@@ -1,133 +0,0 @@
-
-body {
- background-color: #f1c40f;
- color: #fff;
-}
-
-.form {
- text-align: center;
- width: 400px;
- left: 50%;
- margin-top: 60px;
- margin-left: -200px;
- position: relative;
-}
-
-#animation {
- position: absolute;
- height: 100%;
- width: 100%;
-}
-
-.centercontainer {
- display: table;
- height: 100%;
- width: 100%;
- position: absolute;
- top:0px;
- left:0px;
-}
-.center {
- display: table-cell;
- vertical-align: middle;
-}
-
-h1 {
- font-size: 28px;
- line-height: 28px;
- font-weight: bold;
- margin:0;
- padding: 0 0 20px 0;
-}
-
-.instructions {
- font-size: 21px;
- line-height: 1.2em;
- padding: 0 0 20px 0;
-}
-
-.formfield {
- position: relative;
- width: 400px;
-}
-.formfield.textinput .label {
- position: absolute;
- color: #999;
- top:13px;
- left:10px;
- font-size: 16px;
- line-height: 20px;
- -webkit-font-smoothing: antialiased;
-}
-
-.formfield input[type=text], .formfield input[type=password] {
- border: 2px solid transparent;
- width: 376px;
- padding: 10px 10px;
- background-color: #fff;
- color: #666;
- height: 20px;
- line-height: 16px;
- font-size: 16px;
- font-family: Arial, sans-serif;
- border-radius: 3px;
- -webkit-font-smoothing: antialiased;
- margin-bottom: 24px;
-}
-
-.formfield input.error {
- border-color: rgba(255,0,0,0.5);
-}
-
-.errormessage {
- border: 2px solid transparent;
- width: 376px;
- padding: 10px 10px;
- background-color: #e74c3c;
- color: #ffffff;
- min-height: 20px;
- line-height: 20px;
- font-size: 12px;
- font-family: Arial, sans-serif;
- border-radius: 3px;
- -webkit-font-smoothing: antialiased;
- margin-bottom: 24px;
- text-transform: uppercase;
-}
-
-.submit {
- font-size: 21px;
- font-weight: bold;
- line-height: 60px;
- border-radius: 4px;
- width:400px;
- margin-bottom: 24px;
- background-color: rgba(0,0,0,0.6);
-}
-.submit.disabled, .submit.disabled:hover {
- background-color: rgba(0,0,0,0.2);
-}
-.submit:hover {
- background-color: rgba(0,0,0,1);
- cursor: pointer;
-}
-
-.cancel {
- font-size: 21px;
- font-weight: bold;
- line-height: 60px;
- border-radius: 4px;
- width:400px;
- margin-bottom: 24px;
- background-color: rgba(0,0,0,0.6);
-}
-.cancel:hover {
- background-color: rgba(0,0,0,1);
- cursor: pointer;
-}
-
-
-
-
-
-
diff --git a/coder-apps/common/auth/static/js/index.js b/coder-apps/common/auth/static/js/index.js
deleted file mode 100644
index e609a0fd..00000000
--- a/coder-apps/common/auth/static/js/index.js
+++ /dev/null
@@ -1,474 +0,0 @@
-/**
- * Coder for Raspberry Pi
- * A simple platform for experimenting with web stuff.
- * http://goo.gl/coder
- *
- * Copyright 2013 Google Inc. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-$(document).ready( function() {
-
- if ( pagemode === "logout" ) {
- setupLogoutFields();
- $('#logout_form').show();
- } else if ( pagemode === "login" ) {
- setupLoginFields();
- $('#login_form').show();
- } else if ( pagemode === "configure" ) {
- setupConfigureFields();
- $('#configure_form').show();
- } else if ( pagemode === "addpassword" ) {
- setupAddPasswordFields();
- $('#addpassword_form').show();
- } else if ( pagemode === "changepassword" ) {
- setupChangePasswordFields();
- $('#changepassword_form').show();
- } else {
- setupLoginFields();
- $('#login_form').show();
- }
-
- buildAnimation();
- updateAnimation();
- $(window).on('resize', function() {
- setTimeout( buildAnimation, 1 );
- });
-});
-
-var hideTextLabel = function() {
- $(this).parent().find('.label').hide();
-};
-var focusTextInput = function() {
- $(this).parent().find('input').focus();
-};
-var onBlurTextInput = function() {
- if ( $(this).val() == "" ) {
- $(this).parent().find('.label').show();
- }
-};
-var testLoginSubmitEnable = function() {
- var $form = $('#login_form');
- if ( pagemode === "logout" ) {
- $form = $('#logout_form');
- }
-
-
- if ( $form.find('.pass').val() && $form.find('.pass').val() != "" ) {
- $form.find('.submit').removeClass('disabled');
- } else {
- $form.find('.submit').addClass('disabled');
- }
-};
-
-var testConfigureSubmitEnable = function() {
- var $form = $('#configure_form');
- var devicename = $form.find('.device_name').val();
- if ( devicename && devicename != "" &&
- isValidDeviceName(devicename) ) {
- $form.find('.submit').removeClass('disabled');
- } else {
- $form.find('.submit').addClass('disabled');
- }
-};
-
-var testAddPasswordSubmitEnable = function() {
- var $form = $('#addpassword_form');
- var pass = $form.find('.pass').val();
- var pass_repeat = $form.find('.pass_repeat').val();
- $form.find('.pass, .pass_repeat').removeClass('error');
- $form.find('.errormessage').css('visibility','hidden');
-
- if ( isValidPassword(pass) && pass === pass_repeat ) {
- $form.find('.submit').removeClass('disabled');
- } else {
- $form.find('.submit').addClass('disabled');
- }
-};
-
-var testChangePasswordSubmitEnable = function() {
- var $form = $('#changepassword_form');
- var oldpass = $form.find('.oldpass').val();
- var pass = $form.find('.pass').val();
- var pass_repeat = $form.find('.pass_repeat').val();
- $form.find('.errormessage').css('visibility','hidden');
- $form.find('.oldpass, .pass, .pass_repeat').removeClass('error');
- if ( oldpass !== "" && isValidPassword(pass) && pass === pass_repeat ) {
- $form.find('.submit').removeClass('disabled');
- } else {
- $form.find('.submit').addClass('disabled');
- }
-};
-
-
-var setupLoginFields = function() {
- $('#login_form .formfield.textinput .label').click( focusTextInput );
- $('#login_form .formfield.textinput input').click( focusTextInput );
- $('#login_form .formfield.textinput input').focus( hideTextLabel );
- $('#login_form .formfield.textinput input').blur( onBlurTextInput );
- $('#login_form .formfield.textinput input').change( testLoginSubmitEnable );
- $('#login_form .formfield.textinput input').keydown( function(e) {
- if (e.which != 13) {
- setTimeout( testLoginSubmitEnable, 0 );
- }
- });
-
- //submit on enter or button click
- $('#login_form .formfield.textinput .pass').keypress(function (e) {
- if (e.which == 13) {
- e.preventDefault();
- loginClick( $('#login_form .formfield.textinput .pass') );
- }
- });
- $('#login_form .submit').click( function() {
- loginClick( $('#login_form .formfield.textinput .pass') );
- });
-};
-var setupLogoutFields = function() {
- $('#logout_form .formfield.textinput .label').click( focusTextInput );
- $('#logout_form .formfield.textinput input').click( focusTextInput );
- $('#logout_form .formfield.textinput input').focus( hideTextLabel );
- $('#logout_form .formfield.textinput input').blur( onBlurTextInput );
- $('#logout_form .formfield.textinput input').change( testLoginSubmitEnable );
- $('#logout_form .formfield.textinput input').keydown( function(e) {
- if (e.which != 13) {
- setTimeout( testLoginSubmitEnable, 0 );
- }
- });
-
- //submit on enter or button click
- $('#logout_form .formfield.textinput .pass').keypress(function (e) {
- if (e.which == 13) {
- e.preventDefault();
- loginClick( $('#logout_form .formfield.textinput .pass') );
- }
- });
- $('#logout_form .submit').click( function() {
- loginClick( $('#logout_form .formfield.textinput .pass') );
- });
-};
-var setupConfigureFields = function() {
- $('#configure_form .formfield.textinput .label').click( focusTextInput );
- $('#configure_form .formfield.textinput input').click( focusTextInput );
- $('#configure_form .formfield.textinput input').focus( hideTextLabel );
- $('#configure_form .formfield.textinput input').blur( onBlurTextInput );
- $('#configure_form .formfield.textinput input').change( testConfigureSubmitEnable );
- $('#configure_form .formfield.textinput input').keydown( function(e) {
- if (e.which != 13) {
- setTimeout( testConfigureSubmitEnable, 0 );
- }
- });
- $('#configure_form .submit').click( configureClick );
- $('#configure_form .device_name').val( 'My Coder' ).parent().find('.label').hide();
- testConfigureSubmitEnable();
-};
-var setupAddPasswordFields = function() {
- $('#addpassword_form .formfield.textinput .label').click( focusTextInput );
- $('#addpassword_form .formfield.textinput input').click( focusTextInput );
- $('#addpassword_form .formfield.textinput input').focus( hideTextLabel );
- $('#addpassword_form .formfield.textinput input').blur( onBlurTextInput );
- $('#addpassword_form .formfield.textinput input').change( testAddPasswordSubmitEnable );
- $('#addpassword_form .formfield.textinput input').keydown( function(e) {
- if (e.which != 13) {
- setTimeout( testAddPasswordSubmitEnable, 0 );
- }
- });
-
- $('#addpassword_form .formfield.textinput .pass_repeat').keypress(function (e) {
- if (e.which == 13) {
- e.preventDefault();
- addPasswordClick();
- }
- });
-
- $('#addpassword_form .submit').click( addPasswordClick );
-};
-
-var setupChangePasswordFields = function() {
- $('#changepassword_form .formfield.textinput .label').click( focusTextInput );
- $('#changepassword_form .formfield.textinput input').click( focusTextInput );
- $('#changepassword_form .formfield.textinput input').focus( hideTextLabel );
- $('#changepassword_form .formfield.textinput input').blur( onBlurTextInput );
- $('#changepassword_form .formfield.textinput input').change( testChangePasswordSubmitEnable );
- $('#changepassword_form .formfield.textinput input').keydown( function(e) {
- if (e.which != 13) {
- setTimeout( testChangePasswordSubmitEnable, 0 );
- }
- });
-
- $('#changepassword_form .formfield.textinput .pass_repeat').keypress(function (e) {
- if (e.which == 13) {
- e.preventDefault();
- changePasswordClick();
- }
- });
-
- $('#changepassword_form .submit').click( changePasswordClick );
- $('#changepassword_form .cancel').click( function() {
- window.location.href="http://github.com/";
- });
-};
-
-var loginClick = function( what ) {
- $this = $(what);
- var $form = $('#login_form');
- if ( pagemode === "logout" ) {
- $form = $('#logout_form');
- }
-
- $form.find('.errormessage').css('visibility','hidden');
- $form.find('.pass').removeClass('error');
- $.post(
- appurl + '/api/login',
- {
- password: $this.parent().find('.pass').val()
- },
- function( data ) {
- console.log( data );
- if( data.status === "success" ) {
- var firstuse = "";
- if ( typeof getParams['firstuse'] !== 'undefined' ) {
- firstuse = '?firstuse';
- }
- window.location.href="http://github.com/app/coder" + firstuse;
- } else {
- $form.find('.errormessage').text( data.error ).css('visibility','visible');
- $form.find('.pass').addClass('error');
- }
- }
- );
-};
-
-var configureClick = function() {
- $this = $(this);
- var $form = $('#configure_form');
-
- $form.find('.device_name').removeClass('error');
- var devicename = $this.parent().find('.device_name').val();
-
- if ( !isValidDeviceName(devicename) ) {
- $form.find('.device_name').addClass('error');
- return;
- }
-
- $.post(
- appurl + '/api/devicename/set',
- {
- device_name: devicename
- },
- function( data ) {
- console.log( data );
- if( data.status === "success" ) {
- window.location.href="http://github.com/app/auth";
- } else {
- $form.find('.device_name').addClass('error');
- }
- }
- );
-};
-
-var addPasswordClick = function() {
- var $form = $('#addpassword_form');
-
- $form.find('.pass, .pass_repeat').removeClass('error');
- $form.find('.errormessage').css('visibility','hidden');
- var pass = $form.find('.pass').val();
- var pass_repeat = $form.find('.pass_repeat').val();
-
- if ( !isValidPassword(pass) ) {
- $form.find('.pass').addClass('error');
- $form.find('.errormessage').text( getPasswordProblem(pass) ).css('visibility','visible');
- return;
- }
- if ( pass !== pass_repeat ) {
- $form.find('.pass_repeat').addClass('error');
- $form.find('.errormessage').text( "new password does not match" ).css('visibility','visible');
- return;
- }
-
- $.post(
- appurl + '/api/addpassword',
- {
- password: pass
- },
- function( data ) {
- console.log( data );
- if( data.status === "success" ) {
- var firstuse = '';
- if ( typeof getParams['firstuse'] !== 'undefined' ) {
- firstuse = '?firstuse';
- }
- window.location.href="http://github.com/app/auth" + firstuse;
- } else {
- $form.find('.pass').addClass('error');
- $form.find('.errormessage').text( data.error ).css('visibility','visible');
- }
- }
- );
-};
-
-
-var changePasswordClick = function() {
-
- var $form = $('#changepassword_form');
-
- $form.find('.oldpass, .pass, .pass_repeat').removeClass('error');
- $form.find('.errormessage').css('visibility','hidden');
- var oldpass = $form.find('.oldpass').val();
- var pass = $form.find('.pass').val();
- var pass_repeat = $form.find('.pass_repeat').val();
-
- if ( oldpass === "" ) {
- $form.find('.oldpass').addClass('error');
- $form.find('.errormessage').text( "your current password is required" ).css('visibility','visible');
- return;
- }
- if ( !isValidPassword(pass) ) {
- $form.find('.pass').addClass('error');
- $form.find('.errormessage').text( getPasswordProblem(pass) ).css('visibility','visible');
- return;
- }
- if ( pass !== pass_repeat ) {
- $form.find('.pass_repeat').addClass('error');
- $form.find('.errormessage').text( "new password does not match" ).css('visibility','visible');
- return;
- }
-
- $.post(
- appurl + '/api/changepassword',
- {
- oldpassword: oldpass,
- password: pass
- },
- function( data ) {
- console.log( data );
- if( data.status === "success" ) {
- window.location.href="http://github.com/app/auth";
- } else {
- $form.find('.oldpass').addClass('error');
- $form.find('.errormessage').text( data.error ).css('visibility','visible');
- }
- }
- );
-};
-
-var isValidDeviceName = function( name ) {
- if ( !name || name === '' ) {
- return false;
- }
- //starts with an ascii word char. can contain word char's spaces and '
- if ( !name.match(/^[a-zA-Z0-9][\w ']*$/) ) {
- return false;
- }
- //ends in an ascii word char
- if ( !name.match(/[a-zA-Z0-9]$/) ) {
- return false;
- }
- return true;
-};
-
-var getPasswordProblem = function( pass ) {
- if ( !pass || pass === '' ) {
- return "the password is empty";
- }
- if ( pass.length < 6 ) {
- return "the password should contain at least 6 characters";
- }
- if ( !pass.match(/[a-z]/) ||
- !pass.match(/[A-Z0-9\-\_\.\,\;\:\'\"\[\]\{\}\!\@\#\$\%\^\&\*\(\)\\].*[A-Z0-9\-\_\.\,\;\:\'\"\[\]\{\}\!\@\#\$\%\^\&\*\(\)\\]/) ) {
- return "your password must contain a lower case letter and at least two upper case letters or numbers";
- }
-};
-var isValidPassword = function( pass ) {
- if ( !pass || pass === '' ) {
- return false;
- }
- //at least 6 characters
- if ( pass.length < 6 ) {
- return false;
- }
- //contains lower case
- if ( !pass.match(/[a-z]/) ) {
- return false;
- }
- //contains two upper case or numbers
- if ( !pass.match(/[A-Z0-9\-\_\.\,\;\:\'\"\[\]\{\}\!\@\#\$\%\^\&\*\(\)\\].*[A-Z0-9\-\_\.\,\;\:\'\"\[\]\{\}\!\@\#\$\%\^\&\*\(\)\\]/) ) {
- return false;
- }
- return true;
-};
-
-var circles = [];
-var $canvas;
-var ctx;
-var buildAnimation = function() {
- circles = [];
- $canvas = $("#animation");
- ctx = $canvas.get(0).getContext("2d");
- var w = $canvas.parent().width();
- var h = $canvas.parent().height();
- $canvas.attr('width', w);
- $canvas.attr('height', h);
-
- for ( var x=0; x<20; x++ ) {
- var sx = (Math.random() * (w+100)) - 50;
- var sy = (Math.random() * 800) - 400;
- var circle = {
- sx: sx,
- sy: sy,
- x: sx,
- y: sy,
- r: (Math.random() * 150) + 30,
- opacity: .2,
- direction: Math.random() > .5? 1:-1
- };
- circles.push( circle );
- }
-};
-
-var updateAnimation = function() {
- ctx.clearRect(0, 0, $canvas.width(), $canvas.height());
- for ( var x=0; x .9 ) {
- circle.opacity = .9;
- }
-
- circle.x += (Math.random() * .2) * circle.direction;
- if ( circle.x < circle.sx - 250 ) {
- circle.x = circle.sx - 250;
- circle.direction=1;
- } else if ( circle.x > circle.sx + 250 ) {
- circle.x = circle.sx + 250;
- circle.direction = -1;
- }
-
-
- }
- setTimeout( updateAnimation, 1000/60 );
-};
-
-
-
diff --git a/coder-apps/common/auth/static/media/.gitignore b/coder-apps/common/auth/static/media/.gitignore
deleted file mode 100644
index e69de29b..00000000
diff --git a/coder-apps/common/auth/views/index.html b/coder-apps/common/auth/views/index.html
deleted file mode 100644
index d2da0a2a..00000000
--- a/coder-apps/common/auth/views/index.html
+++ /dev/null
@@ -1,108 +0,0 @@
-
-
-
- Coder
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{device_name}}
-
-
-
-
-
Welcome to Coder
-
Enter your Coder password to get coding.
-
- Password
-
-
-
Let's Code
-
-
-
-
-
You Are Signed Out
-
To get back to coding, enter your Coder password.
-
- Password
-
-
-
Let's Code
-
-
-
-
-
Welcome to Coder
-
First, let's give your Coder a name.
-
- Your Coder's Name
-
-
-
OK. Save My Coder's Name
-
-
-
-
-
-
Protect Your Coder
-
Set a password here to make this Coder yours.
-
- My Password
-
-
-
- My Password, Again
-
-
-
Save My Password
-
-
-
-
-
Change Your Coder Password
-
Confirm your current password, then choose a new one to secure your Coder.
-
- Old Password
-
-
-
- New Password
-
-
-
- New Password, Again
-
-
-
Save My Password
-
Cancel
-
-
-
-
-
-
-
-
-
-
-
diff --git a/coder-apps/common/boilerplate/app/app.js b/coder-apps/common/boilerplate/app/app.js
deleted file mode 100644
index 5e949e05..00000000
--- a/coder-apps/common/boilerplate/app/app.js
+++ /dev/null
@@ -1,30 +0,0 @@
-exports.settings={};
-//These are dynamically updated by the runtime
-//settings.appname - the app id (folder) where your app is installed
-//settings.viewpath - prefix to where your view html files are located
-//settings.staticurl - base url path to static assets /static/apps/appname
-//settings.appurl - base url path to this app /app/appname
-//settings.device_name - name given to this coder by the user, Ie."Billy's Coder"
-//settings.coder_owner - name of the user, Ie. "Suzie Q."
-//settings.coder_color - hex css color given to this coder.
-
-exports.get_routes = [
- { path:'/', handler:'index_handler' },
-];
-
-exports.post_routes = [
-];
-
-
-exports.index_handler = function( req, res ) {
- var tmplvars = {};
- tmplvars['static_url'] = exports.settings.staticurl;
- tmplvars['app_name'] = exports.settings.appname;
- tmplvars['app_url'] = exports.settings.appurl;
- tmplvars['device_name'] = exports.settings.device_name;
-
- res.render( exports.settings.viewpath + '/index', tmplvars );
-};
-
-exports.on_destroy = function() {
-};
\ No newline at end of file
diff --git a/coder-apps/common/boilerplate/app/meta.json b/coder-apps/common/boilerplate/app/meta.json
deleted file mode 100644
index d29079e8..00000000
--- a/coder-apps/common/boilerplate/app/meta.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "created": "2013-03-12",
- "modified": "2013-03-14",
- "color": "#3e3e3e",
- "author": "Jason Striegel",
- "name": "Boilerplate",
- "hidden": true
-}
\ No newline at end of file
diff --git a/coder-apps/common/boilerplate/static/css/index.css b/coder-apps/common/boilerplate/static/css/index.css
deleted file mode 100644
index 408ef623..00000000
--- a/coder-apps/common/boilerplate/static/css/index.css
+++ /dev/null
@@ -1,4 +0,0 @@
-
-.pagecontent {
- padding: 24px;
-}
\ No newline at end of file
diff --git a/coder-apps/common/boilerplate/static/js/index.js b/coder-apps/common/boilerplate/static/js/index.js
deleted file mode 100644
index 89508e79..00000000
--- a/coder-apps/common/boilerplate/static/js/index.js
+++ /dev/null
@@ -1,6 +0,0 @@
-
-$(document).ready( function() {
-
- //This code will run after your page loads
-
-});
\ No newline at end of file
diff --git a/coder-apps/common/boilerplate/static/media/.gitignore b/coder-apps/common/boilerplate/static/media/.gitignore
deleted file mode 100644
index e69de29b..00000000
diff --git a/coder-apps/common/boilerplate/views/index.html b/coder-apps/common/boilerplate/views/index.html
deleted file mode 100644
index c62c2c7c..00000000
--- a/coder-apps/common/boilerplate/views/index.html
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
- Coder
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/coder-apps/common/eyeball/app/app.js b/coder-apps/common/eyeball/app/app.js
deleted file mode 100644
index 5e949e05..00000000
--- a/coder-apps/common/eyeball/app/app.js
+++ /dev/null
@@ -1,30 +0,0 @@
-exports.settings={};
-//These are dynamically updated by the runtime
-//settings.appname - the app id (folder) where your app is installed
-//settings.viewpath - prefix to where your view html files are located
-//settings.staticurl - base url path to static assets /static/apps/appname
-//settings.appurl - base url path to this app /app/appname
-//settings.device_name - name given to this coder by the user, Ie."Billy's Coder"
-//settings.coder_owner - name of the user, Ie. "Suzie Q."
-//settings.coder_color - hex css color given to this coder.
-
-exports.get_routes = [
- { path:'/', handler:'index_handler' },
-];
-
-exports.post_routes = [
-];
-
-
-exports.index_handler = function( req, res ) {
- var tmplvars = {};
- tmplvars['static_url'] = exports.settings.staticurl;
- tmplvars['app_name'] = exports.settings.appname;
- tmplvars['app_url'] = exports.settings.appurl;
- tmplvars['device_name'] = exports.settings.device_name;
-
- res.render( exports.settings.viewpath + '/index', tmplvars );
-};
-
-exports.on_destroy = function() {
-};
\ No newline at end of file
diff --git a/coder-apps/common/eyeball/app/meta.json b/coder-apps/common/eyeball/app/meta.json
deleted file mode 100644
index 079a953d..00000000
--- a/coder-apps/common/eyeball/app/meta.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "created": "2013-03-15",
- "modified": "2014-01-14",
- "color": "#f39c12",
- "author": "Justin Windle",
- "name": "Eyeball",
- "hidden": false
-}
\ No newline at end of file
diff --git a/coder-apps/common/eyeball/static/css/index.css b/coder-apps/common/eyeball/static/css/index.css
deleted file mode 100644
index 9f3a2a5d..00000000
--- a/coder-apps/common/eyeball/static/css/index.css
+++ /dev/null
@@ -1,80 +0,0 @@
-
-.pagecontent {
- padding: 24px;
-}
-
-html, body {
- background: #f9de2a;
- text-align: center;
-}
-
-@-webkit-keyframes blink {
- 0% {
- height: 80%;
- }
-
- 50% {
- height: 0%;
- top: 50%;
- }
-
- 100% {
- height: 80%;
- }
-}
-
-.circle {
- border-radius: 100%;
- position: relative;
- overflow: hidden;
-}
-
-.center {
- position: absolute;
- left: 50%;
- top: 50%;
-}
-
-.eye {
- box-shadow: 0 20px 0 rgba(0,0,0,0.05);
- text-align: center;
- background: #cccccc;
- display: inline-block;
- position: absolute;
- margin-left: -100px;
- margin-top: -120px;
- height: 200px;
- width: 200px;
- left: 50%;
- top: 50%;
-}
-.eye .highlight {
- box-shadow: inset 15px 60px rgba(255, 255, 255, 0.1);
- position: absolute;
- height: 100%;
- width: 100%;
- left: 0;
- top: 0;
-}
-.eye .container {
- position: absolute;
- height: 80%;
- width: 99%;
- top: 10%;
-}
-.eye .sclera {
- background: white;
- height: 100%;
- width: 100%;
-}
-.eye .sclera .iris {
- background: #5dd0cb;
- height: 100px;
- width: 100px;
-}
-.eye .sclera .iris .pupil {
- background: #111111;
- height: 50%;
- width: 50%;
-}
-
diff --git a/coder-apps/common/eyeball/static/js/index.js b/coder-apps/common/eyeball/static/js/index.js
deleted file mode 100644
index 03571502..00000000
--- a/coder-apps/common/eyeball/static/js/index.js
+++ /dev/null
@@ -1,89 +0,0 @@
-
-$(document).ready( function() {
-
- var centered = document.getElementsByClassName( 'center' );
- var eyes = document.getElementsByClassName( 'eye' );
- var eyeRadius = 100;
- var mouseX = 0.0;
- var mouseY = 0.0;
-
- // Returns the pixel value of a number, e.g '42px'
- function toPixels( number ) {
- return Math.round( number ) + 'px';
- }
-
- // Applies the CSS3 blink animation to the eyes
- function blink() {
-
- for ( var i = 0; i < eyes.length; i++ ) {
-
- var eye = eyes[i];
- var container = eye.getElementsByClassName( 'container' )[0];
- container.style.webkitAnimation = '';
-
- // Since the animation property was already present on the element,
- // we need to wait until the next frame to add it back so that it
- // registers as a change
- setTimeout( function() {
- container.style.webkitAnimation = 'blink 500ms ease-in-out';
- }, 0);
- }
-
- setTimeout( blink, 4000 + Math.random() * 5000 );
- }
-
- function updateEyes() {
-
- for ( var i = 0; i < eyes.length; i++ ) {
-
- var eye = eyes[i];
- var eyeBounds = eye.getBoundingClientRect();
-
- // Find the angle from the mouse to the center of the eye...
-
- // Then subract the eye center from them
- var deltaX = mouseX - eyeBounds.left - eyeRadius;
- var deltaY = mouseY - eyeBounds.top - eyeRadius;
-
- // Now find the angle
- var angle = Math.atan2( deltaY, deltaX );
-
- // Compute the distance using Pythagorean theorem: a^2 + b^2 = c^2
- var distance = Math.sqrt( deltaX * deltaX + deltaY * deltaY );
-
- // Limit the distance to the radius of the eye
- var offset = Math.min( distance, eyeRadius * 0.6 );
-
- // Now position the iris
- var xPos = Math.cos( angle ) * offset;
- var yPos = Math.sin( angle ) * offset;
-
- // Move the iris
- var iris = eye.getElementsByClassName( 'iris' )[0];
- iris.style.left = toPixels( eyeRadius + xPos );
- iris.style.top = toPixels( eyeRadius + yPos );
- }
- }
-
- // Center all elements with the `centered` class
- for ( var i = 0; i < centered.length; i++ ) {
-
- var obj = centered[i];
- obj.style.marginTop = toPixels( obj.clientHeight * -0.5 );
- obj.style.marginLeft = toPixels( obj.clientWidth * -0.5 );
- }
-
- // Handle mousemove events
- document.addEventListener( 'mousemove', function( event ) {
-
- // Update the mouse position
- mouseX = event.clientX;
- mouseY = event.clientY;
-
- updateEyes();
- });
-
- updateEyes();
- blink();
-
-});
\ No newline at end of file
diff --git a/coder-apps/common/eyeball/static/media/.gitignore b/coder-apps/common/eyeball/static/media/.gitignore
deleted file mode 100644
index e69de29b..00000000
diff --git a/coder-apps/common/eyeball/views/index.html b/coder-apps/common/eyeball/views/index.html
deleted file mode 100644
index 50d0010b..00000000
--- a/coder-apps/common/eyeball/views/index.html
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
- Coder
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/coder-apps/common/game2d/app/app.js b/coder-apps/common/game2d/app/app.js
deleted file mode 100644
index fcc1b4e4..00000000
--- a/coder-apps/common/game2d/app/app.js
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * Coder for Raspberry Pi
- * A simple platform for experimenting with web stuff.
- * http://goo.gl/coder
- *
- * Copyright 2013 Google Inc. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-exports.settings={};
-//These are dynamically updated by the runtime
-//settings.appname - the app id (folder) where your app is installed
-//settings.viewpath - prefix to where your view html files are located
-//settings.staticurl - base url path to static assets /static/apps/appname
-//settings.appurl - base url path to this app /app/appname
-
-exports.get_routes = [
- { path:'/', handler:'index_handler' },
-];
-
-exports.post_routes = [
-];
-
-
-exports.index_handler = function( req, res ) {
- var tmplvars = {};
- tmplvars['static_url'] = exports.settings.staticurl;
- tmplvars['app_name'] = exports.settings.appname;
- tmplvars['app_url'] = exports.settings.appurl;
- tmplvars['device_name'] = exports.settings.device_name;
-
- res.render( exports.settings.viewpath + '/index', tmplvars );
-};
-
-exports.on_destroy = function() {
-};
diff --git a/coder-apps/common/game2d/app/meta.json b/coder-apps/common/game2d/app/meta.json
deleted file mode 100644
index fe57b438..00000000
--- a/coder-apps/common/game2d/app/meta.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "created": "2013-03-12",
- "modified": "2013-03-12",
- "color": "#3e3e3e",
- "author": "Justin Windle",
- "name": "Game2D",
- "hidden": true
-}
diff --git a/coder-apps/common/game2d/static/css/index.css b/coder-apps/common/game2d/static/css/index.css
deleted file mode 100644
index 408ef623..00000000
--- a/coder-apps/common/game2d/static/css/index.css
+++ /dev/null
@@ -1,4 +0,0 @@
-
-.pagecontent {
- padding: 24px;
-}
\ No newline at end of file
diff --git a/coder-apps/common/game2d/static/js/index.js b/coder-apps/common/game2d/static/js/index.js
deleted file mode 100644
index bcc94233..00000000
--- a/coder-apps/common/game2d/static/js/index.js
+++ /dev/null
@@ -1,678 +0,0 @@
-/**
- * Coder for Raspberry Pi
- * A simple platform for experimenting with web stuff.
- * http://goo.gl/coder
- *
- * Copyright 2013 Google Inc. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-/*
---------------------------------------------------
-
- Shims
-
---------------------------------------------------
-*/
-
-if ( !Date.now ) { Date.now = function now() { return +( new Date() ); }; }
-
-/**
- * requestAnimationFrame polyfill by Erik Möller
- * Fixes from Paul Irish and Tino Zijdel
- *
- * @see http://goo.gl/ZC1Lm
- * @see http://goo.gl/X0h6k
- */
-
-(function(){for(var d=0,a=["ms","moz","webkit","o"],b=0;b= 0 && ( ray || r <= 1 ) ) {
-
- if ( s >= 0 && s <= 1 ) {
-
- //return new Vector( this.a.x + r * dx1, this.a.y + r * dy1 );
- return true;
- }
- }
- }
- }
-
- return false;
- }
-});
-
-var Polygon = Class.extend({
-
- init: function( vertices, edges ) {
-
- this.vertices = vertices || [];
- this.edges = edges || [];
-
- this.center = new Vector();
- this.bounds = {
- min: new Vector(),
- max: new Vector()
- };
-
- this.computeBounds();
- this.computeCenter();
- this.computeEdges();
- },
-
- translate: function( vector ) {
-
- var i, n;
-
- for ( i = 0, n = this.vertices.length; i < n; i++ ) {
- this.vertices[i].add( vector );
- }
-
- this.bounds.min.add( vector );
- this.bounds.max.add( vector );
- this.center.add( vector );
- },
-
- rotate: function( radians, pivot ) {
-
- pivot = pivot || this.center;
-
- for ( var i = 0, n = this.vertices.length; i < n; i++ ) {
- this.vertices[i].rotate( radians, pivot );
- }
-
- this.computeBounds();
- },
-
- scale: function( amount ) {
-
- var vertex;
-
- for ( var i = 0, n = this.vertices.length; i < n; i++ ) {
-
- vertex = this.vertices[i];
- delta = vertex.clone().sub( this.center );
- delta.scale( amount - 1.0 );
- vertex.add( delta );
- }
-
- this.computeBounds();
- },
-
- computeCenter: function() {
-
- this.center.set();
-
- for ( var i = 0, n = this.vertices.length; i < n; i++ ) {
- this.center.add( this.vertices[i] );
- }
-
- return this.center.div( n );
- },
-
- computeBounds: function() {
-
- this.bounds.min.set( Number.MAX_VALUE, Number.MAX_VALUE );
- this.bounds.max.set( -Number.MAX_VALUE, -Number.MAX_VALUE );
-
- var i, n, vertex;
-
- for ( i = 0, n = this.vertices.length; i < n; i++ ) {
-
- vertex = this.vertices[i];
- this.bounds.min.min( vertex );
- this.bounds.max.max( vertex );
- }
-
- return this.bounds;
- },
-
- computeEdges: function() {
-
- this.edges.length = 0;
-
- var i, n, edge;
-
- for ( i = 0, n = this.vertices.length; i < n; i++ ) {
-
- edge = new Edge( this.vertices[i], this.vertices[ (i + 1) % this.vertices.length ] );
- this.edges.push( edge );
- }
-
- return this.edges;
- },
-
- intersects: function( other ) {
-
- if ( other.bounds.min.x > this.bounds.max.x || other.bounds.min.y > this.bounds.max.y ) return false;
- if ( other.bounds.max.x < this.bounds.min.x || other.bounds.max.y < this.bounds.min.y ) return false;
-
- var i, j, n, m, edge;
-
- for ( i = 0, n = this.edges.length; i < n; i++ ) {
-
- edge = this.edges[i];
-
- for ( j = 0, m = other.edges.length; j < m; j++ ) {
-
- if ( edge.intersects( other.edges[j] ) ) return true;
- }
- }
-
- return false;
- },
-
- contains: function( vector ) {
-
- if ( vector.x > this.bounds.max.x || vector.x < this.bounds.min.x ) return false;
- if ( vector.y > this.bounds.max.y || vector.y < this.bounds.min.y ) return false;
-
- var minX = function(o) { return o.x; };
- var minY = function(o) { return o.y; };
-
- var outside = new Vector(
- Math.min.apply( Math, this.vertices.map( minX ) ) - 1,
- Math.min.apply( Math, this.vertices.map( minY ) ) - 1);
-
- var ray = new Edge( vector, outside );
- var intersections = 0;
-
- for ( var i = 0, n = this.edges.length; i < n; i++ ) {
-
- if ( ray.intersects( this.edges[i], true ) ) {
- intersections++;
- }
- }
-
- return !!( intersections % 2 );
- },
-
- wrap: function( x1, y1, x2, y2 ) {
-
- var ox = ( this.bounds.max.x - this.bounds.min.x ) + ( x2 - x1 );
- var oy = ( this.bounds.max.y - this.bounds.min.y ) + ( y2 - y1 );
-
- var offset = new Vector();
-
- if ( this.bounds.max.x < x1 ) offset.x = ox;
- else if ( this.bounds.min.x > x2 ) offset.x = -ox;
-
- if ( this.bounds.max.y < y1 ) offset.y = oy;
- else if ( this.bounds.min.y > y2 ) offset.y = -oy;
-
- if ( offset.x !== 0 || offset.y !== 0 ) {
- this.translate( offset );
- }
- },
-
- draw: function( ctx ) {
-
- var i, n, vertex = this.vertices[0];
-
- ctx.beginPath();
- ctx.moveTo( vertex.x, vertex.y );
-
- for ( i = 1, n = this.vertices.length; i < n; i++ ) {
- vertex = this.vertices[i];
- ctx.lineTo( vertex.x, vertex.y );
- }
-
- ctx.closePath();
- },
-
- drawBounds: function( ctx ) {
-
- ctx.beginPath();
- ctx.circle( this.center.x, this.center.y, 5 );
- ctx.rect( this.bounds.min.x, this.bounds.min.y, this.bounds.max.x - this.bounds.min.x, this.bounds.max.y - this.bounds.min.y);
- ctx.closePath();
- }
-});
-
-/*
---------------------------------------------------
-
- Game2D
-
---------------------------------------------------
-*/
-
-var Game2D = Game2D || (function() {
-
- var game;
-
- var keynames = {
- 8: 'BACKSPACE',
- 9: 'TAB',
- 13: 'ENTER',
- 16: 'SHIFT',
- 27: 'ESCAPE',
- 32: 'SPACE',
- 37: 'LEFT',
- 38: 'UP',
- 39: 'RIGHT',
- 40: 'DOWN'
- };
-
- // Global references
- var globals = {
-
- PI : Math.PI,
- TWO_PI : Math.PI * 2,
- HALF_PI : Math.PI / 2,
- QUARTER_PI : Math.PI / 4,
-
- E: Math.E,
- LN2: Math.LN2,
- LN10: Math.LN10,
- LOG2E: Math.LOG2E,
- LOG10E: Math.LOG10E,
- SQRT1_2: Math.SQRT1_2,
- SQRT2: Math.SQRT2,
- abs: Math.abs,
- acos: Math.acos,
- asin: Math.asin,
- atan: Math.atan,
- atan2: Math.atan2,
- ceil: Math.ceil,
- cos: Math.cos,
- exp: Math.exp,
- floor: Math.floor,
- log: Math.log,
- max: Math.max,
- min: Math.min,
- pow: Math.pow,
- round: Math.round,
- sin: Math.sin,
- sqrt: Math.sqrt,
- tan: Math.tan,
-
- random: function( min, max ) {
-
- if ( min && typeof min.length === 'number' && !!min.length )
- return min[ Math.floor( Math.random() * min.length ) ];
-
- if ( typeof max !== 'number' )
- max = min || 1, min = 0;
-
- return min + Math.random() * (max - min);
- },
-
- chance: function( probability ) {
-
- if ( typeof probability !== 'number' ) probability = 0.5;
- return Math.random() < probability;
- }
- };
-
- // Default game options
- var defaults = {
-
- autoclear: true,
- autostart: true,
- container: document.body,
- height: 0,
- width: 0
- };
-
- // Game API
- var gameAPI = {
-
- running: false,
- millis: 0,
- now: NaN,
- dt: NaN,
-
- __init: function() {
-
- bindAll( this );
-
- on( document, 'keydown', this.__keydown );
- on( document, 'keyup', this.__keyup );
- on( window, 'resize', this.__resize );
-
- this.__resize();
- this.init();
-
- var loop;
- var _this = this;
-
- (loop = function() {
-
- if ( _this.running ) _this.__update();
- requestAnimationFrame( loop );
-
- })();
- },
-
- __resize: function() {
-
- this.canvas.height = this.height = this.container.clientHeight;
- this.canvas.width = this.width = this.container.clientWidth;
- this.resize();
- },
-
- __keydown: function( event ) {
-
- this[ map( event.keyCode ) ] = true;
- this[ event.keyCode ] = true;
- },
-
- __keyup: function( event ) {
-
- this[ map( event.keyCode ) ] = false;
- this[ event.keyCode ] = false;
- this.keypressed( map( event.keyCode ) );
- },
-
- __update: function() {
-
- var now = Date.now();
- this.dt = now - this.now;
- this.millis += this.dt;
- this.now = now;
-
- if ( this.autoclear ) this.clear();
- this.update();
- this.draw();
- },
-
- clear: function() {
- this.canvas.width = this.canvas.width;
- },
-
- start: function() {
-
- this.now = Date.now();
- this.running = true;
- },
-
- stop: function() {
-
- this.running = false;
- },
-
- // Override
- init: function() {},
- draw: function() {},
- update: function() {},
- resize: function() {},
- keypressed: function() {}
- };
-
- // Graphics API
- var graphicsAPI = {
-
- line: function( x1, y1, x2, y2 ) {
-
- this.moveTo( x1, y1 );
- this.lineTo( x2, y2 );
- },
-
- rect: function( x, y, width, height ) {
-
- this.moveTo( x, y );
- this.lineTo( x + width, y );
- this.lineTo( x + width, y + height );
- this.lineTo( x, y + height );
- this.lineTo( x, y );
- },
-
- circle: function( x, y, radius ) {
-
- this.moveTo( x + radius, y );
- this.arc( x, y, radius, 0, TWO_PI );
- }
- };
-
- // Helpers
-
- function extend( child, parent, overwrite ) {
-
- for ( var key in parent ) {
-
- if ( !child.hasOwnProperty( key ) || overwrite ) {
- child[ key ] = parent[ key ];
- }
- }
-
- return child;
- }
-
- function isArray( obj ) {
- return Object.prototype.toString.call( obj ) === "[object Array]";
- }
-
- function on( target, event, handler ) {
-
- target.addEventListener( event, handler, false );
- }
-
- function off( target, event, handler ) {
-
- target.removeEventListener( event, handler );
- }
-
- function bind( method, scope ) {
-
- return function() {
- method.apply( scope, Array.prototype.slice.call( arguments ) );
- };
- }
-
- function bindAll( scope ) {
-
- var key, val;
-
- for ( key in scope ) {
-
- val = scope[ key ];
-
- if ( typeof val === 'function' ) {
- scope[ key ] = bind( val, scope );
- }
- }
- }
-
- // maps a key code to a key name
- function map( code ) {
- return keynames[ code ] || String.fromCharCode( code );
- }
-
- // Methods
- function create( options ) {
-
- extend( options || {}, defaults, false );
-
- game = {};
- game.canvas = document.createElement( 'canvas' );
- game.graphics = extend( game.canvas.getContext( '2d' ), graphicsAPI );
-
- for ( var name in keynames ) {
- game[ keynames[ name ] ] = false;
- }
-
- extend( self, globals, false );
- extend( game, gameAPI, false );
- extend( game, options, true );
-
- game.container.appendChild( game.canvas );
-
- game.__init();
-
- if ( game.autostart ) {
- game.start();
- }
-
- return game;
- }
-
- // API
-
- return {
- create: create
- };
-
-})();
-
diff --git a/coder-apps/common/game2d/static/media/.gitignore b/coder-apps/common/game2d/static/media/.gitignore
deleted file mode 100644
index e69de29b..00000000
diff --git a/coder-apps/common/game2d/views/index.html b/coder-apps/common/game2d/views/index.html
deleted file mode 100644
index b985ef83..00000000
--- a/coder-apps/common/game2d/views/index.html
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
- Game2D
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Game2D Javascript Library
-
Documentation for Game2D to come...
-
For now, see the Vectoroids app for a working example.
-
-
-
\ No newline at end of file
diff --git a/coder-apps/common/hello_coder/app/app.js b/coder-apps/common/hello_coder/app/app.js
deleted file mode 100644
index eb6c824e..00000000
--- a/coder-apps/common/hello_coder/app/app.js
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
-
-Hello Coder!
-
-This is the Node.JS piece of your program. Unlike HTML, CSS, and JS,
-this part of your program doesn't run in your web browser. Instead
-it runs on your Raspberry Pi, and can do more advanced things like
-save and retrieve data. Coders call this "back end" or "server side"
-software, and HTML, JS, and CSS code is "front end" or "client side"
-software.
-
-There are a ton of different languages for writing server side software,
-but Coder's built to use one system, called Node.JS. Node.JS uses
-the Javascript language for making server-side code. Because it's
-Javascript, when you get to writing back end code, you'll find that
-it's very similar to what you've learned in front end JS.
-
-
-WHAT'S GOING ON HERE
-This program contains just the default back end code. The index_handler
-function in this program is used to send your HTML code from the
-server to your web browser. That's it!
-
-Many demos in Coder look just like this in the Node.js file. To do
-front end coding, you won't need to do a thing in Node. It's always
-here, though, for when you get to making more advanced things.
-
-If you're new to Coder, don't bother changing anything in here. Yet...
-
-*/
-
-
-exports.settings={};
-//These are dynamically updated by the runtime
-//settings.appname - the app id (folder) where your app is installed
-//settings.viewpath - prefix to where your view html files are located
-//settings.staticurl - base url path to static assets /static/apps/appname
-//settings.appurl - base url path to this app /app/appname
-//settings.device_name - name given to this coder by the user, Ie."Billy's Coder"
-//settings.coder_owner - name of the user, Ie. "Suzie Q."
-//settings.coder_color - hex css color given to this coder.
-
-exports.get_routes = [
- { path:'/', handler:'index_handler' },
-];
-
-exports.post_routes = [
-];
-
-
-exports.index_handler = function( req, res ) {
- var tmplvars = {};
- tmplvars['static_url'] = exports.settings.staticurl;
- tmplvars['app_name'] = exports.settings.appname;
- tmplvars['app_url'] = exports.settings.appurl;
- tmplvars['device_name'] = exports.settings.device_name;
-
- res.render( exports.settings.viewpath + '/index', tmplvars );
-};
-
-exports.on_destroy = function() {
-};
-
-
-
diff --git a/coder-apps/common/hello_coder/app/meta.json b/coder-apps/common/hello_coder/app/meta.json
deleted file mode 100644
index 418ab2d5..00000000
--- a/coder-apps/common/hello_coder/app/meta.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "created": "2013-05-08",
- "modified": "2014-01-14",
- "color": "#d977d4",
- "author": "Jason Striegel",
- "name": "Hello Coder",
- "hidden": false
-}
\ No newline at end of file
diff --git a/coder-apps/common/hello_coder/static/css/index.css b/coder-apps/common/hello_coder/static/css/index.css
deleted file mode 100644
index d5509e67..00000000
--- a/coder-apps/common/hello_coder/static/css/index.css
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
-
-Hello Coder!
-
-You're looking at the CSS code. CSS is a language that describes
-how your app looks. This is the place where you can change the
-color, size, and position of things in your program.
-
-
-
-CHANGING BACKGROUND COLOR
-You can use the background-color attribute in the body tag
-to control the color of your page.
-
-In CSS, colors are written in a code called a hex value. Hex
-values are 6 digits, made of the numbers 0-9 and the letters
-A-F. The first two digits represent red. The second two
-represent green. The final two represent blue. 00 is no color,
-FF is full color. By mixing different values together
-for red, green and blue, you can make all the colors of the
-rainbow.
-
-
-*/
-
-body {
- background-color: #D977D4;
-
- /*
- See if you can change the background-color above to one of these colors.
- Then try and invent a color of your own!
-
- Example colors:
- #FF0000 - only red
- #00FF00 - only green
- #0000FF - only blue
- #C0392B - softer red
- #16A085 - softer green
- #3498D8 - softer blue
- #D977D4 - pink
- #F1C40F - yellow
- #F39C12 - orange
- #FFFFFF - white
- #000000 - black
- #999999 - grey
- */
-}
-
-
-/*
-TEXT SIZE AND COLOR
-This block refers to our h1 tag in the html. You can change the
-text color using the color attribute. background-color changes the
-background color. Unlike the background-color in the body, above,
-these attributes will only affect the h1 area.
-
-Try to change the text and background colors to something you like.
-
-See what happens when you change the font-size value to 40px.
-*/
-h1 {
- text-align: center;
- background-color: #FFFFFF;
- color: #D977D4;
- font-size: 42px;
- line-height: 60px;
- margin: 0;
- padding: 0;
- font-weight: bold;
-
-
- /*
- This lets us set a width on the block.
- Otherwise it will default to the full
- page width.
- */
- width: 400px;
-
- /*
- We can center the block using relative
- positioning, placing it 50% of the page
- width from the left. The negative
- margin-left compensates for half the
- width of the block to complete the
- centering.
- */
- position: relative;
- left: 50%;
- margin-left: -200px;
-}
-
-/*
-MARGINS
-This block affects every p (paragraph) tag in your document. With
-this code, we can change the font size, and even control how far
-apart to space paragraphs. Try changing margin-top to see how that
-affects spacing.
-*/
-p {
- width: 100%;
- margin-top: 15px;
- margin-bottom: 10px;
- font-size: 28px;
- line-height: 28px;
- text-align: center;
- color: #ffffff;
- padding: 0;
-}
-
-
-/*
- #animation refers to the id of our canvas tag, which is were
- we can draw things. If you look in the html, the tag this affects
- looks like this:
-
-
- "absolute" position means that this tag can be positioned anywhere
- on the screen and won't bump into or affect other tags. In this case
- we want it to be the full width and height of the screen, and we
- use a z-index of 1 to put it beneath our page's text content, which
- has a z-index of 2. Higher z-indexes draw on top of lower ones.
-*/
-#animation {
- width: 100%;
- height: 100%;
- position: absolute;
- z-index: 1;
-}
-
-/*
- .pagecontent refers to every tag that has the class called
- "pagecontent". If you look in the html, you will find a div tag
- that looks like this:
-
- We're placing everything inside of this and using this class to
- position this content on top of the animation canvas using z-index.
- It also uses padding-top to position all of the text content 200px
- down from the top of the page.
-*/
-.pagecontent {
- z-index: 2;
- position: relative;
- padding-top: 200px;
- width: 100%;
-}
-
-
-
-
-
diff --git a/coder-apps/common/hello_coder/static/js/index.js b/coder-apps/common/hello_coder/static/js/index.js
deleted file mode 100644
index c188f333..00000000
--- a/coder-apps/common/hello_coder/static/js/index.js
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
-
-Hello Coder!
-
-You're looking at Javascript code. Javascript is a programming
-language that allows you to control how your application functions.
-You can use javascript to respond to mouse clicks, perform
-calculations, or animate things on the screen.
-
-In this demo, we're using Javascript to create a bunch of random lines
-on the screen and then wiggle them back a forth.
-
-Look below for the "numLines" and "speed" variables. See if you can make
-your program draw 100 lines at a time instead of 10. Can you make them
-move a little faster?
-
-If you're comfortable digging in, try and see if you can make the lines
-draw further down the screen. Don't let the math scare you. In
-computational art, math makes things awesome.
-
-*/
-
-
-var lines = []; // array of the all the animated line positions
-var numLines = 10; // how many lines to draw
-var speed = 0.4; // how fast should the lines animate
-var $canvas; // canvas jquery object we're drawing to
-var ctx; // canvas drawing context
-
-
-// Fires when the page first loads
-$(document).ready( function() {
-
- initialize();
- animate();
-
-});
-
-// This creates all the line data that will be
-// used to draw each frame of the animation.
-var initialize = function() {
- lines = [];
- $canvas = $("#animation");
- ctx = $canvas.get(0).getContext("2d");
- var w = $canvas.parent().width();
- var h = $canvas.parent().height();
-
- // Resize the canvas to fill the entire page
- $canvas.attr('width', w);
- $canvas.attr('height', h);
-
- // Make sure numLines isn't a crazy number
- if ( numLines > 10000 ) {
- numLines = 10000;
- }
-
- for ( var x=0; x < numLines; x++ ) {
-
- // top x position
- // randomly chosen across the width of the screen (plus 50px off to the sides)
- var tx = (Math.random() * (w+100)) - 50;
-
- // top y position
- var ty = -20;
-
- // bottom x position
- // randomly chosen plus or minus 250px of the top position
- var bx = tx + (Math.random() * 500) - 250;
-
- // bottom y position
- // random 180px to 680px from top of screen
- var by = 180 + (Math.random() * 500);
-
- // speed at which the bottom of the line moves
- // random between 0.01 and [speed]
- var lineSpeed = (Math.random() * (speed - 0.01)) + 0.01;
-
- // wrap up all the parameters for this line in a single object
- var line = {
- tx: tx,
- bx: bx,
- ty: ty,
- by: by,
- speed: lineSpeed,
- opacity: .2,
- direction: Math.random() > .5? 1:-1 //random moving left (-1) or right (1)
- };
-
- // put the new line into our lines array
- lines.push( line );
- }
-
-};
-
-
-// This runs over an over, moving the line
-// positions and drawing them to the screen.
-var animate = function() {
-
- // clear the screen from the previous step of the animation
- ctx.clearRect(0, 0, $canvas.width(), $canvas.height());
-
- // process each line in our array
- for ( var x=0; x .6 ) {
- line.opacity = .6;
- }
-
- // move the bottom of the line in its direction of travel
- line.bx += Math.random() * line.speed * line.direction;
-
- // limit this movement so that the bottom
- // doesn't drift further than 250px from the top
- // and change the direction if it does
- if ( line.bx < line.tx - 250 ) {
- line.bx = line.tx - 250;
- line.direction=1;
- } else if ( line.bx > line.tx + 250 ) {
- line.bx = line.tx + 250;
- line.direction = -1;
- }
- }
-
- //have the browser run this animation just before each screen refresh
- requestAnimationFrame( animate );
-};
-
diff --git a/coder-apps/common/hello_coder/static/media/.gitignore b/coder-apps/common/hello_coder/static/media/.gitignore
deleted file mode 100644
index e69de29b..00000000
diff --git a/coder-apps/common/hello_coder/views/index.html b/coder-apps/common/hello_coder/views/index.html
deleted file mode 100644
index 573af7d5..00000000
--- a/coder-apps/common/hello_coder/views/index.html
+++ /dev/null
@@ -1,84 +0,0 @@
-
-
-
- Coder
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Check out the quick tips above. For a more detailed tour, go to goo.gl/coder. When you're ready to dive in, just click 'Got It'.
-
-
Got It
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/coder-apps/pi/wifi/app/app.js b/coder-apps/pi/wifi/app/app.js
deleted file mode 100644
index 30f4faf6..00000000
--- a/coder-apps/pi/wifi/app/app.js
+++ /dev/null
@@ -1,247 +0,0 @@
-/**
- * Coder for Raspberry Pi
- * A simple platform for experimenting with web stuff.
- * http://goo.gl/coder
- *
- * Copyright 2013 Google Inc. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-var mustache = require('mustache');
-var util = require('util');
-var fs = require('fs');
-
-var sudoscripts = process.cwd() + '/sudo_scripts';
-
-exports.settings={};
-//These are dynamically updated by the runtime
-//settings.appname - the app id (folder) where your app is installed
-//settings.viewpath - prefix to where your view html files are located
-//settings.staticurl - base url path to static assets /static/apps/appname
-//settings.appurl - base url path to this app /app/appname
-
-
-exports.get_routes = [
- { path:'/', handler:'index_handler'},
- { path: '/api/wifi/list', handler: 'api_wifi_list_handler' }
-];
-
-
-exports.post_routes = [
- { path: '/api/wifi/configure', handler: 'api_wifi_configure_handler' },
- { path: '/api/reboot', handler: 'api_reboot_handler' }
-];
-
-exports.on_destroy = function() {
-};
-
-exports.api_wifi_configure_handler = function( req, res ) {
- var ssid = req.param('ssid');
- var type = req.param('type');
- var password = req.param('password');
-
- if ( typeof ssid === 'undefined' || ssid === '' ||
- typeof type === 'undefined' || type === '' ||
- typeof password === 'undefined' ) {
- res.json({
- 'status': 'error',
- 'error': 'invalid parameters'
- });
- return;
- }
- if ( type !== "OPEN" && password === "" ) {
- res.json({
- 'status': 'error',
- 'error': 'password not set'
- });
- }
-
- if ( type !== 'OPEN' && type != 'WEP' && password.length < 8 ) {
- res.json({
- 'status': 'error',
- 'error': 'short password'
- });
- }
-
- if ( type !== 'WPAPSK' && type != 'WEP' && type != 'OPEN' ) {
- res.json({
- 'status': 'error',
- 'error': 'unknown type'
- });
- return;
- }
- var escapestring = function( str ) {
- return str.replace(/([\\"'])/g, "\\$1").replace(/[\0\r\t\n]/g,"");
- }
-
- ssid = escapestring(ssid);
- password = escapestring(password);
-
-
- var wpatemplate = "network={\n" +
- "\tssid=\"[ssid]\"\n" +
- "\tpsk=\"[password]\"\n" +
- "\tscan_ssid=1\n" +
- "\tpriority=10\n" +
- "}\n";
-
- var weptemplate = "network={\n" +
- "\tssid=\"[ssid]\"\n" +
- "\twep_key0=\"[password]\"\n" +
- "\tscan_ssid=1\n" +
- "\tkey_mgmt=NONE\n" +
- "\tpriority=10\n" +
- "}\n";
-
- var opentemplate = "network={\n" +
- "\tssid=\"[ssid]\"\n" +
- "\tscan_ssid=1\n" +
- "\tkey_mgmt=NONE\n" +
- "\tpriority=10\n" +
- "}\n";
-
-
- var confentry="";
- switch ( type ) {
- case "WPAPSK":
- confentry = wpatemplate;
- break;
- case "WEP":
- confentry = weptemplate;
- break;
- case "OPEN":
- confentry = opentemplate;
- break;
- }
-
-
-
- confentry = confentry.replace( "[ssid]", ssid );
- confentry = confentry.replace( "[password]", password );
- saveWifiConfigEntry( confentry );
-
- res.json( { status: "success" } );
- //res.write( confentry );
- //res.end();
-};
-
-
-var wpa_config = "/etc/wpa_supplicant/wpa_supplicant.conf";
-var saveWifiConfigEntry = function( configdata ) {
-
- conffiledata = fs.readFileSync( wpa_config, 'utf8' );
- if ( conffiledata.match(/\n##BEGIN_AUTOGENERATED[\s\S]*\n##END_AUTOGENERATED/) ) {
-
- conffiledata = conffiledata.replace( /\n##BEGIN_AUTOGENERATED[\s\S]*\n##END_AUTOGENERATED/,
- "\n##BEGIN_AUTOGENERATED\n\n" +
- configdata +
- "\n\n##END_AUTOGENERATED" );
-
- } else {
-
- conffiledata += "\n\n##BEGIN_AUTOGENERATED\n\n";
- conffiledata += configdata;
- conffiledata += "\n\n##END_AUTOGENERATED\n";
- }
-
- var result = fs.writeFileSync( wpa_config, conffiledata, 'utf8' );
-
- return result;
-};
-
-
-exports.api_reboot_handler = function( req, res ) {
- var spawn = require('child_process').spawn;
- var rebootproc = spawn( '/usr/bin/sudo', [ sudoscripts + '/reboot'] );
- rebootproc.addListener( 'exit', function( code, signal ) {
- res.json( { status: 'success' } );
- });
-};
-
-
-exports.api_wifi_list_handler = function( req, res ) {
- var spawn = require('child_process').spawn;
- var data = "";
-
- var scanStep1 = function( ) {
- var scanproc = spawn( '/usr/bin/sudo', [ sudoscripts + '/wpa_cli_apscan'] );
- scanproc.addListener( 'exit', function( code, signal ) {
- scanStep2();
- });
- };
- var scanStep2 = function( ) {
- var scanproc = spawn( '/usr/bin/sudo', [ sudoscripts + '/wpa_cli_scan'] );
- scanproc.addListener( 'exit', function( code, signal ) {
- scanStep3();
- });
- };
- var scanStep3 = function( ) {
- var scanproc = spawn( '/usr/bin/sudo', [ sudoscripts + '/wpa_cli_scanresults'] );
- scanproc.stdout.on( 'data', function(d) { data += d; } );
- scanproc.addListener( 'exit', function( code, signal ) {
- returnData();
- });
- };
- var returnData = function( ) {
- var lines = data.split('\n');
- var access_points = {};
- var debug="";
-
- var addHighestSignal = function( ssid, type, signal ) {
- if ( !access_points[ssid] ) {
- access_points[ssid] = { ssid: ssid, type: type, signal: signal };
- } else if ( access_points[ssid].signal < signal ) {
- access_points[ssid] = { ssid: ssid, type: type, signal: signal };
- }
- }
-
-
- for ( var x=0; x");
- $op.text( network.ssid + " (" + network.type + ")" );
- $op.attr('data-nettype', network.type);
- $op.val( network.ssid );
- $select.append( $op );
- }
-};
-
-
-var testSubmitEnable = function() {
- var $form = $('#wifi_form');
- if ( isValidForm() ) {
- $form.find('.submit').removeClass('disabled');
- } else {
- $form.find('.submit').addClass('disabled');
- }
-
-};
-
-var isValidForm = function() {
- var $form = $('#wifi_form');
- var pass = $form.find('.pass').val();
-
- $select = $form.find('select.network').first();
- $selected = $select.find('option:selected').first();
-
- if ( $selected.attr("name") !== "choose"
- && $selected.attr("name") !== "rescan"
- && $selected.attr("name") !== "spacer"
- && $selected.val() !== ""
- && $selected.attr('data-nettype') != "") {
-
- if ( $selected.attr('data-nettype') === "OPEN"
- || pass !== "" ) {
- return true;
- } else {
- return false;
- }
- } else {
- return false;
- }
-};
-
-var setupWifiSelectFields = function() {
- $('#wifi_form .formfield.textinput .label').click( focusTextInput );
- $('#wifi_form .formfield.textinput input').click( focusTextInput );
- $('#wifi_form .formfield.textinput input').focus( hideTextLabel );
- $('#wifi_form .formfield.textinput input').blur( onBlurTextInput );
-
- $('#wifi_form .formfield.textinput input').change( testSubmitEnable );
- $('#wifi_form .formfield.textinput input').keydown( function() {
- setTimeout( testSubmitEnable, 0 );
- });
-
-
- $('#wifi_form .formfield.selectbox select option[name="choose"]').attr("selected",true);
- $('#wifi_form .formfield.selectbox select').addClass("nochoice");
- $('.formfield.wifipassword').hide();
- $('#wifi_form .formfield.selectbox select').change( checkSelectInput );
-
-
- $('#wifi_form .submit').click( saveClick );
- $('#wifi_form .cancel').click( function() {
- window.location.href="http://github.com/";
- });
-};
-
-
-var saveClick = function() {
- $this = $(this);
- var $form = $('#wifi_form');
-
- $form.find('.pass').removeClass('error');
- $form.find('.selectbg').removeClass('error');
-
- var pass = $form.find('.pass').val();
- var $select = $form.find('select.network').first();
- var $selected = $select.find('option:selected').first();
-
-
- if ( !isValidForm() ) {
- if ( $selected.attr("name") === "choose"
- || $selected.attr("name") === "rescan"
- || $selected.attr("name") === "spacer"
- || $selected.val() === ""
- || $selected.attr('data-nettype') === "") {
- console.log('not valid');
- $form.find('.selectbg').addClass('error');
- } else if ( $selected.attr('data-nettype') !== "OPEN"
- && pass === "" ) {
- $form.find('.pass').addClass('error');
- } else if ( $selected.attr('data-nettype') !== "OPEN"
- && $selected.attr('data-nettype') !== "WEP"
- && pass.length < 8 ) {
- $form.find('.pass').addClass('error');
- }
- return;
- }
-
- $.post(
- appurl + '/api/wifi/configure',
- {
- ssid: $selected.val(),
- type: $selected.attr('data-nettype'),
- password: pass
- },
- function( data ) {
- if ( data.status === "success" ) {
- $('#wifi_form').hide();
- $('#rebooting_form').show();
- $('#rebooting_form .submit').addClass('disabled').text('Your Coder is restarting.');
- $.post(
- appurl + '/api/reboot',
- function( data ) {
- //TODO: we should be doing some kind of polling here to determine if we can connect to coder
- setTimeout( function() {
- $('#rebooting_form .submit').removeClass('disabled').text('Reconnect to coder.local');
- $('#rebooting_form .submit').click( function() {
- window.location.href="https://coder.local/";
- });
- }, 60 * 1000 );
- }
- );
- }
- }
- );
-
-/*
- $.post(
- appurl + '/api/login',
- {
- password: $this.parent().find('.pass').val()
- },
- function( data ) {
- console.log( data );
- if( data.status === "success" ) {
- window.location.href="http://github.com/app/coder";
- } else {
-
- $form.find('.pass').addClass('error');
- }
- }
- );
- */
-};
-
-
-
-
-
diff --git a/coder-apps/pi/wifi/static/media/.gitignore b/coder-apps/pi/wifi/static/media/.gitignore
deleted file mode 100644
index e69de29b..00000000
diff --git a/coder-apps/pi/wifi/views/index.html b/coder-apps/pi/wifi/views/index.html
deleted file mode 100644
index 1180508c..00000000
--- a/coder-apps/pi/wifi/views/index.html
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
- Coder::Wifi Setup
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{device_name}}
-
-
-
-
-
-
Set up Coder's Wifi
-
Enter your network name and password so Coder can connect and you can get started.
-
-
-
-
-
- Wifi Password
-
-
-
Save Wifi Settings and Reboot
-
Cancel
-
-
-
-
-
Switch Your Wireless
-
Unplug Coder's ethernet cable and connect your computer to your normal wireless network. Your Coder will take a minute to restart.
If your Coder fails to connect to the wireless network, it will reconnect to the CoderConfig network.
-
Reconnect to coder.local
-
-
-
-
-
-
-
-
-
-
diff --git a/coder-apps/tests/gpio_test/app/app.js b/coder-apps/tests/gpio_test/app/app.js
deleted file mode 100644
index f5d734ad..00000000
--- a/coder-apps/tests/gpio_test/app/app.js
+++ /dev/null
@@ -1,214 +0,0 @@
-var gpio = require("gpio");
-gpio.logging = true;
-
-
-// The gpio ids we're using. Note that these aren't the pin numbers, but
-// the IDs exposed by the Pi. Search for Pi GPIO pinout for details.
-var ledGPIOID = 4; //actually pin 7, 4 down on left header
-var buttonGPIOID = 17;
-
-// Handles for our connected gpio devices
-var ledDevice;
-var buttonDevice;
-
-// A collection of all connected sockets.
-// Maps socketid => { socket: sockethandle, id: socketid }
-var connections = {};
-
-exports.settings={};
-//These are dynamically updated by the runtime
-//settings.appname - the app id (folder) where your app is installed
-//settings.viewpath - prefix to where your view html files are located
-//settings.staticurl - base url path to static assets /static/apps/appname
-//settings.appurl - base url path to this app /app/appname
-//settings.device_name - name given to this coder by the user, Ie."Billy's Coder"
-//settings.coder_owner - name of the user, Ie. "Suzie Q."
-//settings.coder_color - hex css color given to this coder.
-
-// Incoming get routes that our app knows how to respond to
-exports.get_routes = [
- { path:'/', handler:'index_handler' }, // Render out main html page
-];
-
-// Incoming post routes that our app knows how to respond to
-// (None in this example)
-exports.post_routes = [
-];
-
-// Incoming socket events that this module will expose.
-exports.socketio_routes = [
- { key:'connect', handler:'on_socket_connect' }, // sent by client once socket is loaded
- { key:'setled', handler:'on_socket_setled' }, // sent by client to turn on/off the led
-];
-
-
-
-//
-// Handles sending the HTML page to the browser
-//
-exports.index_handler = function( req, res ) {
- // Set up some template variables that are substituted in our HTML.
- // Look in the HTML head tag to see where these are inserted.
- var tmplvars = {};
- tmplvars['static_url'] = exports.settings.staticurl;
- tmplvars['app_name'] = exports.settings.appname;
- tmplvars['app_url'] = exports.settings.appurl;
- tmplvars['device_name'] = exports.settings.device_name;
-
- // Send the HTML document to the web browser.
- res.render( exports.settings.viewpath + '/index', tmplvars );
-};
-
-
-//
-// Respond to the "connect" message sent by a new socket client.
-//
-// We do two things here:
-// 1. save the socket object into the "connections" variable so we can talk to it later.
-// 2. initialize the GPIO pins if this is the first time a socket has connected.
-//
-exports.on_socket_connect = function( socket, data ) {
- console.log( 'socket connect from ID: ' + socket.socketID );
- console.log( data );
-
- // Enable the GPIO pins if this is the first connection
- if ( Object.keys( connections ).length <= 0 ) {
- enableGPIO();
- }
-
- // Store information about this socket so we can communicate with
- // all connected sockets in the future.
- connections[socket.socketID] = {
- socket: socket,
- id: socket.socketID
- };
-
- // Watch for this socket to disconnect so that we can remove it from
- // our collection of connected sockets.
- socket.on('disconnect', function() {
- console.log( 'socket disconnect from ID: ' + socket.socketID );
- delete connections[socket.socketID];
-
- //Free up the GPIO when the last socket disconnects
- if ( Object.keys( connections ).length <= 0 ) {
- disableGPIO();
- connected = false;
- }
- });
-
-};
-
-//
-// Respond to a "setled" message from a socket connection to update the LED value
-//
-exports.on_socket_setled = function( socket, data ) {
- if ( data.value !== "undefined" ) {
- setLED( data.value );
- }
-};
-
-
-
-//
-// This is called once from our first socket connection.
-// - set up the LED GPIO as an output
-// - set up the Button GPIO as an input and tie it to send a "change" message
-//
-var enableGPIO = function() {
-
- // Set up the LED output GPIO
- console.log("Setting up LED as an output on GPIO " + ledGPIOID );
- ledDevice = gpio.export( ledGPIOID, {
- ready: function() {
- // This works around a bug in gpio, where sometimes this device
- // doesn't become immediately available.
- setTimeout( function() {
- ledDevice.setDirection("out");
- }, 100); //wait 100 ms before setting direction
- }
- });
-
- // Set up the button input GPIO
- console.log("Setting up Button as an input on GPIO" + buttonGPIOID);
- buttonDevice = gpio.export( buttonGPIOID, {
- direction: "in",
- ready: function() {
-
- // Set up buttonDevice to call the buttonChange
- // function (below) whenever its value changes.
- buttonDevice.on("change", buttonChange);
- }
- });
-
-};
-
-//
-// This is called when the last socket disconnects.
-// It releases our GPIO pins so they can be used by another program.
-//
-var disableGPIO = function() {
- console.log("Disabling GPIO" + ledGPIOID );
- ledDevice.removeAllListeners();
- ledDevice.reset();
- ledDevice.unexport();
-
- console.log("Disabling GPIO" + buttonGPIOID );
- buttonDevice.removeAllListeners();
- buttonDevice.reset();
- buttonDevice.unexport();
-};
-
-//
-// This is triggered by the GPIO "change" event on buttonDevice. This was
-// set up inside emabledGPIO().
-//
-// The change event sends this function a value, either 0 (off) or 1 (on).
-//
-var buttonChange = function( val ) {
- // Recall that this code is running on the device. We need to send a
- // socket message with the button data to our javascript in the
- // web browser. In fact, we need to send this data to every connected
- // socket, since there may be more than one browser window looking at
- // this page.
-
- console.log( "buttonChange event with value: " + val );
-
- // Iterate through all of our socket connections
- for ( var socketid in connections ) {
- // Get the socket object for this socket
- var socket = connections[socketid].socket;
-
- // The "appdata" event will be received by the Coder.socketConnection
- // object in the front end code and sent to the appropriate listener
- // that we've defined.
- // The "buttonupdate" key refers to a listener we set up on the front
- // end with the code:
- // Coder.socketConnection.addListener( "buttonupdate", function... )
- socket.emit( "appdata", {
- key: "buttonupdate",
- data: val
- });
- }
-};
-
-//
-// Set the value on the LED GPIO device, either 0 (off) or 1 (on).
-//
-var setLED = function( val ) {
- val = parseInt( val );
- if ( val != 0 ) {
- val = 1;
- }
- ledDevice.set( val );
-};
-
-//
-// Called by Coder whenever this module is reloaded. This usually happens when
-// you save your code in the editor. This is a good place to destroy any intervals
-// or clean up any long running code or handles.
-//
-exports.on_destroy = function() {
-};
-
-
-
diff --git a/coder-apps/tests/gpio_test/app/meta.json b/coder-apps/tests/gpio_test/app/meta.json
deleted file mode 100644
index ba5193b7..00000000
--- a/coder-apps/tests/gpio_test/app/meta.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "created": "2013-11-30",
- "modified": "2014-01-14",
- "color": "#2ecc71",
- "author": "",
- "name": "GPIO Test",
- "hidden": false
-}
\ No newline at end of file
diff --git a/coder-apps/tests/gpio_test/static/css/index.css b/coder-apps/tests/gpio_test/static/css/index.css
deleted file mode 100644
index f589f589..00000000
--- a/coder-apps/tests/gpio_test/static/css/index.css
+++ /dev/null
@@ -1,61 +0,0 @@
-
-.pagecontent {
- padding: 24px;
- min-width: 880px;
-}
-
-.buttons {
- float: left;
- width: 240px;
-}
-.diagram {
- width: 640px;
- float: left;
- padding-bottom: 100px;
-}
-.clear {
- clear: both;
-}
-
-#buttonval {
- width: 200px;
- height: 150px;
- margin: 24px 0;
- color: #fff;
- background-color: #000000;
- text-align: center;
- font-weight: bold;
- line-height: 150px;
-}
-#buttonval.on {
- background-color: #F03050;
-}
-
-
-.button {
- cursor: pointer;
- width: 200px;
- height: 150px;
- margin: 24px 0;
- background-color: #3498D8;
- line-height: 150px;
- text-align: center;
- color: #fff;
- font-weight: bold;
-}
-
-.button.press {
- background-color: #2488A8;
-}
-
-
-#output {
- position: fixed;
- left:0;
- right:0;
- bottom:0;
- height: 100px;
- color: #fff;
- background-color: #000;
- overflow: hidden;
-}
\ No newline at end of file
diff --git a/coder-apps/tests/gpio_test/static/js/index.js b/coder-apps/tests/gpio_test/static/js/index.js
deleted file mode 100644
index 6c14c96b..00000000
--- a/coder-apps/tests/gpio_test/static/js/index.js
+++ /dev/null
@@ -1,144 +0,0 @@
-///////////////////////
-// GPIO Test
-// Sample code to interact with Raspberry Pi hardware, blink an LED,
-// and detect a physical button press.
-//
-// This part of the code runs in your web browser. It's responsible
-// for handling user input from the web browser, sending commands
-// to the Raspberry Pi, and listening for updates that the device
-// sends back.
-//
-// The code here communicates with another program that runs directly
-// on the Pi (not in your browser). That device-side code can be found
-// in the Node tab.
-////////////////////////
-
-$(document).ready( function() {
-
- // Connection can take a second. Let the user know what's happening.
- addOutputMessage( "Connecting... see the debug console for log messages." );
-
- // This establishes a socket connection to the Coder device. A
- // socket conection stays open while the user is viewing this page,
- // which allows us to send a receive data very quickly from the device
- // instead of checking for updates multiple times a second.
- //
- // Coder.socketConnection.init takes a callback function that will
- // be executed once the connection is established. Anything that
- // requires an established connection in order to function
- // correctly should be placed in here.
- Coder.socketConnection.init(function(){
-
- // Each connection gets a unique ID.
- addOutputMessage( "Connected with ID: " + Coder.socketConnection.socketID );
-
- // Send a "connect" message to our Node page when we first connect.
- Coder.socketConnection.sendData( 'connect', {} );
-
-
- // Listen for a "buttonupdate" socket message from the device
- Coder.socketConnection.addListener( 'buttonupdate', function( d ){
- console.log("button gpio value: " + d);
-
- // The data we get should be an integer, 0 (off) or 1 (button pressed).
- var val = parseInt( d );
- if ( d === 1 ) {
- $("#buttonval").addClass('on');
- } else {
- $("#buttonval").removeClass('on');
- }
- });
-
-
- // Set an interval that will repeatedly send LED on and
- // LED off messages to the device. This will cause the led
- // to blink.
- blinkEnabled = false; // it's off by default
- setInterval( function() {
- // Only blink the LED if the user has
- // turned this feature on.
- if ( blinkEnabled ) {
- ledToggle(); // toggles the led. see below.
- }
- }, 100 ); // This function is repeatedly called every 100ms
-
-
-
- $("#blinkon").click( function() {
- startBlink();
- ledOn(); // start out with the light in the on state.
- });
- $("#blinkoff").click( function() {
- stopBlink();
- ledOff(); // also make sure the light is off
- });
- $("#toggle").click( function() {
- stopBlink(); // discontinue blinking in case it was running
- ledToggle(); // flip the LED state
- });
-
- // Treat this like a push button that turns the light off while
- // the mouse is pressed, and turns it off immediately on release.
- $("#push").on("mousedown", function() {
- stopBlink();
- ledOn();
- }).on("mouseup", function() {
- stopBlink();
- ledOff();
- });
-
-
- });
-
-});
-
-// The "ledValue" variable lets us keep track of the LED's
-// current state. 1 is on, 0 is off.
-var ledValue = 0;
-
-// Send a "setled" message to the device with a value of 1 (on)
-var ledOn = function() {
- ledValue = 1;
- Coder.socketConnection.sendData( 'setled', {
- 'value': ledValue
- });
-};
-
-// Send a "setled" message to the device with a value of 0 (on)
-var ledOff = function() {
- ledValue = 0;
- Coder.socketConnection.sendData( 'setled', {
- 'value': ledValue
- });
-};
-
-// Switch the led state.
-// If it's on, turn it off. If it's off, turn it on.
-var ledToggle = function() {
- if ( ledValue === 1 ) {
- ledOff();
- } else {
- ledOn();
- }
-};
-
-var blinkEnabled = false;
-var startBlink = function() {
- blinkEnabled = true; // enables blinking in our interval timer (above)
- $("#blinkon").hide();
- $("#blinkoff").show();
-};
-var stopBlink = function() {
- blinkEnabled = false; // enables blinking in our interval timer (above)
- $("#blinkon").show();
- $("#blinkoff").hide();
-};
-
-
-// Append a new P tag to the #output DIV
-var addOutputMessage = function( text ) {
- var $output = $("#output");
- $output.append( $("").text( text ) );
- console.log( text );
-};
-
diff --git a/coder-apps/tests/gpio_test/static/media/.gitignore b/coder-apps/tests/gpio_test/static/media/.gitignore
deleted file mode 100644
index e69de29b..00000000
diff --git a/coder-apps/tests/gpio_test/static/media/wiring_diagram.jpg b/coder-apps/tests/gpio_test/static/media/wiring_diagram.jpg
deleted file mode 100644
index 1ad680ed..00000000
Binary files a/coder-apps/tests/gpio_test/static/media/wiring_diagram.jpg and /dev/null differ
diff --git a/coder-apps/tests/gpio_test/views/index.html b/coder-apps/tests/gpio_test/views/index.html
deleted file mode 100644
index 82ab5343..00000000
--- a/coder-apps/tests/gpio_test/views/index.html
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-
- Coder
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
GPIO Test
-
-
BLINK
-
STOP BLINK
-
TOGGLE
-
PUSH
-
HARDWARE PRESS
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/coder-apps/tests/relay_test/app/app.js b/coder-apps/tests/relay_test/app/app.js
deleted file mode 100644
index 2bb4ed84..00000000
--- a/coder-apps/tests/relay_test/app/app.js
+++ /dev/null
@@ -1,249 +0,0 @@
-var gpio = require("gpio");
-gpio.logging = true;
-
-
-// The gpio ids we're using. Note that these aren't the pin numbers, but
-// the IDs exposed by the Pi. Search for Pi GPIO pinout for details.
-var ledGPIOID = 4; //actually pin 7, 4 down on left header
-var buttonGPIOID = 17;
-var relayGPIOID = 18;
-
-// Handles for our connected gpio devices
-var ledDevice;
-var buttonDevice;
-var relayDevice;
-
-// A collection of all connected sockets.
-// Maps socketid => { socket: sockethandle, id: socketid }
-var connections = {};
-
-exports.settings={};
-//These are dynamically updated by the runtime
-//settings.appname - the app id (folder) where your app is installed
-//settings.viewpath - prefix to where your view html files are located
-//settings.staticurl - base url path to static assets /static/apps/appname
-//settings.appurl - base url path to this app /app/appname
-//settings.device_name - name given to this coder by the user, Ie."Billy's Coder"
-//settings.coder_owner - name of the user, Ie. "Suzie Q."
-//settings.coder_color - hex css color given to this coder.
-
-// Incoming get routes that our app knows how to respond to
-exports.get_routes = [
- { path:'/', handler:'index_handler' }, // Render out main html page
-];
-
-// Incoming post routes that our app knows how to respond to
-// (None in this example)
-exports.post_routes = [
-];
-
-// Incoming socket events that this module will expose.
-exports.socketio_routes = [
- { key:'connect', handler:'on_socket_connect' }, // sent by client once socket is loaded
- { key:'setled', handler:'on_socket_setled' }, // sent by client to turn on/off the led
- { key:'setrelay', handler:'on_socket_setrelay' }, // sent by client to turn on/off the relay
-];
-
-
-
-//
-// Handles sending the HTML page to the browser
-//
-exports.index_handler = function( req, res ) {
- // Set up some template variables that are substituted in our HTML.
- // Look in the HTML head tag to see where these are inserted.
- var tmplvars = {};
- tmplvars['static_url'] = exports.settings.staticurl;
- tmplvars['app_name'] = exports.settings.appname;
- tmplvars['app_url'] = exports.settings.appurl;
- tmplvars['device_name'] = exports.settings.device_name;
-
- // Send the HTML document to the web browser.
- res.render( exports.settings.viewpath + '/index', tmplvars );
-};
-
-
-//
-// Respond to the "connect" message sent by a new socket client.
-//
-// We do two things here:
-// 1. save the socket object into the "connections" variable so we can talk to it later.
-// 2. initialize the GPIO pins if this is the first time a socket has connected.
-//
-exports.on_socket_connect = function( socket, data ) {
- console.log( 'socket connect from ID: ' + socket.socketID );
- console.log( data );
-
- // Enable the GPIO pins if this is the first connection
- if ( Object.keys( connections ).length <= 0 ) {
- enableGPIO();
- }
-
- // Store information about this socket so we can communicate with
- // all connected sockets in the future.
- connections[socket.socketID] = {
- socket: socket,
- id: socket.socketID
- };
-
- // Watch for this socket to disconnect so that we can remove it from
- // our collection of connected sockets.
- socket.on('disconnect', function() {
- console.log( 'socket disconnect from ID: ' + socket.socketID );
- delete connections[socket.socketID];
-
- //Free up the GPIO when the last socket disconnects
- if ( Object.keys( connections ).length <= 0 ) {
- disableGPIO();
- connected = false;
- }
- });
-
-};
-
-//
-// Respond to a "setled" message from a socket connection to update the LED value
-//
-exports.on_socket_setled = function( socket, data ) {
- if ( data.value !== "undefined" ) {
- setLED( data.value );
- }
-};
-
-//
-// Respond to a "setrelay" message from a socket connection to update the relay value
-//
-exports.on_socket_setrelay = function( socket, data ) {
- if ( data.value !== "undefined" ) {
- setRelay( data.value );
- }
-};
-
-//
-// This is called once from our first socket connection.
-// - set up the LED GPIO as an output
-// - set up the Button GPIO as an input and tie it to send a "change" message
-//
-var enableGPIO = function() {
-
- // Set up the LED output GPIO
- console.log("Setting up LED as an output on GPIO " + ledGPIOID );
- ledDevice = gpio.export( ledGPIOID, {
- ready: function() {
- // This works around a bug in gpio, where sometimes this device
- // doesn't become immediately available.
- setTimeout( function() {
- ledDevice.setDirection("out");
- }, 100); //wait 100 ms before setting direction
- }
- });
-
- console.log("Setting up Relay as an output on GPIO " + relayGPIOID );
- relayDevice = gpio.export( relayGPIOID, {
- direction: "out",
- ready: function() {
- // This works around a bug in gpio, where sometimes this device
- // doesn't become immediately available.
- setTimeout( function() {
- relayDevice.setDirection("out");
- }, 400); //wait 100 ms before setting direction
- }
- });
-
- // Set up the button input GPIO
- console.log("Setting up Button as an input on GPIO" + buttonGPIOID);
- buttonDevice = gpio.export( buttonGPIOID, {
- direction: "in",
- ready: function() {
-
- // Set up buttonDevice to call the buttonChange
- // function (below) whenever its value changes.
- buttonDevice.on("change", buttonChange);
- }
- });
-
-};
-
-//
-// This is called when the last socket disconnects.
-// It releases our GPIO pins so they can be used by another program.
-//
-var disableGPIO = function() {
- console.log("Disabling GPIO" + ledGPIOID );
- ledDevice.removeAllListeners();
- ledDevice.reset();
- ledDevice.unexport();
-
- console.log("Disabling GPIO" + relayGPIOID );
- relayDevice.removeAllListeners();
- relayDevice.reset();
- relayDevice.unexport();
-
- console.log("Disabling GPIO" + buttonGPIOID );
- buttonDevice.removeAllListeners();
- buttonDevice.reset();
- buttonDevice.unexport();
-};
-
-//
-// This is triggered by the GPIO "change" event on buttonDevice. This was
-// set up inside emabledGPIO().
-//
-// The change event sends this function a value, either 0 (off) or 1 (on).
-//
-var buttonChange = function( val ) {
- // Recall that this code is running on the device. We need to send a
- // socket message with the button data to our javascript in the
- // web browser. In fact, we need to send this data to every connected
- // socket, since there may be more than one browser window looking at
- // this page.
-
- console.log( "buttonChange event with value: " + val );
-
- // Iterate through all of our socket connections
- for ( var socketid in connections ) {
- // Get the socket object for this socket
- var socket = connections[socketid].socket;
-
- // The "appdata" event will be received by the Coder.socketConnection
- // object in the front end code and sent to the appropriate listener
- // that we've defined.
- // The "buttonupdate" key refers to a listener we set up on the front
- // end with the code:
- // Coder.socketConnection.addListener( "buttonupdate", function... )
- socket.emit( "appdata", {
- key: "buttonupdate",
- data: val
- });
- }
-};
-
-//
-// Set the value on the LED GPIO device, either 0 (off) or 1 (on).
-//
-var setLED = function( val ) {
- val = parseInt( val );
- if ( val != 0 ) {
- val = 1;
- }
- ledDevice.set( val );
-};
-
-var setRelay = function( val ) {
- val = parseInt( val );
- if ( val != 0 ) {
- val = 1;
- }
- relayDevice.set( val );
-};
-
-//
-// Called by Coder whenever this module is reloaded. This usually happens when
-// you save your code in the editor. This is a good place to destroy any intervals
-// or clean up any long running code or handles.
-//
-exports.on_destroy = function() {
-};
-
-
-
diff --git a/coder-apps/tests/relay_test/app/meta.json b/coder-apps/tests/relay_test/app/meta.json
deleted file mode 100644
index 6f34598f..00000000
--- a/coder-apps/tests/relay_test/app/meta.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "created": "2013-11-30",
- "modified": "2014-01-14",
- "color": "#2ecc71",
- "author": "",
- "name": "Relay Test",
- "hidden": false
-}
\ No newline at end of file
diff --git a/coder-apps/tests/relay_test/static/css/index.css b/coder-apps/tests/relay_test/static/css/index.css
deleted file mode 100644
index 52c0643d..00000000
--- a/coder-apps/tests/relay_test/static/css/index.css
+++ /dev/null
@@ -1,63 +0,0 @@
-
-.pagecontent {
- padding: 24px;
- min-width: 880px;
-}
-
-.buttons {
- /* float: left;
- width: 240px;
- */
-}
-.diagram {
- width: 640px;
- float: left;
- padding-bottom: 100px;
-}
-.clear {
- clear: both;
-}
-
-#buttonval {
- width: 200px;
- height: 150px;
- margin: 24px 0;
- color: #fff;
- background-color: #000000;
- text-align: center;
- font-weight: bold;
- line-height: 150px;
-}
-#buttonval.on {
- background-color: #F03050;
-}
-
-
-.button {
- cursor: pointer;
- width: 200px;
- height: 150px;
- margin: 24px 0;
- background-color: #3498D8;
- line-height: 150px;
- text-align: center;
- color: #fff;
- font-weight: bold;
- display: inline-block;
-}
-
-.button.press {
- background-color: #2488A8;
-}
-
-
-#output {
- position: fixed;
- left:0;
- right:0;
- bottom:0;
- height: 100px;
- color: #fff;
- background-color: #000;
- overflow: hidden;
-}
\ No newline at end of file
diff --git a/coder-apps/tests/relay_test/static/js/index.js b/coder-apps/tests/relay_test/static/js/index.js
deleted file mode 100644
index 7837a544..00000000
--- a/coder-apps/tests/relay_test/static/js/index.js
+++ /dev/null
@@ -1,160 +0,0 @@
-///////////////////////
-// GPIO Test
-// Sample code to interact with Raspberry Pi hardware, blink an LED,
-// and detect a physical button press.
-//
-// This part of the code runs in your web browser. It's responsible
-// for handling user input from the web browser, sending commands
-// to the Raspberry Pi, and listening for updates that the device
-// sends back.
-//
-// The code here communicates with another program that runs directly
-// on the Pi (not in your browser). That device-side code can be found
-// in the Node tab.
-////////////////////////
-
-$(document).ready( function() {
-
- // Connection can take a second. Let the user know what's happening.
- addOutputMessage( "Connecting... see the debug console for log messages." );
-
- // This establishes a socket connection to the Coder device. A
- // socket conection stays open while the user is viewing this page,
- // which allows us to send a receive data very quickly from the device
- // instead of checking for updates multiple times a second.
- //
- // Coder.socketConnection.init takes a callback function that will
- // be executed once the connection is established. Anything that
- // requires an established connection in order to function
- // correctly should be placed in here.
- Coder.socketConnection.init(function(){
-
- // Each connection gets a unique ID.
- addOutputMessage( "Connected with ID: " + Coder.socketConnection.socketID );
-
- // Send a "connect" message to our Node page when we first connect.
- Coder.socketConnection.sendData( 'connect', {} );
-
-
- // Listen for a "buttonupdate" socket message from the device
- Coder.socketConnection.addListener( 'buttonupdate', function( d ){
- console.log("button gpio value: " + d);
-
- // The data we get should be an integer, 0 (off) or 1 (button pressed).
- var val = parseInt( d );
- if ( d === 1 ) {
- $("#buttonval").addClass('on');
- } else {
- $("#buttonval").removeClass('on');
- }
- });
-
-
- // Set an interval that will repeatedly send LED on and
- // LED off messages to the device. This will cause the led
- // to blink.
- blinkEnabled = false; // it's off by default
- setInterval( function() {
- // Only blink the LED if the user has
- // turned this feature on.
- if ( blinkEnabled ) {
- ledToggle(); // toggles the led. see below.
- }
- }, 100 ); // This function is repeatedly called every 100ms
-
-
-
- $("#blinkon").click( function() {
- startBlink();
- ledOn(); // start out with the light in the on state.
- });
- $("#blinkoff").click( function() {
- stopBlink();
- ledOff(); // also make sure the light is off
- });
- $("#toggle").click( function() {
- stopBlink(); // discontinue blinking in case it was running
- ledToggle(); // flip the LED state
- });
-
- // Treat this like a push button that turns the light off while
- // the mouse is pressed, and turns it off immediately on release.
- $("#push").on("mousedown", function() {
- stopBlink();
- ledOn();
- }).on("mouseup", function() {
- stopBlink();
- ledOff();
- });
-
- $("#push2").on("mousedown", function() {
- relayOn();
- }).on("mouseup", function() {
- relayOff();
- });
- });
-
-});
-
-
-var relayOn = function() {
- Coder.socketConnection.sendData( 'setrelay', {
- 'value': 1
- });
-};
-var relayOff = function() {
- Coder.socketConnection.sendData( 'setrelay', {
- 'value': 0
- });
-};
-
-// The "ledValue" variable lets us keep track of the LED's
-// current state. 1 is on, 0 is off.
-var ledValue = 0;
-
-// Send a "setled" message to the device with a value of 1 (on)
-var ledOn = function() {
- ledValue = 1;
- Coder.socketConnection.sendData( 'setled', {
- 'value': ledValue
- });
-};
-
-// Send a "setled" message to the device with a value of 0 (on)
-var ledOff = function() {
- ledValue = 0;
- Coder.socketConnection.sendData( 'setled', {
- 'value': ledValue
- });
-};
-
-// Switch the led state.
-// If it's on, turn it off. If it's off, turn it on.
-var ledToggle = function() {
- if ( ledValue === 1 ) {
- ledOff();
- } else {
- ledOn();
- }
-};
-
-var blinkEnabled = false;
-var startBlink = function() {
- blinkEnabled = true; // enables blinking in our interval timer (above)
- $("#blinkon").hide();
- $("#blinkoff").show();
-};
-var stopBlink = function() {
- blinkEnabled = false; // enables blinking in our interval timer (above)
- $("#blinkon").show();
- $("#blinkoff").hide();
-};
-
-
-// Append a new P tag to the #output DIV
-var addOutputMessage = function( text ) {
- var $output = $("#output");
- $output.append( $("").text( text ) );
- console.log( text );
-};
-
diff --git a/coder-apps/tests/relay_test/static/media/.gitignore b/coder-apps/tests/relay_test/static/media/.gitignore
deleted file mode 100644
index e69de29b..00000000
diff --git a/coder-apps/tests/relay_test/views/index.html b/coder-apps/tests/relay_test/views/index.html
deleted file mode 100644
index e4efedbd..00000000
--- a/coder-apps/tests/relay_test/views/index.html
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
-
- Coder
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
GPIO Test
-
-
BLINK
-
STOP BLINK
-
TOGGLE
-
PUSH
-
PUSH 2
-
HARDWARE PRESS
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/coder-apps/tests/socket_test/app/app.js b/coder-apps/tests/socket_test/app/app.js
deleted file mode 100644
index cdb4ffbe..00000000
--- a/coder-apps/tests/socket_test/app/app.js
+++ /dev/null
@@ -1,83 +0,0 @@
-exports.settings={};
-//These are dynamically updated by the runtime
-//settings.appname - the app id (folder) where your app is installed
-//settings.viewpath - prefix to where your view html files are located
-//settings.staticurl - base url path to static assets /static/apps/appname
-//settings.appurl - base url path to this app /app/appname
-//settings.device_name - name given to this coder by the user, Ie."Billy's Coder"
-//settings.coder_owner - name of the user, Ie. "Suzie Q."
-//settings.coder_color - hex css color given to this coder.
-
-exports.get_routes = [
- { path:'/', handler:'index_handler' },
-];
-
-exports.post_routes = [
-];
-
-exports.socketio_routes = [
- { key:'connect', handler:'on_socket_connect' },
- { key:'message', handler:'on_socket_message' }
-];
-
-
-var connections = {};
-
-exports.index_handler = function( req, res ) {
- var tmplvars = {};
- tmplvars['static_url'] = exports.settings.staticurl;
- tmplvars['app_name'] = exports.settings.appname;
- tmplvars['app_url'] = exports.settings.appurl;
- tmplvars['device_name'] = exports.settings.device_name;
-
- res.render( exports.settings.viewpath + '/index', tmplvars );
-};
-
-exports.on_socket_connect = function( socket, data ) {
- console.log( 'socket connect from ID: ' + socket.socketID );
- console.log( data );
-
- connections[socket.socketID] = {
- socket: socket,
- name: data.name,
- id: socket.socketID
- };
- socket.on('disconnect', function() {
- console.log( 'socket disconnect from ID: ' + socket.socketID );
- delete connections[socket.socketID];
- });
-
-};
-
-exports.on_socket_message = function( socket, data ) {
- console.log( 'socket message from: ' );
-
- console.log( socket.handshake.sessionID );
- var me = connections[data.id];
- if ( me ) {
- var updated = {};
- for ( var k in connections ) {
- console.log( connections[k].name );
-
- if ( !connections[k].socket.disconnected ) {
- updated[k] = connections[k];
- if ( connections[k] !== me ) {
- var s = connections[k].socket;
- s.emit('appdata', {
- key: 'message',
- data: {
- name: me.name,
- message: data.message
- }
- });
- }
- }
- }
- connections = updated;
- }
-
-};
-
-
-exports.on_destroy = function() {
-};
\ No newline at end of file
diff --git a/coder-apps/tests/socket_test/app/meta.json b/coder-apps/tests/socket_test/app/meta.json
deleted file mode 100644
index 022d7754..00000000
--- a/coder-apps/tests/socket_test/app/meta.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "created": "2013-11-30",
- "modified": "2013-12-03",
- "color": "#2ecc71",
- "author": "",
- "name": "Socket Test",
- "hidden": false
-}
\ No newline at end of file
diff --git a/coder-apps/tests/socket_test/static/css/index.css b/coder-apps/tests/socket_test/static/css/index.css
deleted file mode 100644
index 408ef623..00000000
--- a/coder-apps/tests/socket_test/static/css/index.css
+++ /dev/null
@@ -1,4 +0,0 @@
-
-.pagecontent {
- padding: 24px;
-}
\ No newline at end of file
diff --git a/coder-apps/tests/socket_test/static/js/index.js b/coder-apps/tests/socket_test/static/js/index.js
deleted file mode 100644
index 34cbb575..00000000
--- a/coder-apps/tests/socket_test/static/js/index.js
+++ /dev/null
@@ -1,26 +0,0 @@
-
-$(document).ready( function() {
-
- //This code will run after your page loads
- Coder.socketConnection.init(function(){
-
- addOutputMessage( "Connected with ID: " + Coder.socketConnection.socketID );
-
-
- Coder.socketConnection.sendData( 'connect', {'name':'testing'} );
-
- Coder.socketConnection.addListener( 'message', function( d ){
- console.log("message from: " + d.name + " : " + d.message);
- });
- });
-
- addOutputMessage( "Connecting... see the debug console for log messages." );
-
-});
-
-var addOutputMessage = function( text ) {
- var $output = $("#output");
- $output.prepend( $("").text( text ) );
- console.log( text );
-}
-
diff --git a/coder-apps/tests/socket_test/static/media/.gitignore b/coder-apps/tests/socket_test/static/media/.gitignore
deleted file mode 100644
index e69de29b..00000000
diff --git a/coder-apps/tests/socket_test/views/index.html b/coder-apps/tests/socket_test/views/index.html
deleted file mode 100644
index 7fab1e9e..00000000
--- a/coder-apps/tests/socket_test/views/index.html
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
- Coder
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Socket Test
-
-
-
-
-
-
\ No newline at end of file
diff --git a/coder-apps/tests/spi_test/app/app.js b/coder-apps/tests/spi_test/app/app.js
deleted file mode 100644
index 8da16d0b..00000000
--- a/coder-apps/tests/spi_test/app/app.js
+++ /dev/null
@@ -1,202 +0,0 @@
-var SPI = require('pi-spi');
-
-
-// The SPI linux device. Either /dev/spidev0.0 or /dev/spidev0.1
-var spidev = '/dev/spidev0.0';
-
-// The handle to the device driver
-var spiDevice = null;
-
-
-
-// A collection of all connected sockets.
-// Maps socketid => { socket: sockethandle, id: socketid }
-var connections = {};
-
-exports.settings={};
-//These are dynamically updated by the runtime
-//settings.appname - the app id (folder) where your app is installed
-//settings.viewpath - prefix to where your view html files are located
-//settings.staticurl - base url path to static assets /static/apps/appname
-//settings.appurl - base url path to this app /app/appname
-//settings.device_name - name given to this coder by the user, Ie."Billy's Coder"
-//settings.coder_owner - name of the user, Ie. "Suzie Q."
-//settings.coder_color - hex css color given to this coder.
-
-// Incoming get routes that our app knows how to respond to
-exports.get_routes = [
- { path:'/', handler:'index_handler' }, // Render out main html page
-];
-
-// Incoming post routes that our app knows how to respond to
-// (None in this example)
-exports.post_routes = [
-];
-
-// Incoming socket events that this module will expose.
-exports.socketio_routes = [
- { key:'connect', handler:'on_socket_connect' }, // sent by client once socket is loaded
-];
-
-
-
-//
-// Handles sending the HTML page to the browser
-//
-exports.index_handler = function( req, res ) {
- // Set up some template variables that are substituted in our HTML.
- // Look in the HTML head tag to see where these are inserted.
- var tmplvars = {};
- tmplvars['static_url'] = exports.settings.staticurl;
- tmplvars['app_name'] = exports.settings.appname;
- tmplvars['app_url'] = exports.settings.appurl;
- tmplvars['device_name'] = exports.settings.device_name;
-
- // Send the HTML document to the web browser.
- res.render( exports.settings.viewpath + '/index', tmplvars );
-};
-
-
-//
-// Respond to the "connect" message sent by a new socket client.
-//
-// We do two things here:
-// 1. save the socket object into the "connections" variable so we can talk to it later.
-// 2. initialize the SPI device if this is the first time a socket has connected.
-//
-exports.on_socket_connect = function( socket, data ) {
- console.log( 'socket connect from ID: ' + socket.socketID );
- console.log( data );
-
- // Enable the SPI device if this is the first connection
- if ( Object.keys( connections ).length <= 0 ) {
- enableSPI();
- }
-
- // Store information about this socket so we can communicate with
- // all connected sockets in the future.
- connections[socket.socketID] = {
- socket: socket,
- id: socket.socketID
- };
-
- // Watch for this socket to disconnect so that we can remove it from
- // our collection of connected sockets.
- socket.on('disconnect', function() {
- console.log( 'socket disconnect from ID: ' + socket.socketID );
- delete connections[socket.socketID];
-
- //Free up the GPIO when the last socket disconnects
- if ( Object.keys( connections ).length <= 0 ) {
- disableSPI();
- connected = false;
- spiDevice = null;
- }
- });
-
-};
-
-
-
-
-
-//
-// This is called once from our first socket connection.
-// - set up the SPI device
-// - read input from the device and send spiupdate events
-//
-var updateInterval;
-var enableSPI = function() {
-
- // Set up the SPI device
- console.log("Setting up SPI on " + spidev );
- spiDevice = SPI.initialize( spidev );
-
-
- //Poll the device for updates once a second.
- updateInterval = setInterval( readADCData, 1000 );
-
-
-};
-
-//
-// This is called when the last socket disconnects.
-// It releases our GPIO pins so they can be used by another program.
-//
-var disableSPI = function() {
-
- console.log("Disabling SPI device" + spidev );
-
- clearInterval( updateInterval );
- spiDevice.close();
-
-};
-
-var toBin = function( d ) {
- return ("00000000" + d.toString(2)).substr( -8 );
-};
-
-//
-// Reads channel 0 analog value from an MCP3008 ADC chip
-//
-var readADCData = function() {
- // Recall that this code is running on the device. We need to send a
- // socket message with the data to our javascript in the
- // web browser. In fact, we need to send this data to every connected
- // socket, since there may be more than one browser window looking at
- // this page.
-
- // The message used to tell an MCP3008 ADC chip to return the
- // analog reading of channel 0;
- var channel = 0;
- var message = new Buffer([1, (8+channel)<<4, 0]);
-
- spiDevice.transfer( message, message.length, function( error, data ) {
- if ( error ) {
- console.log( "read error " + error );
- } else {
-
- //last 2 bits of 2nd byte, shifted left 8 bits, added to all 8 bits of third byte = 10 data bits.
- var val = ((data[1]&3) << 8) + data[2];
- //val = data[2];
- console.log( "raw data: " + toBin( data[0] ) + " " + toBin( data[1] ) + " " + toBin( data[2] ) );
- //console.log( "value: " + val );
-
- // Iterate through all of our socket connections
- for ( var socketid in connections ) {
- // Get the socket object for this socket
- var socket = connections[socketid].socket;
-
- // The "appdata" event will be received by the Coder.socketConnection
- // object in the front end code and sent to the appropriate listener
- // that we've defined.
- // The "analogdata" key refers to a listener we set up on the front
- // end with the code:
- // Coder.socketConnection.addListener( "analogdata", function... )
- socket.emit( "appdata", {
- key: "analogdata",
- data: val
- });
- }
-
-
- }
- });
-
-};
-
-
-//
-// Called by Coder whenever this module is reloaded. This usually happens when
-// you save your code in the editor. This is a good place to destroy any intervals
-// or clean up any long running code or handles.
-//
-exports.on_destroy = function() {
- if ( spiDevice !== null ) {
- disableSPI();
- }
-
-};
-
-
-
diff --git a/coder-apps/tests/spi_test/app/meta.json b/coder-apps/tests/spi_test/app/meta.json
deleted file mode 100644
index ab803eca..00000000
--- a/coder-apps/tests/spi_test/app/meta.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "created": "2013-11-30",
- "modified": "2014-04-02",
- "color": "#2ecc71",
- "author": "",
- "name": "SPI Test",
- "hidden": false
-}
\ No newline at end of file
diff --git a/coder-apps/tests/spi_test/static/css/index.css b/coder-apps/tests/spi_test/static/css/index.css
deleted file mode 100644
index e00b9e26..00000000
--- a/coder-apps/tests/spi_test/static/css/index.css
+++ /dev/null
@@ -1,65 +0,0 @@
-
-.pagecontent {
- padding: 24px;
- min-width: 880px;
-}
-
-.buttons {
- float: left;
- width: 240px;
-}
-.diagram {
- width: 640px;
- float: left;
- padding-bottom: 100px;
-}
-.clear {
- clear: both;
-}
-
-.reading {
- margin-top: 20px;
-}
-
-#buttonval {
- width: 200px;
- height: 150px;
- margin: 24px 0;
- color: #fff;
- background-color: #000000;
- text-align: center;
- font-weight: bold;
- line-height: 150px;
-}
-#buttonval.on {
- background-color: #F03050;
-}
-
-
-.button {
- cursor: pointer;
- width: 200px;
- height: 150px;
- margin: 24px 0;
- background-color: #3498D8;
- line-height: 150px;
- text-align: center;
- color: #fff;
- font-weight: bold;
-}
-
-.button.press {
- background-color: #2488A8;
-}
-
-
-#output {
- position: fixed;
- left:0;
- right:0;
- bottom:0;
- height: 100px;
- color: #fff;
- background-color: #000;
- overflow: hidden;
-}
\ No newline at end of file
diff --git a/coder-apps/tests/spi_test/static/js/index.js b/coder-apps/tests/spi_test/static/js/index.js
deleted file mode 100644
index bd125ef6..00000000
--- a/coder-apps/tests/spi_test/static/js/index.js
+++ /dev/null
@@ -1,61 +0,0 @@
-///////////////////////
-// SPI Test
-// Sample code to interact with Raspberry Pi hardware, talk to an
-// MCP3008 ADC chip and return the analog value of channel 0.
-//
-// This part of the code runs in your web browser. It's responsible
-// for handling user input from the web browser, sending commands
-// to the Raspberry Pi, and listening for updates that the device
-// sends back.
-//
-// The code here communicates with another program that runs directly
-// on the Pi (not in your browser). That device-side code can be found
-// in the Node tab.
-////////////////////////
-
-$(document).ready( function() {
-
- // Connection can take a second. Let the user know what's happening.
- addOutputMessage( "Connecting... see the debug console for log messages." );
-
- // This establishes a socket connection to the Coder device. A
- // socket conection stays open while the user is viewing this page,
- // which allows us to send a receive data very quickly from the device
- // instead of checking for updates multiple times a second.
- //
- // Coder.socketConnection.init takes a callback function that will
- // be executed once the connection is established. Anything that
- // requires an established connection in order to function
- // correctly should be placed in here.
- Coder.socketConnection.init(function(){
-
- // Each connection gets a unique ID.
- addOutputMessage( "Connected with ID: " + Coder.socketConnection.socketID );
-
- // Send a "connect" message to our Node page when we first connect.
- Coder.socketConnection.sendData( 'connect', {} );
-
-
-
- Coder.socketConnection.addListener( 'analogdata', function( d ){
- console.log("analog value: " + d);
- $('#analogdata').text( d );
- //addOutputMessage( "Analog value: " + d );
- });
-
-
-
- });
-
-});
-
-
-
-
-// Append a new P tag to the #output DIV
-var addOutputMessage = function( text ) {
- var $output = $("#output");
- $output.append( $("").text( text ) );
- console.log( text );
-};
-
diff --git a/coder-apps/tests/spi_test/static/media/.gitignore b/coder-apps/tests/spi_test/static/media/.gitignore
deleted file mode 100644
index e69de29b..00000000
diff --git a/coder-apps/tests/spi_test/views/index.html b/coder-apps/tests/spi_test/views/index.html
deleted file mode 100644
index c3bbb41a..00000000
--- a/coder-apps/tests/spi_test/views/index.html
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
- Coder
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-