├── .gitignore ├── .iex.exs ├── Procfile ├── README.md ├── brunch-config.js ├── config ├── config.exs ├── dev.exs ├── prod.exs └── test.exs ├── elixir_buildpack.config ├── lib ├── elixir_letters.ex └── elixir_letters │ ├── endpoint.ex │ ├── letters.ex │ ├── repo.ex │ ├── room.ex │ └── room_sup.ex ├── mix.exs ├── mix.lock ├── package.json ├── phoenix_static_buildpack.config ├── priv ├── repo │ └── migrations │ │ ├── 20150809194921_create_snapshot.exs │ │ └── 20150929211004_add_room_name_to_snapshots.exs └── static │ ├── css │ ├── app-4c9251fbb2090360d151782439dadfca.css │ ├── app-4c9251fbb2090360d151782439dadfca.css.gz │ ├── app-c7c74e2693a7fdf12a0b132861756f45.css │ ├── app-c7c74e2693a7fdf12a0b132861756f45.css.gz │ ├── app.css │ ├── app.css-3ff3fa2b37e68a9f85269ecab37fab8b.map │ ├── app.css-3ff3fa2b37e68a9f85269ecab37fab8b.map.gz │ ├── app.css-6a793b5ca11150d2748aee3397be4e22.map │ ├── app.css-6a793b5ca11150d2748aee3397be4e22.map.gz │ ├── app.css.gz │ ├── app.css.map │ ├── app.css.map.gz │ ├── vendor-b50703bbe05021c0cbd4b43eab0ca76b.css │ ├── vendor-b50703bbe05021c0cbd4b43eab0ca76b.css.gz │ ├── vendor.css │ ├── vendor.css-0b5dfcd1aa887a16f157735f5fb4e3ce.map │ ├── vendor.css-0b5dfcd1aa887a16f157735f5fb4e3ce.map.gz │ ├── vendor.css.gz │ ├── vendor.css.map │ └── vendor.css.map.gz │ ├── fonts │ ├── RoundsBlack_gdi-0006787ab426276d98b0c12233ee374e.woff │ ├── RoundsBlack_gdi-0006787ab426276d98b0c12233ee374e.woff.gz │ ├── RoundsBlack_gdi-2e88cd81dc73ecd954ad05c079570851.ttf │ ├── RoundsBlack_gdi-2e88cd81dc73ecd954ad05c079570851.ttf.gz │ ├── RoundsBlack_gdi-47266a92bad966a13348673628b2b76b.eot │ ├── RoundsBlack_gdi-47266a92bad966a13348673628b2b76b.eot.gz │ ├── RoundsBlack_gdi-6455bcca7994c1d529412120500242af.svg │ ├── RoundsBlack_gdi-6455bcca7994c1d529412120500242af.svg.gz │ ├── RoundsBlack_gdi.eot │ ├── RoundsBlack_gdi.eot.gz │ ├── RoundsBlack_gdi.svg │ ├── RoundsBlack_gdi.svg.gz │ ├── RoundsBlack_gdi.ttf │ ├── RoundsBlack_gdi.ttf.gz │ ├── RoundsBlack_gdi.woff │ ├── RoundsBlack_gdi.woff.gz │ ├── alphafridgemagnets-webfont-41515356dd5fbc51f9a048077eb47a0e.eot │ ├── alphafridgemagnets-webfont-41515356dd5fbc51f9a048077eb47a0e.eot.gz │ ├── alphafridgemagnets-webfont-593726dee4d57f008475da596f0e023b.woff │ ├── alphafridgemagnets-webfont-593726dee4d57f008475da596f0e023b.woff.gz │ ├── alphafridgemagnets-webfont-73d9f5706bf2a385d986cd36562c5a4f.svg │ ├── alphafridgemagnets-webfont-73d9f5706bf2a385d986cd36562c5a4f.svg.gz │ ├── alphafridgemagnets-webfont-a4395aa88a24ae40edae68339c6aa526.woff2 │ ├── alphafridgemagnets-webfont-a4395aa88a24ae40edae68339c6aa526.woff2.gz │ ├── alphafridgemagnets-webfont-ac8b3e8fffce73c123a89f12b5e4ce41.ttf │ ├── alphafridgemagnets-webfont-ac8b3e8fffce73c123a89f12b5e4ce41.ttf.gz │ ├── alphafridgemagnets-webfont.eot │ ├── alphafridgemagnets-webfont.eot.gz │ ├── alphafridgemagnets-webfont.svg │ ├── alphafridgemagnets-webfont.svg.gz │ ├── alphafridgemagnets-webfont.ttf │ ├── alphafridgemagnets-webfont.ttf.gz │ ├── alphafridgemagnets-webfont.woff │ ├── alphafridgemagnets-webfont.woff.gz │ ├── alphafridgemagnets-webfont.woff2 │ ├── alphafridgemagnets-webfont.woff2.gz │ ├── gaban-outline-regular-FFP-3281fd5687786dce14ae439207aae32e.ttf │ ├── gaban-outline-regular-FFP-3281fd5687786dce14ae439207aae32e.ttf.gz │ ├── gaban-outline-regular-FFP.ttf │ ├── gaban-outline-regular-FFP.ttf.gz │ ├── glyphicons-halflings-regular-448c34a56d699c29117adc64c43affeb.woff2 │ ├── glyphicons-halflings-regular-448c34a56d699c29117adc64c43affeb.woff2.gz │ ├── glyphicons-halflings-regular-89889688147bd7575d6327160d64e760.svg │ ├── glyphicons-halflings-regular-89889688147bd7575d6327160d64e760.svg.gz │ ├── glyphicons-halflings-regular-e18bbf611f2a2e43afc071aa2f4e1512.ttf │ ├── glyphicons-halflings-regular-e18bbf611f2a2e43afc071aa2f4e1512.ttf.gz │ ├── glyphicons-halflings-regular-f4769f9bdb7466be65088239c12046d1.eot │ ├── glyphicons-halflings-regular-f4769f9bdb7466be65088239c12046d1.eot.gz │ ├── glyphicons-halflings-regular-fa2772327f55d8198301fdb8bcfc8158.woff │ ├── glyphicons-halflings-regular-fa2772327f55d8198301fdb8bcfc8158.woff.gz │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.eot.gz │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.svg.gz │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.ttf.gz │ ├── glyphicons-halflings-regular.woff │ ├── glyphicons-halflings-regular.woff.gz │ ├── glyphicons-halflings-regular.woff2 │ ├── glyphicons-halflings-regular.woff2.gz │ ├── rounds_black-webfont-143e7a8c74255099e3cee136a389f061.svg │ ├── rounds_black-webfont-143e7a8c74255099e3cee136a389f061.svg.gz │ ├── rounds_black-webfont-385cf2a10dd587af78bbbeccf2055dab.woff │ ├── rounds_black-webfont-385cf2a10dd587af78bbbeccf2055dab.woff.gz │ ├── rounds_black-webfont-434521913bd01af0a94cb2ee93991612.ttf │ ├── rounds_black-webfont-434521913bd01af0a94cb2ee93991612.ttf.gz │ ├── rounds_black-webfont-4989a9119f46224f156b9ff0261b27f9.eot │ ├── rounds_black-webfont-4989a9119f46224f156b9ff0261b27f9.eot.gz │ ├── rounds_black-webfont-6421189d8d08faf98bbf37c1093f5e9d.woff2 │ ├── rounds_black-webfont-6421189d8d08faf98bbf37c1093f5e9d.woff2.gz │ ├── rounds_black-webfont.eot │ ├── rounds_black-webfont.eot.gz │ ├── rounds_black-webfont.svg │ ├── rounds_black-webfont.svg.gz │ ├── rounds_black-webfont.ttf │ ├── rounds_black-webfont.ttf.gz │ ├── rounds_black-webfont.woff │ ├── rounds_black-webfont.woff.gz │ ├── rounds_black-webfont.woff2 │ └── rounds_black-webfont.woff2.gz │ ├── images │ ├── Blank_Scrabble_board_with_coordinates.svg-d5f6f986f3f1a8d2880ae9b004261c5b.png │ ├── Blank_Scrabble_board_with_coordinates.svg-d5f6f986f3f1a8d2880ae9b004261c5b.png.gz │ ├── Blank_Scrabble_board_with_coordinates.svg.png │ ├── Blank_Scrabble_board_with_coordinates.svg.png.gz │ ├── Edit fiddle - JSFiddle-3feee48ffe7bdc36e985ca7528fae208.html │ ├── Edit fiddle - JSFiddle-3feee48ffe7bdc36e985ca7528fae208.html.gz │ ├── Edit fiddle - JSFiddle.html │ ├── Edit fiddle - JSFiddle.html.gz │ ├── Edit fiddle - JSFiddle_files │ │ ├── Actions-3ae4e3276bf2d8f1bbb61fbe83cd0ba8.js │ │ ├── Actions-3ae4e3276bf2d8f1bbb61fbe83cd0ba8.js.gz │ │ ├── Actions.js │ │ ├── Actions.js.gz │ │ ├── EditorCM-07fbb8fc7fd9a737772e540443e753ba.js │ │ ├── EditorCM-07fbb8fc7fd9a737772e540443e753ba.js.gz │ │ ├── EditorCM.js │ │ ├── EditorCM.js.gz │ │ ├── LayoutCM-cd2373fd03e7f3d9203bd23664a2d9d3.js │ │ ├── LayoutCM-cd2373fd03e7f3d9203bd23664a2d9d3.js.gz │ │ ├── LayoutCM.js │ │ ├── LayoutCM.js.gz │ │ ├── Resources-271921c16457fd619a4e824b85bb3dea.js │ │ ├── Resources-271921c16457fd619a4e824b85bb3dea.js.gz │ │ ├── Resources.js │ │ ├── Resources.js.gz │ │ ├── Settings-58fe0412f4098d0afe853949a44ea8ac.js │ │ ├── Settings-58fe0412f4098d0afe853949a44ea8ac.js.gz │ │ ├── Settings.js │ │ ├── Settings.js.gz │ │ ├── Sidebar-e82c2ea250e964d7d1d8fa8523f9a083.js │ │ ├── Sidebar-e82c2ea250e964d7d1d8fa8523f9a083.js.gz │ │ ├── Sidebar.js │ │ ├── Sidebar.js.gz │ │ ├── analytics-eed8ec65a6dd9b05eed6d4a02e1439e4.js │ │ ├── analytics-eed8ec65a6dd9b05eed6d4a02e1439e4.js.gz │ │ ├── analytics.js │ │ ├── analytics.js.gz │ │ ├── beautifier-ca2ebb3bbc7de40dca10d6301b6c92a6.js │ │ ├── beautifier-ca2ebb3bbc7de40dca10d6301b6c92a6.js.gz │ │ ├── beautifier.js │ │ ├── beautifier.js.gz │ │ ├── codemirror-e27f8ffe66c50de28b57fef7622cacc5.css │ │ ├── codemirror-e27f8ffe66c50de28b57fef7622cacc5.css.gz │ │ ├── codemirror-e3378a506088e40a05be4d6a7607f264.js │ │ ├── codemirror-e3378a506088e40a05be4d6a7607f264.js.gz │ │ ├── codemirror.css │ │ ├── codemirror.css.gz │ │ ├── codemirror.js │ │ ├── codemirror.js.gz │ │ ├── coffeescript-0e5610e38633c1b9932d6b72949d7510.js │ │ ├── coffeescript-0e5610e38633c1b9932d6b72949d7510.js.gz │ │ ├── coffeescript.js │ │ ├── coffeescript.js.gz │ │ ├── css-b68d20ce073c2a809415d5e3ea6c9c84.js │ │ ├── css-b68d20ce073c2a809415d5e3ea6c9c84.js.gz │ │ ├── css.js │ │ ├── css.js.gz │ │ ├── elusive-webfont-35d1310760ca59973d80eecbe0312f89.css │ │ ├── elusive-webfont-35d1310760ca59973d80eecbe0312f89.css.gz │ │ ├── elusive-webfont.css │ │ ├── elusive-webfont.css.gz │ │ ├── emmet-ceb830bbdfe3bc6723f9ce17f5e537fe.js │ │ ├── emmet-ceb830bbdfe3bc6723f9ce17f5e537fe.js.gz │ │ ├── emmet.js │ │ ├── emmet.js.gz │ │ ├── heyoffline-663b125a188e7236f87ddac9ce1895e0.js │ │ ├── heyoffline-663b125a188e7236f87ddac9ce1895e0.js.gz │ │ ├── heyoffline.js │ │ ├── heyoffline.js.gz │ │ ├── htmlmixed-4c7ab27882547c9075bc3a92c6278fbb.js │ │ ├── htmlmixed-4c7ab27882547c9075bc3a92c6278fbb.js.gz │ │ ├── htmlmixed.js │ │ ├── htmlmixed.js.gz │ │ ├── javascript-51b0e74a915e10ed9498e6b0035ae4b3.js │ │ ├── javascript-51b0e74a915e10ed9498e6b0035ae4b3.js.gz │ │ ├── javascript-hint-8febf4d6664e133fac9da1da672564cd.js │ │ ├── javascript-hint-8febf4d6664e133fac9da1da672564cd.js.gz │ │ ├── javascript-hint.js │ │ ├── javascript-hint.js.gz │ │ ├── javascript.js │ │ ├── javascript.js.gz │ │ ├── jshint-6f67c07133fa77d2c0056ee78b33b2cf.js │ │ ├── jshint-6f67c07133fa77d2c0056ee78b33b2cf.js.gz │ │ ├── jshint.js │ │ ├── jshint.js.gz │ │ ├── light-d41d8cd98f00b204e9800998ecf8427e.css │ │ ├── light-d41d8cd98f00b204e9800998ecf8427e.css.gz │ │ ├── light.css │ │ ├── light.css.gz │ │ ├── matchbrackets-94c58e98823144e56932aa2611c51dff.js │ │ ├── matchbrackets-94c58e98823144e56932aa2611c51dff.js.gz │ │ ├── matchbrackets.js │ │ ├── matchbrackets.js.gz │ │ ├── moo-clientcide-1.3-eb46433f6a58d241c2b11918c5763601.js │ │ ├── moo-clientcide-1.3-eb46433f6a58d241c2b11918c5763601.js.gz │ │ ├── moo-clientcide-1.3.js │ │ ├── moo-clientcide-1.3.js.gz │ │ ├── normalize-d5e58d529ce7268a69faef1263270dae.css │ │ ├── normalize-d5e58d529ce7268a69faef1263270dae.css.gz │ │ ├── normalize.css │ │ ├── normalize.css.gz │ │ ├── prum.min-e3bf3eab2507e6f346de8e47443860d4.js │ │ ├── prum.min-e3bf3eab2507e6f346de8e47443860d4.js.gz │ │ ├── prum.min.js │ │ ├── prum.min.js.gz │ │ ├── screen-c4850dab6ecde70112551f9d30389e15.css │ │ ├── screen-c4850dab6ecde70112551f9d30389e15.css.gz │ │ ├── screen.css │ │ ├── screen.css.gz │ │ ├── searchcursor-a11e9186f471515209a5583f1af6421c.js │ │ ├── searchcursor-a11e9186f471515209a5583f1af6421c.js.gz │ │ ├── searchcursor.js │ │ ├── searchcursor.js.gz │ │ ├── show-hint-4f4de813619905938fb0014ad7e012c5.js │ │ ├── show-hint-4f4de813619905938fb0014ad7e012c5.js.gz │ │ ├── show-hint-630e320a614e7732f6ce1bf37147f27f.css │ │ ├── show-hint-630e320a614e7732f6ce1bf37147f27f.css.gz │ │ ├── show-hint.css │ │ ├── show-hint.css.gz │ │ ├── show-hint.js │ │ ├── show-hint.js.gz │ │ ├── tricks-0b35e0a5dae0760c36d89d1f4a285956.css │ │ ├── tricks-0b35e0a5dae0760c36d89d1f4a285956.css.gz │ │ ├── tricks.css │ │ ├── tricks.css.gz │ │ ├── wafdmsew │ │ ├── wafdmsew-fac6b647ee69375abc3e60d86619533f │ │ ├── wafdmsew-fac6b647ee69375abc3e60d86619533f.gz │ │ ├── wafdmsew.gz │ │ ├── xml-d8d7848554564a632f0147cf566acbce.js │ │ ├── xml-d8d7848554564a632f0147cf566acbce.js.gz │ │ ├── xml.js │ │ └── xml.js.gz │ ├── background-660b8233d0b81f85336eaf4ccb88d1f0.jpg │ ├── background-660b8233d0b81f85336eaf4ccb88d1f0.jpg.gz │ ├── background.jpg │ ├── background.jpg.gz │ ├── blank_tile-c9f83ba339cc09c1d7a8f574c977bf84.jpg │ ├── blank_tile-c9f83ba339cc09c1d7a8f574c977bf84.jpg.gz │ ├── blank_tile.jpg │ ├── blank_tile.jpg.gz │ ├── cursor-05b42b95ba4805ed3ef738cc00050454.png │ ├── cursor-05b42b95ba4805ed3ef738cc00050454.png.gz │ ├── cursor-hand-d736bb826986018683064cbdd0de83bc.svg │ ├── cursor-hand-d736bb826986018683064cbdd0de83bc.svg.gz │ ├── cursor-hand-white-dea71f978bfe71c7bc1e356672e6871d.svg │ ├── cursor-hand-white-dea71f978bfe71c7bc1e356672e6871d.svg.gz │ ├── cursor-hand-white.svg │ ├── cursor-hand-white.svg.gz │ ├── cursor-hand.svg │ ├── cursor-hand.svg.gz │ ├── cursor.png │ ├── cursor.png.gz │ ├── elixir-e88d4a4cb965e3ba33767a67c87cbad8.svg │ ├── elixir-e88d4a4cb965e3ba33767a67c87cbad8.svg.gz │ ├── elixir.svg │ ├── elixir.svg.gz │ ├── favicon-a8ca4e3a2bb8fea46a9ee9e102e7d3eb.ico │ ├── favicon-a8ca4e3a2bb8fea46a9ee9e102e7d3eb.ico.gz │ ├── favicon.ico │ ├── favicon.ico.gz │ ├── initializing@2x-d4f5dc2fdd3c8746a0c9d7e60f5882bc.png │ ├── initializing@2x-d4f5dc2fdd3c8746a0c9d7e60f5882bc.png.gz │ ├── initializing@2x.png │ ├── initializing@2x.png.gz │ ├── lec-cf8ac7f7c006d0b9fe8210d9e1ccca59.jpg │ ├── lec-cf8ac7f7c006d0b9fe8210d9e1ccca59.jpg.gz │ ├── lec.jpg │ ├── lec.jpg.gz │ ├── mouse-pointer-9de44e398c4b988bea6d9042a50f7a5c.svg │ ├── mouse-pointer-9de44e398c4b988bea6d9042a50f7a5c.svg.gz │ ├── mouse-pointer.svg │ ├── mouse-pointer.svg.gz │ ├── phoenix-5bd99a0d17dd41bc9d9bf6840abcc089.png │ ├── phoenix-5bd99a0d17dd41bc9d9bf6840abcc089.png.gz │ ├── phoenix.png │ ├── phoenix.png.gz │ ├── samsung-dacd62f757899374440478886af75e25.jpg │ ├── samsung-dacd62f757899374440478886af75e25.jpg.gz │ ├── samsung.jpg │ ├── samsung.jpg.gz │ ├── samsung2-06ca2713e0dfb5e69065bb61af72f113.jpg │ ├── samsung2-06ca2713e0dfb5e69065bb61af72f113.jpg.gz │ ├── samsung2.jpg │ ├── samsung2.jpg.gz │ ├── scrabble_board-d5f6f986f3f1a8d2880ae9b004261c5b.png │ ├── scrabble_board-d5f6f986f3f1a8d2880ae9b004261c5b.png.gz │ ├── scrabble_board.png │ ├── scrabble_board.png.gz │ ├── scrabble_tiles-c5182c2fa39d2c51afe824a6ba7fb51c.jpg │ ├── scrabble_tiles-c5182c2fa39d2c51afe824a6ba7fb51c.jpg.gz │ ├── scrabble_tiles.jpg │ ├── scrabble_tiles.jpg.gz │ ├── servis-221c6fdf1f18cb85c3e2da557b2f8702.jpg │ ├── servis-221c6fdf1f18cb85c3e2da557b2f8702.jpg.gz │ ├── servis.jpg │ ├── servis.jpg.gz │ ├── smeg-0640013cacb4a99a63a37ca9424d863f.jpeg │ ├── smeg-0640013cacb4a99a63a37ca9424d863f.jpeg.gz │ ├── smeg.jpeg │ ├── smeg.jpeg.gz │ ├── textDemoBG-d176f555dc0aa8596542255fa8a46b28.jpg │ ├── textDemoBG-d176f555dc0aa8596542255fa8a46b28.jpg.gz │ ├── textDemoBG.jpg │ ├── textDemoBG.jpg.gz │ ├── vector-cursor-hand-faba341010cf762230caa47dec8a689d.svg │ ├── vector-cursor-hand-faba341010cf762230caa47dec8a689d.svg.gz │ ├── vector-cursor-hand.svg │ └── vector-cursor-hand.svg.gz │ ├── js │ ├── app-f8111c3e3004fc85dc85f2809500e666.js │ ├── app-f8111c3e3004fc85dc85f2809500e666.js.gz │ ├── app-fc2a8774ac848c897fe8cb878e6803f8.js │ ├── app-fc2a8774ac848c897fe8cb878e6803f8.js.gz │ ├── app.js │ ├── app.js-3783bdfea9e7beece1097016671327a7.map │ ├── app.js-3783bdfea9e7beece1097016671327a7.map.gz │ ├── app.js-e13e9cf5999eb0a14093c7dec2be0450.map │ ├── app.js-e13e9cf5999eb0a14093c7dec2be0450.map.gz │ ├── app.js.gz │ ├── app.js.map │ ├── app.js.map.gz │ ├── vendor-7c4eb1f2a9f4c4d0f31e0e12589b909b.js │ ├── vendor-7c4eb1f2a9f4c4d0f31e0e12589b909b.js.gz │ ├── vendor-cf11df6212f88e58f11555afbfab7cc0.js │ ├── vendor-cf11df6212f88e58f11555afbfab7cc0.js.gz │ ├── vendor.js │ ├── vendor.js-d1d692d95ebc9ddb674e024d4c1e0a6e.map │ ├── vendor.js-d1d692d95ebc9ddb674e024d4c1e0a6e.map.gz │ ├── vendor.js-dc5cd0e7f8927144a2a28c29c7a6ebc8.map │ ├── vendor.js-dc5cd0e7f8927144a2a28c29c7a6ebc8.map.gz │ ├── vendor.js.gz │ ├── vendor.js.map │ └── vendor.js.map.gz │ ├── manifest.json │ ├── robots-067185ba27a5d9139b10a759679045bf.txt │ ├── robots-067185ba27a5d9139b10a759679045bf.txt.gz │ ├── robots.txt │ └── robots.txt.gz ├── test ├── channels │ └── room_channel_test.exs ├── controllers │ └── page_controller_test.exs ├── support │ ├── channel_case.ex │ ├── conn_case.ex │ └── model_case.ex ├── test_helper.exs └── views │ ├── error_view_test.exs │ ├── layout_view_test.exs │ └── page_view_test.exs └── web ├── channels ├── room_channel.ex └── user_socket.ex ├── controllers └── page_controller.ex ├── models └── snapshot.ex ├── router.ex ├── static ├── assets │ ├── fonts │ │ ├── alphafridgemagnets-webfont.eot │ │ ├── alphafridgemagnets-webfont.svg │ │ ├── alphafridgemagnets-webfont.ttf │ │ ├── alphafridgemagnets-webfont.woff │ │ ├── alphafridgemagnets-webfont.woff2 │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ ├── glyphicons-halflings-regular.woff2 │ │ ├── rounds_black-webfont.eot │ │ ├── rounds_black-webfont.svg │ │ ├── rounds_black-webfont.ttf │ │ ├── rounds_black-webfont.woff │ │ └── rounds_black-webfont.woff2 │ ├── images │ │ ├── background.jpg │ │ ├── blank_tile.jpg │ │ ├── cursor-hand-white.svg │ │ ├── cursor-hand.svg │ │ ├── elixir.svg │ │ ├── favicon.ico │ │ ├── lec.jpg │ │ ├── phoenix.png │ │ ├── samsung.jpg │ │ ├── samsung2.jpg │ │ ├── scrabble_board.png │ │ ├── scrabble_tiles.jpg │ │ ├── servis.jpg │ │ └── smeg.jpeg │ └── robots.txt ├── css │ └── app.scss ├── js │ └── app.js └── vendor │ ├── css │ ├── bootstrap-theme.css │ ├── bootstrap-theme.css.map │ ├── bootstrap-theme.min.css │ ├── bootstrap.css │ ├── bootstrap.css.map │ ├── bootstrap.min.css │ └── jquery-ui.min.css │ └── js │ ├── bootstrap.js │ ├── bootstrap.min.js │ ├── jquery-ui.js │ ├── jquery.cookie.js │ ├── jquery.min.js │ ├── jquery.ui.touch-punch.min.js │ ├── phoenix.js │ ├── pixi.min.js │ ├── pixi.min.js.map │ └── webfont.js ├── templates ├── layout │ └── app.html.eex └── page │ └── index.html.eex ├── views ├── error_view.ex ├── layout_view.ex └── page_view.ex └── web.ex /.gitignore: -------------------------------------------------------------------------------- 1 | # App artifacts 2 | /_build 3 | /db 4 | /deps 5 | /*.ez 6 | 7 | # Generate on crash by the VM 8 | erl_crash.dump 9 | 10 | # Static artifacts 11 | /node_modules 12 | 13 | # Since we are building assets from web/static, 14 | # we ignore priv/static. You may want to comment 15 | # this depending on your deployment strategy. 16 | # /priv/static/ 17 | -------------------------------------------------------------------------------- /.iex.exs: -------------------------------------------------------------------------------- 1 | alias ElixirLetters.{Letters,Room,RoomSupervisor} 2 | -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | web: mix phoenix.server 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ElixirLetters 2 | 3 | To start your new Phoenix application: 4 | 5 | 1. Install dependencies with `mix deps.get` 6 | 2. Start Phoenix endpoint with `mix phoenix.server` 7 | 8 | Now you can visit [`localhost:4000`](http://localhost:4000) from your browser. 9 | -------------------------------------------------------------------------------- /brunch-config.js: -------------------------------------------------------------------------------- 1 | exports.config = { 2 | // See http://brunch.io/#documentation for docs. 3 | files: { 4 | javascripts: { 5 | // joinTo: 'js/app.js' 6 | // To use a separate vendor.js bundle, specify two files path 7 | // https://github.com/brunch/brunch/blob/stable/docs/config.md#files 8 | joinTo: { 9 | 'js/app.js': /^(web\/static\/js)/, 10 | 'js/vendor.js': /^(web\/static\/vendor\/js)/ 11 | }, 12 | // 13 | // To change the order of concatenation of files, explictly mention here 14 | // https://github.com/brunch/brunch/tree/master/docs#concatenation 15 | order: { 16 | before: [ 17 | 'web/static/vendor/js/jquery.min.js', 18 | 'web/static/vendor/js/jquery-ui.js', 19 | // 'web/static/vendor/js/bootstrap.min.js' 20 | ] 21 | } 22 | }, 23 | stylesheets: { 24 | joinTo: { 25 | 'css/app.css': /^(web\/static\/css)/, 26 | 'css/vendor.css': /^(web\/static\/vendor\/css)/ 27 | } 28 | }, 29 | templates: { 30 | joinTo: 'js/app.js' 31 | } 32 | }, 33 | 34 | conventions: { 35 | // This option sets where we should place non-css and non-js assets in. 36 | // By default, we set this to '/web/static/assets'. Files in this directory 37 | // will be copied to `paths.public`, which is "priv/static" by default. 38 | assets: /^(web\/static\/assets)/ 39 | }, 40 | 41 | // Phoenix paths configuration 42 | paths: { 43 | // Which directories to watch 44 | watched: ["web/static", "test/static"], 45 | 46 | // Where to compile files to 47 | public: "priv/static" 48 | }, 49 | 50 | // Configure your plugins 51 | plugins: { 52 | babel: { 53 | // Do not use ES6 compiler in vendor code 54 | ignore: [/^(web\/static\/vendor)/] 55 | } 56 | }, 57 | npm: { 58 | enabled: true 59 | } 60 | }; 61 | -------------------------------------------------------------------------------- /config/config.exs: -------------------------------------------------------------------------------- 1 | # This file is responsible for configuring your application 2 | # and its dependencies with the aid of the Mix.Config module. 3 | # 4 | # This configuration file is loaded before any dependency and 5 | # is restricted to this project. 6 | use Mix.Config 7 | 8 | # Configures the endpoint 9 | config :elixir_letters, ElixirLetters.Endpoint, 10 | url: [host: "localhost"], 11 | root: Path.dirname(__DIR__), 12 | secret_key_base: System.get_env("SECRET_KEY_BASE"), 13 | render_errors: [default_format: "html"], 14 | pubsub: [name: ElixirLetters.PubSub, 15 | adapter: Phoenix.PubSub.PG2] 16 | 17 | # Configures Elixir's Logger 18 | config :logger, :console, 19 | format: "$time $metadata[$level] $message\n", 20 | metadata: [:request_id] 21 | 22 | # Import environment specific config. This must remain at the bottom 23 | # of this file so it overrides the configuration defined above. 24 | import_config "#{Mix.env}.exs" 25 | -------------------------------------------------------------------------------- /config/dev.exs: -------------------------------------------------------------------------------- 1 | use Mix.Config 2 | 3 | # For development, we disable any cache and enable 4 | # debugging and code reloading. 5 | # 6 | # The watchers configuration can be used to run external 7 | # watchers to your application. For example, we use it 8 | # with brunch.io to recompile .js and .css sources. 9 | config :elixir_letters, ElixirLetters.Endpoint, 10 | http: [port: 4000], 11 | debug_errors: true, 12 | code_reloader: true, 13 | cache_static_lookup: false, 14 | watchers: [node: ["node_modules/brunch/bin/brunch", "watch"]] 15 | 16 | # Watch static and templates for browser reloading. 17 | config :elixir_letters, ElixirLetters.Endpoint, 18 | live_reload: [ 19 | patterns: [ 20 | ~r{priv/static/.*(js|css|png|jpeg|jpg|gif)$}, 21 | ~r{web/views/.*(ex)$}, 22 | ~r{web/templates/.*(eex)$} 23 | ] 24 | ] 25 | 26 | # Do not include metadata nor timestamps in development logs 27 | config :logger, :console, format: "[$level] $message\n" 28 | 29 | # Configure your database 30 | config :elixir_letters, ElixirLetters.Repo, 31 | adapter: Ecto.Adapters.Postgres, 32 | #url: System.get_env("DATABASE_URL"), 33 | url: "postgres://globalkeith@localhost/elixir_letters_dev", 34 | size: 10 # The amount of database connections in the pool 35 | -------------------------------------------------------------------------------- /config/prod.exs: -------------------------------------------------------------------------------- 1 | use Mix.Config 2 | 3 | # For production, we configure the host to read the PORT 4 | # from the system environment. Therefore, you will need 5 | # to set PORT=80 before running your server. 6 | # 7 | # You should also configure the url host to something 8 | # meaningful, we use this information when generating URLs. 9 | # 10 | # Finally, we also include the path to a manifest 11 | # containing the digested version of static files. This 12 | # manifest is generated by the mix phoenix.digest task 13 | # which you typically run after static files are built. 14 | config :elixir_letters, ElixirLetters.Endpoint, 15 | http: [port: {:system, "PORT"}], 16 | url: [host: "localhost", port: 80], 17 | cache_static_manifest: "priv/static/manifest.json" 18 | 19 | # ## SSL Support 20 | # 21 | # To get SSL working, you will need to add the `https` key 22 | # to the previous section, and set your `:url` port to 443 23 | # 24 | # config :elixir_letters, ElixirLetters.Endpoint, 25 | # ... 26 | # url: [host: "example.com", port: 443], 27 | # https: [port: 443, 28 | # keyfile: System.get_env("SOME_APP_SSL_KEY_PATH"), 29 | # certfile: System.get_env("SOME_APP_SSL_CERT_PATH")] 30 | # 31 | # Where those two env variables point to a file on 32 | # disk for the key and cert. 33 | 34 | # Do not print debug messages in production 35 | config :logger, level: :info 36 | 37 | # ## Using releases 38 | # 39 | # If you are doing OTP releases, you need to instruct Phoenix 40 | # to start the server for all endpoints: 41 | # 42 | # config :phoenix, :serve_endpoints, true 43 | # 44 | # Alternatively, you can configure exactly which server to 45 | # start per endpoint: 46 | # 47 | # config :elixir_letters, ElixirLetters.Endpoint, server: true 48 | # 49 | 50 | # Configure your database 51 | config :elixir_letters, ElixirLetters.Repo, 52 | adapter: Ecto.Adapters.Postgres, 53 | url: System.get_env("DATABASE_URL"), 54 | size: 20 # The amount of database connections in the pool 55 | -------------------------------------------------------------------------------- /config/test.exs: -------------------------------------------------------------------------------- 1 | use Mix.Config 2 | 3 | # We don't run a server during test. If one is required, 4 | # you can enable the server option below. 5 | config :elixir_letters, ElixirLetters.Endpoint, 6 | http: [port: 4001], 7 | server: false 8 | 9 | # Print only warnings and errors during test 10 | config :logger, level: :warn 11 | 12 | # Configure your database 13 | config :elixir_letters, ElixirLetters.Repo, 14 | adapter: Ecto.Adapters.Postgres, 15 | username: "postgres", 16 | password: "postgres", 17 | database: "elixir_letters_test", 18 | pool: Ecto.Adapters.SQL.Sandbox 19 | -------------------------------------------------------------------------------- /elixir_buildpack.config: -------------------------------------------------------------------------------- 1 | # Erlang version 2 | erlang_version=18.2 3 | 4 | # Elixir version 5 | elixir_version=1.2 6 | 7 | # Rebar version 8 | rebar_version=(tag 2.2.0) 9 | 10 | # Do dependencies have to be built from scratch on every deploy? 11 | always_build_deps=false 12 | always_rebuild=false 13 | 14 | config_vars_to_export=(DATABASE_URL SECRET_KEY_BASE) 15 | -------------------------------------------------------------------------------- /lib/elixir_letters.ex: -------------------------------------------------------------------------------- 1 | defmodule ElixirLetters do 2 | use Application 3 | 4 | # See http://elixir-lang.org/docs/stable/elixir/Application.html 5 | # for more information on OTP Applications 6 | def start(_type, _args) do 7 | import Supervisor.Spec, warn: false 8 | 9 | children = [ 10 | # Start the endpoint when the application starts 11 | supervisor(ElixirLetters.Endpoint, []), 12 | # Start the Ecto repository 13 | worker(ElixirLetters.Repo, []), 14 | # Here you could define other workers and supervisors as children 15 | # worker(ElixirLetters.Worker, [arg1, arg2, arg3]), 16 | # worker(ElixirLetters.Room, []) 17 | supervisor(ElixirLetters.RoomSupervisor, []), 18 | ] 19 | 20 | # See http://elixir-lang.org/docs/stable/elixir/Supervisor.html 21 | # for other strategies and supported options 22 | opts = [strategy: :one_for_one, name: ElixirLetters.Supervisor] 23 | Supervisor.start_link(children, opts) 24 | end 25 | 26 | # Tell Phoenix to update the endpoint configuration 27 | # whenever the application is updated. 28 | def config_change(changed, _new, removed) do 29 | ElixirLetters.Endpoint.config_change(changed, removed) 30 | :ok 31 | end 32 | end 33 | -------------------------------------------------------------------------------- /lib/elixir_letters/endpoint.ex: -------------------------------------------------------------------------------- 1 | defmodule ElixirLetters.Endpoint do 2 | use Phoenix.Endpoint, otp_app: :elixir_letters 3 | 4 | socket "/socket", ElixirLetters.UserSocket 5 | 6 | # Serve at "/" the static files from "priv/static" directory. 7 | # 8 | # You should set gzip to true if you are running phoenix.digest 9 | # when deploying your static files in production. 10 | plug Plug.Static, 11 | at: "/", from: :elixir_letters, gzip: false, 12 | only: ~w(css fonts images js favicon.ico robots.txt) 13 | 14 | # Code reloading can be explicitly enabled under the 15 | # :code_reloader configuration of your endpoint. 16 | if code_reloading? do 17 | socket "/phoenix/live_reload/socket", Phoenix.LiveReloader.Socket 18 | plug Phoenix.LiveReloader 19 | plug Phoenix.CodeReloader 20 | end 21 | 22 | plug Plug.RequestId 23 | plug Plug.Logger 24 | 25 | plug Plug.Parsers, 26 | parsers: [:urlencoded, :multipart, :json], 27 | pass: ["*/*"], 28 | json_decoder: Poison 29 | 30 | plug Plug.MethodOverride 31 | plug Plug.Head 32 | 33 | plug Plug.Session, 34 | store: :cookie, 35 | key: "_elixir_letters_key", 36 | signing_salt: "JCH1GMIw" 37 | 38 | plug ElixirLetters.Router 39 | end 40 | -------------------------------------------------------------------------------- /lib/elixir_letters/letters.ex: -------------------------------------------------------------------------------- 1 | defmodule ElixirLetters.Letters do 2 | 3 | def get_letters_map do 4 | for {<>, count} <- letters, letter_count <- 1..count do 5 | ["#{code}_#{letter_count}", get_colour] 6 | end 7 | end 8 | 9 | defp letters do 10 | %{} 11 | |> Map.merge(uppercase) 12 | # |> Map.merge(lowercase) 13 | # |> Map.merge(chars) 14 | # |> Map.merge(numbers) 15 | end 16 | 17 | defp get_colour do 18 | colours 19 | |> Enum.shuffle 20 | |> Enum.take(1) 21 | |> List.first 22 | end 23 | 24 | defp colours do 25 | # ["#ce1e0c","#466dda","#03c03c","#e6d253"] # pastels 26 | ["#9C2E23", "#C5A02F", "#002F6B", "#3D6F24"] 27 | # ["#9C2E23", "#E1E40D", "#005ADA", "#11D60E"] 28 | # ["#ff0000", "#00ff00", "#0000ff"] # primary 29 | # ["#3F2757", "#897999", "#6E5C80", "#533b6b", "#452D5E", "#B5ACC0"] 30 | end 31 | 32 | defp uppercase do 33 | %{ "E" => 8, "T" => 8, "A" => 8, "O" => 8, "I" => 8, "N" => 8, "S" => 8, "R" => 8, "H" => 8, "L" => 6, "D" => 6, "C" => 6, "U" => 6, "M" => 6, "F" => 6, "P" => 6, "G" => 5, "W" => 4, "Y" => 3, "B" => 5, "V" => 3, "K" => 4, "X" => 4, "J" => 4, "Q" => 1, "Z" => 1 } 34 | end 35 | 36 | # defp uppercase do 37 | # %{ "E" => 125, "T" => 92, "A" => 80, "O" => 76, "I" => 72, "N" => 70, "S" => 65, "R" => 61, "H" => 54, "L" => 41, "D" => 39, "C" => 30, "U" => 27, "M" => 25, "F" => 23, "P" => 20, "G" => 19, "W" => 19, "Y" => 17, "B" => 15, "V" => 9, "K" => 6, "X" => 1, "J" => 1, "Q" => 1, "Z" => 1, "e" => 12, "t" => 9, "a" => 8, "o" => 7, "i" => 7, "n" => 7, "s" => 6, "r" => 6, "h" => 5, "l" => 4, "d" => 3, "c" => 3, "u" => 2, "m" => 2, "f" => 2, "p" => 2, "g" => 2, "w" => 2, "y" => 2, "b" => 1, "v" => 9, "k" => 6, "x" => 1, "j" => 1, "q" => 1, "z" => 1, "!" => 5, "?" => 5 } 38 | # end 39 | 40 | # defp uppercase do 41 | # %{ "E" => 12, "T" => 9, "A" => 8, "O" => 8, "I" => 7, "N" => 7, "S" => 6, "R" => 6, "H" => 5, "L" => 4, "D" => 3, "C" => 3, "U" => 2, "M" => 2, "F" => 2, "P" => 2, "G" => 1, "W" => 1, "Y" => 1, "B" => 1, "V" => 1, "K" => 1, "X" => 1, "J" => 1, "Q" => 1, "Z" => 1 } 42 | # end 43 | 44 | # defp lowercase do 45 | # %{ "k" => 1, "e" => 1, "i" => 1, "t" => 1, "h" => 1 } 46 | # end 47 | 48 | defp lowercase do 49 | %{ "e" => 125, "t" => 92, "a" => 80, "o" => 76, "i" => 72, "n" => 70, "s" => 65, "r" => 61, "h" => 54, "l" => 41, "d" => 39, "c" => 30, "u" => 27, "m" => 25, "f" => 23, "p" => 20, "g" => 19, "w" => 19, "y" => 17, "b" => 15, "v" => 9, "k" => 6, "x" => 1, "j" => 1, "q" => 1, "z" => 1 } 50 | end 51 | 52 | defp chars do 53 | chars = %{ "!" => 5, "?" => 5 } 54 | end 55 | 56 | defp numbers do 57 | %{ "0" => 5, "1" => 5, "2" => 5, "3" => 5, "4" => 5, "5" => 5, "6" => 5, "7" => 5, "8" => 5, "9" => 5 } 58 | end 59 | end 60 | -------------------------------------------------------------------------------- /lib/elixir_letters/repo.ex: -------------------------------------------------------------------------------- 1 | defmodule ElixirLetters.Repo do 2 | use Ecto.Repo, otp_app: :elixir_letters 3 | end 4 | -------------------------------------------------------------------------------- /lib/elixir_letters/room.ex: -------------------------------------------------------------------------------- 1 | defmodule ElixirLetters.Room do 2 | use GenServer 3 | alias ElixirLetters.{Repo,Snapshot,Endpoint} 4 | import Ecto.Query 5 | 6 | defmodule State do 7 | defstruct room_name: "lobby", 8 | positions: %{}, 9 | users: %{}, 10 | user_count: 0 11 | end 12 | 13 | # Client 14 | 15 | @doc """ 16 | Starts the process 17 | """ 18 | def start_link(room_name) do 19 | # opts = opts 20 | # |> Keyword.put_new(:room, "lobby") 21 | # |> Enum.reject(fn {_k,v} -> is_nil(v) end) 22 | room = Atom.to_string(room_name) 23 | state = %State{room_name: room, 24 | positions: get_snapshot(room)} 25 | # GenServer.call(__MODULE__, :initialize_room, room_name) 26 | GenServer.start_link(__MODULE__, state) 27 | end 28 | 29 | @doc """ 30 | Add a user to the room. 31 | """ 32 | def join(pid, user_id, user) do 33 | GenServer.cast(pid, {:join, user_id, user}) 34 | end 35 | 36 | @doc """ 37 | Remove a user the room. 38 | """ 39 | def leave(pid, user_id) do 40 | GenServer.cast(pid, {:leave, user_id}) 41 | end 42 | 43 | @doc """ 44 | Set the position of one character. 45 | """ 46 | def set_position(pid, position) do 47 | GenServer.cast(pid, {:set_position, position}) 48 | end 49 | 50 | @doc """ 51 | Save a snapshot of the current state. 52 | """ 53 | def save(pid) do 54 | GenServer.cast(pid, :save) 55 | end 56 | 57 | @doc """ 58 | Get the position of all characters in the room. 59 | """ 60 | def get_positions(pid) do 61 | GenServer.call(pid, :get_positions) 62 | end 63 | 64 | @doc """ 65 | Get a count of the number of users in the room. 66 | """ 67 | def get_user_count(pid) do 68 | GenServer.call(pid, :get_user_count) 69 | end 70 | 71 | # Server (callbacks) 72 | 73 | def handle_call(:get_user_count, _from, state) do 74 | {:reply, state.user_count, state} 75 | end 76 | 77 | def handle_call(:get_positions, _from, state) do 78 | {:reply, state.positions, state} 79 | end 80 | 81 | def handle_cast({:join, user_id, user}, state = %State{users: users}) do 82 | new_state = %State{state | users: Map.put(users, user_id, user), user_count: state.user_count + 1} 83 | # broadcast_user_count(Map.size(new_state.users)) 84 | {:noreply, new_state} 85 | end 86 | 87 | def handle_cast({:leave, user_id}, state = %State{users: users}) do 88 | new_state = %State{state | users: Map.delete(users, user_id), user_count: state.user_count - 1} 89 | {:noreply, new_state} 90 | end 91 | 92 | def handle_cast({:set_position, %{"id" => id} = position}, state = %State{positions: positions}) do 93 | new_state = %State{state | positions: Map.put(positions, id, position)} 94 | {:noreply, new_state} 95 | end 96 | 97 | def handle_cast(:save, state) do 98 | changeset = Snapshot.changeset(%Snapshot{}, 99 | %{room_name: state.room_name, 100 | positions: state.positions 101 | }) 102 | 103 | if changeset.valid? do 104 | _msg = Repo.insert!(changeset) 105 | end 106 | {:noreply, state} 107 | end 108 | 109 | defp get_snapshot(room) do 110 | query = from s in Snapshot, 111 | where: s.room_name == ^room 112 | last_snapshot = query |> Snapshot.last |> Repo.one 113 | 114 | cond do 115 | last_snapshot -> last_snapshot.positions 116 | true -> %{} 117 | end 118 | end 119 | 120 | # defp broadcast_user_count(count) do 121 | # Endpoint.broadcast!("rooms:*", "user_count:update", %{user_count: get_user_count(room_id)}) 122 | # end 123 | end 124 | -------------------------------------------------------------------------------- /lib/elixir_letters/room_sup.ex: -------------------------------------------------------------------------------- 1 | defmodule ElixirLetters.RoomSupervisor do 2 | alias ElixirLetters.Room 3 | require Logger 4 | use Supervisor 5 | 6 | def start_link do 7 | Supervisor.start_link(__MODULE__, [], name: __MODULE__) 8 | end 9 | 10 | def init([]) do 11 | children = [ 12 | worker(Room, [], restart: :transient) 13 | ] 14 | supervise(children, strategy: :simple_one_for_one) 15 | end 16 | 17 | @doc """ 18 | Creates a new child process for the given `room_name`, or returns the pid 19 | for the existing process with that `room_name`. 20 | """ 21 | def start_room(room_name) do 22 | case Supervisor.start_child(__MODULE__, [room_name]) do 23 | {:ok, pid} -> pid 24 | {:error, {:already_started, pid}} -> pid 25 | # res -> res 26 | end 27 | end 28 | 29 | end 30 | -------------------------------------------------------------------------------- /mix.exs: -------------------------------------------------------------------------------- 1 | defmodule ElixirLetters.Mixfile do 2 | use Mix.Project 3 | 4 | def project do 5 | [app: :elixir_letters, 6 | version: "0.0.2", 7 | elixir: "~> 1.0", 8 | elixirc_paths: elixirc_paths(Mix.env), 9 | compilers: [:phoenix] ++ Mix.compilers, 10 | build_embedded: Mix.env == :prod, 11 | start_permanent: Mix.env == :prod, 12 | deps: deps] 13 | end 14 | 15 | # Configuration for the OTP application 16 | # 17 | # Type `mix help compile.app` for more information 18 | def application do 19 | [mod: {ElixirLetters, []}, 20 | applications: [:phoenix, :phoenix_html, :cowboy, :logger, 21 | :phoenix_ecto, :postgrex, :poison]] 22 | end 23 | 24 | # Specifies which paths to compile per environment 25 | defp elixirc_paths(:test), do: ["lib", "web", "test/support"] 26 | defp elixirc_paths(_), do: ["lib", "web"] 27 | 28 | # Specifies your project dependencies 29 | # 30 | # Type `mix help deps` for examples and options 31 | defp deps do 32 | [{:phoenix, "~> 0.14"}, 33 | {:phoenix_ecto, "~> 0.8"}, 34 | {:postgrex, ">= 0.0.0"}, 35 | {:phoenix_html, "~> 1.4"}, 36 | {:phoenix_live_reload, "~> 0.5", only: :dev}, 37 | {:cowboy, "~> 1.0"}, 38 | {:poison, "~> 1.0"}, 39 | {:uuid, "~> 1.1"}] 40 | end 41 | end 42 | -------------------------------------------------------------------------------- /mix.lock: -------------------------------------------------------------------------------- 1 | %{"cowboy": {:hex, :cowboy, "1.0.2"}, 2 | "cowlib": {:hex, :cowlib, "1.0.1"}, 3 | "decimal": {:hex, :decimal, "1.1.0"}, 4 | "ecto": {:hex, :ecto, "0.14.3"}, 5 | "fs": {:hex, :fs, "0.9.2"}, 6 | "json": {:hex, :json, "0.3.2"}, 7 | "phoenix": {:hex, :phoenix, "0.15.0"}, 8 | "phoenix_ecto": {:hex, :phoenix_ecto, "0.8.1"}, 9 | "phoenix_html": {:hex, :phoenix_html, "1.4.0"}, 10 | "phoenix_live_reload": {:hex, :phoenix_live_reload, "0.5.1"}, 11 | "plug": {:hex, :plug, "0.14.0"}, 12 | "poison": {:hex, :poison, "1.4.0"}, 13 | "poolboy": {:hex, :poolboy, "1.5.1"}, 14 | "postgrex": {:hex, :postgrex, "0.9.1"}, 15 | "ranch": {:hex, :ranch, "1.1.0"}, 16 | "uuid": {:hex, :uuid, "1.1.2"}} 17 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "repository": { 3 | }, 4 | "dependencies": { 5 | "brunch": "^1.8.3", 6 | "babel-brunch": "^5.1.1", 7 | "clean-css-brunch": ">= 1.0 < 1.8", 8 | "css-brunch": ">= 1.0 < 1.8", 9 | "javascript-brunch": ">= 1.0 < 1.8", 10 | "sass-brunch": "^1.8.10", 11 | "uglify-js-brunch": ">= 1.0 < 1.8" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /phoenix_static_buildpack.config: -------------------------------------------------------------------------------- 1 | node_version=0.12.7 2 | npm_version=2.11.3 3 | config_vars_to_export=(DATABASE_URL SECRET_KEY_BASE) 4 | -------------------------------------------------------------------------------- /priv/repo/migrations/20150809194921_create_snapshot.exs: -------------------------------------------------------------------------------- 1 | defmodule ElixirLetters.Repo.Migrations.CreateSnapshot do 2 | use Ecto.Migration 3 | 4 | def change do 5 | create table(:snapshots) do 6 | add :positions, :map 7 | 8 | timestamps 9 | end 10 | 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /priv/repo/migrations/20150929211004_add_room_name_to_snapshots.exs: -------------------------------------------------------------------------------- 1 | defmodule ElixirLetters.Repo.Migrations.AddRoomNameToSnapshots do 2 | use Ecto.Migration 3 | 4 | def change do 5 | alter table(:snapshots) do 6 | add :room_name, :string 7 | end 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /priv/static/css/app-4c9251fbb2090360d151782439dadfca.css.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/css/app-4c9251fbb2090360d151782439dadfca.css.gz -------------------------------------------------------------------------------- /priv/static/css/app-c7c74e2693a7fdf12a0b132861756f45.css.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/css/app-c7c74e2693a7fdf12a0b132861756f45.css.gz -------------------------------------------------------------------------------- /priv/static/css/app.css-3ff3fa2b37e68a9f85269ecab37fab8b.map.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/css/app.css-3ff3fa2b37e68a9f85269ecab37fab8b.map.gz -------------------------------------------------------------------------------- /priv/static/css/app.css-6a793b5ca11150d2748aee3397be4e22.map.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/css/app.css-6a793b5ca11150d2748aee3397be4e22.map.gz -------------------------------------------------------------------------------- /priv/static/css/app.css.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/css/app.css.gz -------------------------------------------------------------------------------- /priv/static/css/app.css.map.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/css/app.css.map.gz -------------------------------------------------------------------------------- /priv/static/css/vendor-b50703bbe05021c0cbd4b43eab0ca76b.css.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/css/vendor-b50703bbe05021c0cbd4b43eab0ca76b.css.gz -------------------------------------------------------------------------------- /priv/static/css/vendor.css-0b5dfcd1aa887a16f157735f5fb4e3ce.map.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/css/vendor.css-0b5dfcd1aa887a16f157735f5fb4e3ce.map.gz -------------------------------------------------------------------------------- /priv/static/css/vendor.css.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/css/vendor.css.gz -------------------------------------------------------------------------------- /priv/static/css/vendor.css.map.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/css/vendor.css.map.gz -------------------------------------------------------------------------------- /priv/static/fonts/RoundsBlack_gdi-0006787ab426276d98b0c12233ee374e.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/RoundsBlack_gdi-0006787ab426276d98b0c12233ee374e.woff -------------------------------------------------------------------------------- /priv/static/fonts/RoundsBlack_gdi-0006787ab426276d98b0c12233ee374e.woff.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/RoundsBlack_gdi-0006787ab426276d98b0c12233ee374e.woff.gz -------------------------------------------------------------------------------- /priv/static/fonts/RoundsBlack_gdi-2e88cd81dc73ecd954ad05c079570851.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/RoundsBlack_gdi-2e88cd81dc73ecd954ad05c079570851.ttf -------------------------------------------------------------------------------- /priv/static/fonts/RoundsBlack_gdi-2e88cd81dc73ecd954ad05c079570851.ttf.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/RoundsBlack_gdi-2e88cd81dc73ecd954ad05c079570851.ttf.gz -------------------------------------------------------------------------------- /priv/static/fonts/RoundsBlack_gdi-47266a92bad966a13348673628b2b76b.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/RoundsBlack_gdi-47266a92bad966a13348673628b2b76b.eot -------------------------------------------------------------------------------- /priv/static/fonts/RoundsBlack_gdi-47266a92bad966a13348673628b2b76b.eot.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/RoundsBlack_gdi-47266a92bad966a13348673628b2b76b.eot.gz -------------------------------------------------------------------------------- /priv/static/fonts/RoundsBlack_gdi-6455bcca7994c1d529412120500242af.svg.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/RoundsBlack_gdi-6455bcca7994c1d529412120500242af.svg.gz -------------------------------------------------------------------------------- /priv/static/fonts/RoundsBlack_gdi.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/RoundsBlack_gdi.eot -------------------------------------------------------------------------------- /priv/static/fonts/RoundsBlack_gdi.eot.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/RoundsBlack_gdi.eot.gz -------------------------------------------------------------------------------- /priv/static/fonts/RoundsBlack_gdi.svg.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/RoundsBlack_gdi.svg.gz -------------------------------------------------------------------------------- /priv/static/fonts/RoundsBlack_gdi.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/RoundsBlack_gdi.ttf -------------------------------------------------------------------------------- /priv/static/fonts/RoundsBlack_gdi.ttf.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/RoundsBlack_gdi.ttf.gz -------------------------------------------------------------------------------- /priv/static/fonts/RoundsBlack_gdi.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/RoundsBlack_gdi.woff -------------------------------------------------------------------------------- /priv/static/fonts/RoundsBlack_gdi.woff.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/RoundsBlack_gdi.woff.gz -------------------------------------------------------------------------------- /priv/static/fonts/alphafridgemagnets-webfont-41515356dd5fbc51f9a048077eb47a0e.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/alphafridgemagnets-webfont-41515356dd5fbc51f9a048077eb47a0e.eot -------------------------------------------------------------------------------- /priv/static/fonts/alphafridgemagnets-webfont-41515356dd5fbc51f9a048077eb47a0e.eot.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/alphafridgemagnets-webfont-41515356dd5fbc51f9a048077eb47a0e.eot.gz -------------------------------------------------------------------------------- /priv/static/fonts/alphafridgemagnets-webfont-593726dee4d57f008475da596f0e023b.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/alphafridgemagnets-webfont-593726dee4d57f008475da596f0e023b.woff -------------------------------------------------------------------------------- /priv/static/fonts/alphafridgemagnets-webfont-593726dee4d57f008475da596f0e023b.woff.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/alphafridgemagnets-webfont-593726dee4d57f008475da596f0e023b.woff.gz -------------------------------------------------------------------------------- /priv/static/fonts/alphafridgemagnets-webfont-73d9f5706bf2a385d986cd36562c5a4f.svg.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/alphafridgemagnets-webfont-73d9f5706bf2a385d986cd36562c5a4f.svg.gz -------------------------------------------------------------------------------- /priv/static/fonts/alphafridgemagnets-webfont-a4395aa88a24ae40edae68339c6aa526.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/alphafridgemagnets-webfont-a4395aa88a24ae40edae68339c6aa526.woff2 -------------------------------------------------------------------------------- /priv/static/fonts/alphafridgemagnets-webfont-a4395aa88a24ae40edae68339c6aa526.woff2.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/alphafridgemagnets-webfont-a4395aa88a24ae40edae68339c6aa526.woff2.gz -------------------------------------------------------------------------------- /priv/static/fonts/alphafridgemagnets-webfont-ac8b3e8fffce73c123a89f12b5e4ce41.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/alphafridgemagnets-webfont-ac8b3e8fffce73c123a89f12b5e4ce41.ttf -------------------------------------------------------------------------------- /priv/static/fonts/alphafridgemagnets-webfont-ac8b3e8fffce73c123a89f12b5e4ce41.ttf.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/alphafridgemagnets-webfont-ac8b3e8fffce73c123a89f12b5e4ce41.ttf.gz -------------------------------------------------------------------------------- /priv/static/fonts/alphafridgemagnets-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/alphafridgemagnets-webfont.eot -------------------------------------------------------------------------------- /priv/static/fonts/alphafridgemagnets-webfont.eot.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/alphafridgemagnets-webfont.eot.gz -------------------------------------------------------------------------------- /priv/static/fonts/alphafridgemagnets-webfont.svg.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/alphafridgemagnets-webfont.svg.gz -------------------------------------------------------------------------------- /priv/static/fonts/alphafridgemagnets-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/alphafridgemagnets-webfont.ttf -------------------------------------------------------------------------------- /priv/static/fonts/alphafridgemagnets-webfont.ttf.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/alphafridgemagnets-webfont.ttf.gz -------------------------------------------------------------------------------- /priv/static/fonts/alphafridgemagnets-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/alphafridgemagnets-webfont.woff -------------------------------------------------------------------------------- /priv/static/fonts/alphafridgemagnets-webfont.woff.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/alphafridgemagnets-webfont.woff.gz -------------------------------------------------------------------------------- /priv/static/fonts/alphafridgemagnets-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/alphafridgemagnets-webfont.woff2 -------------------------------------------------------------------------------- /priv/static/fonts/alphafridgemagnets-webfont.woff2.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/alphafridgemagnets-webfont.woff2.gz -------------------------------------------------------------------------------- /priv/static/fonts/gaban-outline-regular-FFP-3281fd5687786dce14ae439207aae32e.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/gaban-outline-regular-FFP-3281fd5687786dce14ae439207aae32e.ttf -------------------------------------------------------------------------------- /priv/static/fonts/gaban-outline-regular-FFP-3281fd5687786dce14ae439207aae32e.ttf.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/gaban-outline-regular-FFP-3281fd5687786dce14ae439207aae32e.ttf.gz -------------------------------------------------------------------------------- /priv/static/fonts/gaban-outline-regular-FFP.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/gaban-outline-regular-FFP.ttf -------------------------------------------------------------------------------- /priv/static/fonts/gaban-outline-regular-FFP.ttf.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/gaban-outline-regular-FFP.ttf.gz -------------------------------------------------------------------------------- /priv/static/fonts/glyphicons-halflings-regular-448c34a56d699c29117adc64c43affeb.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/glyphicons-halflings-regular-448c34a56d699c29117adc64c43affeb.woff2 -------------------------------------------------------------------------------- /priv/static/fonts/glyphicons-halflings-regular-448c34a56d699c29117adc64c43affeb.woff2.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/glyphicons-halflings-regular-448c34a56d699c29117adc64c43affeb.woff2.gz -------------------------------------------------------------------------------- /priv/static/fonts/glyphicons-halflings-regular-89889688147bd7575d6327160d64e760.svg.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/glyphicons-halflings-regular-89889688147bd7575d6327160d64e760.svg.gz -------------------------------------------------------------------------------- /priv/static/fonts/glyphicons-halflings-regular-e18bbf611f2a2e43afc071aa2f4e1512.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/glyphicons-halflings-regular-e18bbf611f2a2e43afc071aa2f4e1512.ttf -------------------------------------------------------------------------------- /priv/static/fonts/glyphicons-halflings-regular-e18bbf611f2a2e43afc071aa2f4e1512.ttf.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/glyphicons-halflings-regular-e18bbf611f2a2e43afc071aa2f4e1512.ttf.gz -------------------------------------------------------------------------------- /priv/static/fonts/glyphicons-halflings-regular-f4769f9bdb7466be65088239c12046d1.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/glyphicons-halflings-regular-f4769f9bdb7466be65088239c12046d1.eot -------------------------------------------------------------------------------- /priv/static/fonts/glyphicons-halflings-regular-f4769f9bdb7466be65088239c12046d1.eot.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/glyphicons-halflings-regular-f4769f9bdb7466be65088239c12046d1.eot.gz -------------------------------------------------------------------------------- /priv/static/fonts/glyphicons-halflings-regular-fa2772327f55d8198301fdb8bcfc8158.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/glyphicons-halflings-regular-fa2772327f55d8198301fdb8bcfc8158.woff -------------------------------------------------------------------------------- /priv/static/fonts/glyphicons-halflings-regular-fa2772327f55d8198301fdb8bcfc8158.woff.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/glyphicons-halflings-regular-fa2772327f55d8198301fdb8bcfc8158.woff.gz -------------------------------------------------------------------------------- /priv/static/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /priv/static/fonts/glyphicons-halflings-regular.eot.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/glyphicons-halflings-regular.eot.gz -------------------------------------------------------------------------------- /priv/static/fonts/glyphicons-halflings-regular.svg.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/glyphicons-halflings-regular.svg.gz -------------------------------------------------------------------------------- /priv/static/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /priv/static/fonts/glyphicons-halflings-regular.ttf.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/glyphicons-halflings-regular.ttf.gz -------------------------------------------------------------------------------- /priv/static/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /priv/static/fonts/glyphicons-halflings-regular.woff.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/glyphicons-halflings-regular.woff.gz -------------------------------------------------------------------------------- /priv/static/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /priv/static/fonts/glyphicons-halflings-regular.woff2.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/glyphicons-halflings-regular.woff2.gz -------------------------------------------------------------------------------- /priv/static/fonts/rounds_black-webfont-143e7a8c74255099e3cee136a389f061.svg.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/rounds_black-webfont-143e7a8c74255099e3cee136a389f061.svg.gz -------------------------------------------------------------------------------- /priv/static/fonts/rounds_black-webfont-385cf2a10dd587af78bbbeccf2055dab.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/rounds_black-webfont-385cf2a10dd587af78bbbeccf2055dab.woff -------------------------------------------------------------------------------- /priv/static/fonts/rounds_black-webfont-385cf2a10dd587af78bbbeccf2055dab.woff.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/rounds_black-webfont-385cf2a10dd587af78bbbeccf2055dab.woff.gz -------------------------------------------------------------------------------- /priv/static/fonts/rounds_black-webfont-434521913bd01af0a94cb2ee93991612.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/rounds_black-webfont-434521913bd01af0a94cb2ee93991612.ttf -------------------------------------------------------------------------------- /priv/static/fonts/rounds_black-webfont-434521913bd01af0a94cb2ee93991612.ttf.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/rounds_black-webfont-434521913bd01af0a94cb2ee93991612.ttf.gz -------------------------------------------------------------------------------- /priv/static/fonts/rounds_black-webfont-4989a9119f46224f156b9ff0261b27f9.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/rounds_black-webfont-4989a9119f46224f156b9ff0261b27f9.eot -------------------------------------------------------------------------------- /priv/static/fonts/rounds_black-webfont-4989a9119f46224f156b9ff0261b27f9.eot.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/rounds_black-webfont-4989a9119f46224f156b9ff0261b27f9.eot.gz -------------------------------------------------------------------------------- /priv/static/fonts/rounds_black-webfont-6421189d8d08faf98bbf37c1093f5e9d.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/rounds_black-webfont-6421189d8d08faf98bbf37c1093f5e9d.woff2 -------------------------------------------------------------------------------- /priv/static/fonts/rounds_black-webfont-6421189d8d08faf98bbf37c1093f5e9d.woff2.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/rounds_black-webfont-6421189d8d08faf98bbf37c1093f5e9d.woff2.gz -------------------------------------------------------------------------------- /priv/static/fonts/rounds_black-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/rounds_black-webfont.eot -------------------------------------------------------------------------------- /priv/static/fonts/rounds_black-webfont.eot.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/rounds_black-webfont.eot.gz -------------------------------------------------------------------------------- /priv/static/fonts/rounds_black-webfont.svg.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/rounds_black-webfont.svg.gz -------------------------------------------------------------------------------- /priv/static/fonts/rounds_black-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/rounds_black-webfont.ttf -------------------------------------------------------------------------------- /priv/static/fonts/rounds_black-webfont.ttf.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/rounds_black-webfont.ttf.gz -------------------------------------------------------------------------------- /priv/static/fonts/rounds_black-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/rounds_black-webfont.woff -------------------------------------------------------------------------------- /priv/static/fonts/rounds_black-webfont.woff.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/rounds_black-webfont.woff.gz -------------------------------------------------------------------------------- /priv/static/fonts/rounds_black-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/rounds_black-webfont.woff2 -------------------------------------------------------------------------------- /priv/static/fonts/rounds_black-webfont.woff2.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/fonts/rounds_black-webfont.woff2.gz -------------------------------------------------------------------------------- /priv/static/images/Blank_Scrabble_board_with_coordinates.svg-d5f6f986f3f1a8d2880ae9b004261c5b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Blank_Scrabble_board_with_coordinates.svg-d5f6f986f3f1a8d2880ae9b004261c5b.png -------------------------------------------------------------------------------- /priv/static/images/Blank_Scrabble_board_with_coordinates.svg-d5f6f986f3f1a8d2880ae9b004261c5b.png.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Blank_Scrabble_board_with_coordinates.svg-d5f6f986f3f1a8d2880ae9b004261c5b.png.gz -------------------------------------------------------------------------------- /priv/static/images/Blank_Scrabble_board_with_coordinates.svg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Blank_Scrabble_board_with_coordinates.svg.png -------------------------------------------------------------------------------- /priv/static/images/Blank_Scrabble_board_with_coordinates.svg.png.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Blank_Scrabble_board_with_coordinates.svg.png.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle-3feee48ffe7bdc36e985ca7528fae208.html.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle-3feee48ffe7bdc36e985ca7528fae208.html.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle.html.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle.html.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/Actions-3ae4e3276bf2d8f1bbb61fbe83cd0ba8.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/Actions-3ae4e3276bf2d8f1bbb61fbe83cd0ba8.js.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/Actions.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/Actions.js.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/EditorCM-07fbb8fc7fd9a737772e540443e753ba.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/EditorCM-07fbb8fc7fd9a737772e540443e753ba.js.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/EditorCM.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/EditorCM.js.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/LayoutCM-cd2373fd03e7f3d9203bd23664a2d9d3.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/LayoutCM-cd2373fd03e7f3d9203bd23664a2d9d3.js.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/LayoutCM.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/LayoutCM.js.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/Resources-271921c16457fd619a4e824b85bb3dea.js: -------------------------------------------------------------------------------- 1 | // @TODO: refactor all of this, this can be simplified by half 2 | 3 | var update_resource_input = function(value) { 4 | if (value) { 5 | if (resources.contains(value)) { 6 | return false; 7 | } 8 | resources.push(value); 9 | } 10 | $('external_resources_id').set('value', resources.join(',')); 11 | return true; 12 | }; 13 | 14 | var remove_resource = function(value) { 15 | if (resources.contains(value)) { 16 | resources.erase(value); 17 | } 18 | update_resource_input(); 19 | 20 | this.external_resource_el = $('external_resource_'+value); 21 | new Fx.Reveal(this.external_resource_el, { 22 | onComplete: function(){ 23 | this.destroy(); 24 | }.bind(this.external_resource_el) 25 | }).dissolve(); 26 | 27 | }; 28 | 29 | var validateGithub = function(){ 30 | return !this.get('value').contains('raw.github'); 31 | }; 32 | 33 | var validateSSL = function(){ 34 | return !this.get('value').contains('http://'); 35 | }; 36 | 37 | var prepareToSubmit = function(e){ 38 | if (e){ 39 | e.stop(); 40 | } 41 | 42 | var externalResources = $('external_resource'); 43 | 44 | if (validateGithub.call(externalResources)){ 45 | submit_external_resource.call(this); 46 | } else { 47 | if (confirm('Github is not a CDN, using it as such will cause issues with loading the file. Do you still wish to it?')){ 48 | submit_external_resource.call(this); 49 | } 50 | } 51 | 52 | if (!validateSSL.call(externalResources)){ 53 | var message = document.location.protocol === "https:" ? 54 | "You're loading resources over HTTP not HTTPS, your fiddle will not work. Do you wish to continue?" : 55 | "You should be loading resources over HTTPS not HTTP, are you sure you want to continue?"; 56 | 57 | if (confirm(message)){ 58 | submit_external_resource.call(this); 59 | } 60 | } 61 | }; 62 | 63 | var submit_external_resource = function() { 64 | 65 | // save url, after success update current list of resources and clean up the input 66 | var url = $('external_resource').value; 67 | if (url && url != $('external_resource').retrieve('default_value') && $('external_resource').value.length > 7) { 68 | new Request.JSON({ 69 | url: add_external_resource_url, 70 | method: 'post', 71 | data: {url: url}, 72 | onSuccess: function(response) { 73 | // push resource id to the list 74 | if (update_resource_input(response.id)) { 75 | // create external resource DOM element 76 | var li = new Element('li', { 77 | 'id': 'external_resource_' + response.id 78 | }).inject($('external_resources_list')); 79 | new Element('a', { 80 | 'text': response.filename, 81 | 'title': response.url, 82 | 'class': 'filename', 83 | 'href': response.url, 84 | 'target': '_blank' 85 | }).inject(li); 86 | 87 | new Element('a', { 88 | 'text': 'Remove', 89 | 'rel': response.id, 90 | 'class': 'remove', 91 | 'events': { 92 | 'click': function(e) { 93 | e.stop(); 94 | remove_resource(this.get('rel').toInt()); 95 | } 96 | } 97 | }).inject(li); 98 | } else { 99 | // this resource was already included in the list 100 | } 101 | var inp = $('external_resource'); 102 | inp.value = ''; 103 | inp.removeClass('warning'); 104 | // if (e && e.target.get('tag') != 'input') { 105 | // set_default_input_value.bind($('external_resource'))(); 106 | // } 107 | } 108 | }).send(); 109 | } 110 | }; 111 | 112 | var change_default_input_value = function(show) { 113 | // set or remove the default value from input 114 | if (show && !this.value) { 115 | this.set('value', this.retrieve('default_value')); 116 | this.addClass('default'); 117 | } else if (!show && this.value == this.retrieve('default_value')) { 118 | this.set('value', ''); 119 | this.removeClass('default'); 120 | } 121 | }; 122 | 123 | var warn = function(){ 124 | if (!validateGithub.call(this)){ 125 | this.addClass('warning'); 126 | } else if (!validateSSL.call(this)){ 127 | this.addClass('warning'); 128 | } else { 129 | this.removeClass('warning'); 130 | } 131 | }; 132 | 133 | window.addEvent('domready', function() { 134 | var addExtenrnalResource = document.id('add_external_resource'); 135 | var inp = $('external_resource'); 136 | inp.store('default_value', default_text); 137 | update_resource_input(); 138 | inp.addEvents({ 139 | change: warn, 140 | keydown: function(e){ 141 | if (e.key === 'enter') { 142 | this.fireEvent('submit', e); 143 | } 144 | }, 145 | keyup: warn, 146 | submit: prepareToSubmit 147 | }); 148 | addExtenrnalResource.addEvent('click', prepareToSubmit); 149 | if (preload_resources) { 150 | preload_resources.each(function(res){ 151 | $('external_resource').set('value',res); 152 | submit_external_resource(); 153 | }) 154 | } 155 | }); 156 | -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/Resources-271921c16457fd619a4e824b85bb3dea.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/Resources-271921c16457fd619a4e824b85bb3dea.js.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/Resources.js: -------------------------------------------------------------------------------- 1 | // @TODO: refactor all of this, this can be simplified by half 2 | 3 | var update_resource_input = function(value) { 4 | if (value) { 5 | if (resources.contains(value)) { 6 | return false; 7 | } 8 | resources.push(value); 9 | } 10 | $('external_resources_id').set('value', resources.join(',')); 11 | return true; 12 | }; 13 | 14 | var remove_resource = function(value) { 15 | if (resources.contains(value)) { 16 | resources.erase(value); 17 | } 18 | update_resource_input(); 19 | 20 | this.external_resource_el = $('external_resource_'+value); 21 | new Fx.Reveal(this.external_resource_el, { 22 | onComplete: function(){ 23 | this.destroy(); 24 | }.bind(this.external_resource_el) 25 | }).dissolve(); 26 | 27 | }; 28 | 29 | var validateGithub = function(){ 30 | return !this.get('value').contains('raw.github'); 31 | }; 32 | 33 | var validateSSL = function(){ 34 | return !this.get('value').contains('http://'); 35 | }; 36 | 37 | var prepareToSubmit = function(e){ 38 | if (e){ 39 | e.stop(); 40 | } 41 | 42 | var externalResources = $('external_resource'); 43 | 44 | if (validateGithub.call(externalResources)){ 45 | submit_external_resource.call(this); 46 | } else { 47 | if (confirm('Github is not a CDN, using it as such will cause issues with loading the file. Do you still wish to it?')){ 48 | submit_external_resource.call(this); 49 | } 50 | } 51 | 52 | if (!validateSSL.call(externalResources)){ 53 | var message = document.location.protocol === "https:" ? 54 | "You're loading resources over HTTP not HTTPS, your fiddle will not work. Do you wish to continue?" : 55 | "You should be loading resources over HTTPS not HTTP, are you sure you want to continue?"; 56 | 57 | if (confirm(message)){ 58 | submit_external_resource.call(this); 59 | } 60 | } 61 | }; 62 | 63 | var submit_external_resource = function() { 64 | 65 | // save url, after success update current list of resources and clean up the input 66 | var url = $('external_resource').value; 67 | if (url && url != $('external_resource').retrieve('default_value') && $('external_resource').value.length > 7) { 68 | new Request.JSON({ 69 | url: add_external_resource_url, 70 | method: 'post', 71 | data: {url: url}, 72 | onSuccess: function(response) { 73 | // push resource id to the list 74 | if (update_resource_input(response.id)) { 75 | // create external resource DOM element 76 | var li = new Element('li', { 77 | 'id': 'external_resource_' + response.id 78 | }).inject($('external_resources_list')); 79 | new Element('a', { 80 | 'text': response.filename, 81 | 'title': response.url, 82 | 'class': 'filename', 83 | 'href': response.url, 84 | 'target': '_blank' 85 | }).inject(li); 86 | 87 | new Element('a', { 88 | 'text': 'Remove', 89 | 'rel': response.id, 90 | 'class': 'remove', 91 | 'events': { 92 | 'click': function(e) { 93 | e.stop(); 94 | remove_resource(this.get('rel').toInt()); 95 | } 96 | } 97 | }).inject(li); 98 | } else { 99 | // this resource was already included in the list 100 | } 101 | var inp = $('external_resource'); 102 | inp.value = ''; 103 | inp.removeClass('warning'); 104 | // if (e && e.target.get('tag') != 'input') { 105 | // set_default_input_value.bind($('external_resource'))(); 106 | // } 107 | } 108 | }).send(); 109 | } 110 | }; 111 | 112 | var change_default_input_value = function(show) { 113 | // set or remove the default value from input 114 | if (show && !this.value) { 115 | this.set('value', this.retrieve('default_value')); 116 | this.addClass('default'); 117 | } else if (!show && this.value == this.retrieve('default_value')) { 118 | this.set('value', ''); 119 | this.removeClass('default'); 120 | } 121 | }; 122 | 123 | var warn = function(){ 124 | if (!validateGithub.call(this)){ 125 | this.addClass('warning'); 126 | } else if (!validateSSL.call(this)){ 127 | this.addClass('warning'); 128 | } else { 129 | this.removeClass('warning'); 130 | } 131 | }; 132 | 133 | window.addEvent('domready', function() { 134 | var addExtenrnalResource = document.id('add_external_resource'); 135 | var inp = $('external_resource'); 136 | inp.store('default_value', default_text); 137 | update_resource_input(); 138 | inp.addEvents({ 139 | change: warn, 140 | keydown: function(e){ 141 | if (e.key === 'enter') { 142 | this.fireEvent('submit', e); 143 | } 144 | }, 145 | keyup: warn, 146 | submit: prepareToSubmit 147 | }); 148 | addExtenrnalResource.addEvent('click', prepareToSubmit); 149 | if (preload_resources) { 150 | preload_resources.each(function(res){ 151 | $('external_resource').set('value',res); 152 | submit_external_resource(); 153 | }) 154 | } 155 | }); 156 | -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/Resources.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/Resources.js.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/Settings-58fe0412f4098d0afe853949a44ea8ac.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Settings loader 3 | */ 4 | 5 | var MooShellSettings = new Class({ 6 | Implements: [Options], 7 | options: { 8 | library_id: 'js_library', 9 | dependency_id: 'js_dependency' 10 | }, 11 | initialize: function(options){ 12 | this.setOptions(options); 13 | this.libEl = $(this.options.library_id); 14 | this.depEl = $(this.options.dependency_id); 15 | this.libEl.addEvent('change', function() { 16 | this.changeDeps(); 17 | }.bind(this)); 18 | this.changeDeps(); 19 | }, 20 | changeDeps: function() { 21 | new Request.JSON({ 22 | url: get_dependencies_url.substitute({ 23 | "lib_id": this.libEl.value 24 | }), 25 | onSuccess: function(result) { 26 | this.depEl.empty(); 27 | result.each( function(dep) { 28 | new Element('li', { 29 | 'html': "".substitute(dep) 30 | }).inject(this.depEl, 'top'); 31 | }, this); 32 | }.bind(this) 33 | }).send(); 34 | } 35 | }); -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/Settings-58fe0412f4098d0afe853949a44ea8ac.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/Settings-58fe0412f4098d0afe853949a44ea8ac.js.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/Settings.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Settings loader 3 | */ 4 | 5 | var MooShellSettings = new Class({ 6 | Implements: [Options], 7 | options: { 8 | library_id: 'js_library', 9 | dependency_id: 'js_dependency' 10 | }, 11 | initialize: function(options){ 12 | this.setOptions(options); 13 | this.libEl = $(this.options.library_id); 14 | this.depEl = $(this.options.dependency_id); 15 | this.libEl.addEvent('change', function() { 16 | this.changeDeps(); 17 | }.bind(this)); 18 | this.changeDeps(); 19 | }, 20 | changeDeps: function() { 21 | new Request.JSON({ 22 | url: get_dependencies_url.substitute({ 23 | "lib_id": this.libEl.value 24 | }), 25 | onSuccess: function(result) { 26 | this.depEl.empty(); 27 | result.each( function(dep) { 28 | new Element('li', { 29 | 'html': "".substitute(dep) 30 | }).inject(this.depEl, 'top'); 31 | }, this); 32 | }.bind(this) 33 | }).send(); 34 | } 35 | }); -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/Settings.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/Settings.js.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/Sidebar-e82c2ea250e964d7d1d8fa8523f9a083.js: -------------------------------------------------------------------------------- 1 | // #TODO: refactor Accordion to fireEvent onCompleted when animation finishes 2 | // It probably should use chaining 3 | 4 | var Sidebar = new Class({ 5 | Implements: [Options, Class.Occlude, Events], 6 | parameter: "Sidebar", 7 | options: { 8 | DOM: '', 9 | toggleSidebar: 'toggleSidebar' 10 | }, 11 | 12 | initialize: function (options) { 13 | this.setOptions(options); 14 | if ($(this.options.DOM)) { 15 | this.element = $(this.options.DOM); 16 | if (this.occlude()) return this.occluded; 17 | 18 | this.element.getFirst('.toggler').addClass('active'); 19 | this.accordion = new Fx.Accordion('#' + this.options.DOM + ' .toggler', '#' + this.options.DOM + ' .elementBody'); 20 | this.accordion.addEvent('active', function(toggler, element) { 21 | toggler.addClass('active').getSiblings('.toggler').removeClass('active'); 22 | this.fireEvent('accordion_activated'); 23 | // 700 ms after launch the animation should be finished... 24 | this.fireEvent('accordion_resized',[]); 25 | }.bind(this)); 26 | var toggleSidebar = $(this.options.toggleSidebar); 27 | if (toggleSidebar) { 28 | if (Layout.isMobile){ 29 | toggleSidebar.show(); 30 | } 31 | toggleSidebar.addEvent('click', this.toggle.bind(this)); 32 | } 33 | this.reportAbuse.setup(); 34 | // this.showJobs(); 35 | } 36 | }, 37 | 38 | toElement: function() { 39 | return this.element; 40 | }, 41 | 42 | showJobs: function(){ 43 | var jobEl = document.id("job"); 44 | if (jobEl){ 45 | jobEl.set("styles", { 46 | display: "block", 47 | opacity: 0 48 | }); 49 | var subs = "

{title}

{job_type} at {company_name}

{location}

"; 50 | var url = "http://jobs.jsfiddle.net/jobs/{url}"; 51 | new Request.JSONP({ 52 | url: "http://jobs.jsfiddle.net/random.js", 53 | onSuccess: function(job){ 54 | if (job.id !== "undefined"){ 55 | jobEl.fade(1); 56 | jobEl.set("html", subs.substitute(job)); 57 | jobEl.set("href", url.substitute(job)); 58 | } 59 | } 60 | }).send(); 61 | } 62 | }, 63 | 64 | hide: function() { 65 | this.element.hide(); 66 | this.contentMargin = $('content').getStyle('marginLeft'); 67 | $('content').setStyle('marginLeft', 13); 68 | this.hidden = true; 69 | Layout.resize(); 70 | }, 71 | 72 | show: function() { 73 | $('content').setStyle('marginLeft', this.contentMargin); 74 | this.element.show(); 75 | this.hidden = false; 76 | Layout.resize(); 77 | }, 78 | 79 | toggle: function(ev) { 80 | var label = $(this.options.toggleSidebar).getElement('span'); 81 | if (label.get('text') === 'Hide sidebar'){ 82 | label.set('text', 'Show sidebar'); 83 | } else { 84 | label.set('text', 'Hide sidebar'); 85 | } 86 | label.toggleClass('hidden'); 87 | if (ev) { 88 | ev.stop(); 89 | } 90 | if (this.hidden) return this.show(); 91 | return this.hide(); 92 | }, 93 | 94 | reportAbuse: { 95 | 96 | setup: function(){ 97 | this.element = { 98 | textarea: document.id('abuse-text'), 99 | submit: document.id('send-abuse') 100 | }; 101 | 102 | if (this.element.textarea && this.element.submit){ 103 | this.element.submit.addEvents({ 104 | click: this.validate.bind(this) 105 | }); 106 | } 107 | }, 108 | 109 | validate: function(event){ 110 | event.stop(); 111 | 112 | if (this.element.textarea.get('value').trim() !== ''){ 113 | this.send(); 114 | } else { 115 | this.element.textarea.highlight(); 116 | } 117 | }, 118 | 119 | send: function(){ 120 | new Request.JSON({ 121 | url: this.element.submit.get('href'), 122 | data: { 123 | text: this.element.textarea.get('value'), 124 | url: document.location.href 125 | }, 126 | onComplete: this.hideFields.bind(this) 127 | }).send(); 128 | }, 129 | 130 | hideFields: function(){ 131 | var notification = Elements.from('

Thanks for reporting. We\'ll look into this as soon as possible.

'); 132 | notification.fade('hide'); 133 | notification.inject(this.element.textarea, 'after'); 134 | notification.fade(1); 135 | this.element.textarea.hide(); 136 | this.element.submit.hide(); 137 | } 138 | 139 | } 140 | }); 141 | -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/Sidebar-e82c2ea250e964d7d1d8fa8523f9a083.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/Sidebar-e82c2ea250e964d7d1d8fa8523f9a083.js.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/Sidebar.js: -------------------------------------------------------------------------------- 1 | // #TODO: refactor Accordion to fireEvent onCompleted when animation finishes 2 | // It probably should use chaining 3 | 4 | var Sidebar = new Class({ 5 | Implements: [Options, Class.Occlude, Events], 6 | parameter: "Sidebar", 7 | options: { 8 | DOM: '', 9 | toggleSidebar: 'toggleSidebar' 10 | }, 11 | 12 | initialize: function (options) { 13 | this.setOptions(options); 14 | if ($(this.options.DOM)) { 15 | this.element = $(this.options.DOM); 16 | if (this.occlude()) return this.occluded; 17 | 18 | this.element.getFirst('.toggler').addClass('active'); 19 | this.accordion = new Fx.Accordion('#' + this.options.DOM + ' .toggler', '#' + this.options.DOM + ' .elementBody'); 20 | this.accordion.addEvent('active', function(toggler, element) { 21 | toggler.addClass('active').getSiblings('.toggler').removeClass('active'); 22 | this.fireEvent('accordion_activated'); 23 | // 700 ms after launch the animation should be finished... 24 | this.fireEvent('accordion_resized',[]); 25 | }.bind(this)); 26 | var toggleSidebar = $(this.options.toggleSidebar); 27 | if (toggleSidebar) { 28 | if (Layout.isMobile){ 29 | toggleSidebar.show(); 30 | } 31 | toggleSidebar.addEvent('click', this.toggle.bind(this)); 32 | } 33 | this.reportAbuse.setup(); 34 | // this.showJobs(); 35 | } 36 | }, 37 | 38 | toElement: function() { 39 | return this.element; 40 | }, 41 | 42 | showJobs: function(){ 43 | var jobEl = document.id("job"); 44 | if (jobEl){ 45 | jobEl.set("styles", { 46 | display: "block", 47 | opacity: 0 48 | }); 49 | var subs = "

{title}

{job_type} at {company_name}

{location}

"; 50 | var url = "http://jobs.jsfiddle.net/jobs/{url}"; 51 | new Request.JSONP({ 52 | url: "http://jobs.jsfiddle.net/random.js", 53 | onSuccess: function(job){ 54 | if (job.id !== "undefined"){ 55 | jobEl.fade(1); 56 | jobEl.set("html", subs.substitute(job)); 57 | jobEl.set("href", url.substitute(job)); 58 | } 59 | } 60 | }).send(); 61 | } 62 | }, 63 | 64 | hide: function() { 65 | this.element.hide(); 66 | this.contentMargin = $('content').getStyle('marginLeft'); 67 | $('content').setStyle('marginLeft', 13); 68 | this.hidden = true; 69 | Layout.resize(); 70 | }, 71 | 72 | show: function() { 73 | $('content').setStyle('marginLeft', this.contentMargin); 74 | this.element.show(); 75 | this.hidden = false; 76 | Layout.resize(); 77 | }, 78 | 79 | toggle: function(ev) { 80 | var label = $(this.options.toggleSidebar).getElement('span'); 81 | if (label.get('text') === 'Hide sidebar'){ 82 | label.set('text', 'Show sidebar'); 83 | } else { 84 | label.set('text', 'Hide sidebar'); 85 | } 86 | label.toggleClass('hidden'); 87 | if (ev) { 88 | ev.stop(); 89 | } 90 | if (this.hidden) return this.show(); 91 | return this.hide(); 92 | }, 93 | 94 | reportAbuse: { 95 | 96 | setup: function(){ 97 | this.element = { 98 | textarea: document.id('abuse-text'), 99 | submit: document.id('send-abuse') 100 | }; 101 | 102 | if (this.element.textarea && this.element.submit){ 103 | this.element.submit.addEvents({ 104 | click: this.validate.bind(this) 105 | }); 106 | } 107 | }, 108 | 109 | validate: function(event){ 110 | event.stop(); 111 | 112 | if (this.element.textarea.get('value').trim() !== ''){ 113 | this.send(); 114 | } else { 115 | this.element.textarea.highlight(); 116 | } 117 | }, 118 | 119 | send: function(){ 120 | new Request.JSON({ 121 | url: this.element.submit.get('href'), 122 | data: { 123 | text: this.element.textarea.get('value'), 124 | url: document.location.href 125 | }, 126 | onComplete: this.hideFields.bind(this) 127 | }).send(); 128 | }, 129 | 130 | hideFields: function(){ 131 | var notification = Elements.from('

Thanks for reporting. We\'ll look into this as soon as possible.

'); 132 | notification.fade('hide'); 133 | notification.inject(this.element.textarea, 'after'); 134 | notification.fade(1); 135 | this.element.textarea.hide(); 136 | this.element.submit.hide(); 137 | } 138 | 139 | } 140 | }); 141 | -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/Sidebar.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/Sidebar.js.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/analytics-eed8ec65a6dd9b05eed6d4a02e1439e4.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/analytics-eed8ec65a6dd9b05eed6d4a02e1439e4.js.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/analytics.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/analytics.js.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/beautifier-ca2ebb3bbc7de40dca10d6301b6c92a6.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/beautifier-ca2ebb3bbc7de40dca10d6301b6c92a6.js.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/beautifier.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/beautifier.js.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/codemirror-e27f8ffe66c50de28b57fef7622cacc5.css.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/codemirror-e27f8ffe66c50de28b57fef7622cacc5.css.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/codemirror-e3378a506088e40a05be4d6a7607f264.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/codemirror-e3378a506088e40a05be4d6a7607f264.js.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/codemirror.css.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/codemirror.css.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/codemirror.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/codemirror.js.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/coffeescript-0e5610e38633c1b9932d6b72949d7510.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/coffeescript-0e5610e38633c1b9932d6b72949d7510.js.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/coffeescript.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/coffeescript.js.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/css-b68d20ce073c2a809415d5e3ea6c9c84.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/css-b68d20ce073c2a809415d5e3ea6c9c84.js.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/css.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/css.js.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/elusive-webfont-35d1310760ca59973d80eecbe0312f89.css.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/elusive-webfont-35d1310760ca59973d80eecbe0312f89.css.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/elusive-webfont.css.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/elusive-webfont.css.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/emmet-ceb830bbdfe3bc6723f9ce17f5e537fe.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/emmet-ceb830bbdfe3bc6723f9ce17f5e537fe.js.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/emmet.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/emmet.js.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/heyoffline-663b125a188e7236f87ddac9ce1895e0.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/heyoffline-663b125a188e7236f87ddac9ce1895e0.js.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/heyoffline.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/heyoffline.js.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/htmlmixed-4c7ab27882547c9075bc3a92c6278fbb.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function(mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror"), require("../xml/xml"), require("../javascript/javascript"), require("../css/css")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror", "../xml/xml", "../javascript/javascript", "../css/css"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function(CodeMirror) { 12 | "use strict"; 13 | 14 | CodeMirror.defineMode("htmlmixed", function(config, parserConfig) { 15 | var htmlMode = CodeMirror.getMode(config, {name: "xml", 16 | htmlMode: true, 17 | multilineTagIndentFactor: parserConfig.multilineTagIndentFactor, 18 | multilineTagIndentPastTag: parserConfig.multilineTagIndentPastTag}); 19 | var cssMode = CodeMirror.getMode(config, "css"); 20 | 21 | var scriptTypes = [], scriptTypesConf = parserConfig && parserConfig.scriptTypes; 22 | scriptTypes.push({matches: /^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^$/i, 23 | mode: CodeMirror.getMode(config, "javascript")}); 24 | if (scriptTypesConf) for (var i = 0; i < scriptTypesConf.length; ++i) { 25 | var conf = scriptTypesConf[i]; 26 | scriptTypes.push({matches: conf.matches, mode: conf.mode && CodeMirror.getMode(config, conf.mode)}); 27 | } 28 | scriptTypes.push({matches: /./, 29 | mode: CodeMirror.getMode(config, "text/plain")}); 30 | 31 | function html(stream, state) { 32 | var tagName = state.htmlState.tagName; 33 | if (tagName) tagName = tagName.toLowerCase(); 34 | var style = htmlMode.token(stream, state.htmlState); 35 | if (tagName == "script" && /\btag\b/.test(style) && stream.current() == ">") { 36 | // Script block: mode to change to depends on type attribute 37 | var scriptType = stream.string.slice(Math.max(0, stream.pos - 100), stream.pos).match(/\btype\s*=\s*("[^"]+"|'[^']+'|\S+)[^<]*$/i); 38 | scriptType = scriptType ? scriptType[1] : ""; 39 | if (scriptType && /[\"\']/.test(scriptType.charAt(0))) scriptType = scriptType.slice(1, scriptType.length - 1); 40 | for (var i = 0; i < scriptTypes.length; ++i) { 41 | var tp = scriptTypes[i]; 42 | if (typeof tp.matches == "string" ? scriptType == tp.matches : tp.matches.test(scriptType)) { 43 | if (tp.mode) { 44 | state.token = script; 45 | state.localMode = tp.mode; 46 | state.localState = tp.mode.startState && tp.mode.startState(htmlMode.indent(state.htmlState, "")); 47 | } 48 | break; 49 | } 50 | } 51 | } else if (tagName == "style" && /\btag\b/.test(style) && stream.current() == ">") { 52 | state.token = css; 53 | state.localMode = cssMode; 54 | state.localState = cssMode.startState(htmlMode.indent(state.htmlState, "")); 55 | } 56 | return style; 57 | } 58 | function maybeBackup(stream, pat, style) { 59 | var cur = stream.current(); 60 | var close = cur.search(pat); 61 | if (close > -1) stream.backUp(cur.length - close); 62 | else if (cur.match(/<\/?$/)) { 63 | stream.backUp(cur.length); 64 | if (!stream.match(pat, false)) stream.match(cur); 65 | } 66 | return style; 67 | } 68 | function script(stream, state) { 69 | if (stream.match(/^<\/\s*script\s*>/i, false)) { 70 | state.token = html; 71 | state.localState = state.localMode = null; 72 | return null; 73 | } 74 | return maybeBackup(stream, /<\/\s*script\s*>/, 75 | state.localMode.token(stream, state.localState)); 76 | } 77 | function css(stream, state) { 78 | if (stream.match(/^<\/\s*style\s*>/i, false)) { 79 | state.token = html; 80 | state.localState = state.localMode = null; 81 | return null; 82 | } 83 | return maybeBackup(stream, /<\/\s*style\s*>/, 84 | cssMode.token(stream, state.localState)); 85 | } 86 | 87 | return { 88 | startState: function() { 89 | var state = htmlMode.startState(); 90 | return {token: html, localMode: null, localState: null, htmlState: state}; 91 | }, 92 | 93 | copyState: function(state) { 94 | if (state.localState) 95 | var local = CodeMirror.copyState(state.localMode, state.localState); 96 | return {token: state.token, localMode: state.localMode, localState: local, 97 | htmlState: CodeMirror.copyState(htmlMode, state.htmlState)}; 98 | }, 99 | 100 | token: function(stream, state) { 101 | return state.token(stream, state); 102 | }, 103 | 104 | indent: function(state, textAfter) { 105 | if (!state.localMode || /^\s*<\//.test(textAfter)) 106 | return htmlMode.indent(state.htmlState, textAfter); 107 | else if (state.localMode.indent) 108 | return state.localMode.indent(state.localState, textAfter); 109 | else 110 | return CodeMirror.Pass; 111 | }, 112 | 113 | innerMode: function(state) { 114 | return {state: state.localState || state.htmlState, mode: state.localMode || htmlMode}; 115 | } 116 | }; 117 | }, "xml", "javascript", "css"); 118 | 119 | CodeMirror.defineMIME("text/html", "htmlmixed"); 120 | 121 | }); 122 | -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/htmlmixed-4c7ab27882547c9075bc3a92c6278fbb.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/htmlmixed-4c7ab27882547c9075bc3a92c6278fbb.js.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/htmlmixed.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function(mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror"), require("../xml/xml"), require("../javascript/javascript"), require("../css/css")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror", "../xml/xml", "../javascript/javascript", "../css/css"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function(CodeMirror) { 12 | "use strict"; 13 | 14 | CodeMirror.defineMode("htmlmixed", function(config, parserConfig) { 15 | var htmlMode = CodeMirror.getMode(config, {name: "xml", 16 | htmlMode: true, 17 | multilineTagIndentFactor: parserConfig.multilineTagIndentFactor, 18 | multilineTagIndentPastTag: parserConfig.multilineTagIndentPastTag}); 19 | var cssMode = CodeMirror.getMode(config, "css"); 20 | 21 | var scriptTypes = [], scriptTypesConf = parserConfig && parserConfig.scriptTypes; 22 | scriptTypes.push({matches: /^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^$/i, 23 | mode: CodeMirror.getMode(config, "javascript")}); 24 | if (scriptTypesConf) for (var i = 0; i < scriptTypesConf.length; ++i) { 25 | var conf = scriptTypesConf[i]; 26 | scriptTypes.push({matches: conf.matches, mode: conf.mode && CodeMirror.getMode(config, conf.mode)}); 27 | } 28 | scriptTypes.push({matches: /./, 29 | mode: CodeMirror.getMode(config, "text/plain")}); 30 | 31 | function html(stream, state) { 32 | var tagName = state.htmlState.tagName; 33 | if (tagName) tagName = tagName.toLowerCase(); 34 | var style = htmlMode.token(stream, state.htmlState); 35 | if (tagName == "script" && /\btag\b/.test(style) && stream.current() == ">") { 36 | // Script block: mode to change to depends on type attribute 37 | var scriptType = stream.string.slice(Math.max(0, stream.pos - 100), stream.pos).match(/\btype\s*=\s*("[^"]+"|'[^']+'|\S+)[^<]*$/i); 38 | scriptType = scriptType ? scriptType[1] : ""; 39 | if (scriptType && /[\"\']/.test(scriptType.charAt(0))) scriptType = scriptType.slice(1, scriptType.length - 1); 40 | for (var i = 0; i < scriptTypes.length; ++i) { 41 | var tp = scriptTypes[i]; 42 | if (typeof tp.matches == "string" ? scriptType == tp.matches : tp.matches.test(scriptType)) { 43 | if (tp.mode) { 44 | state.token = script; 45 | state.localMode = tp.mode; 46 | state.localState = tp.mode.startState && tp.mode.startState(htmlMode.indent(state.htmlState, "")); 47 | } 48 | break; 49 | } 50 | } 51 | } else if (tagName == "style" && /\btag\b/.test(style) && stream.current() == ">") { 52 | state.token = css; 53 | state.localMode = cssMode; 54 | state.localState = cssMode.startState(htmlMode.indent(state.htmlState, "")); 55 | } 56 | return style; 57 | } 58 | function maybeBackup(stream, pat, style) { 59 | var cur = stream.current(); 60 | var close = cur.search(pat); 61 | if (close > -1) stream.backUp(cur.length - close); 62 | else if (cur.match(/<\/?$/)) { 63 | stream.backUp(cur.length); 64 | if (!stream.match(pat, false)) stream.match(cur); 65 | } 66 | return style; 67 | } 68 | function script(stream, state) { 69 | if (stream.match(/^<\/\s*script\s*>/i, false)) { 70 | state.token = html; 71 | state.localState = state.localMode = null; 72 | return null; 73 | } 74 | return maybeBackup(stream, /<\/\s*script\s*>/, 75 | state.localMode.token(stream, state.localState)); 76 | } 77 | function css(stream, state) { 78 | if (stream.match(/^<\/\s*style\s*>/i, false)) { 79 | state.token = html; 80 | state.localState = state.localMode = null; 81 | return null; 82 | } 83 | return maybeBackup(stream, /<\/\s*style\s*>/, 84 | cssMode.token(stream, state.localState)); 85 | } 86 | 87 | return { 88 | startState: function() { 89 | var state = htmlMode.startState(); 90 | return {token: html, localMode: null, localState: null, htmlState: state}; 91 | }, 92 | 93 | copyState: function(state) { 94 | if (state.localState) 95 | var local = CodeMirror.copyState(state.localMode, state.localState); 96 | return {token: state.token, localMode: state.localMode, localState: local, 97 | htmlState: CodeMirror.copyState(htmlMode, state.htmlState)}; 98 | }, 99 | 100 | token: function(stream, state) { 101 | return state.token(stream, state); 102 | }, 103 | 104 | indent: function(state, textAfter) { 105 | if (!state.localMode || /^\s*<\//.test(textAfter)) 106 | return htmlMode.indent(state.htmlState, textAfter); 107 | else if (state.localMode.indent) 108 | return state.localMode.indent(state.localState, textAfter); 109 | else 110 | return CodeMirror.Pass; 111 | }, 112 | 113 | innerMode: function(state) { 114 | return {state: state.localState || state.htmlState, mode: state.localMode || htmlMode}; 115 | } 116 | }; 117 | }, "xml", "javascript", "css"); 118 | 119 | CodeMirror.defineMIME("text/html", "htmlmixed"); 120 | 121 | }); 122 | -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/htmlmixed.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/htmlmixed.js.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/javascript-51b0e74a915e10ed9498e6b0035ae4b3.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/javascript-51b0e74a915e10ed9498e6b0035ae4b3.js.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/javascript-hint-8febf4d6664e133fac9da1da672564cd.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/javascript-hint-8febf4d6664e133fac9da1da672564cd.js.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/javascript-hint.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/javascript-hint.js.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/javascript.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/javascript.js.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/jshint-6f67c07133fa77d2c0056ee78b33b2cf.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/jshint-6f67c07133fa77d2c0056ee78b33b2cf.js.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/jshint.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/jshint.js.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/light-d41d8cd98f00b204e9800998ecf8427e.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/light-d41d8cd98f00b204e9800998ecf8427e.css -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/light-d41d8cd98f00b204e9800998ecf8427e.css.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/light-d41d8cd98f00b204e9800998ecf8427e.css.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/light.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/light.css -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/light.css.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/light.css.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/matchbrackets-94c58e98823144e56932aa2611c51dff.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function(mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function(CodeMirror) { 12 | var ie_lt8 = /MSIE \d/.test(navigator.userAgent) && 13 | (document.documentMode == null || document.documentMode < 8); 14 | 15 | var Pos = CodeMirror.Pos; 16 | 17 | var matching = {"(": ")>", ")": "(<", "[": "]>", "]": "[<", "{": "}>", "}": "{<"}; 18 | 19 | function findMatchingBracket(cm, where, strict, config) { 20 | var line = cm.getLineHandle(where.line), pos = where.ch - 1; 21 | var match = (pos >= 0 && matching[line.text.charAt(pos)]) || matching[line.text.charAt(++pos)]; 22 | if (!match) return null; 23 | var dir = match.charAt(1) == ">" ? 1 : -1; 24 | if (strict && (dir > 0) != (pos == where.ch)) return null; 25 | var style = cm.getTokenTypeAt(Pos(where.line, pos + 1)); 26 | 27 | var found = scanForBracket(cm, Pos(where.line, pos + (dir > 0 ? 1 : 0)), dir, style || null, config); 28 | if (found == null) return null; 29 | return {from: Pos(where.line, pos), to: found && found.pos, 30 | match: found && found.ch == match.charAt(0), forward: dir > 0}; 31 | } 32 | 33 | // bracketRegex is used to specify which type of bracket to scan 34 | // should be a regexp, e.g. /[[\]]/ 35 | // 36 | // Note: If "where" is on an open bracket, then this bracket is ignored. 37 | // 38 | // Returns false when no bracket was found, null when it reached 39 | // maxScanLines and gave up 40 | function scanForBracket(cm, where, dir, style, config) { 41 | var maxScanLen = (config && config.maxScanLineLength) || 10000; 42 | var maxScanLines = (config && config.maxScanLines) || 1000; 43 | 44 | var stack = []; 45 | var re = config && config.bracketRegex ? config.bracketRegex : /[(){}[\]]/; 46 | var lineEnd = dir > 0 ? Math.min(where.line + maxScanLines, cm.lastLine() + 1) 47 | : Math.max(cm.firstLine() - 1, where.line - maxScanLines); 48 | for (var lineNo = where.line; lineNo != lineEnd; lineNo += dir) { 49 | var line = cm.getLine(lineNo); 50 | if (!line) continue; 51 | var pos = dir > 0 ? 0 : line.length - 1, end = dir > 0 ? line.length : -1; 52 | if (line.length > maxScanLen) continue; 53 | if (lineNo == where.line) pos = where.ch - (dir < 0 ? 1 : 0); 54 | for (; pos != end; pos += dir) { 55 | var ch = line.charAt(pos); 56 | if (re.test(ch) && (style === undefined || cm.getTokenTypeAt(Pos(lineNo, pos + 1)) == style)) { 57 | var match = matching[ch]; 58 | if ((match.charAt(1) == ">") == (dir > 0)) stack.push(ch); 59 | else if (!stack.length) return {pos: Pos(lineNo, pos), ch: ch}; 60 | else stack.pop(); 61 | } 62 | } 63 | } 64 | return lineNo - dir == (dir > 0 ? cm.lastLine() : cm.firstLine()) ? false : null; 65 | } 66 | 67 | function matchBrackets(cm, autoclear, config) { 68 | // Disable brace matching in long lines, since it'll cause hugely slow updates 69 | var maxHighlightLen = cm.state.matchBrackets.maxHighlightLineLength || 1000; 70 | var marks = [], ranges = cm.listSelections(); 71 | for (var i = 0; i < ranges.length; i++) { 72 | var match = ranges[i].empty() && findMatchingBracket(cm, ranges[i].head, false, config); 73 | if (match && cm.getLine(match.from.line).length <= maxHighlightLen) { 74 | var style = match.match ? "CodeMirror-matchingbracket" : "CodeMirror-nonmatchingbracket"; 75 | marks.push(cm.markText(match.from, Pos(match.from.line, match.from.ch + 1), {className: style})); 76 | if (match.to && cm.getLine(match.to.line).length <= maxHighlightLen) 77 | marks.push(cm.markText(match.to, Pos(match.to.line, match.to.ch + 1), {className: style})); 78 | } 79 | } 80 | 81 | if (marks.length) { 82 | // Kludge to work around the IE bug from issue #1193, where text 83 | // input stops going to the textare whever this fires. 84 | if (ie_lt8 && cm.state.focused) cm.focus(); 85 | 86 | var clear = function() { 87 | cm.operation(function() { 88 | for (var i = 0; i < marks.length; i++) marks[i].clear(); 89 | }); 90 | }; 91 | if (autoclear) setTimeout(clear, 800); 92 | else return clear; 93 | } 94 | } 95 | 96 | var currentlyHighlighted = null; 97 | function doMatchBrackets(cm) { 98 | cm.operation(function() { 99 | if (currentlyHighlighted) {currentlyHighlighted(); currentlyHighlighted = null;} 100 | currentlyHighlighted = matchBrackets(cm, false, cm.state.matchBrackets); 101 | }); 102 | } 103 | 104 | CodeMirror.defineOption("matchBrackets", false, function(cm, val, old) { 105 | if (old && old != CodeMirror.Init) 106 | cm.off("cursorActivity", doMatchBrackets); 107 | if (val) { 108 | cm.state.matchBrackets = typeof val == "object" ? val : {}; 109 | cm.on("cursorActivity", doMatchBrackets); 110 | } 111 | }); 112 | 113 | CodeMirror.defineExtension("matchBrackets", function() {matchBrackets(this, true);}); 114 | CodeMirror.defineExtension("findMatchingBracket", function(pos, strict, config){ 115 | return findMatchingBracket(this, pos, strict, config); 116 | }); 117 | CodeMirror.defineExtension("scanForBracket", function(pos, dir, style, config){ 118 | return scanForBracket(this, pos, dir, style, config); 119 | }); 120 | }); 121 | -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/matchbrackets-94c58e98823144e56932aa2611c51dff.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/matchbrackets-94c58e98823144e56932aa2611c51dff.js.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/matchbrackets.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function(mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function(CodeMirror) { 12 | var ie_lt8 = /MSIE \d/.test(navigator.userAgent) && 13 | (document.documentMode == null || document.documentMode < 8); 14 | 15 | var Pos = CodeMirror.Pos; 16 | 17 | var matching = {"(": ")>", ")": "(<", "[": "]>", "]": "[<", "{": "}>", "}": "{<"}; 18 | 19 | function findMatchingBracket(cm, where, strict, config) { 20 | var line = cm.getLineHandle(where.line), pos = where.ch - 1; 21 | var match = (pos >= 0 && matching[line.text.charAt(pos)]) || matching[line.text.charAt(++pos)]; 22 | if (!match) return null; 23 | var dir = match.charAt(1) == ">" ? 1 : -1; 24 | if (strict && (dir > 0) != (pos == where.ch)) return null; 25 | var style = cm.getTokenTypeAt(Pos(where.line, pos + 1)); 26 | 27 | var found = scanForBracket(cm, Pos(where.line, pos + (dir > 0 ? 1 : 0)), dir, style || null, config); 28 | if (found == null) return null; 29 | return {from: Pos(where.line, pos), to: found && found.pos, 30 | match: found && found.ch == match.charAt(0), forward: dir > 0}; 31 | } 32 | 33 | // bracketRegex is used to specify which type of bracket to scan 34 | // should be a regexp, e.g. /[[\]]/ 35 | // 36 | // Note: If "where" is on an open bracket, then this bracket is ignored. 37 | // 38 | // Returns false when no bracket was found, null when it reached 39 | // maxScanLines and gave up 40 | function scanForBracket(cm, where, dir, style, config) { 41 | var maxScanLen = (config && config.maxScanLineLength) || 10000; 42 | var maxScanLines = (config && config.maxScanLines) || 1000; 43 | 44 | var stack = []; 45 | var re = config && config.bracketRegex ? config.bracketRegex : /[(){}[\]]/; 46 | var lineEnd = dir > 0 ? Math.min(where.line + maxScanLines, cm.lastLine() + 1) 47 | : Math.max(cm.firstLine() - 1, where.line - maxScanLines); 48 | for (var lineNo = where.line; lineNo != lineEnd; lineNo += dir) { 49 | var line = cm.getLine(lineNo); 50 | if (!line) continue; 51 | var pos = dir > 0 ? 0 : line.length - 1, end = dir > 0 ? line.length : -1; 52 | if (line.length > maxScanLen) continue; 53 | if (lineNo == where.line) pos = where.ch - (dir < 0 ? 1 : 0); 54 | for (; pos != end; pos += dir) { 55 | var ch = line.charAt(pos); 56 | if (re.test(ch) && (style === undefined || cm.getTokenTypeAt(Pos(lineNo, pos + 1)) == style)) { 57 | var match = matching[ch]; 58 | if ((match.charAt(1) == ">") == (dir > 0)) stack.push(ch); 59 | else if (!stack.length) return {pos: Pos(lineNo, pos), ch: ch}; 60 | else stack.pop(); 61 | } 62 | } 63 | } 64 | return lineNo - dir == (dir > 0 ? cm.lastLine() : cm.firstLine()) ? false : null; 65 | } 66 | 67 | function matchBrackets(cm, autoclear, config) { 68 | // Disable brace matching in long lines, since it'll cause hugely slow updates 69 | var maxHighlightLen = cm.state.matchBrackets.maxHighlightLineLength || 1000; 70 | var marks = [], ranges = cm.listSelections(); 71 | for (var i = 0; i < ranges.length; i++) { 72 | var match = ranges[i].empty() && findMatchingBracket(cm, ranges[i].head, false, config); 73 | if (match && cm.getLine(match.from.line).length <= maxHighlightLen) { 74 | var style = match.match ? "CodeMirror-matchingbracket" : "CodeMirror-nonmatchingbracket"; 75 | marks.push(cm.markText(match.from, Pos(match.from.line, match.from.ch + 1), {className: style})); 76 | if (match.to && cm.getLine(match.to.line).length <= maxHighlightLen) 77 | marks.push(cm.markText(match.to, Pos(match.to.line, match.to.ch + 1), {className: style})); 78 | } 79 | } 80 | 81 | if (marks.length) { 82 | // Kludge to work around the IE bug from issue #1193, where text 83 | // input stops going to the textare whever this fires. 84 | if (ie_lt8 && cm.state.focused) cm.focus(); 85 | 86 | var clear = function() { 87 | cm.operation(function() { 88 | for (var i = 0; i < marks.length; i++) marks[i].clear(); 89 | }); 90 | }; 91 | if (autoclear) setTimeout(clear, 800); 92 | else return clear; 93 | } 94 | } 95 | 96 | var currentlyHighlighted = null; 97 | function doMatchBrackets(cm) { 98 | cm.operation(function() { 99 | if (currentlyHighlighted) {currentlyHighlighted(); currentlyHighlighted = null;} 100 | currentlyHighlighted = matchBrackets(cm, false, cm.state.matchBrackets); 101 | }); 102 | } 103 | 104 | CodeMirror.defineOption("matchBrackets", false, function(cm, val, old) { 105 | if (old && old != CodeMirror.Init) 106 | cm.off("cursorActivity", doMatchBrackets); 107 | if (val) { 108 | cm.state.matchBrackets = typeof val == "object" ? val : {}; 109 | cm.on("cursorActivity", doMatchBrackets); 110 | } 111 | }); 112 | 113 | CodeMirror.defineExtension("matchBrackets", function() {matchBrackets(this, true);}); 114 | CodeMirror.defineExtension("findMatchingBracket", function(pos, strict, config){ 115 | return findMatchingBracket(this, pos, strict, config); 116 | }); 117 | CodeMirror.defineExtension("scanForBracket", function(pos, dir, style, config){ 118 | return scanForBracket(this, pos, dir, style, config); 119 | }); 120 | }); 121 | -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/matchbrackets.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/matchbrackets.js.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/moo-clientcide-1.3-eb46433f6a58d241c2b11918c5763601.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/moo-clientcide-1.3-eb46433f6a58d241c2b11918c5763601.js.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/moo-clientcide-1.3.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/moo-clientcide-1.3.js.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/normalize-d5e58d529ce7268a69faef1263270dae.css: -------------------------------------------------------------------------------- 1 | *, body, button, input, textarea, select { 2 | /*text-rendering: optimizeLegibility;*/ 3 | font-size:100%; 4 | } 5 | 6 | body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td { 7 | margin:0; 8 | padding:0; 9 | } 10 | table { 11 | border-collapse:collapse; 12 | border-spacing:0; 13 | } 14 | fieldset,img { 15 | border:0; 16 | } 17 | address,caption,cite,code,dfn,em,strong,th,var { 18 | font-style:normal; 19 | font-weight:normal; 20 | } 21 | ol,ul { 22 | list-style:none; 23 | } 24 | caption,th { 25 | text-align:left; 26 | } 27 | h1,h2,h3,h4,h5,h6 { 28 | font-size:100%; 29 | font-weight:normal; 30 | } 31 | q:before,q:after { 32 | content:''; 33 | } 34 | abbr,acronym { border:0;} 35 | 36 | -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/normalize-d5e58d529ce7268a69faef1263270dae.css.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/normalize-d5e58d529ce7268a69faef1263270dae.css.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/normalize.css: -------------------------------------------------------------------------------- 1 | *, body, button, input, textarea, select { 2 | /*text-rendering: optimizeLegibility;*/ 3 | font-size:100%; 4 | } 5 | 6 | body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td { 7 | margin:0; 8 | padding:0; 9 | } 10 | table { 11 | border-collapse:collapse; 12 | border-spacing:0; 13 | } 14 | fieldset,img { 15 | border:0; 16 | } 17 | address,caption,cite,code,dfn,em,strong,th,var { 18 | font-style:normal; 19 | font-weight:normal; 20 | } 21 | ol,ul { 22 | list-style:none; 23 | } 24 | caption,th { 25 | text-align:left; 26 | } 27 | h1,h2,h3,h4,h5,h6 { 28 | font-size:100%; 29 | font-weight:normal; 30 | } 31 | q:before,q:after { 32 | content:''; 33 | } 34 | abbr,acronym { border:0;} 35 | 36 | -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/normalize.css.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/normalize.css.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/prum.min-e3bf3eab2507e6f346de8e47443860d4.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/prum.min-e3bf3eab2507e6f346de8e47443860d4.js.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/prum.min.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/prum.min.js.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/screen-c4850dab6ecde70112551f9d30389e15.css.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/screen-c4850dab6ecde70112551f9d30389e15.css.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/screen.css.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/screen.css.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/searchcursor-a11e9186f471515209a5583f1af6421c.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/searchcursor-a11e9186f471515209a5583f1af6421c.js.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/searchcursor.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/searchcursor.js.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/show-hint-4f4de813619905938fb0014ad7e012c5.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/show-hint-4f4de813619905938fb0014ad7e012c5.js.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/show-hint-630e320a614e7732f6ce1bf37147f27f.css: -------------------------------------------------------------------------------- 1 | .CodeMirror-hints { 2 | position: absolute; 3 | z-index: 10; 4 | overflow: hidden; 5 | list-style: none; 6 | 7 | margin: 0; 8 | padding: 2px; 9 | 10 | -webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2); 11 | -moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2); 12 | box-shadow: 2px 3px 5px rgba(0,0,0,.2); 13 | border-radius: 3px; 14 | border: 1px solid silver; 15 | 16 | background: white; 17 | font-size: 90%; 18 | font-family: monospace; 19 | 20 | max-height: 20em; 21 | overflow-y: auto; 22 | } 23 | 24 | .CodeMirror-hint { 25 | margin: 0; 26 | padding: 0 4px; 27 | border-radius: 2px; 28 | max-width: 19em; 29 | overflow: hidden; 30 | white-space: pre; 31 | color: black; 32 | cursor: pointer; 33 | } 34 | 35 | li.CodeMirror-hint-active { 36 | background: #08f; 37 | color: white; 38 | } 39 | -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/show-hint-630e320a614e7732f6ce1bf37147f27f.css.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/show-hint-630e320a614e7732f6ce1bf37147f27f.css.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/show-hint.css: -------------------------------------------------------------------------------- 1 | .CodeMirror-hints { 2 | position: absolute; 3 | z-index: 10; 4 | overflow: hidden; 5 | list-style: none; 6 | 7 | margin: 0; 8 | padding: 2px; 9 | 10 | -webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2); 11 | -moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2); 12 | box-shadow: 2px 3px 5px rgba(0,0,0,.2); 13 | border-radius: 3px; 14 | border: 1px solid silver; 15 | 16 | background: white; 17 | font-size: 90%; 18 | font-family: monospace; 19 | 20 | max-height: 20em; 21 | overflow-y: auto; 22 | } 23 | 24 | .CodeMirror-hint { 25 | margin: 0; 26 | padding: 0 4px; 27 | border-radius: 2px; 28 | max-width: 19em; 29 | overflow: hidden; 30 | white-space: pre; 31 | color: black; 32 | cursor: pointer; 33 | } 34 | 35 | li.CodeMirror-hint-active { 36 | background: #08f; 37 | color: white; 38 | } 39 | -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/show-hint.css.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/show-hint.css.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/show-hint.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/show-hint.js.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/tricks-0b35e0a5dae0760c36d89d1f4a285956.css: -------------------------------------------------------------------------------- 1 | /* ----------------------------- CLEARFIX ----------------------------------- */ 2 | 3 | .clearfix:after { 4 | content: "."; 5 | display: block; 6 | height: 0; 7 | clear: both; 8 | visibility: hidden; 9 | } 10 | 11 | .clearfix {display: inline-block;} /* for IE/Mac */ -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/tricks-0b35e0a5dae0760c36d89d1f4a285956.css.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/tricks-0b35e0a5dae0760c36d89d1f4a285956.css.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/tricks.css: -------------------------------------------------------------------------------- 1 | /* ----------------------------- CLEARFIX ----------------------------------- */ 2 | 3 | .clearfix:after { 4 | content: "."; 5 | display: block; 6 | height: 0; 7 | clear: both; 8 | visibility: hidden; 9 | } 10 | 11 | .clearfix {display: inline-block;} /* for IE/Mac */ -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/tricks.css.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/tricks.css.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/wafdmsew-fac6b647ee69375abc3e60d86619533f.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/wafdmsew-fac6b647ee69375abc3e60d86619533f.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/wafdmsew.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/wafdmsew.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/xml-d8d7848554564a632f0147cf566acbce.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/xml-d8d7848554564a632f0147cf566acbce.js.gz -------------------------------------------------------------------------------- /priv/static/images/Edit fiddle - JSFiddle_files/xml.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/Edit fiddle - JSFiddle_files/xml.js.gz -------------------------------------------------------------------------------- /priv/static/images/background-660b8233d0b81f85336eaf4ccb88d1f0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/background-660b8233d0b81f85336eaf4ccb88d1f0.jpg -------------------------------------------------------------------------------- /priv/static/images/background-660b8233d0b81f85336eaf4ccb88d1f0.jpg.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/background-660b8233d0b81f85336eaf4ccb88d1f0.jpg.gz -------------------------------------------------------------------------------- /priv/static/images/background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/background.jpg -------------------------------------------------------------------------------- /priv/static/images/background.jpg.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/background.jpg.gz -------------------------------------------------------------------------------- /priv/static/images/blank_tile-c9f83ba339cc09c1d7a8f574c977bf84.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/blank_tile-c9f83ba339cc09c1d7a8f574c977bf84.jpg -------------------------------------------------------------------------------- /priv/static/images/blank_tile-c9f83ba339cc09c1d7a8f574c977bf84.jpg.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/blank_tile-c9f83ba339cc09c1d7a8f574c977bf84.jpg.gz -------------------------------------------------------------------------------- /priv/static/images/blank_tile.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/blank_tile.jpg -------------------------------------------------------------------------------- /priv/static/images/blank_tile.jpg.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/blank_tile.jpg.gz -------------------------------------------------------------------------------- /priv/static/images/cursor-05b42b95ba4805ed3ef738cc00050454.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/cursor-05b42b95ba4805ed3ef738cc00050454.png -------------------------------------------------------------------------------- /priv/static/images/cursor-05b42b95ba4805ed3ef738cc00050454.png.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/cursor-05b42b95ba4805ed3ef738cc00050454.png.gz -------------------------------------------------------------------------------- /priv/static/images/cursor-hand-d736bb826986018683064cbdd0de83bc.svg.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/cursor-hand-d736bb826986018683064cbdd0de83bc.svg.gz -------------------------------------------------------------------------------- /priv/static/images/cursor-hand-white-dea71f978bfe71c7bc1e356672e6871d.svg.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/cursor-hand-white-dea71f978bfe71c7bc1e356672e6871d.svg.gz -------------------------------------------------------------------------------- /priv/static/images/cursor-hand-white.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Layer 1 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /priv/static/images/cursor-hand-white.svg.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/cursor-hand-white.svg.gz -------------------------------------------------------------------------------- /priv/static/images/cursor-hand.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Layer 1 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /priv/static/images/cursor-hand.svg.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/cursor-hand.svg.gz -------------------------------------------------------------------------------- /priv/static/images/cursor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/cursor.png -------------------------------------------------------------------------------- /priv/static/images/cursor.png.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/cursor.png.gz -------------------------------------------------------------------------------- /priv/static/images/elixir-e88d4a4cb965e3ba33767a67c87cbad8.svg: -------------------------------------------------------------------------------- 1 | Made inMade inElixirElixir -------------------------------------------------------------------------------- /priv/static/images/elixir-e88d4a4cb965e3ba33767a67c87cbad8.svg.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/elixir-e88d4a4cb965e3ba33767a67c87cbad8.svg.gz -------------------------------------------------------------------------------- /priv/static/images/elixir.svg: -------------------------------------------------------------------------------- 1 | Made inMade inElixirElixir -------------------------------------------------------------------------------- /priv/static/images/elixir.svg.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/elixir.svg.gz -------------------------------------------------------------------------------- /priv/static/images/favicon-a8ca4e3a2bb8fea46a9ee9e102e7d3eb.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/favicon-a8ca4e3a2bb8fea46a9ee9e102e7d3eb.ico -------------------------------------------------------------------------------- /priv/static/images/favicon-a8ca4e3a2bb8fea46a9ee9e102e7d3eb.ico.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/favicon-a8ca4e3a2bb8fea46a9ee9e102e7d3eb.ico.gz -------------------------------------------------------------------------------- /priv/static/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/favicon.ico -------------------------------------------------------------------------------- /priv/static/images/favicon.ico.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/favicon.ico.gz -------------------------------------------------------------------------------- /priv/static/images/initializing@2x-d4f5dc2fdd3c8746a0c9d7e60f5882bc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/initializing@2x-d4f5dc2fdd3c8746a0c9d7e60f5882bc.png -------------------------------------------------------------------------------- /priv/static/images/initializing@2x-d4f5dc2fdd3c8746a0c9d7e60f5882bc.png.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/initializing@2x-d4f5dc2fdd3c8746a0c9d7e60f5882bc.png.gz -------------------------------------------------------------------------------- /priv/static/images/initializing@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/initializing@2x.png -------------------------------------------------------------------------------- /priv/static/images/initializing@2x.png.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/initializing@2x.png.gz -------------------------------------------------------------------------------- /priv/static/images/lec-cf8ac7f7c006d0b9fe8210d9e1ccca59.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/lec-cf8ac7f7c006d0b9fe8210d9e1ccca59.jpg -------------------------------------------------------------------------------- /priv/static/images/lec-cf8ac7f7c006d0b9fe8210d9e1ccca59.jpg.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/lec-cf8ac7f7c006d0b9fe8210d9e1ccca59.jpg.gz -------------------------------------------------------------------------------- /priv/static/images/lec.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/lec.jpg -------------------------------------------------------------------------------- /priv/static/images/lec.jpg.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/lec.jpg.gz -------------------------------------------------------------------------------- /priv/static/images/mouse-pointer-9de44e398c4b988bea6d9042a50f7a5c.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 13 | 16 | 19 | 23 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /priv/static/images/mouse-pointer-9de44e398c4b988bea6d9042a50f7a5c.svg.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/mouse-pointer-9de44e398c4b988bea6d9042a50f7a5c.svg.gz -------------------------------------------------------------------------------- /priv/static/images/mouse-pointer.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 13 | 16 | 19 | 23 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /priv/static/images/mouse-pointer.svg.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/mouse-pointer.svg.gz -------------------------------------------------------------------------------- /priv/static/images/phoenix-5bd99a0d17dd41bc9d9bf6840abcc089.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/phoenix-5bd99a0d17dd41bc9d9bf6840abcc089.png -------------------------------------------------------------------------------- /priv/static/images/phoenix-5bd99a0d17dd41bc9d9bf6840abcc089.png.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/phoenix-5bd99a0d17dd41bc9d9bf6840abcc089.png.gz -------------------------------------------------------------------------------- /priv/static/images/phoenix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/phoenix.png -------------------------------------------------------------------------------- /priv/static/images/phoenix.png.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/phoenix.png.gz -------------------------------------------------------------------------------- /priv/static/images/samsung-dacd62f757899374440478886af75e25.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/samsung-dacd62f757899374440478886af75e25.jpg -------------------------------------------------------------------------------- /priv/static/images/samsung-dacd62f757899374440478886af75e25.jpg.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/samsung-dacd62f757899374440478886af75e25.jpg.gz -------------------------------------------------------------------------------- /priv/static/images/samsung.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/samsung.jpg -------------------------------------------------------------------------------- /priv/static/images/samsung.jpg.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/samsung.jpg.gz -------------------------------------------------------------------------------- /priv/static/images/samsung2-06ca2713e0dfb5e69065bb61af72f113.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/samsung2-06ca2713e0dfb5e69065bb61af72f113.jpg -------------------------------------------------------------------------------- /priv/static/images/samsung2-06ca2713e0dfb5e69065bb61af72f113.jpg.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/samsung2-06ca2713e0dfb5e69065bb61af72f113.jpg.gz -------------------------------------------------------------------------------- /priv/static/images/samsung2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/samsung2.jpg -------------------------------------------------------------------------------- /priv/static/images/samsung2.jpg.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/samsung2.jpg.gz -------------------------------------------------------------------------------- /priv/static/images/scrabble_board-d5f6f986f3f1a8d2880ae9b004261c5b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/scrabble_board-d5f6f986f3f1a8d2880ae9b004261c5b.png -------------------------------------------------------------------------------- /priv/static/images/scrabble_board-d5f6f986f3f1a8d2880ae9b004261c5b.png.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/scrabble_board-d5f6f986f3f1a8d2880ae9b004261c5b.png.gz -------------------------------------------------------------------------------- /priv/static/images/scrabble_board.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/scrabble_board.png -------------------------------------------------------------------------------- /priv/static/images/scrabble_board.png.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/scrabble_board.png.gz -------------------------------------------------------------------------------- /priv/static/images/scrabble_tiles-c5182c2fa39d2c51afe824a6ba7fb51c.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/scrabble_tiles-c5182c2fa39d2c51afe824a6ba7fb51c.jpg -------------------------------------------------------------------------------- /priv/static/images/scrabble_tiles-c5182c2fa39d2c51afe824a6ba7fb51c.jpg.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/scrabble_tiles-c5182c2fa39d2c51afe824a6ba7fb51c.jpg.gz -------------------------------------------------------------------------------- /priv/static/images/scrabble_tiles.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/scrabble_tiles.jpg -------------------------------------------------------------------------------- /priv/static/images/scrabble_tiles.jpg.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/scrabble_tiles.jpg.gz -------------------------------------------------------------------------------- /priv/static/images/servis-221c6fdf1f18cb85c3e2da557b2f8702.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/servis-221c6fdf1f18cb85c3e2da557b2f8702.jpg -------------------------------------------------------------------------------- /priv/static/images/servis-221c6fdf1f18cb85c3e2da557b2f8702.jpg.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/servis-221c6fdf1f18cb85c3e2da557b2f8702.jpg.gz -------------------------------------------------------------------------------- /priv/static/images/servis.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/servis.jpg -------------------------------------------------------------------------------- /priv/static/images/servis.jpg.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/servis.jpg.gz -------------------------------------------------------------------------------- /priv/static/images/smeg-0640013cacb4a99a63a37ca9424d863f.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/smeg-0640013cacb4a99a63a37ca9424d863f.jpeg -------------------------------------------------------------------------------- /priv/static/images/smeg-0640013cacb4a99a63a37ca9424d863f.jpeg.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/smeg-0640013cacb4a99a63a37ca9424d863f.jpeg.gz -------------------------------------------------------------------------------- /priv/static/images/smeg.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/smeg.jpeg -------------------------------------------------------------------------------- /priv/static/images/smeg.jpeg.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/smeg.jpeg.gz -------------------------------------------------------------------------------- /priv/static/images/textDemoBG-d176f555dc0aa8596542255fa8a46b28.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/textDemoBG-d176f555dc0aa8596542255fa8a46b28.jpg -------------------------------------------------------------------------------- /priv/static/images/textDemoBG-d176f555dc0aa8596542255fa8a46b28.jpg.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/textDemoBG-d176f555dc0aa8596542255fa8a46b28.jpg.gz -------------------------------------------------------------------------------- /priv/static/images/textDemoBG.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/textDemoBG.jpg -------------------------------------------------------------------------------- /priv/static/images/textDemoBG.jpg.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/textDemoBG.jpg.gz -------------------------------------------------------------------------------- /priv/static/images/vector-cursor-hand-faba341010cf762230caa47dec8a689d.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | Layer 1 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /priv/static/images/vector-cursor-hand-faba341010cf762230caa47dec8a689d.svg.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/vector-cursor-hand-faba341010cf762230caa47dec8a689d.svg.gz -------------------------------------------------------------------------------- /priv/static/images/vector-cursor-hand.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | Layer 1 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /priv/static/images/vector-cursor-hand.svg.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/images/vector-cursor-hand.svg.gz -------------------------------------------------------------------------------- /priv/static/js/app-f8111c3e3004fc85dc85f2809500e666.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/js/app-f8111c3e3004fc85dc85f2809500e666.js.gz -------------------------------------------------------------------------------- /priv/static/js/app-fc2a8774ac848c897fe8cb878e6803f8.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/js/app-fc2a8774ac848c897fe8cb878e6803f8.js.gz -------------------------------------------------------------------------------- /priv/static/js/app.js-3783bdfea9e7beece1097016671327a7.map.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/js/app.js-3783bdfea9e7beece1097016671327a7.map.gz -------------------------------------------------------------------------------- /priv/static/js/app.js-e13e9cf5999eb0a14093c7dec2be0450.map.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/js/app.js-e13e9cf5999eb0a14093c7dec2be0450.map.gz -------------------------------------------------------------------------------- /priv/static/js/app.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/js/app.js.gz -------------------------------------------------------------------------------- /priv/static/js/app.js.map.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/js/app.js.map.gz -------------------------------------------------------------------------------- /priv/static/js/vendor-7c4eb1f2a9f4c4d0f31e0e12589b909b.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/js/vendor-7c4eb1f2a9f4c4d0f31e0e12589b909b.js.gz -------------------------------------------------------------------------------- /priv/static/js/vendor-cf11df6212f88e58f11555afbfab7cc0.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/js/vendor-cf11df6212f88e58f11555afbfab7cc0.js.gz -------------------------------------------------------------------------------- /priv/static/js/vendor.js-d1d692d95ebc9ddb674e024d4c1e0a6e.map.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/js/vendor.js-d1d692d95ebc9ddb674e024d4c1e0a6e.map.gz -------------------------------------------------------------------------------- /priv/static/js/vendor.js-dc5cd0e7f8927144a2a28c29c7a6ebc8.map.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/js/vendor.js-dc5cd0e7f8927144a2a28c29c7a6ebc8.map.gz -------------------------------------------------------------------------------- /priv/static/js/vendor.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/js/vendor.js.gz -------------------------------------------------------------------------------- /priv/static/js/vendor.js.map.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/js/vendor.js.map.gz -------------------------------------------------------------------------------- /priv/static/robots-067185ba27a5d9139b10a759679045bf.txt: -------------------------------------------------------------------------------- 1 | # See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file 2 | # 3 | # To ban all spiders from the entire site uncomment the next two lines: 4 | # User-agent: * 5 | # Disallow: / 6 | -------------------------------------------------------------------------------- /priv/static/robots-067185ba27a5d9139b10a759679045bf.txt.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/robots-067185ba27a5d9139b10a759679045bf.txt.gz -------------------------------------------------------------------------------- /priv/static/robots.txt: -------------------------------------------------------------------------------- 1 | # See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file 2 | # 3 | # To ban all spiders from the entire site uncomment the next two lines: 4 | # User-agent: * 5 | # Disallow: / 6 | -------------------------------------------------------------------------------- /priv/static/robots.txt.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/priv/static/robots.txt.gz -------------------------------------------------------------------------------- /test/channels/room_channel_test.exs: -------------------------------------------------------------------------------- 1 | defmodule ElixirLetters.RoomChannelTest do 2 | use ElixirLetters.ChannelCase 3 | 4 | alias ElixirLetters.RoomChannel 5 | 6 | setup do 7 | {:ok, _, socket} = subscribe_and_join(RoomChannel, "rooms:lobby") 8 | {:ok, socket: socket} 9 | end 10 | 11 | test "ping replies with status ok", %{socket: socket} do 12 | ref = push socket, "ping", %{"hello" => "there"} 13 | assert_reply ref, :ok, %{"hello" => "there"} 14 | end 15 | 16 | test "shout broadcasts to positions:lobby", %{socket: socket} do 17 | push socket, "shout", %{"hello" => "all"} 18 | assert_broadcast "shout", %{"hello" => "all"} 19 | end 20 | 21 | test "broadcasts are pushed to the client", %{socket: socket} do 22 | broadcast_from! socket, "broadcast", %{"some" => "data"} 23 | assert_push "broadcast", %{"some" => "data"} 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /test/controllers/page_controller_test.exs: -------------------------------------------------------------------------------- 1 | defmodule ElixirLetters.PageControllerTest do 2 | use ElixirLetters.ConnCase 3 | 4 | test "GET /" do 5 | conn = get conn(), "/" 6 | assert html_response(conn, 200) =~ "Welcome to Phoenix!" 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /test/support/channel_case.ex: -------------------------------------------------------------------------------- 1 | defmodule ElixirLetters.ChannelCase do 2 | @moduledoc """ 3 | This module defines the test case to be used by 4 | channel tests. 5 | 6 | Such tests rely on `Phoenix.ChannelTest` and also 7 | imports other functionality to make it easier 8 | to build and query models. 9 | 10 | Finally, if the test case interacts with the database, 11 | it cannot be async. For this reason, every test runs 12 | inside a transaction which is reset at the beginning 13 | of the test unless the test case is marked as async. 14 | """ 15 | 16 | use ExUnit.CaseTemplate 17 | 18 | using do 19 | quote do 20 | # Import conveniences for testing with channels 21 | use Phoenix.ChannelTest 22 | 23 | alias ElixirLetters.Repo 24 | import Ecto.Model 25 | import Ecto.Query, only: [from: 2] 26 | 27 | 28 | # The default endpoint for testing 29 | @endpoint ElixirLetters.Endpoint 30 | end 31 | end 32 | 33 | setup tags do 34 | unless tags[:async] do 35 | Ecto.Adapters.SQL.restart_test_transaction(ElixirLetters.Repo, []) 36 | end 37 | 38 | :ok 39 | end 40 | end 41 | -------------------------------------------------------------------------------- /test/support/conn_case.ex: -------------------------------------------------------------------------------- 1 | defmodule ElixirLetters.ConnCase do 2 | @moduledoc """ 3 | This module defines the test case to be used by 4 | tests that require setting up a connection. 5 | 6 | Such tests rely on `Phoenix.ConnTest` and also 7 | imports other functionality to make it easier 8 | to build and query models. 9 | 10 | Finally, if the test case interacts with the database, 11 | it cannot be async. For this reason, every test runs 12 | inside a transaction which is reset at the beginning 13 | of the test unless the test case is marked as async. 14 | """ 15 | 16 | use ExUnit.CaseTemplate 17 | 18 | using do 19 | quote do 20 | # Import conveniences for testing with connections 21 | use Phoenix.ConnTest 22 | 23 | alias ElixirLetters.Repo 24 | import Ecto.Model 25 | import Ecto.Query, only: [from: 2] 26 | 27 | import ElixirLetters.Router.Helpers 28 | 29 | # The default endpoint for testing 30 | @endpoint ElixirLetters.Endpoint 31 | end 32 | end 33 | 34 | setup tags do 35 | unless tags[:async] do 36 | Ecto.Adapters.SQL.restart_test_transaction(ElixirLetters.Repo, []) 37 | end 38 | 39 | :ok 40 | end 41 | end 42 | -------------------------------------------------------------------------------- /test/support/model_case.ex: -------------------------------------------------------------------------------- 1 | defmodule ElixirLetters.ModelCase do 2 | @moduledoc """ 3 | This module defines the test case to be used by 4 | model tests. 5 | 6 | You may define functions here to be used as helpers in 7 | your model tests. See `errors_on/2`'s definition as reference. 8 | 9 | Finally, if the test case interacts with the database, 10 | it cannot be async. For this reason, every test runs 11 | inside a transaction which is reset at the beginning 12 | of the test unless the test case is marked as async. 13 | """ 14 | 15 | use ExUnit.CaseTemplate 16 | 17 | using do 18 | quote do 19 | alias ElixirLetters.Repo 20 | import Ecto.Model 21 | import Ecto.Query, only: [from: 2] 22 | import ElixirLetters.ModelCase 23 | end 24 | end 25 | 26 | setup tags do 27 | unless tags[:async] do 28 | Ecto.Adapters.SQL.restart_test_transaction(ElixirLetters.Repo, []) 29 | end 30 | 31 | :ok 32 | end 33 | 34 | @doc """ 35 | Helper for returning list of errors in model when passed certain data. 36 | 37 | ## Examples 38 | 39 | Given a User model that has validation for the presence of a value for the 40 | `:name` field and validation that `:password` is "safe": 41 | 42 | iex> errors_on(%User{}, password: "password") 43 | [{:password, "is unsafe"}, {:name, "is blank"}] 44 | 45 | You would then write your assertion like: 46 | 47 | assert {:password, "is unsafe"} in errors_on(%User{}, password: "password") 48 | """ 49 | def errors_on(model, data) do 50 | model.__struct__.changeset(model, data).errors 51 | end 52 | end 53 | -------------------------------------------------------------------------------- /test/test_helper.exs: -------------------------------------------------------------------------------- 1 | ExUnit.start 2 | 3 | Mix.Task.run "ecto.create", ["--quiet"] 4 | Mix.Task.run "ecto.migrate", ["--quiet"] 5 | Ecto.Adapters.SQL.begin_test_transaction(ElixirLetters.Repo) 6 | 7 | -------------------------------------------------------------------------------- /test/views/error_view_test.exs: -------------------------------------------------------------------------------- 1 | defmodule ElixirLetters.ErrorViewTest do 2 | use ElixirLetters.ConnCase, async: true 3 | 4 | # Bring render/3 and render_to_string/3 for testing custom views 5 | import Phoenix.View 6 | 7 | test "renders 404.html" do 8 | assert render_to_string(ElixirLetters.ErrorView, "404.html", []) == 9 | "Page not found" 10 | end 11 | 12 | test "render 500.html" do 13 | assert render_to_string(ElixirLetters.ErrorView, "500.html", []) == 14 | "Server internal error" 15 | end 16 | 17 | test "render any other" do 18 | assert render_to_string(ElixirLetters.ErrorView, "505.html", []) == 19 | "Server internal error" 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /test/views/layout_view_test.exs: -------------------------------------------------------------------------------- 1 | defmodule ElixirLetters.LayoutViewTest do 2 | use ElixirLetters.ConnCase, async: true 3 | end -------------------------------------------------------------------------------- /test/views/page_view_test.exs: -------------------------------------------------------------------------------- 1 | defmodule ElixirLetters.PageViewTest do 2 | use ElixirLetters.ConnCase, async: true 3 | end 4 | -------------------------------------------------------------------------------- /web/channels/room_channel.ex: -------------------------------------------------------------------------------- 1 | defmodule ElixirLetters.RoomChannel do 2 | use ElixirLetters.Web, :channel 3 | #use Phoenix.Channel 4 | alias ElixirLetters.{Room,RoomSupervisor} 5 | require Logger 6 | 7 | @doc """ 8 | Authorize socket to subscribe and broadcast events on this channel & topic 9 | Possible Return Values 10 | `{:ok, socket}` to authorize subscription for channel for requested topic 11 | `:ignore` to deny subscription/broadcast on this channeli 12 | for the requested topic 13 | """ 14 | def join("rooms:" <> topic, payload, socket) do 15 | if authorized?(payload) do 16 | topic = String.slice(topic, 0, 100) 17 | pid = RoomSupervisor.start_room(String.to_atom(topic)) 18 | 19 | Process.flag(:trap_exit, true) 20 | send(self, {:after_join, payload}) 21 | 22 | socket = assign(socket, :pid, pid) 23 | {:ok, socket} 24 | else 25 | {:error, %{reason: "unauthorized"}} 26 | end 27 | end 28 | 29 | def terminate(reason, socket) do 30 | Room.leave(socket.assigns[:pid], socket.assigns[:client_id]) 31 | broadcast! socket, "user_count:update", %{user_count: Room.get_user_count(socket.assigns.pid)} 32 | :ok 33 | end 34 | 35 | def handle_info({:after_join, %{"client_id" => client_id}}, socket) do 36 | Logger.debug "> after_join #{inspect socket.assigns}" 37 | socket = assign(socket, :client_id, client_id) 38 | room_id = socket.assigns.pid 39 | Room.join(room_id, client_id, {}) 40 | broadcast! socket, "user_count:update", %{user_count: Room.get_user_count(room_id)} 41 | push socket, "join", %{status: "connected", positions: Room.get_positions(room_id)} 42 | {:noreply, socket} 43 | end 44 | 45 | def handle_in("set:position", payload, socket) do 46 | #%{"id" => _letter_id, "left" => _left, "top" => _top} = payload["body"] 47 | Room.set_position(socket.assigns.pid, payload["body"]) 48 | broadcast! socket, "update:position", payload 49 | {:noreply, socket} 50 | end 51 | 52 | def handle_in("save:snapshot", _payload, socket) do 53 | Room.save(socket.assigns.pid) 54 | {:noreply, socket} 55 | end 56 | 57 | def handle_in("mousemove", payload, socket) do 58 | broadcast! socket, "mousemove", payload 59 | {:noreply, socket} 60 | end 61 | 62 | # This is invoked every time a notification is being broadcast 63 | # to the client. The default implementation is just to push it 64 | # downstream but one could filter or change the event. 65 | def handle_out(event, payload, socket) do 66 | push socket, event, payload 67 | {:noreply, socket} 68 | end 69 | 70 | @doc """ 71 | Authorization can go here 72 | """ 73 | defp authorized?(_payload) do 74 | true 75 | end 76 | 77 | end 78 | -------------------------------------------------------------------------------- /web/channels/user_socket.ex: -------------------------------------------------------------------------------- 1 | defmodule ElixirLetters.UserSocket do 2 | use Phoenix.Socket 3 | 4 | ## Channels 5 | channel "rooms:*", ElixirLetters.RoomChannel 6 | 7 | ## Transports 8 | transport :websocket, Phoenix.Transports.WebSocket 9 | # transport :longpoll, Phoenix.Transports.LongPoll 10 | 11 | # Socket params are passed from the client and can 12 | # be used to verify and authenticate a user. After 13 | # verification, you can put default assigns into 14 | # the socket that will be set for all channels, ie 15 | # 16 | # {:ok, assign(socket, :user_id, verified_user_id)} 17 | # 18 | # To deny connection, return `:error`. 19 | def connect(_params, socket) do 20 | # {:ok, assign(socket, :user_id, UUID.uuid4)} 21 | {:ok, socket} 22 | end 23 | 24 | # Socket id's are topics that allow you to identify all sockets for a given user: 25 | # 26 | # def id(socket), do: "users_socket:#{socket.assigns.user_id}" 27 | # 28 | # Would allow you to broadcast a "disconnect" event and terminate 29 | # all active sockets and channels for a given user: 30 | # 31 | # ElixirLetters.Endpoint.broadcast("users_socket:" <> user.id, "disconnect", %{}) 32 | # 33 | # Returning `nil` makes this socket anonymous. 34 | def id(_socket), do: nil 35 | end 36 | -------------------------------------------------------------------------------- /web/controllers/page_controller.ex: -------------------------------------------------------------------------------- 1 | defmodule ElixirLetters.PageController do 2 | use ElixirLetters.Web, :controller 3 | 4 | def index(conn, _params) do 5 | render(conn, "index.html") 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /web/models/snapshot.ex: -------------------------------------------------------------------------------- 1 | defmodule ElixirLetters.Snapshot do 2 | use ElixirLetters.Web, :model 3 | 4 | schema "snapshots" do 5 | field :room_name, :string 6 | field :positions, :map 7 | 8 | timestamps 9 | end 10 | 11 | @required_fields ~w(room_name positions) 12 | @optional_fields ~w() 13 | 14 | @doc """ 15 | Creates a changeset based on the `model` and `params`. 16 | 17 | If no params are provided, an invalid changeset is returned 18 | with no validation performed. 19 | """ 20 | def changeset(model, params \\ :empty) do 21 | model 22 | |> cast(params, @required_fields, @optional_fields) 23 | end 24 | 25 | def last(query) do 26 | from p in query, 27 | order_by: [desc: p.id], 28 | limit: 1 29 | end 30 | 31 | end 32 | -------------------------------------------------------------------------------- /web/router.ex: -------------------------------------------------------------------------------- 1 | defmodule ElixirLetters.Router do 2 | use ElixirLetters.Web, :router 3 | 4 | pipeline :browser do 5 | plug :accepts, ["html"] 6 | plug :fetch_session 7 | plug :fetch_flash 8 | plug :protect_from_forgery 9 | end 10 | 11 | pipeline :api do 12 | plug :accepts, ["json"] 13 | end 14 | 15 | scope "/", ElixirLetters do 16 | pipe_through :browser # Use the default browser stack 17 | 18 | get "/", PageController, :index 19 | end 20 | 21 | # Other scopes may use custom stacks. 22 | # scope "/api", ElixirLetters do 23 | # pipe_through :api 24 | # end 25 | end 26 | -------------------------------------------------------------------------------- /web/static/assets/fonts/alphafridgemagnets-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/web/static/assets/fonts/alphafridgemagnets-webfont.eot -------------------------------------------------------------------------------- /web/static/assets/fonts/alphafridgemagnets-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/web/static/assets/fonts/alphafridgemagnets-webfont.ttf -------------------------------------------------------------------------------- /web/static/assets/fonts/alphafridgemagnets-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/web/static/assets/fonts/alphafridgemagnets-webfont.woff -------------------------------------------------------------------------------- /web/static/assets/fonts/alphafridgemagnets-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/web/static/assets/fonts/alphafridgemagnets-webfont.woff2 -------------------------------------------------------------------------------- /web/static/assets/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/web/static/assets/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /web/static/assets/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/web/static/assets/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /web/static/assets/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/web/static/assets/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /web/static/assets/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/web/static/assets/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /web/static/assets/fonts/rounds_black-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/web/static/assets/fonts/rounds_black-webfont.eot -------------------------------------------------------------------------------- /web/static/assets/fonts/rounds_black-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/web/static/assets/fonts/rounds_black-webfont.ttf -------------------------------------------------------------------------------- /web/static/assets/fonts/rounds_black-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/web/static/assets/fonts/rounds_black-webfont.woff -------------------------------------------------------------------------------- /web/static/assets/fonts/rounds_black-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/web/static/assets/fonts/rounds_black-webfont.woff2 -------------------------------------------------------------------------------- /web/static/assets/images/background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/web/static/assets/images/background.jpg -------------------------------------------------------------------------------- /web/static/assets/images/blank_tile.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/web/static/assets/images/blank_tile.jpg -------------------------------------------------------------------------------- /web/static/assets/images/cursor-hand-white.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Layer 1 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /web/static/assets/images/cursor-hand.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Layer 1 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /web/static/assets/images/elixir.svg: -------------------------------------------------------------------------------- 1 | Made inMade inElixirElixir -------------------------------------------------------------------------------- /web/static/assets/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/web/static/assets/images/favicon.ico -------------------------------------------------------------------------------- /web/static/assets/images/lec.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/web/static/assets/images/lec.jpg -------------------------------------------------------------------------------- /web/static/assets/images/phoenix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/web/static/assets/images/phoenix.png -------------------------------------------------------------------------------- /web/static/assets/images/samsung.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/web/static/assets/images/samsung.jpg -------------------------------------------------------------------------------- /web/static/assets/images/samsung2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/web/static/assets/images/samsung2.jpg -------------------------------------------------------------------------------- /web/static/assets/images/scrabble_board.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/web/static/assets/images/scrabble_board.png -------------------------------------------------------------------------------- /web/static/assets/images/scrabble_tiles.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/web/static/assets/images/scrabble_tiles.jpg -------------------------------------------------------------------------------- /web/static/assets/images/servis.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/web/static/assets/images/servis.jpg -------------------------------------------------------------------------------- /web/static/assets/images/smeg.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ktec/elixir_letters/23059a790cbf52ea1e099f61cae29d38be51b504/web/static/assets/images/smeg.jpeg -------------------------------------------------------------------------------- /web/static/assets/robots.txt: -------------------------------------------------------------------------------- 1 | # See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file 2 | # 3 | # To ban all spiders from the entire site uncomment the next two lines: 4 | # User-agent: * 5 | # Disallow: / 6 | -------------------------------------------------------------------------------- /web/static/vendor/js/jquery.cookie.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery Cookie Plugin v1.4.1 3 | * https://github.com/carhartl/jquery-cookie 4 | * 5 | * Copyright 2013 Klaus Hartl 6 | * Released under the MIT license 7 | */ 8 | (function (factory) { 9 | if (typeof define === 'function' && define.amd) { 10 | // AMD 11 | define(['jquery'], factory); 12 | } else if (typeof exports === 'object') { 13 | // CommonJS 14 | factory(require('jquery')); 15 | } else { 16 | // Browser globals 17 | factory(jQuery); 18 | } 19 | }(function ($) { 20 | 21 | var pluses = /\+/g; 22 | 23 | function encode(s) { 24 | return config.raw ? s : encodeURIComponent(s); 25 | } 26 | 27 | function decode(s) { 28 | return config.raw ? s : decodeURIComponent(s); 29 | } 30 | 31 | function stringifyCookieValue(value) { 32 | return encode(config.json ? JSON.stringify(value) : String(value)); 33 | } 34 | 35 | function parseCookieValue(s) { 36 | if (s.indexOf('"') === 0) { 37 | // This is a quoted cookie as according to RFC2068, unescape... 38 | s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\'); 39 | } 40 | 41 | try { 42 | // Replace server-side written pluses with spaces. 43 | // If we can't decode the cookie, ignore it, it's unusable. 44 | // If we can't parse the cookie, ignore it, it's unusable. 45 | s = decodeURIComponent(s.replace(pluses, ' ')); 46 | return config.json ? JSON.parse(s) : s; 47 | } catch(e) {} 48 | } 49 | 50 | function read(s, converter) { 51 | var value = config.raw ? s : parseCookieValue(s); 52 | return $.isFunction(converter) ? converter(value) : value; 53 | } 54 | 55 | var config = $.cookie = function (key, value, options) { 56 | 57 | // Write 58 | 59 | if (value !== undefined && !$.isFunction(value)) { 60 | options = $.extend({}, config.defaults, options); 61 | 62 | if (typeof options.expires === 'number') { 63 | var days = options.expires, t = options.expires = new Date(); 64 | t.setTime(+t + days * 864e+5); 65 | } 66 | 67 | return (document.cookie = [ 68 | encode(key), '=', stringifyCookieValue(value), 69 | options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE 70 | options.path ? '; path=' + options.path : '', 71 | options.domain ? '; domain=' + options.domain : '', 72 | options.secure ? '; secure' : '' 73 | ].join('')); 74 | } 75 | 76 | // Read 77 | 78 | var result = key ? undefined : {}; 79 | 80 | // To prevent the for loop in the first place assign an empty array 81 | // in case there are no cookies at all. Also prevents odd result when 82 | // calling $.cookie(). 83 | var cookies = document.cookie ? document.cookie.split('; ') : []; 84 | 85 | for (var i = 0, l = cookies.length; i < l; i++) { 86 | var parts = cookies[i].split('='); 87 | var name = decode(parts.shift()); 88 | var cookie = parts.join('='); 89 | 90 | if (key && key === name) { 91 | // If second argument (value) is a function it's a converter... 92 | result = read(cookie, value); 93 | break; 94 | } 95 | 96 | // Prevent storing a cookie that we couldn't decode. 97 | if (!key && (cookie = read(cookie)) !== undefined) { 98 | result[name] = cookie; 99 | } 100 | } 101 | 102 | return result; 103 | }; 104 | 105 | config.defaults = {}; 106 | 107 | $.removeCookie = function (key, options) { 108 | if ($.cookie(key) === undefined) { 109 | return false; 110 | } 111 | 112 | // Must not alter options, thus extending a fresh object... 113 | $.cookie(key, '', $.extend({}, options, { expires: -1 })); 114 | return !$.cookie(key); 115 | }; 116 | 117 | })); 118 | -------------------------------------------------------------------------------- /web/static/vendor/js/jquery.ui.touch-punch.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Touch Punch 0.2.3 3 | * 4 | * Copyright 2011–2014, Dave Furfero 5 | * Dual licensed under the MIT or GPL Version 2 licenses. 6 | * 7 | * Depends: 8 | * jquery.ui.widget.js 9 | * jquery.ui.mouse.js 10 | */ 11 | !function(a){function f(a,b){if(!(a.originalEvent.touches.length>1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery); -------------------------------------------------------------------------------- /web/templates/layout/app.html.eex: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Elixir Letters! 11 | "> 12 | "> 13 | 14 | 15 | 16 | 17 | 43 | 44 | 45 |
46 | <%= @inner %> 47 |
48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /web/templates/page/index.html.eex: -------------------------------------------------------------------------------- 1 |
2 | 3 | 7 | -------------------------------------------------------------------------------- /web/views/error_view.ex: -------------------------------------------------------------------------------- 1 | defmodule ElixirLetters.ErrorView do 2 | use ElixirLetters.Web, :view 3 | 4 | def render("404.html", _assigns) do 5 | "Page not found" 6 | end 7 | 8 | def render("500.html", _assigns) do 9 | "Server internal error" 10 | end 11 | 12 | # In case no render clause matches or no 13 | # template is found, let's render it as 500 14 | def template_not_found(_template, assigns) do 15 | render "500.html", assigns 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /web/views/layout_view.ex: -------------------------------------------------------------------------------- 1 | defmodule ElixirLetters.LayoutView do 2 | use ElixirLetters.Web, :view 3 | end 4 | -------------------------------------------------------------------------------- /web/views/page_view.ex: -------------------------------------------------------------------------------- 1 | defmodule ElixirLetters.PageView do 2 | use ElixirLetters.Web, :view 3 | alias ElixirLetters.Letters 4 | 5 | def letters_map do 6 | Letters.get_letters_map 7 | end 8 | 9 | def player_token do 10 | # player_uuid = case get_session(conn, :player_uuid) do 11 | # nil -> 12 | # uuid = UUID.uuid4 13 | # conn = put_session(conn, :player_uuid, uuid) 14 | # uuid 15 | # existent_uuid -> existent_uuid 16 | # end 17 | # signed = Phoenix.Token.sign(ElixirLetters.Endpoint, "player_token", player_uuid) 18 | # signed 19 | UUID.uuid4 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /web/web.ex: -------------------------------------------------------------------------------- 1 | defmodule ElixirLetters.Web do 2 | @moduledoc """ 3 | A module that keeps using definitions for controllers, 4 | views and so on. 5 | 6 | This can be used in your application as: 7 | 8 | use ElixirLetters.Web, :controller 9 | use ElixirLetters.Web, :view 10 | 11 | The definitions below will be executed for every view, 12 | controller, etc, so keep them short and clean, focused 13 | on imports, uses and aliases. 14 | 15 | Do NOT define functions inside the quoted expressions 16 | below. 17 | """ 18 | 19 | def model do 20 | quote do 21 | use Ecto.Model 22 | end 23 | end 24 | 25 | def controller do 26 | quote do 27 | use Phoenix.Controller 28 | 29 | alias ElixirLetters.Repo 30 | import Ecto.Model 31 | import Ecto.Query, only: [from: 2] 32 | 33 | import ElixirLetters.Router.Helpers 34 | end 35 | end 36 | 37 | def view do 38 | quote do 39 | use Phoenix.View, root: "web/templates" 40 | 41 | # Import convenience functions from controllers 42 | import Phoenix.Controller, only: [get_csrf_token: 0, get_flash: 2, view_module: 1] 43 | 44 | # Use all HTML functionality (forms, tags, etc) 45 | use Phoenix.HTML 46 | 47 | import ElixirLetters.Router.Helpers 48 | end 49 | end 50 | 51 | def router do 52 | quote do 53 | use Phoenix.Router 54 | end 55 | end 56 | 57 | def channel do 58 | quote do 59 | use Phoenix.Channel 60 | 61 | alias ElixirLetters.Repo 62 | import Ecto.Model 63 | import Ecto.Query, only: [from: 2] 64 | 65 | end 66 | end 67 | 68 | @doc """ 69 | When used, dispatch to the appropriate controller/view/etc. 70 | """ 71 | defmacro __using__(which) when is_atom(which) do 72 | apply(__MODULE__, which, []) 73 | end 74 | end 75 | --------------------------------------------------------------------------------