master 0a29988a9d24 cached
615 files
3.3 MB
890.0k tokens
1641 symbols
1 requests
Download .txt
Showing preview only (3,553K chars total). Download the full file or copy to clipboard to get everything.
Repository: basco-johnkevin/laravelsnippets
Branch: master
Commit: 0a29988a9d24
Files: 615
Total size: 3.3 MB

Directory structure:
gitextract_pialv810/

├── .gitattributes
├── .gitignore
├── app/
│   ├── LaraSnipp/
│   │   ├── Command/
│   │   │   └── CommentsCommand.php
│   │   ├── Composer/
│   │   │   └── LayoutMasterComposer.php
│   │   ├── LaraSnippServiceProvider.php
│   │   ├── Mailer/
│   │   │   ├── Mailer.php
│   │   │   └── UserMailer.php
│   │   ├── Observer/
│   │   │   ├── ObserverServiceProvider.php
│   │   │   ├── Snippet/
│   │   │   │   └── SnippetObserver.php
│   │   │   └── User/
│   │   │       └── UserObserver.php
│   │   ├── Repo/
│   │   │   ├── EloquentBaseRepository.php
│   │   │   ├── RepoServiceProvider.php
│   │   │   ├── Snippet/
│   │   │   │   ├── EloquentSnippetRepository.php
│   │   │   │   └── SnippetRepositoryInterface.php
│   │   │   ├── Tag/
│   │   │   │   ├── EloquentTagRepository.php
│   │   │   │   └── TagRepositoryInterface.php
│   │   │   └── User/
│   │   │       ├── EloquentUserRepository.php
│   │   │       └── UserRepositoryInterface.php
│   │   └── Service/
│   │       ├── Form/
│   │       │   ├── FormServiceProvider.php
│   │       │   ├── Snippet/
│   │       │   │   ├── SnippetForm.php
│   │       │   │   └── SnippetFormLaravelValidator.php
│   │       │   └── User/
│   │       │       ├── UserForm.php
│   │       │       └── UserFormLaravelValidator.php
│   │       └── Validation/
│   │           ├── AbstractLaravelValidator.php
│   │           └── ValidableInterface.php
│   ├── commands/
│   │   └── .gitkeep
│   ├── config/
│   │   ├── app.php
│   │   ├── auth.php
│   │   ├── cache.php
│   │   ├── compile.php
│   │   ├── database.php
│   │   ├── disqus.php
│   │   ├── mail.php
│   │   ├── packages/
│   │   │   └── .gitkeep
│   │   ├── purifier.php
│   │   ├── queue.php
│   │   ├── remote.php
│   │   ├── session.php
│   │   ├── site.php
│   │   ├── testing/
│   │   │   ├── app.php
│   │   │   ├── cache.php
│   │   │   ├── database.php
│   │   │   ├── mail.php
│   │   │   └── session.php
│   │   ├── view.php
│   │   └── workbench.php
│   ├── controllers/
│   │   ├── .gitkeep
│   │   ├── Admin/
│   │   │   └── IndexController.php
│   │   ├── AuthController.php
│   │   ├── BaseController.php
│   │   ├── HomeController.php
│   │   ├── Member/
│   │   │   ├── SnippetController.php
│   │   │   └── UserController.php
│   │   ├── RemindersController.php
│   │   ├── SnippetController.php
│   │   ├── TagController.php
│   │   ├── UserController.php
│   │   └── website/
│   │       └── PagesController.php
│   ├── database/
│   │   ├── migrations/
│   │   │   ├── .gitkeep
│   │   │   ├── 2013_11_08_145020_create_snippets_table.php
│   │   │   ├── 2013_12_05_122548_create_users_table.php
│   │   │   ├── 2013_12_05_122952_add_author_id_in_snippets_table.php
│   │   │   ├── 2013_12_08_055430_add_slug_and_activation_key_and_active_in_users_table.php
│   │   │   ├── 2013_12_09_125456_drop_active_in_users_table.php
│   │   │   ├── 2013_12_09_130122_add_active_in_users_table.php
│   │   │   ├── 2013_12_10_112312_add_approved_in_snippets_table.php
│   │   │   ├── 2013_12_10_132447_add_slug_in_snippets_table.php
│   │   │   ├── 2013_12_11_012940_create_roles_table.php
│   │   │   ├── 2013_12_11_013036_add_role_id_in_users_table.php
│   │   │   ├── 2013_12_11_013559_add_description_credits_to_resource_deleted_at_in_snippets_table.php
│   │   │   ├── 2013_12_11_014226_create_tags_table.php
│   │   │   ├── 2013_12_11_014317_create_snippet_tag_table.php
│   │   │   ├── 2013_12_11_103428_add_slug_in_tags_table.php
│   │   │   ├── 2013_12_12_093641_add_remaining_columns_in_users_table.php
│   │   │   ├── 2013_12_19_134131_create_password_reminders_table.php
│   │   │   ├── 2014_01_04_072223_add_disqus_columns_to_snippets_table.php
│   │   │   ├── 2014_01_06_212314_create_user_starred_table.php
│   │   │   └── 2014_04_17_151653_add_remember_token_to_users_table.php
│   │   └── seeds/
│   │       ├── .gitkeep
│   │       ├── DatabaseSeeder.php
│   │       ├── RoleSeeder.php
│   │       └── TagSeeder.php
│   ├── filters.php
│   ├── lang/
│   │   └── en/
│   │       ├── pagination.php
│   │       ├── reminders.php
│   │       └── validation.php
│   ├── libraries/
│   │   └── SiteHelpers.php
│   ├── macros.php
│   ├── models/
│   │   ├── BaseModel.php
│   │   ├── Role.php
│   │   ├── Snippet.php
│   │   ├── Starred.php
│   │   ├── Tag.php
│   │   └── User.php
│   ├── routes.php
│   ├── start/
│   │   ├── artisan.php
│   │   ├── global.php
│   │   └── local.php
│   ├── storage/
│   │   ├── .gitignore
│   │   ├── cache/
│   │   │   └── .gitignore
│   │   ├── logs/
│   │   │   └── .gitignore
│   │   ├── meta/
│   │   │   └── .gitignore
│   │   ├── sessions/
│   │   │   └── .gitignore
│   │   └── views/
│   │       └── .gitignore
│   ├── tests/
│   │   ├── TestCase.php
│   │   ├── functional/
│   │   │   └── Controller/
│   │   │       ├── AuthControllerTest.php
│   │   │       ├── HomeControllerTest.php
│   │   │       ├── Member/
│   │   │       │   ├── SnippetControllerTest.php
│   │   │       │   └── UserControllerTest.php
│   │   │       ├── SnippetControllerTest.php
│   │   │       ├── TagControllerTest.php
│   │   │       └── UserControllerTest.php
│   │   ├── integration/
│   │   │   ├── Model/
│   │   │   │   └── UserModelTest.php
│   │   │   └── Repo/
│   │   │       ├── EloquentSnippetRepositoryTest.php
│   │   │       └── EloquentUserRepositoryTest.php
│   │   └── unit/
│   │       └── Model/
│   │           └── UserModelTest.php
│   └── views/
│       ├── admin/
│       │   ├── index.blade.php
│       │   ├── layouts/
│       │   │   └── master.blade.php
│       │   └── partials/
│       │       └── navbar.blade.php
│       ├── auth/
│       │   ├── login.blade.php
│       │   └── signup.blade.php
│       ├── emails/
│       │   └── auth/
│       │       ├── activate.blade.php
│       │       └── reminder.blade.php
│       ├── layouts/
│       │   └── master.blade.php
│       ├── member/
│       │   ├── snippets/
│       │   │   ├── create.blade.php
│       │   │   └── edit.blade.php
│       │   └── users/
│       │       └── dashboard.blade.php
│       ├── partials/
│       │   ├── footer.blade.php
│       │   ├── header.blade.php
│       │   ├── notifications.blade.php
│       │   ├── pagination.blade.php
│       │   ├── search-narrow.blade.php
│       │   ├── search.blade.php
│       │   ├── searchForm.blade.php
│       │   ├── sidebars/
│       │   │   ├── default.blade.php
│       │   │   ├── snippet.blade.php
│       │   │   └── widgets/
│       │   │       ├── author.blade.php
│       │   │       ├── categories.blade.php
│       │   │       ├── social.blade.php
│       │   │       └── top-contributors.blade.php
│       │   └── snippets.php
│       ├── password/
│       │   ├── remind.blade.php
│       │   └── reset.blade.php
│       ├── snippets/
│       │   ├── index.blade.php
│       │   └── show.blade.php
│       ├── tags/
│       │   └── snippets.blade.php
│       ├── users/
│       │   ├── index.blade.php
│       │   ├── profile.blade.php
│       │   ├── settings.blade.php
│       │   └── snippets.blade.php
│       └── website/
│           └── pages/
│               ├── 404.blade.php
│               ├── index.blade.php
│               └── roadmap.blade.php
├── artisan
├── bootstrap/
│   ├── autoload.php
│   ├── paths.php
│   └── start.php
├── composer.json
├── gulpfile.js
├── package.json
├── phpunit.xml
├── public/
│   ├── .htaccess
│   ├── administration/
│   │   ├── css/
│   │   │   ├── sb-admin-2.css
│   │   │   └── timeline.css
│   │   └── js/
│   │       └── sb-admin-2.js
│   ├── assets/
│   │   ├── coffee/
│   │   │   ├── common.coffee
│   │   │   └── snippet.coffee
│   │   ├── css/
│   │   │   └── styles.css
│   │   ├── js/
│   │   │   ├── common.js
│   │   │   ├── snippet.js
│   │   │   └── vendors/
│   │   │       └── json2/
│   │   │           └── json2.js
│   │   └── scss/
│   │       ├── core/
│   │       │   ├── _band.scss
│   │       │   ├── _global.scss
│   │       │   ├── _mixins.scss
│   │       │   └── _variables.scss
│   │       ├── pages/
│   │       │   ├── _profiles.scss
│   │       │   └── _snippet.scss
│   │       ├── partials/
│   │       │   ├── _breadcrumbs.scss
│   │       │   ├── _footer.scss
│   │       │   ├── _nav-bar.scss
│   │       │   ├── _pagination.scss
│   │       │   ├── _search-band.scss
│   │       │   ├── _sidebar.scss
│   │       │   └── _snippets.scss
│   │       └── styles.scss
│   ├── index.php
│   ├── packages/
│   │   ├── .gitkeep
│   │   ├── chosen_v1.0.0/
│   │   │   ├── chosen.css
│   │   │   ├── chosen.jquery.js
│   │   │   ├── chosen.proto.js
│   │   │   ├── docsupport/
│   │   │   │   ├── prism.css
│   │   │   │   ├── prism.js
│   │   │   │   └── style.css
│   │   │   ├── index.html
│   │   │   ├── index.proto.html
│   │   │   └── options.html
│   │   ├── codemirror-3.19/
│   │   │   ├── .gitattributes
│   │   │   ├── .gitignore
│   │   │   ├── .travis.yml
│   │   │   ├── AUTHORS
│   │   │   ├── CONTRIBUTING.md
│   │   │   ├── LICENSE
│   │   │   ├── README.md
│   │   │   ├── addon/
│   │   │   │   ├── comment/
│   │   │   │   │   ├── comment.js
│   │   │   │   │   └── continuecomment.js
│   │   │   │   ├── dialog/
│   │   │   │   │   ├── dialog.css
│   │   │   │   │   └── dialog.js
│   │   │   │   ├── display/
│   │   │   │   │   ├── fullscreen.css
│   │   │   │   │   ├── fullscreen.js
│   │   │   │   │   └── placeholder.js
│   │   │   │   ├── edit/
│   │   │   │   │   ├── closebrackets.js
│   │   │   │   │   ├── closetag.js
│   │   │   │   │   ├── continuelist.js
│   │   │   │   │   ├── matchbrackets.js
│   │   │   │   │   ├── matchtags.js
│   │   │   │   │   └── trailingspace.js
│   │   │   │   ├── fold/
│   │   │   │   │   ├── brace-fold.js
│   │   │   │   │   ├── comment-fold.js
│   │   │   │   │   ├── foldcode.js
│   │   │   │   │   ├── foldgutter.css
│   │   │   │   │   ├── foldgutter.js
│   │   │   │   │   ├── indent-fold.js
│   │   │   │   │   └── xml-fold.js
│   │   │   │   ├── hint/
│   │   │   │   │   ├── anyword-hint.js
│   │   │   │   │   ├── css-hint.js
│   │   │   │   │   ├── html-hint.js
│   │   │   │   │   ├── javascript-hint.js
│   │   │   │   │   ├── pig-hint.js
│   │   │   │   │   ├── python-hint.js
│   │   │   │   │   ├── show-hint.css
│   │   │   │   │   ├── show-hint.js
│   │   │   │   │   ├── sql-hint.js
│   │   │   │   │   └── xml-hint.js
│   │   │   │   ├── lint/
│   │   │   │   │   ├── coffeescript-lint.js
│   │   │   │   │   ├── css-lint.js
│   │   │   │   │   ├── javascript-lint.js
│   │   │   │   │   ├── json-lint.js
│   │   │   │   │   ├── lint.css
│   │   │   │   │   └── lint.js
│   │   │   │   ├── merge/
│   │   │   │   │   ├── dep/
│   │   │   │   │   │   └── diff_match_patch.js
│   │   │   │   │   ├── merge.css
│   │   │   │   │   └── merge.js
│   │   │   │   ├── mode/
│   │   │   │   │   ├── loadmode.js
│   │   │   │   │   ├── multiplex.js
│   │   │   │   │   ├── multiplex_test.js
│   │   │   │   │   └── overlay.js
│   │   │   │   ├── runmode/
│   │   │   │   │   ├── colorize.js
│   │   │   │   │   ├── runmode-standalone.js
│   │   │   │   │   ├── runmode.js
│   │   │   │   │   └── runmode.node.js
│   │   │   │   ├── scroll/
│   │   │   │   │   └── scrollpastend.js
│   │   │   │   ├── search/
│   │   │   │   │   ├── match-highlighter.js
│   │   │   │   │   ├── search.js
│   │   │   │   │   └── searchcursor.js
│   │   │   │   ├── selection/
│   │   │   │   │   ├── active-line.js
│   │   │   │   │   └── mark-selection.js
│   │   │   │   ├── tern/
│   │   │   │   │   ├── tern.css
│   │   │   │   │   ├── tern.js
│   │   │   │   │   └── worker.js
│   │   │   │   └── wrap/
│   │   │   │       └── hardwrap.js
│   │   │   ├── bin/
│   │   │   │   ├── authors.sh
│   │   │   │   ├── compress
│   │   │   │   ├── lint
│   │   │   │   └── source-highlight
│   │   │   ├── bower.json
│   │   │   ├── demo/
│   │   │   │   ├── activeline.html
│   │   │   │   ├── anywordhint.html
│   │   │   │   ├── bidi.html
│   │   │   │   ├── btree.html
│   │   │   │   ├── buffers.html
│   │   │   │   ├── changemode.html
│   │   │   │   ├── closebrackets.html
│   │   │   │   ├── closetag.html
│   │   │   │   ├── complete.html
│   │   │   │   ├── emacs.html
│   │   │   │   ├── folding.html
│   │   │   │   ├── fullscreen.html
│   │   │   │   ├── hardwrap.html
│   │   │   │   ├── html5complete.html
│   │   │   │   ├── indentwrap.html
│   │   │   │   ├── lint.html
│   │   │   │   ├── loadmode.html
│   │   │   │   ├── marker.html
│   │   │   │   ├── markselection.html
│   │   │   │   ├── matchhighlighter.html
│   │   │   │   ├── matchtags.html
│   │   │   │   ├── merge.html
│   │   │   │   ├── multiplex.html
│   │   │   │   ├── mustache.html
│   │   │   │   ├── placeholder.html
│   │   │   │   ├── preview.html
│   │   │   │   ├── resize.html
│   │   │   │   ├── runmode.html
│   │   │   │   ├── search.html
│   │   │   │   ├── spanaffectswrapping_shim.html
│   │   │   │   ├── tern.html
│   │   │   │   ├── theme.html
│   │   │   │   ├── trailingspace.html
│   │   │   │   ├── variableheight.html
│   │   │   │   ├── vim.html
│   │   │   │   ├── visibletabs.html
│   │   │   │   ├── widget.html
│   │   │   │   └── xmlcomplete.html
│   │   │   ├── doc/
│   │   │   │   ├── activebookmark.js
│   │   │   │   ├── compress.html
│   │   │   │   ├── docs.css
│   │   │   │   ├── internals.html
│   │   │   │   ├── manual.html
│   │   │   │   ├── realworld.html
│   │   │   │   ├── releases.html
│   │   │   │   ├── reporting.html
│   │   │   │   ├── upgrade_v2.2.html
│   │   │   │   └── upgrade_v3.html
│   │   │   ├── index.html
│   │   │   ├── keymap/
│   │   │   │   ├── emacs.js
│   │   │   │   ├── extra.js
│   │   │   │   └── vim.js
│   │   │   ├── lib/
│   │   │   │   ├── codemirror.css
│   │   │   │   └── codemirror.js
│   │   │   ├── mode/
│   │   │   │   ├── apl/
│   │   │   │   │   ├── apl.js
│   │   │   │   │   └── index.html
│   │   │   │   ├── asterisk/
│   │   │   │   │   ├── asterisk.js
│   │   │   │   │   └── index.html
│   │   │   │   ├── clike/
│   │   │   │   │   ├── clike.js
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── scala.html
│   │   │   │   ├── clojure/
│   │   │   │   │   ├── clojure.js
│   │   │   │   │   └── index.html
│   │   │   │   ├── cobol/
│   │   │   │   │   ├── cobol.js
│   │   │   │   │   └── index.html
│   │   │   │   ├── coffeescript/
│   │   │   │   │   ├── coffeescript.js
│   │   │   │   │   └── index.html
│   │   │   │   ├── commonlisp/
│   │   │   │   │   ├── commonlisp.js
│   │   │   │   │   └── index.html
│   │   │   │   ├── css/
│   │   │   │   │   ├── css.js
│   │   │   │   │   ├── index.html
│   │   │   │   │   ├── scss.html
│   │   │   │   │   ├── scss_test.js
│   │   │   │   │   └── test.js
│   │   │   │   ├── d/
│   │   │   │   │   ├── d.js
│   │   │   │   │   └── index.html
│   │   │   │   ├── diff/
│   │   │   │   │   ├── diff.js
│   │   │   │   │   └── index.html
│   │   │   │   ├── dtd/
│   │   │   │   │   ├── dtd.js
│   │   │   │   │   └── index.html
│   │   │   │   ├── ecl/
│   │   │   │   │   ├── ecl.js
│   │   │   │   │   └── index.html
│   │   │   │   ├── eiffel/
│   │   │   │   │   ├── eiffel.js
│   │   │   │   │   └── index.html
│   │   │   │   ├── erlang/
│   │   │   │   │   ├── erlang.js
│   │   │   │   │   └── index.html
│   │   │   │   ├── fortran/
│   │   │   │   │   ├── fortran.js
│   │   │   │   │   └── index.html
│   │   │   │   ├── gas/
│   │   │   │   │   ├── gas.js
│   │   │   │   │   └── index.html
│   │   │   │   ├── gfm/
│   │   │   │   │   ├── gfm.js
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── test.js
│   │   │   │   ├── gherkin/
│   │   │   │   │   ├── gherkin.js
│   │   │   │   │   └── index.html
│   │   │   │   ├── go/
│   │   │   │   │   ├── go.js
│   │   │   │   │   └── index.html
│   │   │   │   ├── groovy/
│   │   │   │   │   ├── groovy.js
│   │   │   │   │   └── index.html
│   │   │   │   ├── haml/
│   │   │   │   │   ├── haml.js
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── test.js
│   │   │   │   ├── haskell/
│   │   │   │   │   ├── haskell.js
│   │   │   │   │   └── index.html
│   │   │   │   ├── haxe/
│   │   │   │   │   ├── haxe.js
│   │   │   │   │   └── index.html
│   │   │   │   ├── htmlembedded/
│   │   │   │   │   ├── htmlembedded.js
│   │   │   │   │   └── index.html
│   │   │   │   ├── htmlmixed/
│   │   │   │   │   ├── htmlmixed.js
│   │   │   │   │   └── index.html
│   │   │   │   ├── http/
│   │   │   │   │   ├── http.js
│   │   │   │   │   └── index.html
│   │   │   │   ├── index.html
│   │   │   │   ├── jade/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── jade.js
│   │   │   │   ├── javascript/
│   │   │   │   │   ├── index.html
│   │   │   │   │   ├── javascript.js
│   │   │   │   │   ├── test.js
│   │   │   │   │   └── typescript.html
│   │   │   │   ├── jinja2/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── jinja2.js
│   │   │   │   ├── less/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── less.js
│   │   │   │   ├── livescript/
│   │   │   │   │   ├── index.html
│   │   │   │   │   ├── livescript.js
│   │   │   │   │   └── livescript.ls
│   │   │   │   ├── lua/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── lua.js
│   │   │   │   ├── markdown/
│   │   │   │   │   ├── index.html
│   │   │   │   │   ├── markdown.js
│   │   │   │   │   └── test.js
│   │   │   │   ├── meta.js
│   │   │   │   ├── mirc/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── mirc.js
│   │   │   │   ├── nginx/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── nginx.js
│   │   │   │   ├── ntriples/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── ntriples.js
│   │   │   │   ├── ocaml/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── ocaml.js
│   │   │   │   ├── octave/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── octave.js
│   │   │   │   ├── pascal/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── pascal.js
│   │   │   │   ├── perl/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── perl.js
│   │   │   │   ├── php/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── php.js
│   │   │   │   ├── pig/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── pig.js
│   │   │   │   ├── properties/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── properties.js
│   │   │   │   ├── python/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── python.js
│   │   │   │   ├── q/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── q.js
│   │   │   │   ├── r/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── r.js
│   │   │   │   ├── rpm/
│   │   │   │   │   ├── changes/
│   │   │   │   │   │   ├── changes.js
│   │   │   │   │   │   └── index.html
│   │   │   │   │   └── spec/
│   │   │   │   │       ├── index.html
│   │   │   │   │       ├── spec.css
│   │   │   │   │       └── spec.js
│   │   │   │   ├── rst/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── rst.js
│   │   │   │   ├── ruby/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── ruby.js
│   │   │   │   ├── rust/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── rust.js
│   │   │   │   ├── sass/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── sass.js
│   │   │   │   ├── scheme/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── scheme.js
│   │   │   │   ├── shell/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── shell.js
│   │   │   │   ├── sieve/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── sieve.js
│   │   │   │   ├── smalltalk/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── smalltalk.js
│   │   │   │   ├── smarty/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── smarty.js
│   │   │   │   ├── smartymixed/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── smartymixed.js
│   │   │   │   ├── sparql/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── sparql.js
│   │   │   │   ├── sql/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── sql.js
│   │   │   │   ├── stex/
│   │   │   │   │   ├── index.html
│   │   │   │   │   ├── stex.js
│   │   │   │   │   └── test.js
│   │   │   │   ├── tcl/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── tcl.js
│   │   │   │   ├── tiddlywiki/
│   │   │   │   │   ├── index.html
│   │   │   │   │   ├── tiddlywiki.css
│   │   │   │   │   └── tiddlywiki.js
│   │   │   │   ├── tiki/
│   │   │   │   │   ├── index.html
│   │   │   │   │   ├── tiki.css
│   │   │   │   │   └── tiki.js
│   │   │   │   ├── toml/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── toml.js
│   │   │   │   ├── turtle/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── turtle.js
│   │   │   │   ├── vb/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── vb.js
│   │   │   │   ├── vbscript/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── vbscript.js
│   │   │   │   ├── velocity/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── velocity.js
│   │   │   │   ├── verilog/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── verilog.js
│   │   │   │   ├── xml/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── xml.js
│   │   │   │   ├── xquery/
│   │   │   │   │   ├── index.html
│   │   │   │   │   ├── test.js
│   │   │   │   │   └── xquery.js
│   │   │   │   ├── yaml/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── yaml.js
│   │   │   │   └── z80/
│   │   │   │       ├── index.html
│   │   │   │       └── z80.js
│   │   │   ├── package.json
│   │   │   ├── test/
│   │   │   │   ├── comment_test.js
│   │   │   │   ├── doc_test.js
│   │   │   │   ├── driver.js
│   │   │   │   ├── emacs_test.js
│   │   │   │   ├── index.html
│   │   │   │   ├── lint/
│   │   │   │   │   ├── acorn.js
│   │   │   │   │   ├── lint.js
│   │   │   │   │   └── walk.js
│   │   │   │   ├── mode_test.css
│   │   │   │   ├── mode_test.js
│   │   │   │   ├── phantom_driver.js
│   │   │   │   ├── run.js
│   │   │   │   ├── test.js
│   │   │   │   └── vim_test.js
│   │   │   └── theme/
│   │   │       ├── 3024-day.css
│   │   │       ├── 3024-night.css
│   │   │       ├── ambiance-mobile.css
│   │   │       ├── ambiance.css
│   │   │       ├── base16-dark.css
│   │   │       ├── base16-light.css
│   │   │       ├── blackboard.css
│   │   │       ├── cobalt.css
│   │   │       ├── eclipse.css
│   │   │       ├── elegant.css
│   │   │       ├── erlang-dark.css
│   │   │       ├── lesser-dark.css
│   │   │       ├── mbo.css
│   │   │       ├── midnight.css
│   │   │       ├── monokai.css
│   │   │       ├── neat.css
│   │   │       ├── night.css
│   │   │       ├── paraiso-dark.css
│   │   │       ├── paraiso-light.css
│   │   │       ├── rubyblue.css
│   │   │       ├── solarized.css
│   │   │       ├── the-matrix.css
│   │   │       ├── tomorrow-night-eighties.css
│   │   │       ├── twilight.css
│   │   │       ├── vibrant-ink.css
│   │   │       ├── xq-dark.css
│   │   │       └── xq-light.css
│   │   ├── google-code-prettify/
│   │   │   ├── lang-apollo.js
│   │   │   ├── lang-basic.js
│   │   │   ├── lang-clj.js
│   │   │   ├── lang-css.js
│   │   │   ├── lang-dart.js
│   │   │   ├── lang-erlang.js
│   │   │   ├── lang-go.js
│   │   │   ├── lang-hs.js
│   │   │   ├── lang-lisp.js
│   │   │   ├── lang-llvm.js
│   │   │   ├── lang-lua.js
│   │   │   ├── lang-matlab.js
│   │   │   ├── lang-ml.js
│   │   │   ├── lang-mumps.js
│   │   │   ├── lang-n.js
│   │   │   ├── lang-pascal.js
│   │   │   ├── lang-proto.js
│   │   │   ├── lang-r.js
│   │   │   ├── lang-rd.js
│   │   │   ├── lang-scala.js
│   │   │   ├── lang-sql.js
│   │   │   ├── lang-tcl.js
│   │   │   ├── lang-tex.js
│   │   │   ├── lang-vb.js
│   │   │   ├── lang-vhdl.js
│   │   │   ├── lang-wiki.js
│   │   │   ├── lang-xq.js
│   │   │   ├── lang-yaml.js
│   │   │   ├── prettify.css
│   │   │   ├── prettify.js
│   │   │   └── run_prettify.js
│   │   └── jquery-file-upload-8.9.0/
│   │       ├── .gitignore
│   │       ├── CONTRIBUTING.md
│   │       ├── README.md
│   │       ├── angularjs.html
│   │       ├── basic-plus.html
│   │       ├── basic.html
│   │       ├── blueimp-file-upload.jquery.json
│   │       ├── bower.json
│   │       ├── cors/
│   │       │   ├── postmessage.html
│   │       │   └── result.html
│   │       ├── css/
│   │       │   ├── demo-ie8.css
│   │       │   ├── demo.css
│   │       │   ├── jquery.fileupload-noscript.css
│   │       │   ├── jquery.fileupload-ui-noscript.css
│   │       │   ├── jquery.fileupload-ui.css
│   │       │   ├── jquery.fileupload.css
│   │       │   └── style.css
│   │       ├── index.html
│   │       ├── jquery-ui.html
│   │       ├── js/
│   │       │   ├── app.js
│   │       │   ├── cors/
│   │       │   │   ├── jquery.postmessage-transport.js
│   │       │   │   └── jquery.xdr-transport.js
│   │       │   ├── jquery.fileupload-angular.js
│   │       │   ├── jquery.fileupload-audio.js
│   │       │   ├── jquery.fileupload-image.js
│   │       │   ├── jquery.fileupload-jquery-ui.js
│   │       │   ├── jquery.fileupload-process.js
│   │       │   ├── jquery.fileupload-ui.js
│   │       │   ├── jquery.fileupload-validate.js
│   │       │   ├── jquery.fileupload-video.js
│   │       │   ├── jquery.fileupload.js
│   │       │   ├── jquery.iframe-transport.js
│   │       │   ├── main.js
│   │       │   └── vendor/
│   │       │       └── jquery.ui.widget.js
│   │       ├── package.json
│   │       ├── server/
│   │       │   ├── gae-go/
│   │       │   │   ├── app/
│   │       │   │   │   └── main.go
│   │       │   │   ├── app.yaml
│   │       │   │   └── static/
│   │       │   │       └── robots.txt
│   │       │   ├── gae-python/
│   │       │   │   ├── app.yaml
│   │       │   │   ├── main.py
│   │       │   │   └── static/
│   │       │   │       └── robots.txt
│   │       │   ├── node/
│   │       │   │   ├── .gitignore
│   │       │   │   ├── package.json
│   │       │   │   ├── public/
│   │       │   │   │   └── files/
│   │       │   │   │       └── .gitignore
│   │       │   │   ├── server.js
│   │       │   │   └── tmp/
│   │       │   │       └── .gitignore
│   │       │   └── php/
│   │       │       ├── UploadHandler.php
│   │       │       ├── files/
│   │       │       │   ├── .gitignore
│   │       │       │   └── .htaccess
│   │       │       └── index.php
│   │       └── test/
│   │           ├── index.html
│   │           └── test.js
│   ├── robots.txt
│   └── sitemap.xml
├── readme.md
├── server.php
├── vagrant.pp
└── vagrantfile

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitattributes
================================================
* text=auto

================================================
FILE: .gitignore
================================================
/bootstrap/compiled.php
/vendor
composer.phar
.DS_Store
Thumbs.db

# OSX
.DS_Store

# Project specific
.sass-cache
/public/uploads

# local settings
/app/config/local

# production settings
/app/config/production

# test site basic auth
public/.htpasswd

# vagrant
.vagrant
/node_modules/

/.idea/
composer.lock


================================================
FILE: app/LaraSnipp/Command/CommentsCommand.php
================================================
<?php

namespace LaraSnipp\Command;

use Config;
use Illuminate\Console\Command;
use Snippet;

class CommentsCommand extends Command
{
    /**
     * The console command name.
     *
     * @var string
     */
    protected $name = "larasnipp:comments";

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = "Fetches comment counts from Disqus.";

    /**
     * Execute the console command.
     *
     * @return void
     */
    public function fire()
    {
        $this->info("Getting comment counts...");

        $key = Config::get("disqus.key");
        $forum = Config::get("disqus.shortname");
        $endpoint = Config::get("disqus.endpoint");

        $snippets = Snippet::orderBy("updated_comments_at", "asc")->take(50)->get();

        foreach ($snippets as $snippet) {
            $link = sprintf($endpoint, $key, $forum, "snippet-" . $snippet->slug);
            $session = curl_init($link);

            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            $response = curl_exec($session);
            curl_close($session);

            $data = json_decode($response);

            if ($data->code == 0) {
                $snippet->comments = $data->response->posts;
                $snippet->updated_comments_at = date("Y-m-d H:i:s");
                $snippet->save();

                $this->info($link);
            }
        }
    }

    /**
     * Get the console command arguments.
     *
     * @return array
     */
    protected function getArguments()
    {
        return [];
    }

    /**
     * Get the console command options.
     *
     * @return array
     */
    protected function getOptions()
    {
        return [];
    }

}


================================================
FILE: app/LaraSnipp/Composer/LayoutMasterComposer.php
================================================
<?php namespace LaraSnipp\Composer;

class LayoutMasterComposer
{
}

================================================
FILE: app/LaraSnipp/LaraSnippServiceProvider.php
================================================
<?php namespace LaraSnipp;

use App;
use Illuminate\Support\ServiceProvider;
// use Redis;
use View;

// use Tag;

class LaraSnippServiceProvider extends ServiceProvider
{
    protected $deferred = true;

    public function register()
    {
        App::bind("larasnipp.command.comments", function () {
            return new Command\CommentsCommand();
        });

        $this->commands(
            "larasnipp.command.comments"
        );
    }

    /**
     * Bootstrap the application
     *
     * @return void
     */
    public function boot()
    {
        $app = $this->app;

        // $app->singleton('redis', function()
        // {
        //     return Redis::connection();
        // });

        $this->_bootComposers();
    }

    private function _bootComposers()
    {
    }

    public function provides()
    {
        return [
            "larasnipp.command.comments"
        ];
    }

}


================================================
FILE: app/LaraSnipp/Mailer/Mailer.php
================================================
<?php namespace LaraSnipp\Mailer;

abstract class Mailer
{
    /**
     * @param $user
     * @param $subject
     * @param $view
     * @param $data
     */
    public function sendTo($user, $subject, $view, $data = [])
    {
        \Mail::queue($view, $data, function ($message) use ($user, $subject) {
            $message->from(\Config::get('site.mail_from'), \Config::get('site.name'));
            $message->to($user->email, $user->full_name)->subject($subject);
        });
    }
}


================================================
FILE: app/LaraSnipp/Mailer/UserMailer.php
================================================
<?php namespace LaraSnipp\Mailer;

class UserMailer extends Mailer
{
    /**
     * @param User $user
     */
    public function sendActivationEmail($user)
    {
        $data = array(
            'user' => $user,
            'activationUrl' => route('auth.getActivateAccount', array($user->slug, $user->activation_key))
        );
        $subject = 'Please activate your account';
        $view = 'emails.auth.activate';

        return $this->sendTo($user, $subject, $view, $data);
    }
}


================================================
FILE: app/LaraSnipp/Observer/ObserverServiceProvider.php
================================================
<?php namespace LaraSnipp\Observer;

use LaraSnipp\Mailer\UserMailer;
use User;
use Snippet;
use LaraSnipp\Observer\User\UserObserver;
use LaraSnipp\Observer\Snippet\SnippetObserver;
use Illuminate\Support\ServiceProvider;

class ObserverServiceProvider extends ServiceProvider
{
    public function register()
    {
    }

    public function boot()
    {
        User::observe(new UserObserver(new UserMailer));
        Snippet::observe(new SnippetObserver);
    }
}


================================================
FILE: app/LaraSnipp/Observer/Snippet/SnippetObserver.php
================================================
<?php namespace LaraSnipp\Observer\Snippet;

use Auth;

class SnippetObserver
{
    /**
     * Assign the currently user's id as the author of the snippet being created
     *
     * @param $snippet
     */
    public function creating($snippet)
    {
        $snippet->author_id = Auth::user()->id;
    }

}


================================================
FILE: app/LaraSnipp/Observer/User/UserObserver.php
================================================
<?php namespace LaraSnipp\Observer\User;

use LaraSnipp\Mailer\UserMailer;

class UserObserver
{
    /**
     * @var UserMailer
     */
    private $userMailer;

    /**
     * @param UserMailer $userMailer
     */
    public function __construct(UserMailer $userMailer)
    {
        $this->userMailer = $userMailer;
    }

    /**
     * Assign a role to the user that's being created (member by default)
     *
     * @param $user
     */
    public function creating($user)
    {
        // generate activation key for the user being created
        $user->activation_key = md5(uniqid(rand(), true));

        // @TODO: use a Role repository
        $role = \Role::where('name', 'member')->first();
        $user->role()->associate($role);
    }

    /**
     * When the user was created, send the activation email
     *
     * @param $user
     */
    public function created($user)
    {
        $this->userMailer->sendActivationEmail($user);
    }
}


================================================
FILE: app/LaraSnipp/Repo/EloquentBaseRepository.php
================================================
<?php namespace LaraSnipp\Repo;

use Illuminate\Database\Eloquent\Model;

abstract class EloquentBaseRepository
{
    /**
     * Eloquent model
     *
     * @var Illuminate\Database\Eloquent\Model
     */
    protected $model;

    public function __construct($model = null)
    {
        $this->model = $model;
    }

    /**
     * Returns all records
     *
     * @return mixed
     */
    public function all()
    {
        return $this->model->all();
    }

    /**
     * Create a new model
     *
     * @param array  Data to create a new object
     * @return boolean
     */
    public function create(array $data)
    {
        $model = $this->model->create($data);

        if (!$model) {
            return false;
        }

        return true;
    }

    /**
     * Get single model by slug
     *
     * @param string slug
     * @return object object of model
     */
    public function bySlug($slug)
    {
        return $this->model->whereSlug($slug)->first();
    }

    /**
     * Updates the model with the provided input
     *
     * @param $model
     * @param array $input
     * @return mixed
     */
    public function update($model, array $input)
    {
        $model->fill($input);

        return $model->save();
    }
}


================================================
FILE: app/LaraSnipp/Repo/RepoServiceProvider.php
================================================
<?php namespace LaraSnipp\Repo;

use Snippet;
use User;
use Tag;
use LaraSnipp\Repo\Snippet\EloquentSnippetRepository;
use LaraSnipp\Repo\User\EloquentUserRepository;
use LaraSnipp\Repo\Tag\EloquentTagRepository;
use Illuminate\Support\ServiceProvider;

class RepoServiceProvider extends ServiceProvider
{
    /**
     * Register the service provider.
     *
     * @return void
     */
    public function register()
    {
        $app = $this->app;

        $app->bind('LaraSnipp\Repo\Snippet\SnippetRepositoryInterface', function ($app) {
            return new EloquentSnippetRepository(
                new Snippet,
                $app->make('LaraSnipp\Repo\Tag\TagRepositoryInterface'),
                $app->make('LaraSnipp\Repo\User\UserRepositoryInterface')
            );
        });

        $app->bind('LaraSnipp\Repo\User\UserRepositoryInterface', function ($app) {
            return new EloquentUserRepository(new User);
        });

        $app->bind('LaraSnipp\Repo\Tag\TagRepositoryInterface', function ($app) {
            return new EloquentTagRepository(new Tag);
        });
    }
}


================================================
FILE: app/LaraSnipp/Repo/Snippet/EloquentSnippetRepository.php
================================================
<?php namespace LaraSnipp\Repo\Snippet;

use App;
use DB;
use LaraSnipp\Repo\EloquentBaseRepository;
use LaraSnipp\Repo\Snippet\SnippetRepositoryInterface;
use LaraSnipp\Repo\Tag\TagRepositoryInterface;
use LaraSnipp\Repo\User\UserRepositoryInterface;
use Illuminate\Database\Eloquent\Model;

class EloquentSnippetRepository extends EloquentBaseRepository implements SnippetRepositoryInterface
{
    /**
     * Snippet Model
     *
     * @var $snippet typeof \Illuminate\Database\Eloquent\Model
     */
    protected $snippet;

    /**
     * Tag repository
     *
     * @var $tag typeof \LaraSnipp\Repo\Tag\TagRepositoryInterface
     */
    protected $tag;

    /**
     * User repository
     *
     * @var $user typeof \LaraSnipp\Repo\User\UserRepositoryInterface
     */
    protected $user;

    public function __construct(
        Model $snippet,
        TagRepositoryInterface $tag,
        UserRepositoryInterface $user)
    {
        parent::__construct($snippet);
        $this->snippet = $snippet;
        $this->tag = $tag;
        $this->user = $user;
    }

    /**
     * Get paginated snippets
     *
     * @param int $perPage
     * @param  boolean $all Show published or all
     * @param $q
     * @return StdClass Object with $items and $totalItems for pagination
     */
    public function byPage($perPage = 30, $all = false, $q = null)
    {
        $query = $q ? $this->snippet->like('title', $q)->orderBy('created_at', 'desc')->with('Starred') : $this->snippet->orderBy('created_at', 'desc')->with('Starred');

        if (!$all) {
            $query->where('approved', 1);
        }

        return $query->paginate($perPage);
    }

    /**
     * Get total snippets count
     *
     * @todo I hate that this is public for the decorators.
     *       Perhaps interface it?
     * @param bool $all
     * @return int Total snippets
     */
    protected function totalSnippets($all = false)
    {
        if (!$all) {
            return $this->snippet->where('approved', 1)->count();
        }

        return $this->snippet->count();
    }

    /**
     * Get snippets by their tag
     *
     * @param $slug
     * @param int $page
     * @param int $limit
     * @internal param \LaraSnipp\Repo\Snippet\URL $string slug of tag
     * @internal param Number $int of snippets per page
     * @return StdClass Object with $items and $totalItems for pagination
     */
    public function byTag($slug, $page = 1, $limit = 10)
    {
        $tag = $this->tag->bySlug($slug);

        $result = new \StdClass;
        $result->page = $page;
        $result->limit = $limit;
        $result->totalItems = 0;
        $result->items = array();
        $result->tag = '';

        if (!$tag) {
            return $result;
        }

        $snippets = $tag->snippets()
            ->where('approved', 1)
            ->orderBy('created_at', 'desc')
            ->skip($limit * ($page - 1))
            ->take($limit)
            ->get();

        $result->totalItems = $this->totalByTag($slug);
        $result->items = $snippets->all();

        // attach tag in the result object so we can use it when needed
        $result->tag = $tag;

        return $result;
    }

    /**
     * Get total snippets count per tag
     *
     * @todo I hate that this is public for the decorators
     *       Perhaps interface it?
     * @param $slug
     * @internal param string $tag Tag slug
     * @return int    Total snippets per tag
     */
    protected function totalByTag($slug)
    {
        return $this->tag->bySlug($slug)
            ->snippets()
            ->where('approved', 1)
            ->count();
    }

    /**
     * Get snippets ordered by their number of views/hits
     *
     * @param int|string $limit Number of maximum snippets to return
     * @return \Illuminate\Database\Eloquent\Collection
     */
    public function getMostViewed($limit = 5)
    {
        $redis = App::make('redis');
        $mostViewedSnippets = $redis->zRevRange('hits', 0, $limit, array('withscores' => true));
        $snippetIds = array();

        // if there are no recorded hits in redis
        // lets return a blank eloquent collection
        if (empty($mostViewedSnippets)) {
            return new \Illuminate\Database\Eloquent\Collection;
        }

        foreach ($mostViewedSnippets as $snippet) {
            array_push($snippetIds, $snippet[0]);
        }

        $ids = implode(',', $snippetIds);

        // get all snippets at once and ordered by the current order
        // of ids inside $snippetIds array
        //
        // NOTE: here is the format
        //
        // Raw SQL:
        // SELECT * FROM snippets WHERE id IN (1,2) ORDER BY FIELD(id,2,1);
        //
        // Eloquent + raw query
        // $snippets = static::whereIn('id', $snippetIds)
        //     ->orderByRaw(DB::raw("FIELD(id, 2,1)"))
        //     ->get();
        $snippets = $this->snippet->whereIn('id', $snippetIds)
            ->orderByRaw(DB::raw("FIELD(id, $ids)"))
            ->take($limit)
            ->get();

        return $snippets;
    }

    /**
     * Get snippets by their author
     *
     * @param  string $slug Slug of author
     * @param  int $page Page number
     * @param  int $limit Number of snippets per page
     * @param bool $all
     * @return StdClass Object with $items and $totalItems for pagination
     */
    public function byAuthor($slug, $page = 1, $limit = 10, $all = false)
    {
        $user = $this->user->bySlug($slug);

        $result = new \StdClass;
        $result->page = $page;
        $result->limit = $limit;
        $result->totalItems = 0;
        $result->items = array();

        if (!$user) {
            return $result;
        }

        $query = $user->snippets()
            ->orderBy('created_at', 'desc')
            ->skip($limit * ($page - 1))
            ->take($limit);

        if (!$all) {
            $query->where('approved', 1);
        }

        $snippets = $query->get();

        $result->totalItems = $this->totalByAuthor($slug);
        $result->items = $snippets->all();

        // attach user in the result object so we can use it when needed
        $result->user = $user;

        return $result;
    }

    /**
     * Get total snippets count per author
     *
     * @todo I hate that this is public for the decorators
     *       Perhaps interface it?
     * @param  string $slug Author slug
     * @return int    Total snippets per author
     */
    protected function totalByAuthor($slug)
    {
        return $this->user->bySlug($slug)
            ->snippets()
            ->where('approved', 1)
            ->count();
    }

    /**
     * Create a snippet
     *
     * @param  array $data Array of inputs
     * @return boolean
     */
    public function create(array $data)
    {
        if ($snippet = $this->snippet->create($data)) {
            if (isset($data['tags'])) {
                $snippet->tags()->sync($data['tags']);
            } else {
                $snippet->tags()->detach();
            }

            return true;
        }

        return false;
    }

    /**
     * Update a snippet
     *
     * @param  Illuminate\Database\Eloquent\Model $snippet Snippet Model
     * @param array $input
     * @internal param array $data Array of inputs
     * @return boolean
     */
    public function update($snippet, array $input)
    {
        $snippet->fill($input);

        if ($snippet->save()) {
            if (isset($input['tags'])) {
                $snippet->tags()->sync($input['tags']);
            } else {
                $snippet->tags()->detach();
            }

            return true;
        }

        return false;
    }

    /**
     * Get snippets by their slug
     *
     * @param  string $slug Slug of snippet
     * @param  boolean $all Wether to include not yet approved snippets
     * @return Illuminate\Database\Eloquent\Model
     */
    public function bySlug($slug, $all = false)
    {
        $query = $this->model->whereSlug($slug);

        if (!$all) {
            $query->where('approved', 1);
        }

        return $query->first();
    }
}


================================================
FILE: app/LaraSnipp/Repo/Snippet/SnippetRepositoryInterface.php
================================================
<?php namespace LaraSnipp\Repo\Snippet;

interface SnippetRepositoryInterface
{
    /**
     * Get paginated snippets
     *
     * @param $perPage
     * @param  boolean $all Show published or all
     * @param $q
     * @return StdClass Object with $items and $totalItems for pagination
     */
    public function byPage($perPage = 30, $all = false, $q = null);

    /**
     * Get snippets by their tag
     *
     * @param string  URL slug of tag
     * @param int $page
     * @param int $limit
     * @internal param Number $int of snippets per page
     * @return StdClass Object with $items and $totalItems for pagination
     */
    public function byTag($slug, $page = 1, $limit = 10);

    /**
     * Get snippets ordered by their number of views/hits
     *
     * @param int|string $limit Number of maximum snippets to return
     * @return \Illuminate\Database\Eloquent\Collection
     */
    public function getMostViewed($limit = 5);

    /**
     * Get snippets by their author
     *
     * @param  string $slug Slug of author
     * @param  int $page Page number
     * @param  int $limit Number of snippets per page
     * @param bool $all
     * @return StdClass Object with $items and $totalItems for pagination
     */
    public function byAuthor($slug, $page = 1, $limit = 10, $all = false);

    /**
     * Create a snippet
     *
     * @param  array $data Array of inputs
     * @return boolean
     */
    public function create(array $data);

    /**
     * Update a snippet
     *
     * @param  Illuminate\Database\Eloquent\Model $snippet Snippet Model
     * @param array $input
     * @internal param array $data Array of inputs
     * @return boolean
     */
    public function update($snippet, array $input);

    /**
     * Get snippets by their slug
     *
     * @param  string $slug Slug of snippet
     * @param  boolean $all Wether to include not yet approved snippets
     * @return Illuminate\Database\Eloquent\Model
     */
    public function bySlug($slug, $all = false);
}


================================================
FILE: app/LaraSnipp/Repo/Tag/EloquentTagRepository.php
================================================
<?php namespace LaraSnipp\Repo\Tag;

use LaraSnipp\Repo\EloquentBaseRepository;
use LaraSnipp\Repo\Tag\TagRepositoryInterface;
use Illuminate\Database\Eloquent\Model;

class EloquentTagRepository extends EloquentBaseRepository implements TagRepositoryInterface
{
    /**
     * Eloquent Tag Model
     *
     * @var $tag typeof \Illuminate\Database\Eloquent\Model
     */
    protected $tag;

    // Class expects an Eloquent model
    public function __construct(Model $tag)
    {
        parent::__construct($tag);
        $this->tag = $tag;
    }
}


================================================
FILE: app/LaraSnipp/Repo/Tag/TagRepositoryInterface.php
================================================
<?php namespace LaraSnipp\Repo\Tag;

interface TagRepositoryInterface {}


================================================
FILE: app/LaraSnipp/Repo/User/EloquentUserRepository.php
================================================
<?php namespace LaraSnipp\Repo\User;

use DB;
use LaraSnipp\Repo\EloquentBaseRepository;
use LaraSnipp\Repo\User\UserRepositoryInterface;
use Illuminate\Database\Eloquent\Model;

class EloquentUserRepository extends EloquentBaseRepository implements UserRepositoryInterface
{
    /**
     * User Eloquent Model
     *
     * @var $user typeof \Illuminate\Database\Eloquent\Model
     */
    protected $user;

    public function __construct(Model $user)
    {
        parent::__construct($user);
        $this->user = $user;
    }

    /**
     * Get top snippets contributors
     *
     * @param  int $limit Results per page
     * @return Illuminate\Database\Eloquent\Collection
     */
    public function getTopSnippetContributors($limit = 5)
    {
        return $this->user->from('users AS u')
            ->join('snippets AS s', 'u.id', '=', 's.author_id', 'LEFT OUTER')
            ->where('u.active', '=', 1)
            ->where('s.approved', '=', 1)
            ->whereRaw('s.deleted_at IS NULL')
            ->groupBy('s.author_id')
            ->orderBy('snippets_count', 'DESC')
            ->take($limit)
            ->get(array('u.id', 'u.first_name', 'u.last_name', 'u.slug',
                DB::raw('count(s.author_id) AS snippets_count')));
    }

    /**
     * Get paginated users
     *
     * @param  int      $page  Number of snippet per page
     * @param  int      $limit Results per page
     * @param  boolean  $all   Show only active users or all
     * @return StdClass Object with $items and $totalItems for pagination
     */
    public function byPage($page = 1, $limit = 10, $all = false)
    {
        $result = new \StdClass;
        $result->page = $page;
        $result->limit = $limit;
        $result->totalItems = 0;
        $result->items = array();

        $query = $this->user->orderBy('created_at', 'desc');

        if (! $all) {
            $query->where('active', 1);
        }

        $users = $query->skip($limit * ($page-1))
                        ->take($limit)
                        ->get();

        $result->totalItems = $this->totalUsers($all);
        $result->items = $users->all();

        return $result;
    }

    /**
     * Get total users count
     *
     * @todo I hate that this is public for the decorators.
     *       Perhaps interface it?
     * @param bool $all
     * @return int Total users
     */
    protected function totalUsers($all = false)
    {
        if (! $all) {
            return $this->user->where('active', 1)->count();
        }

        return $this->user->count();
    }
}


================================================
FILE: app/LaraSnipp/Repo/User/UserRepositoryInterface.php
================================================
<?php namespace LaraSnipp\Repo\User;

interface UserRepositoryInterface
{
    /**
     * Get top snippets contributors
     *
     * @param  int $limit Results per page
     * @return Illuminate\Database\Eloquent\Collection
     */
    public function getTopSnippetContributors($limit = 5);

    /**
     * Get paginated users
     *
     * @param  int $page Number of snippet per page
     * @param  int $limit Results per page
     * @param  boolean $all Show only active users or all
     * @return \StdClass Object with $items and $totalItems for pagination
     */
    public function byPage($page = 1, $limit = 10, $all = false);
}


================================================
FILE: app/LaraSnipp/Service/Form/FormServiceProvider.php
================================================
<?php namespace LaraSnipp\Service\Form;

use Illuminate\Support\ServiceProvider;
use LaraSnipp\Service\Form\User\UserForm;
use LaraSnipp\Service\Form\User\UserFormLaravelValidator;
use LaraSnipp\Service\Form\Snippet\SnippetForm;
use LaraSnipp\Service\Form\Snippet\SnippetFormLaravelValidator;

class FormServiceProvider extends ServiceProvider
{
    /**
     * Register the binding
     *
     * @return void
     */
    public function register()
    {
        $app = $this->app;

        $app->bind('LaraSnipp\Service\Form\User\UserForm', function ($app) {
            return new UserForm(
                new UserFormLaravelValidator($app['validator']),
                $app->make('LaraSnipp\Repo\User\UserRepositoryInterface')
            );
        });

        $app->bind('LaraSnipp\Service\Form\Snippet\SnippetForm', function ($app) {
            return new SnippetForm(
                new SnippetFormLaravelValidator($app['validator']),
                $app->make('LaraSnipp\Repo\Snippet\SnippetRepositoryInterface'),
                $app->make('LaraSnipp\Repo\Tag\TagRepositoryInterface')
            );
        });
    }

}


================================================
FILE: app/LaraSnipp/Service/Form/Snippet/SnippetForm.php
================================================
<?php namespace LaraSnipp\Service\Form\Snippet;

use App;
use Auth;
use LaraSnipp\Service\Validation\ValidableInterface;
use LaraSnipp\Repo\Snippet\SnippetRepositoryInterface;
use LaraSnipp\Repo\Tag\TagRepositoryInterface;

class SnippetForm
{
    /**
     * Form Data
     *
     * @var array
     */
    protected $data;

    /**
     * Validator
     *
     * @var \LaraSnipp\Form\Service\ValidableInterface
     */
    protected $validator;

    /**
     * User repository
     *
     * @var \LaraSnipp\Repo\User\UserRepositoryInterface
     */
    protected $snippet;

    /**
     * Tag Repository
     *
     * @var $tag typeof \LaraSnipp\Repo\Tag\TagRepositoryInterface
     */
    protected $tag;

    public function __construct(
        ValidableInterface $validator,
        SnippetRepositoryInterface $snippet,
        TagRepositoryInterface $tag)
    {
        $this->validator = $validator;
        $this->snippet = $snippet;
        $this->tag = $tag;
    }

    /**
     * Create a new snippet
     *
     * @param array $input
     * @return boolean
     */
    public function create(array $input)
    {
        if (!$this->valid($input, 'creating')) {
            return false;
        }

        // validate if tags chosen are valid
        // @TODO: move this into a helper so we can re-use this one
        $tagIds = $this->tag->all()->lists('id');

        if (isset($input['tags']) && count($input['tags']) > 0) {
            foreach ($input['tags'] as $id) {
                if (!in_array($id, $tagIds)) {
                    return App::abort(404);
                }
            }
        }

        return $this->snippet->create($input);
    }

    /**
     * Update the snippet
     *
     * @param $slug
     * @param array $input
     * @return bool|\LaraSnipp\Repo\Snippet\Illuminate\Database\Eloquent\Model
     */
    public function update($slug, array $input)
    {
        $snippet = $this->snippet->bySlug($slug, $all = true);

        if (!$snippet->isTheAuthor(Auth::user())) {
            return App::abort(404);
        }

        if (!$this->valid($input, 'updating')) {
            return false;
        }

        // validate if tags chosen are valid
        // @TODO: move this into a helper so we can re-use this one
        $tagIds = $this->tag->all()->lists('id');

        if (isset($input['tags']) && count($input['tags']) > 0) {
            foreach ($input['tags'] as $id) {
                if (!in_array($id, $tagIds)) {
                    return App::abort(404);
                }
            }
        }

        if (!$this->snippet->update($snippet, $input)) return false;
        return $snippet;
    }

    /**
     * Return any validation errors
     *
     * @return array
     */
    public function errors()
    {
        return $this->validator->errors();
    }

    /**
     * Test if form validator passes
     *
     * @param array $input
     * @return boolean
     */
    protected function valid(array $input, $mode)
    {
        return $this->validator->with($input)->passes($mode);
    }
}


================================================
FILE: app/LaraSnipp/Service/Form/Snippet/SnippetFormLaravelValidator.php
================================================
<?php namespace LaraSnipp\Service\Form\Snippet;

use LaraSnipp\Service\Validation\AbstractLaravelValidator;

class SnippetFormLaravelValidator extends AbstractLaravelValidator
{
    /**
     * Validation rules
     *
     * @var Array
     */
    protected $rules = [
        'creating' => [
            'title' => 'required',
            'body' => 'required',
            'resource' => 'url'
        ],
        'updating' => [
            'title' => 'required',
            'body' => 'required',
            'resource' => 'url'
        ]
    ];
}


================================================
FILE: app/LaraSnipp/Service/Form/User/UserForm.php
================================================
<?php namespace LaraSnipp\Service\Form\User;

use LaraSnipp\Service\Validation\ValidableInterface;
use LaraSnipp\Repo\User\UserRepositoryInterface;
use User;

class UserForm
{
    /**
     * Form Data
     *
     * @var array
     */
    protected $data;

    /**
     * Validator
     *
     * @var \LaraSnipp\Form\Service\ValidableInterface
     */
    protected $validator;

    /**
     * User repository
     *
     * @var \LaraSnipp\Repo\User\UserRepositoryInterface
     */
    protected $user;

    public function __construct(ValidableInterface $validator, UserRepositoryInterface $user)
    {
        $this->validator = $validator;
        $this->user = $user;
    }

    /**
     * Create a new user
     *
     * @param array $input
     * @return boolean
     */
    public function create(array $input)
    {
        if (!$this->valid($input, 'creating')) {
            return false;
        }

        return $this->user->create($input);
    }

    /**
     * Updates an existent user
     *
     * @param $user
     * @param array $input
     * @return bool
     */
    public function update($user, array $input)
    {
        if (!$this->valid($input, 'updating')) {
            return false;
        }
        return $this->user->update($user, $input);
    }

    /**
     * Return any validation errors
     *
     * @return array
     */
    public function errors()
    {
        return $this->validator->errors();
    }

    /**
     * Test if form validator passes
     *
     * @param array $input
     * @param $mode : creating || updating
     * @return bool
     */
    protected function valid(array $input, $mode)
    {
        return $this->validator->with($input)->passes($mode);
    }
}


================================================
FILE: app/LaraSnipp/Service/Form/User/UserFormLaravelValidator.php
================================================
<?php namespace LaraSnipp\Service\Form\User;

use LaraSnipp\Service\Validation\AbstractLaravelValidator;

class UserFormLaravelValidator extends AbstractLaravelValidator
{
    /**
     * Validation rules
     *
     * @var Array
     */
    protected $rules = [
        'creating' => [
            'username' => 'required|between:3,16|unique:users',
            'password' => 'required|min:4|confirmed',
            'password_confirmation' => 'required|min:4',
            'email' => 'required|email|unique:users',
            'first_name' => 'required',
            'last_name' => 'required'
        ],
        'updating' => [
            'password' => 'min:8|confirmed',
            'password_confirmation' => 'min:8',
            'first_name' => 'required',
            'last_name' => 'required',
            'twitter_url' => 'url',
            'facebook_url' => 'url',
            'github_url' => 'url',
            'website_url' => 'url'
        ]
    ];
}


================================================
FILE: app/LaraSnipp/Service/Validation/AbstractLaravelValidator.php
================================================
<?php namespace LaraSnipp\Service\Validation;

use Illuminate\Validation\Factory;

abstract class AbstractLaravelValidator implements ValidableInterface
{
    /**
     * Validator
     *
     * @var \Illuminate\Validation\Factory
     */
    protected $validator;

    /**
     * Validation data key => value array
     *
     * @var Array
     */
    protected $data = array();

    /**
     * Validation errors
     *
     * @var Array
     */
    protected $errors = array();

    /**
     * Validation rules
     *
     * @var Array
     */
    protected $rules = array();

    public function __construct(Factory $validator)
    {
        $this->validator = $validator;
    }

    /**
     * Set data to validate
     *
     * @param array $data
     * @return \LaraSnipp\Service\Validation\AbstractLaravelValidator
     */
    public function with(array $data)
    {
        $this->data = $data;

        return $this;
    }

    /**
     * Validation passes or fails
     *
     * @param string $mode
     * @return bool
     */
    public function passes($mode = 'creating')
    {
        if ($mode === 'updating') {
            $validator = $this->validator->make($this->data, $this->rules['updating']);
        } else {
            $validator = $this->validator->make($this->data, $this->rules['creating']);
        }

        if ($validator->fails()) {
            $this->errors = $validator->messages();

            return false;
        }

        return true;
    }

    /**
     * Return errors, if any
     *
     * @return array
     */
    public function errors()
    {
        return $this->errors;
    }

}


================================================
FILE: app/LaraSnipp/Service/Validation/ValidableInterface.php
================================================
<?php namespace LaraSnipp\Service\Validation;

interface ValidableInterface
{
    /**
     * Add data to validation against
     *
     * @param array
     * @return \LaraSnipp\Service\Validation\ValidableInterface $this
     */
    public function with(array $input);

    /**
     * Test if validation passes
     *
     * @return boolean
     */
    public function passes();

    /**
     * Retrieve validation errors
     *
     * @return array
     */
    public function errors();

}


================================================
FILE: app/commands/.gitkeep
================================================


================================================
FILE: app/config/app.php
================================================
<?php

return array(

  /*
  |--------------------------------------------------------------------------
  | Application Debug Mode
  |--------------------------------------------------------------------------
  |
  | When your application is in debug mode, detailed error messages with
  | stack traces will be shown on every error that occurs within your
  | application. If disabled, a simple generic error page is shown.
  |
  */

  'debug' => false,

  /*
  |--------------------------------------------------------------------------
  | Application URL
  |--------------------------------------------------------------------------
  |
  | This URL is used by the console to properly generate URLs when using
  | the Artisan command line tool. You should set this to the root of
  | your application so that it is used when running Artisan tasks.
  |
  */

  'url' => 'http://localhost',

  /*
  |--------------------------------------------------------------------------
  | Application Timezone
  |--------------------------------------------------------------------------
  |
  | Here you may specify the default timezone for your application, which
  | will be used by the PHP date and date-time functions. We have gone
  | ahead and set this to a sensible default for you out of the box.
  |
  */

  'timezone' => 'UTC',

  /*
  |--------------------------------------------------------------------------
  | Application Locale Configuration
  |--------------------------------------------------------------------------
  |
  | The application locale determines the default locale that will be used
  | by the translation service provider. You are free to set this value
  | to any of the locales which will be supported by the application.
  |
  */

  'locale' => 'en',

  /*
  |--------------------------------------------------------------------------
  | Encryption Key
  |--------------------------------------------------------------------------
  |
  | This key is used by the Illuminate encrypter service and should be set
  | to a random, 32 character string, otherwise these encrypted strings
  | will not be safe. Please do this before deploying an application!
  |
  */

  'key' => 'YourSecretKey!!!',

  /*
  |--------------------------------------------------------------------------
  | Autoloaded Service Providers
  |--------------------------------------------------------------------------
  |
  | The service providers listed here will be automatically loaded on the
  | request to your application. Feel free to add your own services to
  | this array to grant expanded functionality to your applications.
  |
  */

  'providers' => array(

    'Illuminate\Foundation\Providers\ArtisanServiceProvider',
    'Illuminate\Auth\AuthServiceProvider',
    'Illuminate\Cache\CacheServiceProvider',
    'Illuminate\Foundation\Providers\CommandCreatorServiceProvider',
    'Illuminate\Session\CommandsServiceProvider',
    'Illuminate\Foundation\Providers\ComposerServiceProvider',
    'Illuminate\Routing\ControllerServiceProvider',
    'Illuminate\Cookie\CookieServiceProvider',
    'Illuminate\Database\DatabaseServiceProvider',
    'Illuminate\Encryption\EncryptionServiceProvider',
    'Illuminate\Filesystem\FilesystemServiceProvider',
    'Illuminate\Hashing\HashServiceProvider',
    'Illuminate\Html\HtmlServiceProvider',
    'Illuminate\Foundation\Providers\KeyGeneratorServiceProvider',
    'Illuminate\Log\LogServiceProvider',
    'Illuminate\Mail\MailServiceProvider',
    'Illuminate\Foundation\Providers\MaintenanceServiceProvider',
    'Illuminate\Database\MigrationServiceProvider',
    'Illuminate\Foundation\Providers\OptimizeServiceProvider',
    'Illuminate\Pagination\PaginationServiceProvider',
    'Illuminate\Foundation\Providers\PublisherServiceProvider',
    'Illuminate\Queue\QueueServiceProvider',
    'Illuminate\Redis\RedisServiceProvider',
    'Illuminate\Auth\Reminders\ReminderServiceProvider',
    'Illuminate\Foundation\Providers\RouteListServiceProvider',
    'Illuminate\Database\SeedServiceProvider',
    'Illuminate\Foundation\Providers\ServerServiceProvider',
    'Illuminate\Session\SessionServiceProvider',
    'Illuminate\Foundation\Providers\TinkerServiceProvider',
    'Illuminate\Translation\TranslationServiceProvider',
    'Illuminate\Validation\ValidationServiceProvider',
    'Illuminate\View\ViewServiceProvider',
    'Illuminate\Workbench\WorkbenchServiceProvider',
    'Illuminate\Remote\RemoteServiceProvider',

    // app specific
    'LaraSnipp\Repo\RepoServiceProvider',
    'LaraSnipp\Service\Form\FormServiceProvider',
    'LaraSnipp\Observer\ObserverServiceProvider',
    'LaraSnipp\LaraSnippServiceProvider',

    // 3rd party
    'Cviebrock\EloquentSluggable\SluggableServiceProvider',
    'Mews\Purifier\PurifierServiceProvider',
    'Bugsnag\BugsnagLaravel\BugsnagLaravelServiceProvider'

  ),

  /*
  |--------------------------------------------------------------------------
  | Service Provider Manifest
  |--------------------------------------------------------------------------
  |
  | The service provider manifest is used by Laravel to lazy load service
  | providers which are not needed for each request, as well to keep a
  | list of all of the services. Here, you may set its storage spot.
  |
  */

  'manifest' => storage_path().'/meta',

  /*
  |--------------------------------------------------------------------------
  | Class Aliases
  |--------------------------------------------------------------------------
  |
  | This array of class aliases will be registered when this application
  | is started. However, feel free to register as many as you wish as
  | the aliases are "lazy" loaded so they don't hinder performance.
  |
  */

  'aliases' => array(

    'App'         => 'Illuminate\Support\Facades\App',
    'Artisan'     => 'Illuminate\Support\Facades\Artisan',
    'Auth'        => 'Illuminate\Support\Facades\Auth',
    'Blade'       => 'Illuminate\Support\Facades\Blade',
    'Cache'       => 'Illuminate\Support\Facades\Cache',
    'ClassLoader' => 'Illuminate\Support\ClassLoader',
    'Config'      => 'Illuminate\Support\Facades\Config',
    'Controller'  => 'Illuminate\Routing\Controller',
    'Cookie'      => 'Illuminate\Support\Facades\Cookie',
    'Crypt'       => 'Illuminate\Support\Facades\Crypt',
    'DB'          => 'Illuminate\Support\Facades\DB',
    'Eloquent'    => 'Illuminate\Database\Eloquent\Model',
    'Event'       => 'Illuminate\Support\Facades\Event',
    'File'        => 'Illuminate\Support\Facades\File',
    'Form'        => 'Illuminate\Support\Facades\Form',
    'Hash'        => 'Illuminate\Support\Facades\Hash',
    'HTML'        => 'Illuminate\Support\Facades\HTML',
    'Input'       => 'Illuminate\Support\Facades\Input',
    'Lang'        => 'Illuminate\Support\Facades\Lang',
    'Log'         => 'Illuminate\Support\Facades\Log',
    'Mail'        => 'Illuminate\Support\Facades\Mail',
    'Paginator'   => 'Illuminate\Support\Facades\Paginator',
    'Password'    => 'Illuminate\Support\Facades\Password',
    'Queue'       => 'Illuminate\Support\Facades\Queue',
    'Redirect'    => 'Illuminate\Support\Facades\Redirect',
    'Redis'       => 'Illuminate\Support\Facades\Redis',
    'Request'     => 'Illuminate\Support\Facades\Request',
    'Response'    => 'Illuminate\Support\Facades\Response',
    'Route'       => 'Illuminate\Support\Facades\Route',
    'Schema'      => 'Illuminate\Support\Facades\Schema',
    'Seeder'      => 'Illuminate\Database\Seeder',
    'Session'     => 'Illuminate\Support\Facades\Session',
    'Str'         => 'Illuminate\Support\Str',
    'URL'         => 'Illuminate\Support\Facades\URL',
    'Validator'   => 'Illuminate\Support\Facades\Validator',
    'View'        => 'Illuminate\Support\Facades\View',
    'SSH'         => 'Illuminate\Support\Facades\SSH',

    // 3rd party
    'Sluggable' => 'Cviebrock\EloquentSluggable\Facades\Sluggable',
    'Purifier' => 'Mews\Purifier\Facades\Purifier',
    'Bugsnag' => 'Bugsnag\BugsnagLaravel\BugsnagFacade'
  ),

    'cipher' => MCRYPT_RIJNDAEL_256

);


================================================
FILE: app/config/auth.php
================================================
<?php

return array(

    /*
    |--------------------------------------------------------------------------
    | Default Authentication Driver
    |--------------------------------------------------------------------------
    |
    | This option controls the authentication driver that will be utilized.
    | This driver manages the retrieval and authentication of the users
    | attempting to get access to protected areas of your application.
    |
    | Supported: "database", "eloquent"
    |
    */

    'driver' => 'eloquent',

    /*
    |--------------------------------------------------------------------------
    | Authentication Model
    |--------------------------------------------------------------------------
    |
    | When using the "Eloquent" authentication driver, we need to know which
    | Eloquent model should be used to retrieve your users. Of course, it
    | is often just the "User" model but you may use whatever you like.
    |
    */

    'model' => 'User',

    /*
    |--------------------------------------------------------------------------
    | Authentication Table
    |--------------------------------------------------------------------------
    |
    | When using the "Database" authentication driver, we need to know which
    | table should be used to retrieve your users. We have chosen a basic
    | default value but you may easily change it to any table you like.
    |
    */

    'table' => 'users',

    /*
    |--------------------------------------------------------------------------
    | Password Reminder Settings
    |--------------------------------------------------------------------------
    |
    | Here you may set the settings for password reminders, including a view
    | that should be used as your password reminder e-mail. You will also
    | be able to set the name of the table that holds the reset tokens.
    |
    | The "expire" time is the number of minutes that the reminder should be
    | considered valid. This security feature keeps tokens short-lived so
    | they have less time to be guessed. You may change this as needed.
    |
    */

    'reminder' => array(

        'email' => 'emails.auth.reminder',

        'table' => 'password_reminders',

        'expire' => 60,

    ),

);


================================================
FILE: app/config/cache.php
================================================
<?php

return array(

    /*
    |--------------------------------------------------------------------------
    | Default Cache Driver
    |--------------------------------------------------------------------------
    |
    | This option controls the default cache "driver" that will be used when
    | using the Caching library. Of course, you may use other drivers any
    | time you wish. This is the default when another is not specified.
    |
    | Supported: "file", "database", "apc", "memcached", "redis", "array"
    |
    */

    'driver' => 'file',

    /*
    |--------------------------------------------------------------------------
    | File Cache Location
    |--------------------------------------------------------------------------
    |
    | When using the "file" cache driver, we need a location where the cache
    | files may be stored. A sensible default has been specified, but you
    | are free to change it to any other place on disk that you desire.
    |
    */

    'path' => storage_path().'/cache',

    /*
    |--------------------------------------------------------------------------
    | Database Cache Connection
    |--------------------------------------------------------------------------
    |
    | When using the "database" cache driver you may specify the connection
    | that should be used to store the cached items. When this option is
    | null the default database connection will be utilized for cache.
    |
    */

    'connection' => null,

    /*
    |--------------------------------------------------------------------------
    | Database Cache Table
    |--------------------------------------------------------------------------
    |
    | When using the "database" cache driver we need to know the table that
    | should be used to store the cached items. A default table name has
    | been provided but you're free to change it however you deem fit.
    |
    */

    'table' => 'cache',

    /*
    |--------------------------------------------------------------------------
    | Memcached Servers
    |--------------------------------------------------------------------------
    |
    | Now you may specify an array of your Memcached servers that should be
    | used when utilizing the Memcached cache driver. All of the servers
    | should contain a value for "host", "port", and "weight" options.
    |
    */

    'memcached' => array(

        array('host' => '127.0.0.1', 'port' => 11211, 'weight' => 100),

    ),

    /*
    |--------------------------------------------------------------------------
    | Cache Key Prefix
    |--------------------------------------------------------------------------
    |
    | When utilizing a RAM based store such as APC or Memcached, there might
    | be other applications utilizing the same cache. So, we'll specify a
    | value to get prefixed to all our keys so we can avoid collisions.
    |
    */

    'prefix' => 'laravel',

);


================================================
FILE: app/config/compile.php
================================================
<?php

return array(

    /*
    |--------------------------------------------------------------------------
    | Additional Compiled Classes
    |--------------------------------------------------------------------------
    |
    | Here you may specify additional classes to include in the compiled file
    | generated by the `artisan optimize` command. These should be classes
    | that are included on basically every request into the application.
    |
    */

);


================================================
FILE: app/config/database.php
================================================
<?php

return array(

    /*
    |--------------------------------------------------------------------------
    | PDO Fetch Style
    |--------------------------------------------------------------------------
    |
    | By default, database results will be returned as instances of the PHP
    | stdClass object; however, you may desire to retrieve records in an
    | array format for simplicity. Here you can tweak the fetch style.
    |
    */

    'fetch' => PDO::FETCH_CLASS,

    /*
    |--------------------------------------------------------------------------
    | Default Database Connection Name
    |--------------------------------------------------------------------------
    |
    | Here you may specify which of the database connections below you wish
    | to use as your default connection for all database work. Of course
    | you may use many connections at once using the Database library.
    |
    */

    'default' => 'mysql',

    /*
    |--------------------------------------------------------------------------
    | Database Connections
    |--------------------------------------------------------------------------
    |
    | Here are each of the database connections setup for your application.
    | Of course, examples of configuring each database platform that is
    | supported by Laravel is shown below to make development simple.
    |
    |
    | All database work in Laravel is done through the PHP PDO facilities
    | so make sure you have the driver for your particular database of
    | choice installed on your machine before you begin development.
    |
    */

    'connections' => array(

        'sqlite' => array(
            'driver'   => 'sqlite',
            'database' => __DIR__.'/../database/production.sqlite',
            'prefix'   => '',
        ),

        'mysql' => array(
            'driver'    => 'mysql',
            'host'      => 'localhost',
            'database'  => 'database',
            'username'  => 'root',
            'password'  => '',
            'charset'   => 'utf8',
            'collation' => 'utf8_unicode_ci',
            'prefix'    => '',
        ),

        'pgsql' => array(
            'driver'   => 'pgsql',
            'host'     => 'localhost',
            'database' => 'database',
            'username' => 'root',
            'password' => '',
            'charset'  => 'utf8',
            'prefix'   => '',
            'schema'   => 'public',
        ),

        'sqlsrv' => array(
            'driver'   => 'sqlsrv',
            'host'     => 'localhost',
            'database' => 'database',
            'username' => 'root',
            'password' => '',
            'prefix'   => '',
        ),

    ),

    /*
    |--------------------------------------------------------------------------
    | Migration Repository Table
    |--------------------------------------------------------------------------
    |
    | This table keeps track of all the migrations that have already run for
    | your application. Using this information, we can determine which of
    | the migrations on disk have not actually be run in the databases.
    |
    */

    'migrations' => 'migrations',

    /*
    |--------------------------------------------------------------------------
    | Redis Databases
    |--------------------------------------------------------------------------
    |
    | Redis is an open source, fast, and advanced key-value store that also
    | provides a richer set of commands than a typical key-value systems
    | such as APC or Memcached. Laravel makes it easy to dig right in.
    |
    */

    'redis' => array(

        'cluster' => false,

        'default' => array(
            'host'     => '127.0.0.1',
            'port'     => 6379,
            'database' => 0,
        ),

    ),

);


================================================
FILE: app/config/disqus.php
================================================
<?php

return [
    "key"       => null,
    "shortname" => null,
    "endpoint"  => "http://disqus.com/api/3.0/threads/details.json?api_key=%s&forum=%s&thread:ident=%s"
];


================================================
FILE: app/config/mail.php
================================================
<?php

return array(

    /*
    |--------------------------------------------------------------------------
    | Mail Driver
    |--------------------------------------------------------------------------
    |
    | Laravel supports both SMTP and PHP's "mail" function as drivers for the
    | sending of e-mail. You may specify which one you're using throughout
    | your application here. By default, Laravel is setup for SMTP mail.
    |
    | Supported: "smtp", "mail", "sendmail"
    |
    */

    'driver' => 'smtp',

    /*
    |--------------------------------------------------------------------------
    | SMTP Host Address
    |--------------------------------------------------------------------------
    |
    | Here you may provide the host address of the SMTP server used by your
    | applications. A default option is provided that is compatible with
    | the Postmark mail service, which will provide reliable delivery.
    |
    */

    'host' => 'smtp.mailgun.org',

    /*
    |--------------------------------------------------------------------------
    | SMTP Host Port
    |--------------------------------------------------------------------------
    |
    | This is the SMTP port used by your application to delivery e-mails to
    | users of your application. Like the host we have set this value to
    | stay compatible with the Postmark e-mail application by default.
    |
    */

    'port' => 587,

    /*
    |--------------------------------------------------------------------------
    | Global "From" Address
    |--------------------------------------------------------------------------
    |
    | You may wish for all e-mails sent by your application to be sent from
    | the same address. Here, you may specify a name and address that is
    | used globally for all e-mails that are sent by your application.
    |
    */

    'from' => array('address' => null, 'name' => null),

    /*
    |--------------------------------------------------------------------------
    | E-Mail Encryption Protocol
    |--------------------------------------------------------------------------
    |
    | Here you may specify the encryption protocol that should be used when
    | the application send e-mail messages. A sensible default using the
    | transport layer security protocol should provide great security.
    |
    */

    'encryption' => 'tls',

    /*
    |--------------------------------------------------------------------------
    | SMTP Server Username
    |--------------------------------------------------------------------------
    |
    | If your SMTP server requires a username for authentication, you should
    | set it here. This will get used to authenticate with your server on
    | connection. You may also set the "password" value below this one.
    |
    */

    'username' => null,

    /*
    |--------------------------------------------------------------------------
    | SMTP Server Password
    |--------------------------------------------------------------------------
    |
    | Here you may set the password required by your SMTP server to send out
    | messages from your application. This will be given to the server on
    | connection so that the application will be able to send messages.
    |
    */

    'password' => null,

    /*
    |--------------------------------------------------------------------------
    | Sendmail System Path
    |--------------------------------------------------------------------------
    |
    | When using the "sendmail" driver to send e-mails, we will need to know
    | the path to where Sendmail lives on this server. A default path has
    | been provided here, which will work well on most of your systems.
    |
    */

    'sendmail' => '/usr/sbin/sendmail -bs',

    /*
    |--------------------------------------------------------------------------
    | Mail "Pretend"
    |--------------------------------------------------------------------------
    |
    | When this option is enabled, e-mail will not actually be sent over the
    | web and will instead be written to your application's logs files so
    | you may inspect the message. This is great for local development.
    |
    */

    'pretend' => false,

);


================================================
FILE: app/config/packages/.gitkeep
================================================


================================================
FILE: app/config/purifier.php
================================================
<?php

return array(

    'encoding' => 'UTF-8',
    'finalize' => true,
    'preload'  => false,
    'settings' => array(
        'default' => array(
            'HTML.Doctype'             => 'XHTML 1.0 Strict',
            'HTML.Allowed'             => 'code,div,b,strong,i,em,a[href|title],ul,ol,li,p[style],br,span[style],img[width|height|alt|src]',
            'CSS.AllowedProperties'    => 'font,font-size,font-weight,font-style,font-family,text-decoration,padding-left,color,background-color,text-align',
            'AutoFormat.AutoParagraph' => true,
            'AutoFormat.RemoveEmpty'   => true,
        ),
    ),
);


================================================
FILE: app/config/queue.php
================================================
<?php

return array(

    /*
    |--------------------------------------------------------------------------
    | Default Queue Driver
    |--------------------------------------------------------------------------
    |
    | The Laravel queue API supports a variety of back-ends via an unified
    | API, giving you convenient access to each back-end using the same
    | syntax for each one. Here you may set the default queue driver.
    |
    | Supported: "sync", "beanstalkd", "sqs", "iron"
    |
    */

    'default' => 'sync',

    /*
    |--------------------------------------------------------------------------
    | Queue Connections
    |--------------------------------------------------------------------------
    |
    | Here you may configure the connection information for each server that
    | is used by your application. A default configuration has been added
    | for each back-end shipped with Laravel. You are free to add more.
    |
    */

    'connections' => array(

        'sync' => array(
            'driver' => 'sync',
        ),

        'beanstalkd' => array(
            'driver' => 'beanstalkd',
            'host'   => 'localhost',
            'queue'  => 'default',
        ),

        'sqs' => array(
            'driver' => 'sqs',
            'key'    => 'your-public-key',
            'secret' => 'your-secret-key',
            'queue'  => 'your-queue-url',
            'region' => 'us-east-1',
        ),

        'iron' => array(
            'driver'  => 'iron',
            'project' => 'your-project-id',
            'token'   => 'your-token',
            'queue'   => 'your-queue-name',
        ),

        'redis' => array(
            'driver' => 'redis',
            'queue'  => 'default',
        ),

    ),

    /*
    |--------------------------------------------------------------------------
    | Failed Queue Jobs
    |--------------------------------------------------------------------------
    |
    | These options configure the behavior of failed queue job logging so you
    | can control which database and table are used to store the jobs that
    | have failed. You may change them to any database / table you wish.
    |
    */

    'failed' => array(

        'database' => 'mysql', 'table' => 'failed_jobs',

    ),

);


================================================
FILE: app/config/remote.php
================================================
<?php

return array(

  /*
  |--------------------------------------------------------------------------
  | Default Remote Connection Name
  |--------------------------------------------------------------------------
  |
  | Here you may specify the default connection that will be used for SSH
  | operations. This name should correspond to a connection name below
  | in the server list. Each connection will be manually accessible.
  |
  */

  'default' => 'production',

  /*
  |--------------------------------------------------------------------------
  | Remote Server Connections
  |--------------------------------------------------------------------------
  |
  | These are the servers that will be accessible via the SSH task runner
  | facilities of Laravel. This feature radically simplifies executing
  | tasks on your servers, such as deploying out these applications.
  |
  */

  'connections' => array(

    'production' => array(
      'host'      => '',
      'username'  => '',
      'password'  => '',
      'key'       => '',
      'keyphrase' => '',
      'root'      => '/var/www',
    ),

  ),

  /*
  |--------------------------------------------------------------------------
  | Remote Server Groups
  |--------------------------------------------------------------------------
  |
  | Here you may list connections under a single group name, which allows
  | you to easily access all of the servers at once using a short name
  | that is extremely easy to remember, such as "web" or "database".
  |
  */

  'groups' => array(

    'web' => array('production')

  ),

);


================================================
FILE: app/config/session.php
================================================
<?php

return array(

    /*
    |--------------------------------------------------------------------------
    | Default Session Driver
    |--------------------------------------------------------------------------
    |
    | This option controls the default session "driver" that will be used on
    | requests. By default, we will use the lightweight native driver but
    | you may specify any of the other wonderful drivers provided here.
    |
    | Supported: "file", "cookie", "database", "apc",
    |            "memcached", "redis", "array"
    |
    */

    'driver' => 'file',

    /*
    |--------------------------------------------------------------------------
    | Session Lifetime
    |--------------------------------------------------------------------------
    |
    | Here you may specify the number of minutes that you wish the session
    | to be allowed to remain idle before it expires. If you want them
    | to immediately expire on the browser closing, set that option.
    |
    */

    'lifetime' => 120,

    'expire_on_close' => false,

    /*
    |--------------------------------------------------------------------------
    | Session File Location
    |--------------------------------------------------------------------------
    |
    | When using the native session driver, we need a location where session
    | files may be stored. A default has been set for you but a different
    | location may be specified. This is only needed for file sessions.
    |
    */

    'files' => storage_path().'/sessions',

    /*
    |--------------------------------------------------------------------------
    | Session Database Connection
    |--------------------------------------------------------------------------
    |
    | When using the "database" or "redis" session drivers, you may specify a
    | connection that should be used to manage these sessions. This should
    | correspond to a connection in your database configuration options.
    |
    */

    'connection' => null,

    /*
    |--------------------------------------------------------------------------
    | Session Database Table
    |--------------------------------------------------------------------------
    |
    | When using the "database" session driver, you may specify the table we
    | should use to manage the sessions. Of course, a sensible default is
    | provided for you; however, you are free to change this as needed.
    |
    */

    'table' => 'sessions',

    /*
    |--------------------------------------------------------------------------
    | Session Sweeping Lottery
    |--------------------------------------------------------------------------
    |
    | Some session drivers must manually sweep their storage location to get
    | rid of old sessions from storage. Here are the chances that it will
    | happen on a given request. By default, the odds are 2 out of 100.
    |
    */

    'lottery' => array(2, 100),

    /*
    |--------------------------------------------------------------------------
    | Session Cookie Name
    |--------------------------------------------------------------------------
    |
    | Here you may change the name of the cookie used to identify a session
    | instance by ID. The name specified here will get used every time a
    | new session cookie is created by the framework for every driver.
    |
    */

    'cookie' => 'laravel_session',

    /*
    |--------------------------------------------------------------------------
    | Session Cookie Path
    |--------------------------------------------------------------------------
    |
    | The session cookie path determines the path for which the cookie will
    | be regarded as available. Typically, this will be the root path of
    | your application but you are free to change this when necessary.
    |
    */

    'path' => '/',

    /*
    |--------------------------------------------------------------------------
    | Session Cookie Domain
    |--------------------------------------------------------------------------
    |
    | Here you may change the domain of the cookie used to identify a session
    | in your application. This will determine which domains the cookie is
    | available to in your application. A sensible default has been set.
    |
    */

    'domain' => null,

    /*
    |--------------------------------------------------------------------------
    | HTTPS Only Cookies
    |--------------------------------------------------------------------------
    |
    | By setting this option to true, session cookies will only be sent back
    | to the server if the browser has a HTTPS connection. This will keep
    | the cookie from being sent to you if it can not be done securely.
    |
    */

    'secure' => false,

);


================================================
FILE: app/config/site.php
================================================
<?php

return array(

    /*
    |--------------------------------------------------------------------------
    | URL Config
    |--------------------------------------------------------------------------
    */

    'url' => 'http://www.laravelsnippets.com',
    'url_short' => 'laravelsnippets.com',

    /*
    |--------------------------------------------------------------------------
    | Google Analytics Config
    |--------------------------------------------------------------------------
    */

    'ga_code' => 'UA-45609720-1',

    /*
    |--------------------------------------------------------------------------
    | Facebook Config
    |--------------------------------------------------------------------------
    */

    'facebook_url' => 'https://www.facebook.com/LaravelSnippets',
    'facebook_username' => 'laravelsnippets',

    /*
    |--------------------------------------------------------------------------
    | Twitter Config
    |--------------------------------------------------------------------------
    */

    'twitter_url' => 'https://twitter.com/laravelsnippets',
    'twitter_username' => 'laravelsnippets',
    'twitter_via' => 'LaravelSnippets #Laravel #snippet',

    /*
    |--------------------------------------------------------------------------
    | Header Config
    |--------------------------------------------------------------------------
    */
    'title' => 'LaravelSnippets.com',
    'meta_description' => 'A repository of useful code snippets for Laravel framework',
    'meta_author' => 'John Kevin M. Basco',

    /*
    |--------------------------------------------------------------------------
    | Footer Config
    |--------------------------------------------------------------------------
    */

    'footer_copyright' => '&copy; <a href="' . route('home') . '">laravelsnippets.com</a> by <a href="https://twitter.com/johnkevinmbasco" target="_blank">John Kevin M. Basco</a> | <a href="http://mayonvolcanosoftware.com/" target="_blank">Mayon Volcano Software Ltd.</a>',

    /*
    |--------------------------------------------------------------------------
    | Misc Config
    |--------------------------------------------------------------------------
    */

    'name' => 'Laravel Snippets',
    'welcome_message' => '<h1>Welcome to laravelsnippets.com</h1><p>A repository of useful code snippets for Laravel PHP framework. <a href="' . route('member.snippet.getCreate') . '">Submit</a>, grab and share!</p><p>Source code of the site - <a href="https://github.com/basco-johnkevin/laravelsnippets" target="_blank">Github link</a> . We accept pull requests! =)</p>',
    'repo_url' => '//github.com/basco-johnkevin/laravelsnippets',
    'mail_from' => 'basco.johnkevin@gmail.com',

    'snippetsPerPage' => 30

);


================================================
FILE: app/config/testing/app.php
================================================
<?php

return array(

    /*
    |--------------------------------------------------------------------------
    | Application Debug Mode
    |--------------------------------------------------------------------------
    |
    | When your application is in debug mode, detailed error messages with
    | stack traces will be shown on every error that occurs within your
    | application. If disabled, a simple generic error page is shown.
    |
    */

    'debug' => true,

);


================================================
FILE: app/config/testing/cache.php
================================================
<?php

return array(

    /*
    |--------------------------------------------------------------------------
    | Default Cache Driver
    |--------------------------------------------------------------------------
    |
    | This option controls the default cache "driver" that will be used when
    | using the Caching library. Of course, you may use other drivers any
    | time you wish. This is the default when another is not specified.
    |
    | Supported: "file", "database", "apc", "memcached", "redis", "array"
    |
    */

    'driver' => 'array',

);


================================================
FILE: app/config/testing/database.php
================================================
<?php

return array(

    /*
    |--------------------------------------------------------------------------
    | Default Database Connection Name
    |--------------------------------------------------------------------------
    |
    | Here you may specify which of the database connections below you wish
    | to use as your default connection for all database work. Of course
    | you may use many connections at once using the Database library.
    |
    */

    'default' => 'mysql',

    /*
    |--------------------------------------------------------------------------
    | Database Connections
    |--------------------------------------------------------------------------
    |
    | Here are each of the database connections setup for your application.
    | Of course, examples of configuring each database platform that is
    | supported by Laravel is shown below to make development simple.
    |
    |
    | All database work in Laravel is done through the PHP PDO facilities
    | so make sure you have the driver for your particular database of
    | choice installed on your machine before you begin development.
    |
    */

    'connections' => array(

        'mysql' => array(
            'driver'    => 'mysql',
            'host'      => 'localhost',
            'database'  => 'test.larasnipp',
            'username'  => 'root',
            'password'  => '',
            'charset'   => 'utf8',
            'collation' => 'utf8_unicode_ci',
            'prefix'    => '',
        ),

    ),

    /*
    |--------------------------------------------------------------------------
    | Redis Databases
    |--------------------------------------------------------------------------
    |
    | Redis is an open source, fast, and advanced key-value store that also
    | provides a richer set of commands than a typical key-value systems
    | such as APC or Memcached. Laravel makes it easy to dig right in.
    |
    */

    'redis' => array(

        'cluster' => false,

        'default' => array(
            'host'     => '127.0.0.1',
            'port'     => 6379,
            'database' => 5,
        ),

    ),

);


================================================
FILE: app/config/testing/mail.php
================================================
<?php

return array(

    /*
    |--------------------------------------------------------------------------
    | Mail "Pretend"
    |--------------------------------------------------------------------------
    |
    | When this option is enabled, e-mail will not actually be sent over the
    | web and will instead be written to your application's logs files so
    | you may inspect the message. This is great for local development.
    |
    */

    'pretend' => true,

);


================================================
FILE: app/config/testing/session.php
================================================
<?php

return array(

    /*
    |--------------------------------------------------------------------------
    | Default Session Driver
    |--------------------------------------------------------------------------
    |
    | This option controls the default session "driver" that will be used on
    | requests. By default, we will use the lightweight native driver but
    | you may specify any of the other wonderful drivers provided here.
    |
    | Supported: "native", "cookie", "database", "apc",
    |            "memcached", "redis", "array"
    |
    */

    'driver' => 'array',

);


================================================
FILE: app/config/view.php
================================================
<?php

return array(

    /*
    |--------------------------------------------------------------------------
    | View Storage Paths
    |--------------------------------------------------------------------------
    |
    | Most templating systems load templates from disk. Here you may specify
    | an array of paths that should be checked for your views. Of course
    | the usual Laravel view path has already been registered for you.
    |
    */

    'paths' => array(__DIR__.'/../views'),

    /*
    |--------------------------------------------------------------------------
    | Pagination View
    |--------------------------------------------------------------------------
    |
    | This view will be used to render the pagination link output, and can
    | be easily customized here to show any view you like. A clean view
    | compatible with Twitter's Bootstrap is given to you by default.
    |
    */

    // 'pagination' => 'pagination::bootstrap-3',
    'pagination' => 'partials/pagination',

);


================================================
FILE: app/config/workbench.php
================================================
<?php

return array(

    /*
    |--------------------------------------------------------------------------
    | Workbench Author Name
    |--------------------------------------------------------------------------
    |
    | When you create new packages via the Artisan "workbench" command your
    | name is needed to generate the composer.json file for your package.
    | You may specify it now so it is used for all of your workbenches.
    |
    */

    'name' => '',

    /*
    |--------------------------------------------------------------------------
    | Workbench Author E-Mail Address
    |--------------------------------------------------------------------------
    |
    | Like the option above, your e-mail address is used when generating new
    | workbench packages. The e-mail is placed in your composer.json file
    | automatically after the package is created by the workbench tool.
    |
    */

    'email' => '',

);


================================================
FILE: app/controllers/.gitkeep
================================================


================================================
FILE: app/controllers/Admin/IndexController.php
================================================
<?php namespace Admin;

class IndexController extends \BaseController
{
    public function getIndex()
    {
        return \View::make('admin.index');
    }
}

================================================
FILE: app/controllers/AuthController.php
================================================
<?php

use LaraSnipp\Repo\User\UserRepositoryInterface;
use LaraSnipp\Service\Form\User\UserForm;

class AuthController extends BaseController
{
    /**
     * User repository
     *
     * @var \LaraSnipp\Repo\User\UserRepositoryInterface
     */
    protected $user;

    /**
     * User form
     *
     * @var \LaraSnipp\Service\Form\User\UserForm
     */
    protected $userForm;

    public function __construct(UserRepositoryInterface $user, UserForm $userForm)
    {
        $this->user = $user;
        $this->userForm = $userForm;
    }

    /**
     * Show signup form
     * GET /signup
     */
    public function getSignup()
    {
        return View::make('auth.signup');
    }

    /**
     * Process signup form
     * POST /signup
     */
    public function postSignup()
    {
        if ($this->userForm->create(Input::all())) {
            return Redirect::route('auth.getLogin')
                ->with('message', 'Successfully registered. Please check your email and activate your account.')
                ->with('messageType', "success");
        }

        return Redirect::route('auth.getSignup')
            ->withInput()
            ->withErrors($this->userForm->errors());
    }

    /**
     * Activate account
     * GET /auth/activate/{slug}/key/{activation_key}
     */
    public function getActivateAccount($userSlug, $activationKey)
    {
        $user = $this->user->bySlug($userSlug);

        if ($user->isActive()) {
            return Redirect::route('home')
                ->with('message', 'This user account is already active.');
        }

        if ($user->activate($activationKey)) {
            Auth::login($user);

            return Redirect::route('home')
                ->with('message', 'Your account is now activated.')
                ->with('messageType', "success");
        } else {
            return Redirect::route('home')
                ->with('message', 'Invalid activation key.');
        }

    }

    /**
     * Show login form
     * GET /login
     */
    public function getLogin()
    {
        return View::make('auth.login');
    }

    /**
     * Process login
     * POST /login
     */
    public function postLogin()
    {
        $params = array(
            'username' => Input::get('username'),
            'password' => Input::get('password'),
            'active' => 1
        );

        if (Auth::attempt($params)) {
            // if next is present, redirect to that url
            $next = Input::get('next');
            if ($next) return Redirect::to($next);
            return Redirect::route('home');
        }

        return Redirect::route('auth.getLogin')
            ->with('message', 'Wrong username or password')
            ->withInput();
    }

    /**
     * Process logout
     * GET /logout
     */
    public function getLogout()
    {
        Auth::logout();

        return Redirect::route('auth.getLogin');
    }
}


================================================
FILE: app/controllers/BaseController.php
================================================
<?php

class BaseController extends Controller
{
    /**
     * Setup the layout used by the controller.
     *
     * @return void
     */
    protected function setupLayout()
    {
        if (!is_null($this->layout)) {
            $this->layout = View::make($this->layout);
        }
    }

}


================================================
FILE: app/controllers/HomeController.php
================================================
<?php
use LaraSnipp\Repo\Snippet\SnippetRepositoryInterface;
use LaraSnipp\Repo\User\UserRepositoryInterface;
use LaraSnipp\Repo\Tag\TagRepositoryInterface;

class HomeController extends BaseController
{
    /**
     * Snippet repository
     *
     * @var \LaraSnipp\Repo\Snippet\SnippetRepositoryInterface
     */
    protected $snippet;

    /**
     * User repository
     *
     * @var \LaraSnipp\Repo\Snippet\UserRepositoryInterface
     */
    protected $user;

    /**
     * Tag repository
     *
     * @var \LaraSnipp\Repo\Snippet\TagRepositoryInterface
     */
    protected $tag;

    public function __construct(
        SnippetRepositoryInterface $snippet,
        UserRepositoryInterface $user,
        TagRepositoryInterface $tag)
    {
        $this->snippet = $snippet;
        $this->user = $user;
        $this->tag = $tag;
    }

    /**
     * Show home page
     * GET /
     */
    public function getIndex()
    {
        $perPage = Config::get('site.snippetsPerPage');

        $snippets = $this->snippet->byPage($perPage);
        $topSnippetContributors = $this->user->getTopSnippetContributors();
        $mostViewedSnippets = $this->snippet->getMostViewed(10);
        $tags = $this->tag->all();

        return View::make('website.pages.index', compact('snippets', 'topSnippetContributors', 'mostViewedSnippets', 'tags'));
    }

}


================================================
FILE: app/controllers/Member/SnippetController.php
================================================
<?php namespace Member;

use BaseController;
use View;
use Input;
use Redirect;
use Auth;
use App;
use LaraSnipp\Repo\Snippet\SnippetRepositoryInterface;
use LaraSnipp\Repo\User\UserRepositoryInterface;
use LaraSnipp\Repo\Tag\TagRepositoryInterface;
use LaraSnipp\Service\Form\Snippet\SnippetForm;

class SnippetController extends BaseController
{
    /**
     * Snippet repository
     *
     * @var \LaraSnipp\Repo\Snippet\SnippetRepositoryInterface
     */
    protected $snippet;

    /**
     * User repository
     *
     * @var \LaraSnipp\Repo\Snippet\UserRepositoryInterface
     */
    protected $user;

    /**
     * Tag repository
     *
     * @var \LaraSnipp\Repo\Snippet\UserRepositoryInterface
     */
    protected $tag;

    /**
     * Snippet form
     *
     * @var LaraSnipp\Service\Form\Snippet\SnippetForm
     */
    protected $snippetForm;

    public function __construct(
        SnippetRepositoryInterface $snippet,
        UserRepositoryInterface $user,
        TagRepositoryInterface $tag,
        SnippetForm $snippetForm)
    {
        $this->snippet = $snippet;
        $this->user = $user;
        $this->tag = $tag;
        $this->snippetForm = $snippetForm;
    }

    /**
     * Show a single snippet of a user
     * GET /members/snippets/{slug}
     *
     * @param string $slug Slug of a snippet
     */
    public function getShow($slug)
    {
        $snippet = $this->snippet->bySlug($slug, $all = true);

        if (!$snippet) {
            return App::abort(404);
        }

        $user = Auth::user();
        $has_starred = !empty($user) ? $user->hasStarred($snippet->id) : false;

        $tags = $this->tag->all();
        $topSnippetContributors = $this->user->getTopSnippetContributors();

        return View::make('snippets.show', compact('snippet', 'has_starred', 'tags', 'topSnippetContributors'));
    }

    /**
     * Show the snippet create form
     * GET /members/submit/snippet
     */
    public function getCreate()
    {
        $tags = $this->tag->all()->lists('name', 'id');

        return View::make('member.snippets.create', compact('tags'));
    }

    /**
     * Process snippet submission
     * POST /members/submit/snippet
     */
    public function postStore()
    {
        if ($this->snippetForm->create(Input::all())) {
            return Redirect::route('member.snippet.getCreate')
                ->with('message', "Your snippet is now submitted and waiting for admin's approval")
                ->with('messageType', "success");
        }

        return Redirect::route('member.snippet.getCreate')
            ->withInput()
            ->withErrors($this->snippetForm->errors());
    }

    /**
     * Show the snippet edit form
     * GET /members/snippets/{slug}/edit
     */
    public function getEdit($slug)
    {
        $snippet = $this->snippet->bySlug($slug, $all = true);

        // validate that the user updating the snippet is the snippet author
        if (!$snippet->isTheAuthor(Auth::user())) return App::abort(404);

        $tags = $this->tag->all()->lists('name', 'id');

        return View::make('member.snippets.edit', compact('snippet', 'tags'));
    }

    /**
     * Process edit snippet form
     * POST /members/snippets/{slug}/update
     */
    public function postUpdate($slug)
    {
        if ($snippet = $this->snippetForm->update($slug, Input::all())) {
            return Redirect::route('member.snippet.getShow', $snippet->slug)
                ->with('message', 'Update successful')
                ->with('messageType', 'success');
        }

        return Redirect::back()
            ->withInput()
            ->withErrors($this->snippetForm->errors());
    }
}


================================================
FILE: app/controllers/Member/UserController.php
================================================
<?php namespace Member;

use BaseController;
use View;
use Input;
use Paginator;
use Auth;
use LaraSnipp\Repo\Snippet\SnippetRepositoryInterface;

class UserController extends BaseController
{
    /**
     * Snippet repository
     *
     * @var \LaraSnipp\Repo\Snippet\SnippetRepositoryInterface
     */
    protected $snippet;

    public function __construct(SnippetRepositoryInterface $snippet)
    {
        $this->snippet = $snippet;
    }

    /**
     * Show dashboard with snippets and starred snippets of the current logged-in user
     * GET /members/dashboard
     */
    public function dashboard()
    {
        $page = Input::get('page', 1);

        // Candidate for config item
        $perPage = 10;

        $pagiData = $this->snippet->byAuthor(Auth::user()->slug, $page, $perPage, $all = true);
        $my_snippets = Paginator::make($pagiData->items, $pagiData->totalItems, $perPage);

        $user = Auth::user();
        $starred_snippets = $user->starred()->with('Snippet')->get();

        return View::make('member.users.dashboard', compact('my_snippets', 'starred_snippets'));
    }
}


================================================
FILE: app/controllers/RemindersController.php
================================================
<?php


class RemindersController extends Controller
{

    /**
     * Display the password reminder view.
     *
     * @return \Illuminate\Http\Response
     */
    public function getRemind()
    {
        return View::make('password.remind');
    }

    /**
     * Handle a POST request to remind a user of their password.
     *
     * @return \Illuminate\Http\Response
     */
    public function postRemind()
    {
        switch ($response = Password::remind(Input::only('email'))) {
            case Password::INVALID_USER:
                return Redirect::route('password.remind')->with('message', 'Your email is invalid');

            case Password::REMINDER_SENT:
                return Redirect::route('password.remind')->with('message', 'The password reminder has been sent. Check your email')->with('messageType', "success");
        }
    }

    /**
     * Display the password reset view for the given token.
     *
     * @param  string $token
     * @return \Illuminate\Http\Response
     */
    public function getReset($token = null)
    {
        if (is_null($token)) {
            App::abort(404);
        }

        return View::make('password.reset')->with('token', $token);
    }

    /**
     * Handle a POST request to reset a user's password.
     *
     * @return \Illuminate\Http\Response
     */
    public function postReset()
    {
        $credentials = Input::only(
            'email',
            'password',
            'password_confirmation',
            'token'
        );

        $response = Password::reset($credentials, function ($user, $password) {
            $user->password = $password;

            $user->save();
        });

        switch ($response) {
            case Password::INVALID_PASSWORD:
            case Password::INVALID_TOKEN:
                return Redirect::route('password.remind')->with('message', "Your password remind request has expired or is invalid. Please request another one.")
                    ->with('messageType', "warning");
            case Password::INVALID_USER:
                return Redirect::route('password.reset')->with('message', "Whoops something went terribily wrong! Please retry")
                    ->with('messageType', "danger");

            case Password::PASSWORD_RESET:
                return Redirect::route('auth.getLogin')->with('message', 'Password successfully updated. Now log in')->with('messageType', 'success');
        }
    }
}


================================================
FILE: app/controllers/SnippetController.php
================================================
<?php

use LaraSnipp\Repo\Snippet\SnippetRepositoryInterface;
use LaraSnipp\Repo\User\UserRepositoryInterface;
use LaraSnipp\Repo\Tag\TagRepositoryInterface;

class SnippetController extends BaseController
{
    /**
     * Snippet repository
     *
     * @var \LaraSnipp\Repo\Snippet\SnippetRepositoryInterface
     */
    protected $snippet;

    /**
     * User repository
     *
     * @var \LaraSnipp\Repo\Snippet\UserRepositoryInterface
     */
    protected $user;

    /**
     * Tag repository
     *
     * @var \LaraSnipp\Repo\Snippet\TagRepositoryInterface
     */
    protected $tag;

    public function __construct(
        SnippetRepositoryInterface $snippet,
        UserRepositoryInterface $user,
        TagRepositoryInterface $tag)
    {
        $this->snippet = $snippet;
        $this->user = $user;
        $this->tag = $tag;
    }

    /**
     * Show listing of snippets
     * GET /snippets
     */
    public function getIndex()
    {
        $perPage = Config::get('site.snippetsPerPage');
        if (Request::has('q') and Request::get('q') !== '')
            $snippets = $this->snippet->byPage($perPage, false, e(Request::get('q')));
        else
            $snippets = $this->snippet->byPage($perPage);

        $tags = $this->tag->all();

        $topSnippetContributors = $this->user->getTopSnippetContributors();

        return View::make('snippets.index', compact('snippets', 'tags', 'topSnippetContributors'));
    }

    /**
     * Show an individual snippet
     * GET /snippets/{slug}
     * @param $slug
     * @return
     */
    public function getShow($slug)
    {
        $snippet = $this->snippet->bySlug($slug);

        if (!$snippet) {
            return App::abort(404);
        }

        $user = Auth::user();
        $has_starred = !empty($user) ? $user->hasStarred($snippet->id) : false;

        # check cookie readlist
        $cookieName = md5('snippet.readlist');
        $cookieJson = Cookie::get($cookieName);
        $cookieArray = json_decode($cookieJson);

        if (is_null($cookieArray) or !in_array($snippet->id, $cookieArray)) {
            # increment hit count if snippet id not exist cookie
            $snippet->incrementHits();

            # put cookie the snippet id
            $cookieArray[] = $snippet->id;

            # attached all cookies for one week.
            Cookie::queue($cookieName, json_encode($cookieArray), 10080);
        }

        $tags = $this->tag->all();
        $topSnippetContributors = $this->user->getTopSnippetContributors();

        return View::make('snippets.show', compact('snippet', 'has_starred', 'tags', 'topSnippetContributors'));
    }

    /**
     * Stars a snippet
     * GET /snippets/{slug}/star
     * @param $slug
     * @return
     */
    public function starSnippet($slug)
    {
        $snippet = $this->snippet->bySlug($slug);
        $user = Auth::user();

        if (empty($user)) {
            return Redirect::route('snippet.getShow', array($slug))
                ->with(
                    'message',
                    sprintf(
                        'Only logged in users can star snippets. Please %s or %s.',
                        link_to_route('auth.getLogin', 'login'),
                        link_to_route('auth.getSignup', 'signup')
                    )
                );
        }

        $user->starSnippet($snippet->id);

        return Redirect::route('snippet.getShow', array($slug));
    }

    /**
     * Unstars a snippet
     * GET /snippets/{slug}/unstar
     * @param $slug
     * @return
     */
    public function unstarSnippet($slug)
    {
        $snippet = $this->snippet->bySlug($slug);
        $user = Auth::user();

        if (empty($user)) {
            return Redirect::route('snippet.getShow', array($slug))
                ->with(
                    'message',
                    sprintf(
                        'Only logged in users can unstar snippets. Please %s or %s.',
                        link_to_route('auth.getLogin', 'login'),
                        link_to_route('auth.getSignup', 'signup')
                    )
                );
        }

        $user->unStarSnippet($snippet->id);

        return Redirect::route('snippet.getShow', array($slug));
    }
}


================================================
FILE: app/controllers/TagController.php
================================================
<?php

use LaraSnipp\Repo\Snippet\SnippetRepositoryInterface;
use LaraSnipp\Repo\Tag\TagRepositoryInterface;
use LaraSnipp\Repo\User\UserRepositoryInterface;

class TagController extends BaseController
{
    /**
     * Tag repository
     *
     * @var \LaraSnipp\Repo\Snippet\UserRepositoryInterface
     */
    protected $tag;

    /**
     * Snippet repository
     *
     * @var \LaraSnipp\Repo\Snippet\SnippetRepositoryInterface
     */
    protected $snippet;

    /**
     * User repository
     *
     * @var \LaraSnipp\Repo\Snippet\UserRepositoryInterface
     */
    protected $user;

    public function __construct(
        TagRepositoryInterface $tag,
        SnippetRepositoryInterface $snippet,
        UserRepositoryInterface $user)
    {
        $this->tag = $tag;
        $this->snippet = $snippet;
        $this->user = $user;
    }

    /**
     * Show listing of snippets filtered by a tag
     * GET /tags/{slug}
     */
    public function getShow($slug)
    {
        $page = Input::get('page', 1);

        // Candidate for config item
        $perPage = 30;

        $pagiData = $this->snippet->byTag($slug, $page, $perPage);

        if (!$pagiData->tag) {
            return App::abort(404);
        }

        $tag = $pagiData->tag;
        $snippets = Paginator::make($pagiData->items, $pagiData->totalItems, $perPage);

        $tags = $this->tag->all();
        $topSnippetContributors = $this->user->getTopSnippetContributors();

        return View::make('tags.snippets', compact('snippets', 'tag', 'tags', 'topSnippetContributors'));
    }
}


================================================
FILE: app/controllers/UserController.php
================================================
<?php

use Illuminate\Support\Facades\Redirect;
use LaraSnipp\Repo\Snippet\SnippetRepositoryInterface;
use LaraSnipp\Repo\User\UserRepositoryInterface;
use LaraSnipp\Service\Form\User\UserForm;

class UserController extends BaseController
{
    /**
     * Snippet repository
     *
     * @var \LaraSnipp\Repo\Snippet\SnippetRepositoryInterface
     */
    protected $snippet;

    /**
     * User repository
     *
     * @var \LaraSnipp\Repo\Snippet\UserRepositoryInterface
     */
    protected $user;
    /**
     * @var UserForm
     */
    private $userForm;

    /**
     * @param UserRepositoryInterface $user
     * @param SnippetRepositoryInterface $snippet
     * @param UserForm $userForm
     */
    public function __construct(UserRepositoryInterface $user, SnippetRepositoryInterface $snippet, UserForm $userForm)
    {
        $this->user = $user;
        $this->snippet = $snippet;
        $this->userForm = $userForm;
    }

    /**
     * Show listing of users
     * GET /profiles
     */
    public function getIndex()
    {
        $page = Input::get('page', 1);

        // Candidate for config item
        $perPage = 12;

        $pagiData = $this->user->byPage($page, $perPage);
        $users = Paginator::make($pagiData->items, $pagiData->totalItems, $perPage);

        return View::make('users.index', compact('users'));
    }

    /**
     * Show profile of a user
     * GET /profiles/{slug}
     */
    public function getProfile($slug)
    {
        $user = $this->user->bySlug($slug);

        if (!$user) {
            return App::abort(404);
        }

        return View::make('users.profile', compact('user'));
    }

    /**
     * Show listing of snippets of a user
     * GET /profiles/{slug}/snippets
     * @param $slug
     * @return
     */
    public function getSnippets($slug)
    {
        $page = Input::get('page', 1);

        // Candidate for config item
        $perPage = 10;

        $pagiData = $this->snippet->byAuthor($slug, $page, $perPage);
        $user = $pagiData->user;
        $snippets = Paginator::make($pagiData->items, $pagiData->totalItems, $perPage);

        return View::make('users.snippets', compact('snippets', 'user'));
    }

    /**
     * Show user's settings page
     * GET /profiles/{slug}/settings
     * @param $slug
     */
    public function getSettings($slug)
    {
        $user = Auth::user();
        return View::make('users.settings', compact('user'));
    }

    /**
     * Updates user settings
     * @param $slug
     * @return mixed
     */
    public function putSettings($slug)
    {
        $user = Auth::user();

        $result = $this->userForm->update($user, Input::all());

        if ($result) {
            return Redirect::route('user.getSettings', $slug)
                ->with('message', 'Successfully updated your settings.')
                ->with('messageType', "success");
        } else {
            return Redirect::route('user.getSettings', $slug)
                ->withInput()
                ->withErrors($this->userForm->errors());
        }
    }
}


================================================
FILE: app/controllers/website/PagesController.php
================================================
<?php namespace Website;

use View;

class PagesController extends \BaseController
{
    public function showRoadmap()
    {
        return View::make('website.pages.roadmap');
    }

}


================================================
FILE: app/database/migrations/.gitkeep
================================================


================================================
FILE: app/database/migrations/2013_11_08_145020_create_snippets_table.php
================================================
<?php

use Illuminate\Database\Migrations\Migration;

class CreateSnippetsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('snippets', function ($table) {
            $table->increments('id');
            $table->string('title');
            $table->text('body');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('snippets');
    }

}


================================================
FILE: app/database/migrations/2013_12_05_122548_create_users_table.php
================================================
<?php

use Illuminate\Database\Migrations\Migration;

class CreateUsersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('users', function ($table) {
            $table->increments('id');
            $table->string('username');
            $table->string('email');
            $table->string('password');
            $table->string('first_name');
            $table->string('last_name');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('users');
    }

}


================================================
FILE: app/database/migrations/2013_12_05_122952_add_author_id_in_snippets_table.php
================================================
<?php

use Illuminate\Database\Migrations\Migration;

class AddAuthorIdInSnippetsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('snippets', function ($table) {
            $table->unsignedInteger('author_id');
            $table->foreign('author_id')->references('id')->on('users');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('snippets', function ($table) {
            $table->dropForeign('snippets_author_id_foreign');
            $table->dropColumn('author_id');
        });
    }

}


================================================
FILE: app/database/migrations/2013_12_08_055430_add_slug_and_activation_key_and_active_in_users_table.php
================================================
<?php

use Illuminate\Database\Migrations\Migration;

class AddSlugAndActivationKeyAndActiveInUsersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('users', function ($table) {
              $table->string('slug');
              $table->string('activation_key');
              $table->string('active');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('users', function ($table) {
            $table->dropColumn('slug');
            $table->dropColumn('activation_key');
            $table->dropColumn('active');
        });
    }

}


================================================
FILE: app/database/migrations/2013_12_09_125456_drop_active_in_users_table.php
================================================
<?php

use Illuminate\Database\Migrations\Migration;

class DropActiveInUsersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('users', function ($table) {
            $table->dropColumn('active');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('users', function ($table) {
            $table->string('active');
        });
    }

}


================================================
FILE: app/database/migrations/2013_12_09_130122_add_active_in_users_table.php
================================================
<?php

use Illuminate\Database\Migrations\Migration;

class AddActiveInUsersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('users', function ($table) {
            $table->string('active')->default(0);
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('users', function ($table) {
            $table->dropColumn('active');
        });
    }

}


================================================
FILE: app/database/migrations/2013_12_10_112312_add_approved_in_snippets_table.php
================================================
<?php

use Illuminate\Database\Migrations\Migration;

class AddApprovedInSnippetsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('snippets', function ($table) {
            $table->boolean('approved')->default(0);
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('snippets', function ($table) {
            $table->dropColumn('approved');
        });
    }

}


================================================
FILE: app/database/migrations/2013_12_10_132447_add_slug_in_snippets_table.php
================================================
<?php

use Illuminate\Database\Migrations\Migration;

class AddSlugInSnippetsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('snippets', function ($table) {
            $table->string('slug')->default(0);
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('snippets', function ($table) {
            $table->dropColumn('slug');
        });
    }

}


================================================
FILE: app/database/migrations/2013_12_11_012940_create_roles_table.php
================================================
<?php

use Illuminate\Database\Migrations\Migration;

class CreateRolesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('roles', function ($table) {
            $table->increments('id');
            $table->string('name');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('roles');
    }

}


================================================
FILE: app/database/migrations/2013_12_11_013036_add_role_id_in_users_table.php
================================================
<?php

use Illuminate\Database\Migrations\Migration;

class AddRoleIdInUsersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('users', function ($table) {
            $table->unsignedInteger('role_id');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('users', function ($table) {
            $table->dropColumn('role_id');
        });
    }

}


================================================
FILE: app/database/migrations/2013_12_11_013559_add_description_credits_to_resource_deleted_at_in_snippets_table.php
================================================
<?php

use Illuminate\Database\Migrations\Migration;

class AddDescriptionCreditsToResourceDeletedAtInSnippetsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('snippets', function ($table) {
            $table->text('description')->nullable();
            $table->string('credits_to')->nullable();
            $table->string('resource')->nullable();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('snippets', function ($table) {
            $table->dropColumn('description');
            $table->dropColumn('credits_to');
            $table->dropColumn('resource');
            $table->dropColumn('deleted_at');
        });
    }

}


================================================
FILE: app/database/migrations/2013_12_11_014226_create_tags_table.php
================================================
<?php

use Illuminate\Database\Migrations\Migration;

class CreateTagsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('tags', function ($table) {
            $table->increments('id');
            $table->string('name');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('tags');
    }

}


================================================
FILE: app/database/migrations/2013_12_11_014317_create_snippet_tag_table.php
================================================
<?php

use Illuminate\Database\Migrations\Migration;

class CreateSnippetTagTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('snippet_tag', function ($table) {
            $table->increments('id');
            $table->unsignedInteger('snippet_id');
            $table->unsignedInteger('tag_id');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('snippet_tag');
    }

}


================================================
FILE: app/database/migrations/2013_12_11_103428_add_slug_in_tags_table.php
================================================
<?php

use Illuminate\Database\Migrations\Migration;

class AddSlugInTagsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('tags', function ($table) {
              $table->string('slug');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('tags', function ($table) {
            $table->dropColumn('slug');
        });
    }

}


================================================
FILE: app/database/migrations/2013_12_12_093641_add_remaining_columns_in_users_table.php
================================================
<?php

use Illuminate\Database\Migrations\Migration;

class AddRemainingColumnsInUsersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('users', function ($table) {
            $table->string('twitter_url')->nullable();
            $table->string('facebook_url')->nullable();
            $table->string('github_url')->nullable();
            $table->string('website_url')->nullable();
            $table->string('photo_url')->nullable();
            $table->text('about_me')->nullable();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('users', function ($table) {
            $table->dropColumn('twitter_url');
            $table->dropColumn('facebook_url');
            $table->dropColumn('github_url');
            $table->dropColumn('website_url');
            $table->dropColumn('photo_url');
            $table->dropColumn('about_me');
        });
    }

}


================================================
FILE: app/database/migrations/2013_12_19_134131_create_password_reminders_table.php
================================================
<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreatePasswordRemindersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('password_reminders', function (Blueprint $table) {
            $table->string('email')->index();
            $table->string('token')->index();
            $table->timestamp('created_at');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('password_reminders');
    }

}


================================================
FILE: app/database/migrations/2014_01_04_072223_add_disqus_columns_to_snippets_table.php
================================================
<?php

use Illuminate\Database\Migrations\Migration;

class AddDisqusColumnsToSnippetsTable
extends Migration
{
  /**
   * Run the migrations.
   *
   * @return void
   */
  public function up()
  {
    Schema::table("snippets", function ($table) {
      $table->timestamp("updated_comments_at");
      $table->integer("comments");
    });
  }

  /**
   * Reverse the migrations.
   *
   * @return void
   */
  public function down()
  {
    Schema::table("snippets", function ($table) {
      $table->dropColumn("updated_comments_at");
      $table->dropColumn("comments");
    });
  }
}


================================================
FILE: app/database/migrations/2014_01_06_212314_create_user_starred_table.php
================================================
<?php

use Illuminate\Database\Migrations\Migration;

class CreateUserStarredTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('user_starred', function ($table) {
            $table->increments('id');
            $table->unsignedInteger('user_id');
            $table->unsignedInteger('snippet_id');
            $table->index('user_id');
            $table->index('snippet_id');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('user_starred');
    }

}


================================================
FILE: app/database/migrations/2014_04_17_151653_add_remember_token_to_users_table.php
================================================
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class AddRememberTokenToUsersTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::table('users', function(Blueprint $table) {
			$table->string('remember_token', 100)->nullable();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::table('users', function(Blueprint $table) {
			$table->dropColumn('remember_token');
		});
	}

}


================================================
FILE: app/database/seeds/.gitkeep
================================================


================================================
FILE: app/database/seeds/DatabaseSeeder.php
================================================
<?php

class DatabaseSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        Eloquent::unguard();

        $this->call('RoleSeeder');
        $this->call('TagSeeder');
    }

}


================================================
FILE: app/database/seeds/RoleSeeder.php
================================================
<?php

class RoleSeeder extends Seeder
{
    public function run()
    {
        if (Role::count() == 0) {
            $this->generate();
        }
    }

    private function generate()
    {
        $roles = array(
            'admin',
            'member'
        );

        foreach ($roles as $role) {
            Role::create(array(
                'name' => $role
            ));
        }
    }
}


================================================
FILE: app/database/seeds/TagSeeder.php
================================================
<?php

class TagSeeder extends Seeder
{
    public function run()
    {
        if (Tag::count() == 0) {
            $this->generate();
        }
    }

    private function generate()
    {
        $tags = array(
            'auth' => 'auth',
            'eloquent' => 'eloquent'
        );

        foreach ($tags as $name => $slug) {
            Tag::create(array(
                'name' => $name,
                'slug' => $slug
            ));
        }
    }
}


================================================
FILE: app/filters.php
================================================
<?php

/*
|--------------------------------------------------------------------------
| Application & Route Filters
|--------------------------------------------------------------------------
|
| Below you will find the "before" and "after" events for the application
| which may be used to do any work before or after a request into your
| application. Here you may also register your custom route filters.
|
*/

App::before(function ($request) {
    if (App::environment() === 'production') {

        $client = new Raven_Client(Config::get('app.sentryDsn'));

        $error_handler = new Raven_ErrorHandler($client);

        // Register error handler callbacks
        set_error_handler(array($error_handler, 'handleError'));
        set_exception_handler(array($error_handler, 'handleException'));
    }
});

App::after(function ($request, $response) {
    //
});

/*
|--------------------------------------------------------------------------
| Authentication Filters
|--------------------------------------------------------------------------
|
| The following filters are used to verify that the user of the current
| session is logged into this application. The "basic" filter easily
| integrates HTTP Basic authentication for quick, simple checking.
|
*/

Route::filter('auth', function ($route, $request, $message = '', $nextUrl = '') {
    if (Auth::guest()) {
        if ($message) {
            return Redirect::route('auth.getLogin', array('next' => $nextUrl))->with('message', $message);
        }

        return Redirect::route('auth.getLogin');
    }
});

Route::filter('admin', function ($route, $request) {
    if (!Auth::user()->isAdmin()) {
        return App::abort(401, 'You are not authorized.');
    }
});

Route::filter('auth.basic', function () {
    return Auth::basic();
});

/*
|--------------------------------------------------------------------------
| Guest Filter
|--------------------------------------------------------------------------
|
| The "guest" filter is the counterpart of the authentication filters as
| it simply checks that the current user is not logged in. A redirect
| response will be issued if they are, which you may freely change.
|
*/

Route::filter('guest', function () {
    if (Auth::check()) return Redirect::to('/');
});

/*
|--------------------------------------------------------------------------
| CSRF Protection Filter
|--------------------------------------------------------------------------
|
| The CSRF filter is responsible for protecting your application against
| cross-site request forgery attacks. If this special token in a user
| session does not match the one given in this request, we'll bail.
|
*/

Route::filter('csrf', function () {
    if (Session::token() != Input::get('_token')) {
        throw new Illuminate\Session\TokenMismatchException;
    }
});


================================================
FILE: app/lang/en/pagination.php
================================================
<?php

return array(

    /*
    |--------------------------------------------------------------------------
    | Pagination Language Lines
    |--------------------------------------------------------------------------
    |
    | The following language lines are used by the paginator library to build
    | the simple pagination links. You are free to change them to anything
    | you want to customize your views to better match your application.
    |
    */

    'previous' => '&laquo; Previous',

    'next'     => 'Next &raquo;',

);


================================================
FILE: app/lang/en/reminders.php
================================================
<?php

return array(

    /*
    |--------------------------------------------------------------------------
    | Password Reminder Language Lines
    |--------------------------------------------------------------------------
    |
    | The following language lines are the default lines which match reasons
    | that are given by the password broker for a password update attempt
    | has failed, such as for an invalid token or invalid new password.
    |
    */

    "password" => "Passwords must be at least six characters and match the confirmation.",

    "user" => "We can't find a user with that e-mail address.",

    "token" => "This password reset token is invalid.",

    "sent" => "Password reminder sent!",

);


================================================
FILE: app/lang/en/validation.php
================================================
<?php

return array(

    /*
    |--------------------------------------------------------------------------
    | Validation Language Lines
    |--------------------------------------------------------------------------
    |
    | The following language lines contain the default error messages used by
    | the validator class. Some of these rules have multiple versions such
    | such as the size rules. Feel free to tweak each of these messages.
    |
    */

    "accepted"         => "The :attribute must be accepted.",
    "active_url"       => "The :attribute is not a valid URL.",
    "after"            => "The :attribute must be a date after :date.",
    "alpha"            => "The :attribute may only contain letters.",
    "alpha_dash"       => "The :attribute may only contain letters, numbers, and dashes.",
    "alpha_num"        => "The :attribute may only contain letters and numbers.",
    "array"            => "The :attribute must be an array.",
    "before"           => "The :attribute must be a date before :date.",
    "between"          => array(
        "numeric" => "The :attribute must be between :min and :max.",
        "file"    => "The :attribute must be between :min and :max kilobytes.",
        "string"  => "The :attribute must be between :min and :max characters.",
        "array"   => "The :attribute must have between :min and :max items.",
    ),
    "confirmed"        => "The :attribute confirmation does not match.",
    "date"             => "The :attribute is not a valid date.",
    "date_format"      => "The :attribute does not match the format :format.",
    "different"        => "The :attribute and :other must be different.",
    "digits"           => "The :attribute must be :digits digits.",
    "digits_between"   => "The :attribute must be between :min and :max digits.",
    "email"            => "The :attribute format is invalid.",
    "exists"           => "The selected :attribute is invalid.",
    "image"            => "The :attribute must be an image.",
    "in"               => "The selected :attribute is invalid.",
    "integer"          => "The :attribute must be an integer.",
    "ip"               => "The :attribute must be a valid IP address.",
    "max"              => array(
        "numeric" => "The :attribute may not be greater than :max.",
        "file"    => "The :attribute may not be greater than :max kilobytes.",
        "string"  => "The :attribute may not be greater than :max characters.",
        "array"   => "The :attribute may not have more than :max items.",
    ),
    "mimes"            => "The :attribute must be a file of type: :values.",
    "min"              => array(
        "numeric" => "The :attribute must be at least :min.",
        "file"    => "The :attribute must be at least :min kilobytes.",
        "string"  => "The :attribute must be at least :min characters.",
        "array"   => "The :attribute must have at least :min items.",
    ),
    "not_in"           => "The selected :attribute is invalid.",
    "numeric"          => "The :attribute must be a number.",
    "regex"            => "The :attribute format is invalid.",
    "required"         => "The :attribute field is required.",
    "required_if"      => "The :attribute field is required when :other is :value.",
    "required_with"    => "The :attribute field is required when :values is present.",
    "required_without" => "The :attribute field is required when :values is not present.",
    "same"             => "The :attribute and :other must match.",
    "size"             => array(
        "numeric" => "The :attribute must be :size.",
        "file"    => "The :attribute must be :size kilobytes.",
        "string"  => "The :attribute must be :size characters.",
        "array"   => "The :attribute must contain :size items.",
    ),
    "unique"           => "The :attribute has already been taken.",
    "url"              => "The :attribute format is invalid.",

    /*
    |--------------------------------------------------------------------------
    | Custom Validation Language Lines
    |--------------------------------------------------------------------------
    |
    | Here you may specify custom validation messages for attributes using the
    | convention "attribute.rule" to name the lines. This makes it quick to
    | specify a specific custom language line for a given attribute rule.
    |
    */

    'custom' => array(),

    /*
    |--------------------------------------------------------------------------
    | Custom Validation Attributes
    |--------------------------------------------------------------------------
    |
    | The following language lines are used to swap attribute place-holders
    | with something more reader friendly such as E-Mail Address instead
    | of "email". This simply helps us make messages a little cleaner.
    |
    */

    'attributes' => array(),

);


================================================
FILE: app/libraries/SiteHelpers.php
================================================
<?php

class SiteHelpers
{
    /**
     * Returns body id made up by URI segments
     *
     * @return string
     */
    public static function bodyId()
    {
        $body_id = preg_replace(['/\d-/', '/-\d/'], '', implode('-', Request::segments()));
        return !empty($body_id) && $body_id != '-' ? $body_id : "homepage";
    }

    /**
     * Returns body classes made up by URI segments
     *
     * @return string
     */
    public static function bodyClass()
    {
        $body_classes = [];
        $class = "";

        if (Request::segment(1) === 'snippets' && !empty(Request::segment(2))) {
            return "single-snippet";
        }

        foreach (Request::segments() as $segment) {
            if (is_numeric($segment) || empty($segment)) {
                continue;
            }

            $class .= !empty($class) ? "-" . $segment : $segment;

            array_push($body_classes, $class);
        }

        if (Auth::check()) {
            array_push($body_classes, 'user-' . Auth::user()->type);
        }

        return !empty($body_classes) ? implode(' ', $body_classes) : NULL;
    }

    /**
     * Returns breadcrumbs made up by URI segments
     *
     * @return string
     */
    public static function breadcrumbs()
    {
        $breadcrumbs = [];
        $crumbs = Request::segments();

        if (count($crumbs) < 2) {
            return;
        }

        $url = "";

        end($crumbs);
        $last_key = key($crumbs);

        foreach ($crumbs as $key => $crumb) {
            $url .= '/' . $crumb;
            $crumb = ucwords($crumb);

            if ($key != $last_key) {
                $crumb = '<span typeof="v:Breadcrumb">' .
                    link_to($url, $crumb, ['rel' => 'v:url', 'property' => 'v:title']) .
                    '</span>';
            } else if (Request::segment(1) === 'snippets') {
                $crumb = "";
            } else {
                $crumb = '<span class="current">' . $crumb . '</span>';
            }

            array_push($breadcrumbs, $crumb);
        }

        $return = '<div class="clearfix">';
        $return .= '<div class="breadcrumbs" xmlns:v="http://rdf.data-vocabulary.org/#">';
        $return .= '<div class="container">';
        $return .= implode('<i class="fa fa-chevron-right"></i>', $breadcrumbs);
        $return .= '</div>';
        $return .= '</div>';
        $return .= '</div>';

        return $return;
    }

    /**
     * Returns li wrapped link with active class
     *
     * @param string $url
     * @param string $title
     * @param bool $has_sub_menu
     * @param array $attributes
     * @param bool $secure
     * @return string
     */
    public static function navLinkTo($url, $title, $has_sub_menu = false, $attributes = [], $secure = null)
    {
        $purl = parse_url($url);
        $uri = ltrim($purl['path'], '/');

        $link = '<li class="';
        $link .= Request::is($uri) ? 'active ' : '';
        $link .= strtolower($title);
        $link .= '">';
        $link .= link_to($url, $title, $attributes, $secure);

        if (!$has_sub_menu) {
            $link .= '</li>';
        }

        return $link;
    }

    /**
     * Returns URL with prepended protocol
     *
     * @param string $url
     * @param bool $https optional
     * @return string
     */
    public static function url($url, $https = false)
    {
        $http = $https ? 'https://' : 'http://';
        return $http . str_replace(['http://', 'https://'], '', $url);
    }
}

================================================
FILE: app/macros.php
================================================
<?php

Form::macro('rawLabel', function ($name, $value = null, $options = array()) {
    $label = Form::label($name, '%s', $options);
    return sprintf($label, $value);
});

Form::macro("field", function ($options) {
    $markup = "";

    $type = "text";

    if (!empty($options["type"])) {
        $type = $options["type"];
    }

    if (empty($options["name"])) {
        return;
    }

    $name = $options["name"];

    $label = "";

    if (!empty($options["label"])) {
        $label = $options["label"];
    }

    if (empty($label) && empty($options['no_label'])) {
        $label = str_replace('_', ' ', ucwords($name));
    }

    $value = Input::old($name);

    if (!empty($options["value"])) {
        $value = Input::old($name, $options["value"]);
    }

    // if (!empty($options["selected"]))
    // {
    // 	// $value = Input::old($name, $options["selected"]);
    // }

    $placeholder = "";

    if (!empty($options["placeholder"])) {
        $placeholder = $options["placeholder"];
    }

    $class = "";

    if (!empty($options["class"])) {
        $class = " " . $options["class"];
    }

    $parameters = [
        "class" => "form-control" . $class,
        "placeholder" => $placeholder
    ];

    if (!empty($options['parameters'])) {
        $parameters = array_merge($parameters, $options['parameters']);
    }

    $error = "";

    if (!empty($options["error"])) {
        $error = $options["error"]->has($name) ? $options["error"]->first($name) : NULL;
    }

    if ($type !== "hidden") {
        $markup .= "<div class='form-group";
        $markup .= ($error ? " has-error" : "");
        $markup .= "'>";
    }

    switch ($type) {
        case "text":
            if (empty($options['no_label'])) {
                $markup .= Form::rawLabel($name, $label, [
                    "class" => "control-label"
                ]);
            }
            $markup .= Form::text($name, $value, $parameters);
            break;

        case "textarea":
            if (empty($options['no_label'])) {
                $markup .= Form::rawLabel($name, $label, [
                    "class" => "control-label"
                ]);
            }
            $markup .= Form::textarea($name, $value, $parameters);
            break;

        case "password":
            if (empty($options['no_label'])) {
                $markup .= Form::rawLabel($name, $label, [
                    "class" => "control-label"
                ]);
            }
            $markup .= Form::password($name, $parameters);
            break;

        case "checkbox":
            $markup .= "<div class='checkbox'>";
            if (empty($options['no_label'])) {
                $markup .= "<label>";
            }

            $selected = !empty($options['selected']) ? $options['selected'] : false;
            $value = !empty($value) ? $value : 1;
            $markup .= Form::checkbox($name, $value, (boolean)$selected);

            if (empty($options['no_label'])) {
                $markup .= " " . $label;
                $markup .= "</label>";
            }
            $markup .= "</div>";
            break;

        case "hidden":
            $markup .= Form::hidden($name, $value);
            break;

        case "select":
            if (empty($options['no_label'])) {
                $markup .= Form::rawLabel($name, $label, [
                    "class" => "control-label"
                ]);
            }

            if (!in_array('multiple', $parameters)) {
                $options['options'] = [NULL => 'Choose an option'] + $options['options'];
            }
            $markup .= Form::select($name, $options['options'], $value, $parameters);
            break;

        case "radio":
            $markup .= "<div class='radio'>";
            if (empty($options['no_label'])) {
                $markup .= "<label>";
            }

            $selected = !empty($options['selected']) ? $options['selected'] : false;
            $markup .= Form::radio($name, $value, (boolean)$selected);

            if (empty($options['no_label'])) {
                $markup .= " " . $label;
                $markup .= "</label>";
            }
            $markup .= "</div>";
            break;
    }

    if ($error) {
        $markup .= "<span class='help-block'>";
        $markup .= $error;
        $markup .= "</span>";
    }

    if ($type !== "hidden") {
        $markup .= "</div>";
    }

    return $markup;
});


HTML::macro('submit', function ($value = null, $options = []) {
    $options['class'] = !empty($options['class']) ? 'btn btn-info ' . $options['class'] : 'btn btn-info';
    return Form::input('submit', null, $value, $options);
});

HTML::macro('snippets', function ($snippets, $show_pagination = true) {
    include(app_path() . '/views/partials/snippets.php');

    if ($show_pagination) {
        echo $snippets->appends(Input::except('page'))->links();
    }
});

================================================
FILE: app/models/BaseModel.php
================================================
<?php

class BaseModel extends Eloquent
{

    /**
     * Get human created at date
     *
     * @return mixed
     */
    public function getHumanCreatedAtAttribute()
    {
        return $this->created_at->diffForHumans();
    }

    /**
     * Get human updated at date
     *
     * @return mixed
     */
    public function getHumanUpdatedAtAttribute()
    {
        return $this->updated_at->diffForHumans();
    }
}


================================================
FILE: app/models/Role.php
================================================
<?php

class Role extends BaseModel {}


================================================
FILE: app/models/Snippet.php
================================================
<?php

use Illuminate\Database\Eloquent\SoftDeletingTrait;

class Snippet extends BaseModel
{
    /**
     * The fields who are mass assignable
     *
     * @var $fillable typeof array
     */
    protected $fillable = array(
        'title',
        'body',
        'description',
        'credits_to',
        'resource'
    );

    /**
     * Soft deleting
     *
     * @var $dates typeof array
     */
    use SoftDeletingTrait;
    protected $dates = ['deleted_at'];

    /**
     * Config for eloquent sluggable package
     * Reference: https://github.com/cviebrock/eloquent-sluggable
     *
     * @var array
     */
    public static $sluggable = array(
        'build_from' => 'title',
        'save_to' => 'slug',
    );

    /**
     * The snippet belongs to a user
     *
     * @return mixed
     */
    public function author()
    {
        return $this->belongsTo('User');
    }

    /**
     * The snippet has many tags
     *
     * @return mixed
     */
    public function tags()
    {
        return $this->belongsToMany('Tag');
    }

    /**
     * Hits eloquent accessor
     *
     * @return string
     */
    public function getHitsAttribute()
    {
        $redis = App::make('redis');

        return $redis->zScore('hits', $this->id);
    }

    /**
     * Determine if Snippet has hits/views
     *
     * @return boolean
     */
    public function hasHits()
    {
        return $this->hits ? true : false;
    }

    /**
     * Determine if the passed User is the Snippet author
     *
     * @param  User $user User instance
     * @return boolean
     */
    public function isTheAuthor($user)
    {
        return $this->author_id === $user->id;
    }

    /**
     * Increment hits count
     */
    public function incrementHits()
    {
        $redis = App::make('redis');
        $redis->zIncrBy('hits', 1, $this->id);
    }

    /**
     * Tests links for twitter/url
     */
    protected function testLink($url)
    {
        stream_context_set_default(
            [
                "http" => [
                    "method" => "HEAD"
                ]
            ]
        );

        try {
            $headers = get_headers($url);
        } catch (Exception $e) {
            return false;
        }

        foreach ($headers as $header) {
            if (stristr($header, "200 OK")) {
                return $url;
            }
        }

        return false;
    }

    /**
     * Gets links for twitter/url
     */
    public function getCreditsToLinkAttribute()
    {
        $creditsTo = $this->attributes["credits_to"];
        $twitterHandle = str_replace("@", "", $creditsTo);

        $twitterLink = Cache::remember("credits_to_link_twitter_" . $creditsTo, 60, function () use ($twitterHandle) {
            $url = "http://twitter.com/" . $twitterHandle;

            return $this->testLink($url);
        });

        if ($twitterLink) {
            return $twitterLink;
        }

        $normalLink = Cache::remember("credits_to_link_normal_" . $creditsTo, 60, function () use ($creditsTo) {
            return $this->testLink($creditsTo);
        });

        if ($normalLink) {
            return $normalLink;
        }

        return null;
    }

    /**
     * A snippet can be starred by users
     *
     * @return mixed
     */
    public function starred()
    {
        return $this->hasMany('Starred');
    }


    public function scopeLike($query, $field, $value)
    {
        return $query->where($field, 'LIKE', "%$value%");
    }

}


================================================
FILE: app/models/Starred.php
================================================
<?php

class Starred extends BaseModel
{
    /**
     * The database table used by the model.
     *
     * @var $table typeof string
     */
    protected $table = 'user_starred';

    /**
     * Being a pivot table, we disable the timestamps (created_at and updated_at)
     *
     * @var $timestamps typeof bool
     */
    public $timestamps = false;

    /**
     * Fillable fields
     *
     * @var $fillable typeof array
     */
    protected $fillable = array(
        'snippet_id',
        'user_id'
    );

    /**
     * A "Star" belongs to a Snippet relationship
     *
     * @return mixed
     */
    public function snippet()
    {
        return $this->belongsTo('Snippet');
    }

}


================================================
FILE: app/models/Tag.php
================================================
<?php

class Tag extends Eloquent
{
    public $timestamps = false;

    public static $sluggable = array(
        'build_from' => 'name',
        'save_to'    => 'slug',
    );

    public function snippets()
    {
        return $this->belongsToMany('Snippet');
    }

    /**
     * Determine if Tag has snippets
     *
     * @return boolean
     */
    public function hasSnippets()
    {
        return $this->snippets()->where('approved', 1)->count() ? true : false;
    }

}


================================================
FILE: app/models/User.php
================================================
<?php

use Illuminate\Auth\UserInterface;
use Illuminate\Auth\Reminders\RemindableInterface;

class User extends BaseModel implements UserInterface, RemindableInterface
{
    /**
     * The database table used by the model.
     *
     * @var string
     */
    protected $table = 'users';

    /**
     * The fields who are mass assignable
     *
     * @var string
     */
    protected $fillable = array(
        'username',
        'password',
        'first_name',
        'last_name',
        'email',
        'twitter_url',
        'github_url',
        'facebook_url',
        'website_url',
        'about_me'
    );

    /**
     * The attributes excluded from the model's JSON form.
     *
     * @var array
     */
    protected $hidden = array('password');

    /**
     * Config for eloquent sluggable package
     * Reference: https://github.com/cviebrock/eloquent-sluggable
     *
     * @var array
     */
    public static $sluggable = array(
        'build_from' => 'full_name',
        'save_to' => 'slug',
    );

    /**
     * Define a one-to-many relationship.
     *
     * @return \Illuminate\Database\Eloquent\Relations\HasMany
     */
    public function snippets()
    {
        return $this->hasMany('Snippet', 'author_id');
    }

    /**
     * A user has a role, like administration etc.
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function role()
    {
        return $this->belongsTo('Role');
    }

    /**
     * The user has starred snippets
     *
     * @return \Illuminate\Database\Eloquent\Relations\HasMany
     */
    public function starred()
    {
        return $this->hasMany('Starred');
    }

    /**
     * Get the unique identifier for the user.
     *
     * @return mixed
     */
    public function getAuthIdentifier()
    {
        return $this->getKey();
    }

    /**
     * Get the password for the user.
     *
     * @return string
     */
    public function getAuthPassword()
    {
        return $this->password;
    }

    /**
     * Get the token value for the "remember me" session.
     *
     * @return string
     */
    public function getRememberToken()
    {
        return $this->remember_token;
    }

    /**
     * Set the token value for the "remember me" session.
     *
     * @param  string $value
     * @return void
     */
    public function setRememberToken($value)
    {
        $this->remember_token = $value;
    }

    /**
     * Get the column name for the "remember me" token.
     *
     * @return string
     */
    public function getRememberTokenName()
    {
        return 'remember_token';
    }

    /**
     * Get the e-mail address where password reminders are sent.
     *
     * @return string
     */
    public function getReminderEmail()
    {
        return $this->email;
    }

    /**
     * Full name eloquent accessor
     *
     * @return string
     */
    public function getFullNameAttribute()
    {
        return ucfirst($this->first_name) . ' ' . ucfirst($this->last_name);
    }

    /**
     * Returns the absolute url for the profile picture
     * @return string
     */
    public function getAbsPhotoUrlAttribute()
    {
        if (!$this->photo_url) {

            $hash = md5(trim(strtolower($this->attributes["email"])));

            return "http://www.gravatar.com/avatar/" . $hash . "?s=120";
        }

        $assetsDir = asset('/');

        return $assetsDir . $this->photo_url;
    }

    /**
     * Gets the number of snippets that a user has
     * @return mixed
     */
    public function getSnippetsCountAttribute()
    {
        return $this->snippets()->where('approved', 1)->count();
    }

    /**
     * Password eloquent mutator
     *
     * @param $value
     * @return string
     */
    public function setPasswordAttribute($value)
    {
        $this->attributes['password'] = Hash::make($value);
    }

    /**
     * Checks if user is active
     *
     * @return boolean
     */
    public function isActive()
    {
        return $this->active ? true : false;
    }

    /**
     * Activates a user
     *
     * @param $key
     * @throws RuntimeException
     * @return boolean
     */
    public function activate($key)
    {
        if ($this->activation_key === $key) {

            $this->active = 1;

            if ($this->save()) {
                return true;
            }

            throw new \RuntimeException('Saving to database failed.');
        }

        return false;
    }

    /**
     * Checks if user is administration
     *
     * @return boolean
     */
    public function isAdmin()
    {
        return $this->role->name === 'admin';
    }

    /**
     * Checks if a user has starred a snippet
     *
     * @param  integer $snippet_id
     * @return bool
     */
    public function hasStarred($snippet_id)
    {
        return $this->starred()->whereSnippetId($snippet_id)->count() ? true : false;
    }

    /**
     * Stars a snippet
     *
     * @param  integer $snippet_id
     * @return bool
     */
    public function starSnippet($snippet_id)
    {
        if ($this->hasStarred($snippet_id)) {
            return;
        }

        $this->starred()->create(array('snippet_id' => $snippet_id));
    }

    /**
     * Unstars a snippet
     *
     * @param  integer $snippet_id
     * @return bool
     */
    public function unstarSnippet($snippet_id)
    {
        if (!$this->hasStarred($snippet_id)) {
            return;
        }

        $this->starred()->whereSnippetId($snippet_id)->delete();
    }

}


================================================
FILE: app/routes.php
================================================
<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the Closure to execute when that URI is requested.
|
*/

/**
 * Website Routes
 */

# 404
Route::get('/404', ['as' => '404', 'uses' => function() {
    return View::make('website.pages.404');
}]);

# Pages
Route::get('/', ['as' => 'home', 'uses' => 'HomeController@getIndex']);
Route::get('roadmap', ['as' => 'pages.roadmap', 'uses' => 'Website\PagesController@showRoadmap']);

# Signup
Route::get('signup', ['as' => 'auth.getSignup', 'uses' => 'AuthController@getSignup']);
Route::post('signup', ['before' => 'csrf', 'as' => 'auth.postSignup', 'uses' => 'AuthController@postSignup']);

# Login
Route::get('login', ['as' => 'auth.getLogin', 'uses' => 'AuthController@getLogin']);
Route::post('login', ['before' => 'csrf', 'as' => 'auth.postLogin', 'uses' => 'AuthController@postLogin']);

# Logout
Route::get('logout', ['as' => 'auth.getLogout', 'uses' => 'AuthController@getLogout']);
Route::get('auth/activate/{userSlug}/key/{activationKey}', ['as' => 'auth.getActivateAccount', 'uses' => 'AuthController@getActivateAccount']);

/**
 * Snippet Routes
 */
Route::get('snippets', ['as' => 'snippet.getIndex', 'uses' => 'SnippetController@getIndex']);
Route::get('snippets/{slug}', ['as' => 'snippet.getShow', 'uses' => 'SnippetController@getShow']);
Route::get('snippets/{slug}/star', ['as' => 'snippet.star', 'uses' => 'SnippetController@starSnippet']);
Route::get('snippets/{slug}/unstar', ['as' => 'snippet.unStar', 'uses' => 'SnippetController@unstarSnippet']);

/**
 * Tag Routes
 */
Route::get('tags/{slug}', ['as' => 'tag.getShow', 'uses' => 'TagController@getShow']);

/**
 * Password Reset Routes
 */
Route::get('password/remind', ['as' => 'password.remind', 'uses' => 'RemindersController@getRemind']);
Route::post('password/remind', ['before' => 'csrf', 'as' => 'password.remind', 'uses' => 'RemindersController@postRemind']);
Route::get('password/reset/{token}', ['as' => 'password.reset', 'uses' => 'RemindersController@getReset']);
Route::post('password/reset/{token}', ['before' => 'csrf', 'as' => 'password.reset', 'uses' => 'RemindersController@postReset']);

/**
 * Profile Routes
 */
Route::get('profiles', ['as' => 'user.getIndex', 'uses' => 'UserController@getIndex']);
Route::get('profiles/{slug}', ['as' => 'user.getProfile', 'uses' => 'UserController@getProfile']);
Route::get('profiles/{slug}/settings', ['as' => 'user.getSettings', 'uses' => 'UserController@getSettings']);
Route::put('profiles/{slug}/settings', ['as' => 'user.putSettings', 'uses' => 'UserController@putSettings']);
Route::get('profiles/{slug}/snippets', ['as' => 'user.getSnippets', 'uses' => 'UserController@getSnippets']);

/**
 * Member Routes
 */
Route::group(
    ['prefix' => 'members', 'before' => ['auth']],
    function () {

        # Dashboard
        Route::get('dashboard', ['as' => 'member.user.dashboard', 'uses' => 'Member\UserController@dashboard']);

        # Snippets
        Route::get('snippets/{slug}', ['as' => 'member.snippet.getShow', 'uses' => 'Member\SnippetController@getShow']);
        Route::get('snippets/{slug}/edit', ['as' => 'member.snippet.getEdit', 'uses' => 'Member\SnippetController@getEdit']);
        Route::post('snippets/{slug}/update', ['before' => 'csrf', 'as' => 'member.snippet.postUpdate', 'uses' => 'Member\SnippetController@postUpdate']);
        Route::get('submit/snippet', ['as' => 'member.snippet.getCreate', 'uses' => 'Member\SnippetController@getCreate']);
        Route::post('submit/snippet', ['before' => 'csrf', 'as' => 'member.snippet.postStore', 'uses' => 'Member\SnippetController@postStore']);

    });

/**
 * Admin Routes
 */
Route::group(['prefix' => 'admin', 'namespace' => 'Admin'], function () {
    Route::get('/', ['as' => 'admin.index', 'uses' => 'IndexController@getIndex']);
});

================================================
FILE: app/start/artisan.php
================================================
<?php

/*
|--------------------------------------------------------------------------
| Register The Artisan Commands
|--------------------------------------------------------------------------
|
| Each available Artisan command must be registered with the console so
| that it is available to be called. We'll register every command so
| the console gets access to each of the command object instances.
|
*/


================================================
FILE: app/start/global.php
================================================
<?php

/*
|--------------------------------------------------------------------------
| Register The Laravel Class Loader
|--------------------------------------------------------------------------
|
| In addition to using Composer, you may use the Laravel class loader to
| load your controllers and models. This is useful for keeping all of
| your classes in the "global" namespace without Composer updating.
|
*/

ClassLoader::addDirectories(array(

    app_path() . '/commands',
    app_path() . '/controllers',
    app_path() . '/models',
    app_path() . '/database/seeds',
    app_path() . '/libraries',

));

/*
|--------------------------------------------------------------------------
| Application Error Logger
|--------------------------------------------------------------------------
|
| Here we will configure the error logger setup for the application which
| is built on top of the wonderful Monolog library. By default we will
| build a rotating log file setup which creates a new file each day.
|
*/

$logFile = 'log-' . php_sapi_name() . '.txt';

Log::useDailyFiles(storage_path() . '/logs/' . $logFile);

/*
|--------------------------------------------------------------------------
| Application Error Handler
|--------------------------------------------------------------------------
|
| Here you may handle any errors that occur in your application, including
| logging them or displaying custom views for specific errors. You may
| even register several error handlers to handle different types of
| exceptions. If nothing is returned, the default error view is
| shown, which includes a detailed stack trace during debug.
|
*/

App::error(function (Exception $exception, $code) {
    Log::error($exception);
});

/*
|--------------------------------------------------------------------------
| Maintenance Mode Handler
|--------------------------------------------------------------------------
|
| The "down" Artisan command gives you the ability to put an application
| into maintenance mode. Here, you will define what is displayed back
| to the user if maintenace mode is in effect for this application.
|
*/

App::down(function () {
    return Response::make("Be right back!", 503);
});


App::missing(function () {
    return Redirect::route('404');
});

/*
|--------------------------------------------------------------------------
| Require The Filters File
|--------------------------------------------------------------------------
|
| Next we will load the filters file for the application. This gives us
| a nice separate location to store our route and application filter
| definitions instead of putting them all in the main routes file.
|
*/

require app_path() . '/filters.php';

/*
|--------------------------------------------------------------------------
| Require The Macros File
|--------------------------------------------------------------------------
|
| Next we will load the macros file for the application. This gives us
| a nice separate location to store our macros.
|
*/
require app_path() . '/macros.php';

================================================
FILE: app/start/local.php
================================================
<?php

//


================================================
FILE: app/storage/.gitignore
================================================
services.manifest

================================================
FILE: app/storage/cache/.gitignore
================================================
*
!.gitignore

================================================
FILE: app/storage/logs/.gitignore
================================================
*
!.gitignore

================================================
FILE: app/storage/meta/.gitignore
================================================
*
!.gitignore

================================================
FILE: app/storage/sessions/.gitignore
================================================
*
!.gitignore

================================================
FILE: app/storage/views/.gitignore
================================================
*
!.gitignore

================================================
FILE: app/tests/TestCase.php
================================================
<?php

class TestCase extends Illuminate\Foundation\Testing\TestCase
{
    /**
     * Prepare for tests
     *
     */
    public function setUp()
    {
        parent::setUp();

        $this->prepareForTests();
    }

    /**
     * Creates the application.
     *
     * @return \Symfony\Component\HttpKernel\HttpKernelInterface
     */
    public function createApplication()
    {
        $unitTesting = true;

        $testEnvironment = 'testing';

        return require __DIR__.'/../../bootstrap/start.php';
    }

    /**
     * Migrates the database.
     *
     */
    private function prepareForTests()
    {
        Artisan::call('migrate:reset');
        Artisan::call('migrate');

        Eloquent::unguard();

        // create roles
        $this->generateRoles();

        Eloquent::reguard();

        // reset redis db
        App::make('redis')->flushAll();
    }

    public function generateRoles()
    {
        Role::truncate();

        Role::create(array(
            'name' => 'admin'
        ));

        Role::create(array(
            'name' => 'member'
        ));
    }

    /**
     * NOTE: this only works on PHP version 5.3.2 and above
     *
     * Call protected/private method of a class.
     *
     * @param object &$object    Instantiated object that we will run method on.
     * @param string $methodName Method name to call
     * @param array  $parameters Array of parameters to pass into method.
     *
     * @return mixed Method return.
     */
    public function invokeMethod(&$object, $methodName, array $parameters = array())
    {
        $reflection = new \ReflectionClass(get_class($object));
        $method = $reflection->getMethod($methodName);
        $method->setAccessible(true);

        return $method->invokeArgs($object, $parameters);
    }

}


================================================
FILE: app/tests/functional/Controller/AuthControllerTest.php
================================================
<?php namespace Tests\Functional\Controller;

use TestCase;
use User;
use Hash;
use Way\Tests\Factory;

class AuthControllerTest extends TestCase
{
    public function testGetSignup()
    {
        $crawler = $this->client->request('GET', route('auth.getSignup'));
        $this->assertTrue($this->client->getResponse()->isOk());
    }

    public function testSuccessfulSignup()
    {
        $inputs = array(
            'username' => 'johndoe25',
            'password' => 'dummypassword',
            'password_confirmation' => 'dummypassword',
            'email' => 'johndoe@gmail.com',
            'first_name' => 'John',
            'last_name' => 'Doe',
        );

        $response = $this->call('POST', route('auth.postSignup', $inputs));
        $this->assertRedirectedToRoute('auth.getSignup');
        $this->assertSessionHas('message', 'Successfully registered. Please check your email and activate your account.');
        $user = User::where('email', '=', $inputs['email'])->first();
        $this->assertNotNull($user);
        $this->assertTrue((Hash::check($inputs['password'], $user->password)));
        $this->assertEquals('member', $user->role->name);
    }

    public function testInvalidSignup()
    {
        $response = $this->call('POST', route('auth.postSignup'));
        $this->assertRedirectedToRoute('auth.getSignup');
        $this->assertSessionHas('errors');
    }

    public function testSuccessfulAccountActivation()
    {
        // NOTE: for some reason, Ways generator doesn't respect the fillable
        // attribute of Eloquent model so active column is being filled with
        // data so I needed to specify active = 0
        // @TODO: find a better solution
        $user = Factory::create('User', array('active' => 0));
        $this->call('GET', route('auth.getActivateAccount', array($user->slug, $user->activation_key)));
        $this->assertRedirectedToRoute('home');
        $this->assertSessionHas('message', 'Your account is now activated.');
    }

    public function testInvalidAccountActivationUsingWrongKey()
    {
        // NOTE: for some reason, Ways generator doesn't respect the fillable
        // attribute of Eloquent model so active column is being filled with
        // data so I needed to specify active = 0
        // @TODO: find a better solution
        $user = Factory::create('User', array('active' => 0));
        $this->call('GET', route('auth.getActivateAccount', array($user->slug, 'wrong activation key')));
        $this->assertRedirectedToRoute('home');
        $this->assertSessionHas('message', 'Invalid activation key.');
    }

    public function testGetLogin()
    {
        $crawler = $this->client->request('GET', route('auth.getLogin'));
        $this->assertTrue($this->client->getResponse()->isOk());
    }

    public function testSuccessfulLogin()
    {
        $rawPassword = 'admin';
        $user = Factory::create('User', array('password' => $rawPassword, 'active' => 1));

        $inputs = array(
            'username' => $user->username,
            'password' => $rawPassword
        );

        $crawler = $this->client->request('POST', route('auth.postLogin', $inputs));
        $this->assertRedirectedToRoute('home');
    }

    public function testInvalidLoginUsingUnregisteredUser()
    {
        $inputs = array(
            'username' => 'unregistered username',
            'password' => 'password'
        );

        $crawler = $this->client->request('POST', route('auth.postLogin', $inputs));
        $this->assertRedirectedToRoute('auth.getLogin');
        $this->assertSessionHas('message', 'Wrong username or password');
    }

    public function testInvalidLoginUsingInactiveUser()
    {
        $rawPassword = 'admin';
        $user = Factory::create('User', array('password' => $rawPassword, 'active' => 0));

        $inputs = array(
            'username' => $user->username,
            'password' => $rawPassword
        );

        $crawler = $this->client->request('POST', route('auth.postLogin', $inputs));
        $this->assertRedirectedToRoute('auth.getLogin');
        $this->assertSessionHas('message', 'Wrong username or password');
    }

    public function testInvalidLoginUsingWrongCredentials()
    {
        $user = Factory::create('User', array('password' => 'admin', 'active' => 1));

        $inputs = array(
            'username' => $user->username,
            'password' => 'wrong password'
        );

        $crawler = $this->client->request('POST', route('auth.postLogin', $inputs));
        $this->assertRedirectedToRoute('auth.getLogin');
        $this->assertSessionHas('message', 'Wrong username or password');
    }

}


================================================
FILE: app/tests/functional/Controller/HomeControllerTest.php
================================================
<?php namespace Tests\Functional\Controller;

use TestCase;
use Way\Tests\Factory;
use Snippet;

class HomeControllerTest extends TestCase
{
    public function testHomePageOnlyShowsApprovedSnippets()
    {
        $user = Factory::create('User');
        $this->be($user);
        $snippet = Factory::create('Snippet', array(
            'author_id' => $user->id, 'approved' => 1,
            'deleted_at' => null));

        $notYetApprovedSnippet = Factory::create('Snippet', array(
            'author_id' => $user->id,
            'approved' => 0,
            'deleted_at' => null));

        $response = $this->call('GET', '/');
        $view = $response->original;
        $this->assertEquals(count($view['snippets']), 1);
        $this->assertEquals($snippet->title, $view['snippets'][0]->title);
    }

    public function testHomePageTopSnippetContributors()
    {
        // with 2 approved and 1 not yet approved snippet
        $user = Factory::create('User', array('active' => 1));
        $this->be($user);
        Factory::create('Snippet', array('author_id' => $user->id, 'approved' => 1, 'deleted_at' => null));
        Factory::create('Snippet', array('author_id' => $user->id, 'approved' => 1, 'deleted_at' => null));
        Factory::create('Snippet', array('author_id' => $user->id, 'approved' => 0, 'deleted_at' => null));

        // with 1 not yet approved snippet
        $secondUser = Factory::create('User', array('active' => 1));
        $this->be($secondUser);
        Factory::create('Snippet', array('author_id' => $secondUser->id, 'approved' => 0, 'deleted_at' => null));

        // with 1 approved and 3 not yet approved snippets
        $thirdUser = Factory::create('User', array('active' => 1));
        $this->be($thirdUser);
        Factory::create('Snippet', array('author_id' => $thirdUser->id, 'approved' => 1, 'deleted_at' => null));
        Factory::create('Snippet', array('author_id' => $thirdUser->id, 'approved' => 0, 'deleted_at' => null));
        Factory::create('Snippet', array('author_id' => $thirdUser->id, 'approved' => 0, 'deleted_at' => null));
        Factory::create('Snippet', array('author_id' => $thirdUser->id, 'approved' => 0, 'deleted_at' => null));

        $response = $this->call('GET', '/');
        $view = $response->original;

        // only 2 is expected since we are only rendering contributors w/ approved snippets
        $this->assertEquals(count($view['topSnippetContributors']), 2);

        # rank 1 should be $user
        $this->assertEquals($view['topSnippetContributors'][0]->full_name, $user->full_name);
        $this->assertEquals($view['topSnippetContributors'][0]->snippets_count, 2);

        # rank 2 should be $thirdUser
        $this->assertEquals($view['topSnippetContributors'][1]->full_name, $thirdUser->full_name);
        $this->assertEquals($view['topSnippetContributors'][1]->snippets_count, 1);
    }

}


================================================
FILE: app/tests/functional/Controller/Member/SnippetControllerTest.php
================================================
<?php namespace Tests\Functional\Controller\Member;

use TestCase;
use Config;
use User;
use Snippet;
use Way\Tests\Factory;

class SnippetControllerTest extends TestCase
{
    public function testGetShowRendersNotYetApprovedSnippets()
    {
        $user = Factory::create('User');
        $this->be($user);

        $snippet = Factory::create('Snippet', array(
            'author_id' => $user->id, 'approved' => 0,
            'deleted_at' => null));

        $response = $this->call('GET', route('member.snippet.getShow', $snippet->slug));
        $this->assertResponseOk();
        $view = $response->original;
        $this->assertEquals($view['snippet']->title, $snippet->title);
    }

    public function testGetShowRendersApprovedSnippets()
    {
        $user = Factory::create('User');
        $this->be($user);

        $snippet = Factory::create('Snippet', array(
            'author_id' => $user->id, 'approved' => 1,
            'deleted_at' => null));

        $response = $this->call('GET', route('member.snippet.getShow', $snippet->slug));
        $this->assertResponseOk();
        $view = $response->original;
        $this->assertEquals($view['snippet']->title, $snippet->title);
    }

    public function testGetCreate()
    {
        $response = $this->call('GET', route('member.snippet.getCreate'));
        $this->assertResponseOk();
        $this->assertViewHas('tags');
    }

    public function testPostStoreThrowsErrorOnBlankInput()
    {
        $user = Factory::create('User');
        $this->be($user);
        $input = array();
        $response = $this->call('POST', route('member.snippet.postStore', $input));
        $this->assertRedirectedToRoute('member.snippet.getCreate');
        $this->assertSessionHas('errors');
    }

    public function testPostStoreThrowsErrorOnInvalidResourceFormat()
    {
        $user = Factory::create('User');
        $this->be($user);

        $input = array(
            'title' => 'dummy title',
            'body' => 'dummy body',
            'resource' => 'invalid resource url format'
        );

        $response = $this->call('POST', route('member.snippet.postStore', $input));
        $this->assertRedirectedToRoute('member.snippet.getCreate');
        $this->assertSessionHas('errors');
    }

    /**
     * @expectedException Symfony\Component\HttpKernel\Exception\NotFoundHttpException
     */
    public function testPostStoreThrowsExceptionOnInvalidTags()
    {
        $user = Factory::create('User');
        $this->be($user);

        # invalid tags
        $inputs = array(
            'title' => 'dummy title',
            'body' => 'dummy body',
            'tags' => array('12345') // <-- invalid tag id since no tags are on the db yet
        );

        $response = $this->call('POST', route('member.snippet.postStore'), $inputs);
    }

    public function testPostStoreSavesSnippetOnValidInput()
    {
        $user = Factory::create('User');
        $this->be($user);

        $tag = Factory::create('Tag');
        $secondTag = Factory::create('Tag');

        $input = array(
            'title' => 'dummy title',
            'body' => 'dummy body',
            'resource' => Config::get('site.url'),
            'tags' => array($tag->id, $secondTag->id)
        );

        $response = $this->call('POST', route('member.snippet.postStore'), $input);
        $this->assertRedirectedToRoute('member.snippet.getCreate');
        $this->assertSessionHas('message', "Your snippet is now submitted and waiting for admin's approval");
    }

    public function testGetEdit()
    {
        $user = Factory::create('User');
        $user->id = (string) $user->id;

        $this->be($user);

        $snippet = Factory::create('Snippet', array(
            'author_id' => $user->id, 'approved' => 1,
            'deleted_at' => null));

        $response = $this->call('GET', route('member.snippet.getEdit', $snippet->slug));

        $this->assertResponseOk();
        $view = $response->original;
        $this->assertEquals($view['snippet']->title, $snippet->title);
        $this->assertViewHas('tags');
    }

    public function testPostUpdateUpdatesSnippetOnValidInput()
    {
        $user = Factory::create('User');
        $user->id = (string) $user->id;

        $this->be($user);

        $tag = Factory::create('Tag');
        $secondTag = Factory::create('Tag');

        $snippet = Factory::create('Snippet', array(
            'author_id' => $user->id, 'approved' => 1,
            'deleted_at' => null));

        $input = array(
            'title' => 'dummy title',
            'body' => 'dummy body',
            'resource' => Config::get('site.url'),
            'tags' => array($tag->id, $secondTag->id)
        );

        $uri = route('member.snippet.postUpdate', $snippet->slug);
        $response = $this->call('POST', $uri, $input);

        $snippetFromDB = Snippet::where('slug', $snippet->slug)->first();
        $this->assertEquals($input['title'], $snippetFromDB->title);

        $this->assertRedirectedToRoute('member.snippet.getShow', $snippet->slug);
        $this->assertSessionHas('message', 'Update successful');
    }

    // public function testPostUpdateDoesntUpdateOnInvalidResourceFormat()
    // {
    //     $user = Factory::create('User');
    //     $this->be($user);

    //     $snippet = Factory::create('Snippet', array(
    //         'author_id' => $user->id, 'approved' => 1,
    //         'deleted_at' => null));

    //     $input = array(
    //         'title' => 'dummy title',
    //         'body' => 'dummy body',
    //         'resource' => 'invalid-resource-format'
    //     );

    //     $uri = route('member.snippet.postUpdate', $snippet->slug);

    //     $response = $this->call('POST', $uri, $input);

    //     // $snippetFromDB = Snippet::where('slug', $snippet->slug)->first();
    //     // $this->assertNull($snippetFromDB);

    //     // $this->assertRedirectedToRoute('member.snippet.getEdit', $snippet->slug);
    //     // $this->assertSessionHas('errors');
    // }

}


================================================
FILE: app/tests/functional/Controller/Member/UserControllerTest.php
================================================
<?php namespace Tests\Functional\Controller\Member;

use TestCase;
use User;
use Snippet;
use Way\Tests\Factory;

class UserControllerTest extends TestCase
{
    public function testGetMySnippetsRendersApprovedAndNotYetApprovedSnippets()
    {
        $user = Factory::create('User');
        $this->be($user);

        $notYetApprovedSnippet = Factory::create('Snippet', array(
            'author_id' => $user->id,
            'approved' => 0,
            'deleted_at' => null));

        $approvedSnippet = Factory::create('Snippet', array(
            'author_id' => $user->id,
            'approved' => 1,
            'deleted_at' => null));

        $response = $this->call('GET', route('member.user.dashboard'));
        $view = $response->original;
        $this->assertEquals(count($view['my_snippets']), 2);
    }

}


================================================
FILE: app/tests/functional/Controller/SnippetControllerTest.php
================================================
<?php namespace Tests\Functional\Controller;

use TestCase;
use User;
use Way\Tests\Factory;

class SnippetControllerTest extends TestCase
{
    public function testGetIndexOnlyShowsApprovedSnippets()
    {
        $user = Factory::create('User');
        $this->be($user);

        $snippet = Factory::create('Snippet', array(
            'author_id' => $user->id,
            'approved' => 1,
            'deleted_at' => null));

        $notYetApprovedSnippet = Factory::create('Snippet', array(
            'author_id' => $user->id,
            'approved' => 0,
            'deleted_at' => null));

        $response = $this->call('GET', route('snippet.getIndex'));

        $view = $response->original;
        $this->assertEquals(1, count($view['snippets']));
        $this->assertEquals($snippet->title, $view['snippets'][0]->title);
    }

    /**
     * @expectedException Symfony\Component\HttpKernel\Exception\NotFoundHttpException
     */
    public function testGetShowDoesNotRenderNotYetApprovedSnippets()
    {
        $user = Factory::create('User');
        $this->be($user);

        $snippet = Factory::create('Snippet', array(
            'author_id' => $user->id, 'approved' => 0,
            'deleted_at' => null));

        $response = $this->call('GET', route('snippet.getShow', $snippet->slug));
    }

    public function testGetShowRendersApprovedSnippets()
    {
        $user = Factory::create('User');
        $this->be($user);

        $snippet = Factory::create('Snippet', array(
            'author_id' => $user->id, 'approved' => 1,
            'deleted_at' => null));

        $response = $this->call('GET', route('snippet.getShow', $snippet->slug));
        $this->assertResponseOk();
        $view = $response->original;
        $this->assertEquals($view['snippet']->title, $snippet->title);
    }

}


================================================
FILE: app/tests/functional/Controller/TagControllerTest.php
================================================
<?php namespace Tests\Functional\Controller;

use TestCase;
use User;
use Way\Tests\Factory;

class TagControllerTest extends TestCase
{
    public function testGetShowOnlyRendersApprovedSnippets()
    {
        $user = Factory::create('User');
        $this->be($user);

        $notYetApprovedSnippet = Factory::create('Snippet', array(
            'author_id' => $user->id,
            'approved' => 0,
            'deleted_at' => null));

        $approvedSnippet = Factory::create('Snippet', array(
            'author_id' => $user->id,
            'approved' => 1,
            'deleted_at' => null));

        $response = $this->call('GET', route('snippet.getIndex'));
        $view = $response->original;
        $this->assertEquals(count($view['snippets']), 1);
        $this->assertEquals($approvedSnippet->title, $view['snippets'][0]->title);
    }

}


================================================
FILE: app/tests/functional/Controller/UserControllerTest.php
================================================
<?php namespace Tests\Functional\Controller;

use TestCase;
use User;
use Way\Tests\Factory;

class UserControllerTest extends TestCase
{
    public function testGetIndex()
    {
        $user = Factory::create('User', array('active' => 1));
        $secondUser = Factory::create('User', array('active' => 0));
        $this->be($user);

        $notYetApprovedSnippet = Factory::create('Snippet', array(
            'author_id' => $user->id,
            'approved' => 0,
            'deleted_at' => null));

        $approvedSnippet = Factory::create('Snippet', array(
            'author_id' => $user->id,
            'approved' => 1,
            'deleted_at' => null));

        $response = $this->call('GET', route('user.getIndex'));
        $view = $response->original;
        $this->assertResponseOk();

        # should be 1 because only 1 user is active, the 2nd user is not yet active
        $this->assertEquals(1, count($view['users']));

        # should be 1 because only 1 submitted snippet of $user is approved
        $this->assertEquals(1, $view['users'][0]->snippets_count);
    }

    public function testGetProfile()
    {
        $user = Factory::create('User', array('active' => 1));

        $response = $this->call('GET', route('user.getProfile', $user->slug));

        $view = $response->original;
        $this->assertResponseOk();
        $this->assertViewHas('user');
    }

    public function testGetSnippets()
    {
        $user = Factory::create('User', array('active' => 1));
        $this->be($user);

        $notYetApprovedSnippet = Factory::create('Snippet', array(
            'author_id' => $user->id,
            'approved' => 0,
            'deleted_at' => null));

        $approvedSnippet = Factory::create('Snippet', array(
            'author_id' => $user->id,
            'approved' => 1,
            'deleted_at' => null));

        $response = $this->call('GET', route('user.getSnippets', $user->slug));

        $this->assertResponseOk();
        $view = $response->original;

        # should be 1 because only 1 submitted snippet of $user is approved
        $this->assertEquals(1, count($view['snippets']));
        $this->assertViewHas('user');
    }

}


================================================
FILE: app/tests/integration/Model/UserModelTest.php
================================================
<?php namespace Tests\Integration\Model;

use TestCase;
use User;
use Hash;

class UserModelTest extends TestCase
{
    public function testGetFullNameAttribute()
    {
        $user = new User;
        $user->first_name = 'John';
        $user->last_name = 'Doe';

        $this->assertEquals('John Doe', $user->full_name);
    }

    public function testSetPasswordAttribute()
    {
        $user = new User;
        $user->password = 'myawesomepassword';

        $this->assertTrue((Hash::check('myawesomepassword', $user->password)));
    }

    public function testGetAbsPhotoUrlAttribute()
    {
        $user = new User;

        $user->email = 'johndoe@gmail.com';

        $this->assertNotEquals(asset('photo.png'), $user->abs_photo_url);

        $user->photo_url = 'photo.png';

        $this->assertEquals(asset('photo.png'), $user->abs_photo_url);
    }

}


================================================
FILE: app/tests/integration/Repo/EloquentSnippetRepositoryTest.php
================================================
<?php namespace Tests\Integration\Repo;

use TestCase;
use Way\Tests\Factory;
use Snippet;
use App;
use LaraSnipp\Repo\Snippet\EloquentSnippetRepository;

class EloquentSnippetRepositoryTest extends TestCase
{
    public function testByPage()
    {
        $user = Factory::create('User');
        $this->be($user);
        $expectedTotalItems = 4;
        $snippets = array();

        for ($i=0; $i < $expectedTotalItems; $i++) {
            $snippets[] = Factory::create('Snippet', array('author_id' => $user->id, 'approved' => 1, 'deleted_at' => null));
        }

        $snippetRepo = new EloquentSnippetRepository(
            new Snippet,
            $this->app->make('LaraSnipp\Repo\Tag\TagRepositoryInterface'),
            $this->app->make('LaraSnipp\Repo\User\UserRepositoryInterface')
        );

        $result = $snippetRepo->byPage($page=1, $limit=3, $all=false);
        $this->assertEquals($result->totalItems, $expectedTotalItems);
        $this->assertEquals(count($result->items), $limit);
    }

    public function testTotalSnippets()
    {
        $user = Factory::create('User');
        $this->be($user);

        // create 3 approved snippets
        for ($i=0; $i < 3; $i++) {
            $snippets[] = Factory::create('Snippet', array('author_id' => $user->id, 'approved' => 1, 'deleted_at' => null));
        }

        // create 1 not yet approved snippet
        Factory::create('Snippet', array('author_id' => $user->id, 'approved' => 0, 'deleted_at' => null));

        $snippetRepo = new EloquentSnippetRepository(
            new Snippet,
            $this->app->make('LaraSnipp\Repo\Tag\TagRepositoryInterface'),
            $this->app->make('LaraSnipp\Repo\User\UserRepositoryInterface')
        );

        // test totalSnippets only returns the count of approved snippets if $all = false
        $totalSnippets = $this->invokeMethod($snippetRepo, 'totalSnippets', array($all = false));
        $this->assertEquals($totalSnippets, 3);

        // test totalSnippets returns the count of all snippets (approved & not yet approved)
        $totalSnippets = $this->invokeMethod($snippetRepo, 'totalSnippets', array($all = true));
        $this->assertEquals($totalSnippets, 4);
    }

    public function testByTag()
    {
        $user = Factory::create('User');
        $this->be($user);
        $snippets = array();

        $tag = Factory::create('Tag');

        # create 4 approved snippets that is linked to $tag
        for ($i=0; $i < 4; $i++) {
            $snippet = Factory::create('Snippet', array(
                'author_id' => $user->id,
                'approved' => 1,
                'deleted_at' => null
            ));

            $snippet->tags()->attach($tag->id);

            $snippets[] = $snippet;
        }

        # snippet w/ same tag as above but is not yet approved
        $snippet = Factory::create('Snippet', array(
            'author_id' => $user->id,
            'approved' => 0,
            'deleted_at' => null
        ));

        $snippet->tags()->attach($tag->id);

        # snippet w/o a tag
        Factory::create('Snippet', array(
            'author_id' => $user->id,
            'approved' => 1,
            'deleted_at' => null
        ));

        # snippet w/ a different tag
        $snippet = Factory::create('Snippet', array(
            'author_id' => $user->id,
            'approved' => 1,
            'deleted_at' => null
        ));
        $secondTag = Factory::create('Tag');
        $snippet->tags()->attach($secondTag->id);

        $snippetRepo = new EloquentSnippetRepository(
            new Snippet,
            $this->app->make('LaraSnipp\Repo\Tag\TagRepositoryInterface'),
            $this->app->make('LaraSnipp\Repo\User\UserRepositoryInterface')
        );

        $result = $snippetRepo->byTag($tag->slug, $page = 1, $limit = 3);

        // should only have 4 total snippets for $tag because even if it really
        // has 5, only 4 snippets are approved
        $this->assertEquals(4, $result->totalItems);

        // should be 3 because we set $limit = 3 in the
        // $snippetRepo->byTag($tag->slug, $page = 1, $limit = 3); call above
        $this->assertEquals(3 , count($result->items));
    }

    public function testGetMostViewed()
    {
        $user = Factory::create('User');
        $this->be($user);
        $snippets = array();

        $tag = Factory::create('Tag');

        // create 3 approved snippets
        for ($i=0; $i < 3; $i++) {
            $snippets[] = Factory::create('Snippet', array(
                'author_id' => $user->id,
                'approved' => 1,
                'deleted_at' => null
            ));
        }

        $redis = App::make('redis');

        // add 10 hits in snippet[1]
        $redis->zIncrBy('hits', 10, $snippets[1]->id);

        // add 5 hits in snippet[2]
        $redis->zIncrBy('hits', 5, $snippets[2]->id);

        // add 1 hit in snippet[0]
        $redis->zIncrBy('hits', 1, $snippets[0]->id);

        // expected ranking:
        // 1. $snippets[1]
        // 2. $snippets[2]
        // 3. $snippets[0]

        $snippetRepo = new EloquentSnippetRepository(
            new Snippet,
            $this->app->make('LaraSnipp\Repo\Tag\TagRepositoryInterface'),
            $this->app->make('LaraSnipp\Repo\User\UserRepositoryInterface')
        );

        $snippetsResult = $snippetRepo->getMostViewed();

        $this->assertEquals($snippets[1], $snippetsResult[0]);
    }

}


================================================
FILE: app/tests/integration/Repo/EloquentUserRepositoryTest.php
================================================
<?php namespace Tests\Integration\Repo;

use TestCase;
use Way\Tests\Factory;
use User;
use LaraSnipp\Repo\User\EloquentUserRepository;

class EloquentUserRepositoryTest extends TestCase
{
    public function testGetTopSnippetContributors()
    {
        $user = Factory::create('User', array('active' => 1));
        $secondUser = Factory::create('User', array('active' => 1));
        $thirdUser = Factory::create('User', array('active' => 1));

        // 1 snippet for $user
        $this->be($user);
        Factory::create('Snippet', array('author_id' => $user->id, 'approved' => 1, 'deleted_at' => null));

        // 2 snippets for $secondUser
        $this->be($secondUser);
        Factory::create('Snippet', array('author_id' => $secondUser->id, 'approved' => 1, 'deleted_at' => null));
        Factory::create('Snippet', array('author_id' => $secondUser->id, 'approved' => 1, 'deleted_at' => null));

        // 3 not yet approved snippets for $thirdUser
        $this->be($thirdUser);
        Factory::create('Snippet', array('author_id' => $thirdUser->id, 'approved' => 0, 'deleted_at' => null));
        Factory::create('Snippet', array('author_id' => $thirdUser->id, 'approved' => 0, 'deleted_at' => null));
        Factory::create('Snippet', array('author_id' => $thirdUser->id, 'approved' => 0, 'deleted_at' => null));

        $userRepo = new EloquentUserRepository(new User);
        $results = $userRepo->getTopSnippetContributors($limit = 3);

        // check if the top snippet contributor is $secondUser
        $this->assertEquals($results[0]->first_name, $secondUser->first_name);

        // check that there are only 2 snippet contributors since the snippets
        // submitted by $thirdUser is not yet approved
        $this->assertCount(2, $results);
    }

}


================================================
FILE: app/tests/unit/Model/UserModelTest.php
================================================
<?php namespace Tests\Unit\Model;

use TestCase;
use User;

class UserModelTest extends TestCase
{
    public function testIsActive()
    {
        $user = new User;
        $user->active = 1;

        $this->assertTrue($user->isActive());

        $user->active = 0;
        $this->assertFalse($user->isActive());
    }

}


================================================
FILE: app/views/admin/index.blade.php
================================================
@extends('admin.layouts.master')

@section('content')
    <div class="row">
        <div class="col-lg-12">
            <h1 class="page-header">Dashboard</h1>
        </div>
        <!-- /.col-lg-12 -->
    </div>
    <!-- /.row -->
    <div class="row">
        <div class="col-lg-3 col-md-6">
            <div class="panel panel-green">
                <div class="panel-heading">
                    <div class="row">
                        <div class="col-xs-3">
                            <i class="fa fa-code fa-5x"></i>
                        </div>
                        <div class="col-xs-9 text-right">
                            <div class="huge">12</div>
                            <div>Snippets!</div>
                        </div>
                    </div>
                </div>
                <a href="#">
                    <div class="panel-footer">
                        <span class="pull-left">Manage snippets</span>
                        <span class="pull-right"><i class="fa fa-arrow-circle-right"></i></span>

                        <div class="clearfix"></div>
                    </div>
                </a>
            </div>
        </div>
        <div class="col-lg-3 col-md-6">
            <div class="panel panel-yellow">
                <div class="panel-heading">
                    <div class="row">
                        <div class="col-xs-3">
                            <i class="fa fa-exclamation-triangle fa-5x"></i>
                        </div>
                        <div class="col-xs-9 text-right">
                            <div class="huge">124</div>
                            <div>Unapproved snippets!</div>
                        </div>
                    </div>
                </div>
                <a href="#">
                    <div class="panel-footer">
                        <span class="pull-left">Approve pending snippets</span>
                        <span class="pull-right"><i class="fa fa-arrow-circle-right"></i></span>

                        <div class="clearfix"></div>
                    </div>
                </a>
            </div>
        </div>
        <div class="col-lg-3 col-md-6">
            <div class="panel panel-primary">
                <div class="panel-heading">
                    <div class="row">
                        <div class="col-xs-3">
                            <i class="fa fa-users fa-5x"></i>
                        </div>
                        <div class="col-xs-9 text-right">
                            <div class="huge">26</div>
                            <div>Users!</div>
                        </div>
                    </div>
                </div>
                <a href="#">
                    <div class="panel-footer">
                        <span class="pull-left">Manage users</span>
                        <span class="pull-right"><i class="fa fa-arrow-circle-right"></i></span>

                        <div class="clearfix"></div>
                    </div>
                </a>
            </div>
        </div>
        <div class="col-lg-3 col-md-6">
            <div class="panel panel-red">
                <div class="panel-heading">
                    <div class="row">
                        <div class="col-xs-3">
                            <i class="fa fa-user-secret fa-5x"></i>
                        </div>
                        <div class="col-xs-9 text-right">
                            <div class="huge">13</div>
                            <div>Inactive users!</div>
                        </div>
                    </div>
                </div>
                <a href="#">
                    <div class="panel-footer">
                        <span class="pull-left">Manage inactive users</span>
                        <span class="pull-right"><i class="fa fa-arrow-circle-right"></i></span>

                        <div class="clearfix"></div>
                    </div>
                </a>
            </div>
        </div>
    </div>
    <!-- /.row -->
    <div class="row">
        <div class="col-lg-12">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <i class="fa fa-bell fa-fw"></i> Activity
                </div>
                <!-- /.panel-heading -->
                <div class="panel-body">
                    <div class="list-group">
                        <a href="#" class="list-group-item">
                            <i class="fa fa-comment fa-fw"></i> New Comment
                                    <span class="pull-right text-muted small"><em>4 minutes ago</em>
                                    </span>
                        </a>
                        <a href="#" class="list-group-item">
                            <i class="fa fa-twitter fa-fw"></i> 3 New Followers
                                    <span class="pull-right text-muted small"><em>12 minutes ago</em>
                                    </span>
                        </a>
                        <a href="#" class="list-group-item">
                            <i class="fa fa-envelope fa-fw"></i> Message Sent
                                    <span class="pull-right text-muted small"><em>27 minutes ago</em>
                                    </span>
                        </a>
                        <a href="#" class="list-group-item">
                            <i class="fa fa-tasks fa-fw"></i> New Task
                                    <span class="pull-right text-muted small"><em>43 minutes ago</em>
                                    </span>
                        </a>
                        <a href="#" class="list-group-item">
                            <i class="fa fa-upload fa-fw"></i> Server Rebooted
                                    <span class="pull-right text-muted small"><em>11:32 AM</em>
                                    </span>
                        </a>
                        <a href="#" class="list-group-item">
                            <i class="fa fa-bolt fa-fw"></i> Server Crashed!
                                    <span class="pull-right text-muted small"><em>11:13 AM</em>
                                    </span>
                        </a>
                        <a href="#" class="list-group-item">
                            <i class="fa fa-warning fa-fw"></i> Server Not Responding
                                    <span class="pull-right text-muted small"><em>10:57 AM</em>
                                    </span>
                        </a>
                        <a href="#" class="list-group-item">
                            <i class="fa fa-shopping-cart fa-fw"></i> New Order Placed
                                    <span class="pull-right text-muted small"><em>9:49 AM</em>
                                    </span>
                        </a>
                        <a href="#" class="list-group-item">
                            <i class="fa fa-money fa-fw"></i> Payment Received
                                    <span class="pull-right text-muted small"><em>Yesterday</em>
                                    </span>
                        </a>
                    </div>
                    <!-- /.list-group -->
                    <a href="#" class="btn btn-default btn-block">View all</a>
                </div>
                <!-- /.panel-body -->
            </div>
            <!-- /.panel -->
        </div>
        <!-- /.col-lg-8 -->
    </div>
    <!-- /.row -->
@stop

================================================
FILE: app/views/admin/layouts/master.blade.php
================================================
<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>LaravelSnippets - Admin</title>

    <!-- Bootstrap Core CSS -->
    {{ HTML::style('//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css') }}

    <!-- MetisMenu CSS -->
    {{ HTML::style('//cdnjs.cloudflare.com/ajax/libs/metisMenu/2.0.0/metisMenu.min.css') }}

    <!-- Timeline CSS -->
    {{ HTML::style('//cdnjs.cloudflare.com/ajax/libs/metisMenu/2.0.0/metisMenu.min.css') }}
    <link href="/administration/css/timeline.css" rel="stylesheet">

    <!-- Custom CSS -->
    <link href="/administration/css/sb-admin-2.css" rel="stylesheet">

    <!-- Custom Fonts -->
    {{ HTML::style('//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css') }}

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

</head>

<body>

<div id="wrapper">

    <!-- Navigation -->
    @include('admin.partials.navbar')

    <div id="page-wrapper">
        @yield('content')
    </div>
    <!-- /#page-wrapper -->

</div>
<!-- /#wrapper -->

<!-- jQuery -->
{{ HTML::script( asset('assets/js/vendors/jquery.min.js') ) }}

<!-- Bootstrap Core JavaScript -->
{{ HTML::script('//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js') }}

<!-- Metis Menu Plugin JavaScript -->
{{ HTML::script('//cdnjs.cloudflare.com/ajax/libs/metisMenu/2.0.0/metisMenu.min.js') }}

<!-- Custom Theme JavaScript -->
{{ HTML::script('/administration/js/sb-admin-2.js') }}

</body>

</html>


================================================
FILE: app/views/admin/partials/navbar.blade.php
================================================
<nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
    <div class="navbar-header">
        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
        </button>
        <a class="navbar-brand" href="{{route('home')}}">
            <span class="fa fa-chevron-left">&nbsp;</span>
            Back to LaravelSnippets
        </a>
    </div>

    <ul class="nav navbar-top-links navbar-right">
        <li class="dropdown">
            <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                <i class="fa fa-user fa-fw"></i> <i class="fa fa-caret-down"></i>
            </a>
            <ul class="dropdown-menu dropdown-user">
                <li><a href="#"><i class="fa fa-user fa-fw"></i> User Profile</a>
                </li>
                <li><a href="#"><i class="fa fa-gear fa-fw"></i> Settings</a>
                </li>
                <li class=
Download .txt
gitextract_pialv810/

├── .gitattributes
├── .gitignore
├── app/
│   ├── LaraSnipp/
│   │   ├── Command/
│   │   │   └── CommentsCommand.php
│   │   ├── Composer/
│   │   │   └── LayoutMasterComposer.php
│   │   ├── LaraSnippServiceProvider.php
│   │   ├── Mailer/
│   │   │   ├── Mailer.php
│   │   │   └── UserMailer.php
│   │   ├── Observer/
│   │   │   ├── ObserverServiceProvider.php
│   │   │   ├── Snippet/
│   │   │   │   └── SnippetObserver.php
│   │   │   └── User/
│   │   │       └── UserObserver.php
│   │   ├── Repo/
│   │   │   ├── EloquentBaseRepository.php
│   │   │   ├── RepoServiceProvider.php
│   │   │   ├── Snippet/
│   │   │   │   ├── EloquentSnippetRepository.php
│   │   │   │   └── SnippetRepositoryInterface.php
│   │   │   ├── Tag/
│   │   │   │   ├── EloquentTagRepository.php
│   │   │   │   └── TagRepositoryInterface.php
│   │   │   └── User/
│   │   │       ├── EloquentUserRepository.php
│   │   │       └── UserRepositoryInterface.php
│   │   └── Service/
│   │       ├── Form/
│   │       │   ├── FormServiceProvider.php
│   │       │   ├── Snippet/
│   │       │   │   ├── SnippetForm.php
│   │       │   │   └── SnippetFormLaravelValidator.php
│   │       │   └── User/
│   │       │       ├── UserForm.php
│   │       │       └── UserFormLaravelValidator.php
│   │       └── Validation/
│   │           ├── AbstractLaravelValidator.php
│   │           └── ValidableInterface.php
│   ├── commands/
│   │   └── .gitkeep
│   ├── config/
│   │   ├── app.php
│   │   ├── auth.php
│   │   ├── cache.php
│   │   ├── compile.php
│   │   ├── database.php
│   │   ├── disqus.php
│   │   ├── mail.php
│   │   ├── packages/
│   │   │   └── .gitkeep
│   │   ├── purifier.php
│   │   ├── queue.php
│   │   ├── remote.php
│   │   ├── session.php
│   │   ├── site.php
│   │   ├── testing/
│   │   │   ├── app.php
│   │   │   ├── cache.php
│   │   │   ├── database.php
│   │   │   ├── mail.php
│   │   │   └── session.php
│   │   ├── view.php
│   │   └── workbench.php
│   ├── controllers/
│   │   ├── .gitkeep
│   │   ├── Admin/
│   │   │   └── IndexController.php
│   │   ├── AuthController.php
│   │   ├── BaseController.php
│   │   ├── HomeController.php
│   │   ├── Member/
│   │   │   ├── SnippetController.php
│   │   │   └── UserController.php
│   │   ├── RemindersController.php
│   │   ├── SnippetController.php
│   │   ├── TagController.php
│   │   ├── UserController.php
│   │   └── website/
│   │       └── PagesController.php
│   ├── database/
│   │   ├── migrations/
│   │   │   ├── .gitkeep
│   │   │   ├── 2013_11_08_145020_create_snippets_table.php
│   │   │   ├── 2013_12_05_122548_create_users_table.php
│   │   │   ├── 2013_12_05_122952_add_author_id_in_snippets_table.php
│   │   │   ├── 2013_12_08_055430_add_slug_and_activation_key_and_active_in_users_table.php
│   │   │   ├── 2013_12_09_125456_drop_active_in_users_table.php
│   │   │   ├── 2013_12_09_130122_add_active_in_users_table.php
│   │   │   ├── 2013_12_10_112312_add_approved_in_snippets_table.php
│   │   │   ├── 2013_12_10_132447_add_slug_in_snippets_table.php
│   │   │   ├── 2013_12_11_012940_create_roles_table.php
│   │   │   ├── 2013_12_11_013036_add_role_id_in_users_table.php
│   │   │   ├── 2013_12_11_013559_add_description_credits_to_resource_deleted_at_in_snippets_table.php
│   │   │   ├── 2013_12_11_014226_create_tags_table.php
│   │   │   ├── 2013_12_11_014317_create_snippet_tag_table.php
│   │   │   ├── 2013_12_11_103428_add_slug_in_tags_table.php
│   │   │   ├── 2013_12_12_093641_add_remaining_columns_in_users_table.php
│   │   │   ├── 2013_12_19_134131_create_password_reminders_table.php
│   │   │   ├── 2014_01_04_072223_add_disqus_columns_to_snippets_table.php
│   │   │   ├── 2014_01_06_212314_create_user_starred_table.php
│   │   │   └── 2014_04_17_151653_add_remember_token_to_users_table.php
│   │   └── seeds/
│   │       ├── .gitkeep
│   │       ├── DatabaseSeeder.php
│   │       ├── RoleSeeder.php
│   │       └── TagSeeder.php
│   ├── filters.php
│   ├── lang/
│   │   └── en/
│   │       ├── pagination.php
│   │       ├── reminders.php
│   │       └── validation.php
│   ├── libraries/
│   │   └── SiteHelpers.php
│   ├── macros.php
│   ├── models/
│   │   ├── BaseModel.php
│   │   ├── Role.php
│   │   ├── Snippet.php
│   │   ├── Starred.php
│   │   ├── Tag.php
│   │   └── User.php
│   ├── routes.php
│   ├── start/
│   │   ├── artisan.php
│   │   ├── global.php
│   │   └── local.php
│   ├── storage/
│   │   ├── .gitignore
│   │   ├── cache/
│   │   │   └── .gitignore
│   │   ├── logs/
│   │   │   └── .gitignore
│   │   ├── meta/
│   │   │   └── .gitignore
│   │   ├── sessions/
│   │   │   └── .gitignore
│   │   └── views/
│   │       └── .gitignore
│   ├── tests/
│   │   ├── TestCase.php
│   │   ├── functional/
│   │   │   └── Controller/
│   │   │       ├── AuthControllerTest.php
│   │   │       ├── HomeControllerTest.php
│   │   │       ├── Member/
│   │   │       │   ├── SnippetControllerTest.php
│   │   │       │   └── UserControllerTest.php
│   │   │       ├── SnippetControllerTest.php
│   │   │       ├── TagControllerTest.php
│   │   │       └── UserControllerTest.php
│   │   ├── integration/
│   │   │   ├── Model/
│   │   │   │   └── UserModelTest.php
│   │   │   └── Repo/
│   │   │       ├── EloquentSnippetRepositoryTest.php
│   │   │       └── EloquentUserRepositoryTest.php
│   │   └── unit/
│   │       └── Model/
│   │           └── UserModelTest.php
│   └── views/
│       ├── admin/
│       │   ├── index.blade.php
│       │   ├── layouts/
│       │   │   └── master.blade.php
│       │   └── partials/
│       │       └── navbar.blade.php
│       ├── auth/
│       │   ├── login.blade.php
│       │   └── signup.blade.php
│       ├── emails/
│       │   └── auth/
│       │       ├── activate.blade.php
│       │       └── reminder.blade.php
│       ├── layouts/
│       │   └── master.blade.php
│       ├── member/
│       │   ├── snippets/
│       │   │   ├── create.blade.php
│       │   │   └── edit.blade.php
│       │   └── users/
│       │       └── dashboard.blade.php
│       ├── partials/
│       │   ├── footer.blade.php
│       │   ├── header.blade.php
│       │   ├── notifications.blade.php
│       │   ├── pagination.blade.php
│       │   ├── search-narrow.blade.php
│       │   ├── search.blade.php
│       │   ├── searchForm.blade.php
│       │   ├── sidebars/
│       │   │   ├── default.blade.php
│       │   │   ├── snippet.blade.php
│       │   │   └── widgets/
│       │   │       ├── author.blade.php
│       │   │       ├── categories.blade.php
│       │   │       ├── social.blade.php
│       │   │       └── top-contributors.blade.php
│       │   └── snippets.php
│       ├── password/
│       │   ├── remind.blade.php
│       │   └── reset.blade.php
│       ├── snippets/
│       │   ├── index.blade.php
│       │   └── show.blade.php
│       ├── tags/
│       │   └── snippets.blade.php
│       ├── users/
│       │   ├── index.blade.php
│       │   ├── profile.blade.php
│       │   ├── settings.blade.php
│       │   └── snippets.blade.php
│       └── website/
│           └── pages/
│               ├── 404.blade.php
│               ├── index.blade.php
│               └── roadmap.blade.php
├── artisan
├── bootstrap/
│   ├── autoload.php
│   ├── paths.php
│   └── start.php
├── composer.json
├── gulpfile.js
├── package.json
├── phpunit.xml
├── public/
│   ├── .htaccess
│   ├── administration/
│   │   ├── css/
│   │   │   ├── sb-admin-2.css
│   │   │   └── timeline.css
│   │   └── js/
│   │       └── sb-admin-2.js
│   ├── assets/
│   │   ├── coffee/
│   │   │   ├── common.coffee
│   │   │   └── snippet.coffee
│   │   ├── css/
│   │   │   └── styles.css
│   │   ├── js/
│   │   │   ├── common.js
│   │   │   ├── snippet.js
│   │   │   └── vendors/
│   │   │       └── json2/
│   │   │           └── json2.js
│   │   └── scss/
│   │       ├── core/
│   │       │   ├── _band.scss
│   │       │   ├── _global.scss
│   │       │   ├── _mixins.scss
│   │       │   └── _variables.scss
│   │       ├── pages/
│   │       │   ├── _profiles.scss
│   │       │   └── _snippet.scss
│   │       ├── partials/
│   │       │   ├── _breadcrumbs.scss
│   │       │   ├── _footer.scss
│   │       │   ├── _nav-bar.scss
│   │       │   ├── _pagination.scss
│   │       │   ├── _search-band.scss
│   │       │   ├── _sidebar.scss
│   │       │   └── _snippets.scss
│   │       └── styles.scss
│   ├── index.php
│   ├── packages/
│   │   ├── .gitkeep
│   │   ├── chosen_v1.0.0/
│   │   │   ├── chosen.css
│   │   │   ├── chosen.jquery.js
│   │   │   ├── chosen.proto.js
│   │   │   ├── docsupport/
│   │   │   │   ├── prism.css
│   │   │   │   ├── prism.js
│   │   │   │   └── style.css
│   │   │   ├── index.html
│   │   │   ├── index.proto.html
│   │   │   └── options.html
│   │   ├── codemirror-3.19/
│   │   │   ├── .gitattributes
│   │   │   ├── .gitignore
│   │   │   ├── .travis.yml
│   │   │   ├── AUTHORS
│   │   │   ├── CONTRIBUTING.md
│   │   │   ├── LICENSE
│   │   │   ├── README.md
│   │   │   ├── addon/
│   │   │   │   ├── comment/
│   │   │   │   │   ├── comment.js
│   │   │   │   │   └── continuecomment.js
│   │   │   │   ├── dialog/
│   │   │   │   │   ├── dialog.css
│   │   │   │   │   └── dialog.js
│   │   │   │   ├── display/
│   │   │   │   │   ├── fullscreen.css
│   │   │   │   │   ├── fullscreen.js
│   │   │   │   │   └── placeholder.js
│   │   │   │   ├── edit/
│   │   │   │   │   ├── closebrackets.js
│   │   │   │   │   ├── closetag.js
│   │   │   │   │   ├── continuelist.js
│   │   │   │   │   ├── matchbrackets.js
│   │   │   │   │   ├── matchtags.js
│   │   │   │   │   └── trailingspace.js
│   │   │   │   ├── fold/
│   │   │   │   │   ├── brace-fold.js
│   │   │   │   │   ├── comment-fold.js
│   │   │   │   │   ├── foldcode.js
│   │   │   │   │   ├── foldgutter.css
│   │   │   │   │   ├── foldgutter.js
│   │   │   │   │   ├── indent-fold.js
│   │   │   │   │   └── xml-fold.js
│   │   │   │   ├── hint/
│   │   │   │   │   ├── anyword-hint.js
│   │   │   │   │   ├── css-hint.js
│   │   │   │   │   ├── html-hint.js
│   │   │   │   │   ├── javascript-hint.js
│   │   │   │   │   ├── pig-hint.js
│   │   │   │   │   ├── python-hint.js
│   │   │   │   │   ├── show-hint.css
│   │   │   │   │   ├── show-hint.js
│   │   │   │   │   ├── sql-hint.js
│   │   │   │   │   └── xml-hint.js
│   │   │   │   ├── lint/
│   │   │   │   │   ├── coffeescript-lint.js
│   │   │   │   │   ├── css-lint.js
│   │   │   │   │   ├── javascript-lint.js
│   │   │   │   │   ├── json-lint.js
│   │   │   │   │   ├── lint.css
│   │   │   │   │   └── lint.js
│   │   │   │   ├── merge/
│   │   │   │   │   ├── dep/
│   │   │   │   │   │   └── diff_match_patch.js
│   │   │   │   │   ├── merge.css
│   │   │   │   │   └── merge.js
│   │   │   │   ├── mode/
│   │   │   │   │   ├── loadmode.js
│   │   │   │   │   ├── multiplex.js
│   │   │   │   │   ├── multiplex_test.js
│   │   │   │   │   └── overlay.js
│   │   │   │   ├── runmode/
│   │   │   │   │   ├── colorize.js
│   │   │   │   │   ├── runmode-standalone.js
│   │   │   │   │   ├── runmode.js
│   │   │   │   │   └── runmode.node.js
│   │   │   │   ├── scroll/
│   │   │   │   │   └── scrollpastend.js
│   │   │   │   ├── search/
│   │   │   │   │   ├── match-highlighter.js
│   │   │   │   │   ├── search.js
│   │   │   │   │   └── searchcursor.js
│   │   │   │   ├── selection/
│   │   │   │   │   ├── active-line.js
│   │   │   │   │   └── mark-selection.js
│   │   │   │   ├── tern/
│   │   │   │   │   ├── tern.css
│   │   │   │   │   ├── tern.js
│   │   │   │   │   └── worker.js
│   │   │   │   └── wrap/
│   │   │   │       └── hardwrap.js
│   │   │   ├── bin/
│   │   │   │   ├── authors.sh
│   │   │   │   ├── compress
│   │   │   │   ├── lint
│   │   │   │   └── source-highlight
│   │   │   ├── bower.json
│   │   │   ├── demo/
│   │   │   │   ├── activeline.html
│   │   │   │   ├── anywordhint.html
│   │   │   │   ├── bidi.html
│   │   │   │   ├── btree.html
│   │   │   │   ├── buffers.html
│   │   │   │   ├── changemode.html
│   │   │   │   ├── closebrackets.html
│   │   │   │   ├── closetag.html
│   │   │   │   ├── complete.html
│   │   │   │   ├── emacs.html
│   │   │   │   ├── folding.html
│   │   │   │   ├── fullscreen.html
│   │   │   │   ├── hardwrap.html
│   │   │   │   ├── html5complete.html
│   │   │   │   ├── indentwrap.html
│   │   │   │   ├── lint.html
│   │   │   │   ├── loadmode.html
│   │   │   │   ├── marker.html
│   │   │   │   ├── markselection.html
│   │   │   │   ├── matchhighlighter.html
│   │   │   │   ├── matchtags.html
│   │   │   │   ├── merge.html
│   │   │   │   ├── multiplex.html
│   │   │   │   ├── mustache.html
│   │   │   │   ├── placeholder.html
│   │   │   │   ├── preview.html
│   │   │   │   ├── resize.html
│   │   │   │   ├── runmode.html
│   │   │   │   ├── search.html
│   │   │   │   ├── spanaffectswrapping_shim.html
│   │   │   │   ├── tern.html
│   │   │   │   ├── theme.html
│   │   │   │   ├── trailingspace.html
│   │   │   │   ├── variableheight.html
│   │   │   │   ├── vim.html
│   │   │   │   ├── visibletabs.html
│   │   │   │   ├── widget.html
│   │   │   │   └── xmlcomplete.html
│   │   │   ├── doc/
│   │   │   │   ├── activebookmark.js
│   │   │   │   ├── compress.html
│   │   │   │   ├── docs.css
│   │   │   │   ├── internals.html
│   │   │   │   ├── manual.html
│   │   │   │   ├── realworld.html
│   │   │   │   ├── releases.html
│   │   │   │   ├── reporting.html
│   │   │   │   ├── upgrade_v2.2.html
│   │   │   │   └── upgrade_v3.html
│   │   │   ├── index.html
│   │   │   ├── keymap/
│   │   │   │   ├── emacs.js
│   │   │   │   ├── extra.js
│   │   │   │   └── vim.js
│   │   │   ├── lib/
│   │   │   │   ├── codemirror.css
│   │   │   │   └── codemirror.js
│   │   │   ├── mode/
│   │   │   │   ├── apl/
│   │   │   │   │   ├── apl.js
│   │   │   │   │   └── index.html
│   │   │   │   ├── asterisk/
│   │   │   │   │   ├── asterisk.js
│   │   │   │   │   └── index.html
│   │   │   │   ├── clike/
│   │   │   │   │   ├── clike.js
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── scala.html
│   │   │   │   ├── clojure/
│   │   │   │   │   ├── clojure.js
│   │   │   │   │   └── index.html
│   │   │   │   ├── cobol/
│   │   │   │   │   ├── cobol.js
│   │   │   │   │   └── index.html
│   │   │   │   ├── coffeescript/
│   │   │   │   │   ├── coffeescript.js
│   │   │   │   │   └── index.html
│   │   │   │   ├── commonlisp/
│   │   │   │   │   ├── commonlisp.js
│   │   │   │   │   └── index.html
│   │   │   │   ├── css/
│   │   │   │   │   ├── css.js
│   │   │   │   │   ├── index.html
│   │   │   │   │   ├── scss.html
│   │   │   │   │   ├── scss_test.js
│   │   │   │   │   └── test.js
│   │   │   │   ├── d/
│   │   │   │   │   ├── d.js
│   │   │   │   │   └── index.html
│   │   │   │   ├── diff/
│   │   │   │   │   ├── diff.js
│   │   │   │   │   └── index.html
│   │   │   │   ├── dtd/
│   │   │   │   │   ├── dtd.js
│   │   │   │   │   └── index.html
│   │   │   │   ├── ecl/
│   │   │   │   │   ├── ecl.js
│   │   │   │   │   └── index.html
│   │   │   │   ├── eiffel/
│   │   │   │   │   ├── eiffel.js
│   │   │   │   │   └── index.html
│   │   │   │   ├── erlang/
│   │   │   │   │   ├── erlang.js
│   │   │   │   │   └── index.html
│   │   │   │   ├── fortran/
│   │   │   │   │   ├── fortran.js
│   │   │   │   │   └── index.html
│   │   │   │   ├── gas/
│   │   │   │   │   ├── gas.js
│   │   │   │   │   └── index.html
│   │   │   │   ├── gfm/
│   │   │   │   │   ├── gfm.js
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── test.js
│   │   │   │   ├── gherkin/
│   │   │   │   │   ├── gherkin.js
│   │   │   │   │   └── index.html
│   │   │   │   ├── go/
│   │   │   │   │   ├── go.js
│   │   │   │   │   └── index.html
│   │   │   │   ├── groovy/
│   │   │   │   │   ├── groovy.js
│   │   │   │   │   └── index.html
│   │   │   │   ├── haml/
│   │   │   │   │   ├── haml.js
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── test.js
│   │   │   │   ├── haskell/
│   │   │   │   │   ├── haskell.js
│   │   │   │   │   └── index.html
│   │   │   │   ├── haxe/
│   │   │   │   │   ├── haxe.js
│   │   │   │   │   └── index.html
│   │   │   │   ├── htmlembedded/
│   │   │   │   │   ├── htmlembedded.js
│   │   │   │   │   └── index.html
│   │   │   │   ├── htmlmixed/
│   │   │   │   │   ├── htmlmixed.js
│   │   │   │   │   └── index.html
│   │   │   │   ├── http/
│   │   │   │   │   ├── http.js
│   │   │   │   │   └── index.html
│   │   │   │   ├── index.html
│   │   │   │   ├── jade/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── jade.js
│   │   │   │   ├── javascript/
│   │   │   │   │   ├── index.html
│   │   │   │   │   ├── javascript.js
│   │   │   │   │   ├── test.js
│   │   │   │   │   └── typescript.html
│   │   │   │   ├── jinja2/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── jinja2.js
│   │   │   │   ├── less/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── less.js
│   │   │   │   ├── livescript/
│   │   │   │   │   ├── index.html
│   │   │   │   │   ├── livescript.js
│   │   │   │   │   └── livescript.ls
│   │   │   │   ├── lua/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── lua.js
│   │   │   │   ├── markdown/
│   │   │   │   │   ├── index.html
│   │   │   │   │   ├── markdown.js
│   │   │   │   │   └── test.js
│   │   │   │   ├── meta.js
│   │   │   │   ├── mirc/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── mirc.js
│   │   │   │   ├── nginx/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── nginx.js
│   │   │   │   ├── ntriples/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── ntriples.js
│   │   │   │   ├── ocaml/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── ocaml.js
│   │   │   │   ├── octave/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── octave.js
│   │   │   │   ├── pascal/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── pascal.js
│   │   │   │   ├── perl/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── perl.js
│   │   │   │   ├── php/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── php.js
│   │   │   │   ├── pig/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── pig.js
│   │   │   │   ├── properties/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── properties.js
│   │   │   │   ├── python/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── python.js
│   │   │   │   ├── q/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── q.js
│   │   │   │   ├── r/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── r.js
│   │   │   │   ├── rpm/
│   │   │   │   │   ├── changes/
│   │   │   │   │   │   ├── changes.js
│   │   │   │   │   │   └── index.html
│   │   │   │   │   └── spec/
│   │   │   │   │       ├── index.html
│   │   │   │   │       ├── spec.css
│   │   │   │   │       └── spec.js
│   │   │   │   ├── rst/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── rst.js
│   │   │   │   ├── ruby/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── ruby.js
│   │   │   │   ├── rust/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── rust.js
│   │   │   │   ├── sass/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── sass.js
│   │   │   │   ├── scheme/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── scheme.js
│   │   │   │   ├── shell/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── shell.js
│   │   │   │   ├── sieve/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── sieve.js
│   │   │   │   ├── smalltalk/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── smalltalk.js
│   │   │   │   ├── smarty/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── smarty.js
│   │   │   │   ├── smartymixed/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── smartymixed.js
│   │   │   │   ├── sparql/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── sparql.js
│   │   │   │   ├── sql/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── sql.js
│   │   │   │   ├── stex/
│   │   │   │   │   ├── index.html
│   │   │   │   │   ├── stex.js
│   │   │   │   │   └── test.js
│   │   │   │   ├── tcl/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── tcl.js
│   │   │   │   ├── tiddlywiki/
│   │   │   │   │   ├── index.html
│   │   │   │   │   ├── tiddlywiki.css
│   │   │   │   │   └── tiddlywiki.js
│   │   │   │   ├── tiki/
│   │   │   │   │   ├── index.html
│   │   │   │   │   ├── tiki.css
│   │   │   │   │   └── tiki.js
│   │   │   │   ├── toml/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── toml.js
│   │   │   │   ├── turtle/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── turtle.js
│   │   │   │   ├── vb/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── vb.js
│   │   │   │   ├── vbscript/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── vbscript.js
│   │   │   │   ├── velocity/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── velocity.js
│   │   │   │   ├── verilog/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── verilog.js
│   │   │   │   ├── xml/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── xml.js
│   │   │   │   ├── xquery/
│   │   │   │   │   ├── index.html
│   │   │   │   │   ├── test.js
│   │   │   │   │   └── xquery.js
│   │   │   │   ├── yaml/
│   │   │   │   │   ├── index.html
│   │   │   │   │   └── yaml.js
│   │   │   │   └── z80/
│   │   │   │       ├── index.html
│   │   │   │       └── z80.js
│   │   │   ├── package.json
│   │   │   ├── test/
│   │   │   │   ├── comment_test.js
│   │   │   │   ├── doc_test.js
│   │   │   │   ├── driver.js
│   │   │   │   ├── emacs_test.js
│   │   │   │   ├── index.html
│   │   │   │   ├── lint/
│   │   │   │   │   ├── acorn.js
│   │   │   │   │   ├── lint.js
│   │   │   │   │   └── walk.js
│   │   │   │   ├── mode_test.css
│   │   │   │   ├── mode_test.js
│   │   │   │   ├── phantom_driver.js
│   │   │   │   ├── run.js
│   │   │   │   ├── test.js
│   │   │   │   └── vim_test.js
│   │   │   └── theme/
│   │   │       ├── 3024-day.css
│   │   │       ├── 3024-night.css
│   │   │       ├── ambiance-mobile.css
│   │   │       ├── ambiance.css
│   │   │       ├── base16-dark.css
│   │   │       ├── base16-light.css
│   │   │       ├── blackboard.css
│   │   │       ├── cobalt.css
│   │   │       ├── eclipse.css
│   │   │       ├── elegant.css
│   │   │       ├── erlang-dark.css
│   │   │       ├── lesser-dark.css
│   │   │       ├── mbo.css
│   │   │       ├── midnight.css
│   │   │       ├── monokai.css
│   │   │       ├── neat.css
│   │   │       ├── night.css
│   │   │       ├── paraiso-dark.css
│   │   │       ├── paraiso-light.css
│   │   │       ├── rubyblue.css
│   │   │       ├── solarized.css
│   │   │       ├── the-matrix.css
│   │   │       ├── tomorrow-night-eighties.css
│   │   │       ├── twilight.css
│   │   │       ├── vibrant-ink.css
│   │   │       ├── xq-dark.css
│   │   │       └── xq-light.css
│   │   ├── google-code-prettify/
│   │   │   ├── lang-apollo.js
│   │   │   ├── lang-basic.js
│   │   │   ├── lang-clj.js
│   │   │   ├── lang-css.js
│   │   │   ├── lang-dart.js
│   │   │   ├── lang-erlang.js
│   │   │   ├── lang-go.js
│   │   │   ├── lang-hs.js
│   │   │   ├── lang-lisp.js
│   │   │   ├── lang-llvm.js
│   │   │   ├── lang-lua.js
│   │   │   ├── lang-matlab.js
│   │   │   ├── lang-ml.js
│   │   │   ├── lang-mumps.js
│   │   │   ├── lang-n.js
│   │   │   ├── lang-pascal.js
│   │   │   ├── lang-proto.js
│   │   │   ├── lang-r.js
│   │   │   ├── lang-rd.js
│   │   │   ├── lang-scala.js
│   │   │   ├── lang-sql.js
│   │   │   ├── lang-tcl.js
│   │   │   ├── lang-tex.js
│   │   │   ├── lang-vb.js
│   │   │   ├── lang-vhdl.js
│   │   │   ├── lang-wiki.js
│   │   │   ├── lang-xq.js
│   │   │   ├── lang-yaml.js
│   │   │   ├── prettify.css
│   │   │   ├── prettify.js
│   │   │   └── run_prettify.js
│   │   └── jquery-file-upload-8.9.0/
│   │       ├── .gitignore
│   │       ├── CONTRIBUTING.md
│   │       ├── README.md
│   │       ├── angularjs.html
│   │       ├── basic-plus.html
│   │       ├── basic.html
│   │       ├── blueimp-file-upload.jquery.json
│   │       ├── bower.json
│   │       ├── cors/
│   │       │   ├── postmessage.html
│   │       │   └── result.html
│   │       ├── css/
│   │       │   ├── demo-ie8.css
│   │       │   ├── demo.css
│   │       │   ├── jquery.fileupload-noscript.css
│   │       │   ├── jquery.fileupload-ui-noscript.css
│   │       │   ├── jquery.fileupload-ui.css
│   │       │   ├── jquery.fileupload.css
│   │       │   └── style.css
│   │       ├── index.html
│   │       ├── jquery-ui.html
│   │       ├── js/
│   │       │   ├── app.js
│   │       │   ├── cors/
│   │       │   │   ├── jquery.postmessage-transport.js
│   │       │   │   └── jquery.xdr-transport.js
│   │       │   ├── jquery.fileupload-angular.js
│   │       │   ├── jquery.fileupload-audio.js
│   │       │   ├── jquery.fileupload-image.js
│   │       │   ├── jquery.fileupload-jquery-ui.js
│   │       │   ├── jquery.fileupload-process.js
│   │       │   ├── jquery.fileupload-ui.js
│   │       │   ├── jquery.fileupload-validate.js
│   │       │   ├── jquery.fileupload-video.js
│   │       │   ├── jquery.fileupload.js
│   │       │   ├── jquery.iframe-transport.js
│   │       │   ├── main.js
│   │       │   └── vendor/
│   │       │       └── jquery.ui.widget.js
│   │       ├── package.json
│   │       ├── server/
│   │       │   ├── gae-go/
│   │       │   │   ├── app/
│   │       │   │   │   └── main.go
│   │       │   │   ├── app.yaml
│   │       │   │   └── static/
│   │       │   │       └── robots.txt
│   │       │   ├── gae-python/
│   │       │   │   ├── app.yaml
│   │       │   │   ├── main.py
│   │       │   │   └── static/
│   │       │   │       └── robots.txt
│   │       │   ├── node/
│   │       │   │   ├── .gitignore
│   │       │   │   ├── package.json
│   │       │   │   ├── public/
│   │       │   │   │   └── files/
│   │       │   │   │       └── .gitignore
│   │       │   │   ├── server.js
│   │       │   │   └── tmp/
│   │       │   │       └── .gitignore
│   │       │   └── php/
│   │       │       ├── UploadHandler.php
│   │       │       ├── files/
│   │       │       │   ├── .gitignore
│   │       │       │   └── .htaccess
│   │       │       └── index.php
│   │       └── test/
│   │           ├── index.html
│   │           └── test.js
│   ├── robots.txt
│   └── sitemap.xml
├── readme.md
├── server.php
├── vagrant.pp
└── vagrantfile
Download .txt
SYMBOL INDEX (1641 symbols across 211 files)

FILE: app/LaraSnipp/Command/CommentsCommand.php
  class CommentsCommand (line 9) | class CommentsCommand extends Command
    method fire (line 30) | public function fire()
    method getArguments (line 65) | protected function getArguments()
    method getOptions (line 75) | protected function getOptions()

FILE: app/LaraSnipp/Composer/LayoutMasterComposer.php
  class LayoutMasterComposer (line 3) | class LayoutMasterComposer

FILE: app/LaraSnipp/LaraSnippServiceProvider.php
  class LaraSnippServiceProvider (line 10) | class LaraSnippServiceProvider extends ServiceProvider
    method register (line 14) | public function register()
    method boot (line 30) | public function boot()
    method _bootComposers (line 42) | private function _bootComposers()
    method provides (line 46) | public function provides()

FILE: app/LaraSnipp/Mailer/Mailer.php
  class Mailer (line 3) | abstract class Mailer
    method sendTo (line 11) | public function sendTo($user, $subject, $view, $data = [])

FILE: app/LaraSnipp/Mailer/UserMailer.php
  class UserMailer (line 3) | class UserMailer extends Mailer
    method sendActivationEmail (line 8) | public function sendActivationEmail($user)

FILE: app/LaraSnipp/Observer/ObserverServiceProvider.php
  class ObserverServiceProvider (line 10) | class ObserverServiceProvider extends ServiceProvider
    method register (line 12) | public function register()
    method boot (line 16) | public function boot()

FILE: app/LaraSnipp/Observer/Snippet/SnippetObserver.php
  class SnippetObserver (line 5) | class SnippetObserver
    method creating (line 12) | public function creating($snippet)

FILE: app/LaraSnipp/Observer/User/UserObserver.php
  class UserObserver (line 5) | class UserObserver
    method __construct (line 15) | public function __construct(UserMailer $userMailer)
    method creating (line 25) | public function creating($user)
    method created (line 40) | public function created($user)

FILE: app/LaraSnipp/Repo/EloquentBaseRepository.php
  class EloquentBaseRepository (line 5) | abstract class EloquentBaseRepository
    method __construct (line 14) | public function __construct($model = null)
    method all (line 24) | public function all()
    method create (line 35) | public function create(array $data)
    method bySlug (line 52) | public function bySlug($slug)
    method update (line 64) | public function update($model, array $input)

FILE: app/LaraSnipp/Repo/RepoServiceProvider.php
  class RepoServiceProvider (line 11) | class RepoServiceProvider extends ServiceProvider
    method register (line 18) | public function register()

FILE: app/LaraSnipp/Repo/Snippet/EloquentSnippetRepository.php
  class EloquentSnippetRepository (line 11) | class EloquentSnippetRepository extends EloquentBaseRepository implement...
    method __construct (line 34) | public function __construct(
    method byPage (line 53) | public function byPage($perPage = 30, $all = false, $q = null)
    method totalSnippets (line 72) | protected function totalSnippets($all = false)
    method byTag (line 91) | public function byTag($slug, $page = 1, $limit = 10)
    method totalByTag (line 131) | protected function totalByTag($slug)
    method getMostViewed (line 145) | public function getMostViewed($limit = 5)
    method byAuthor (line 192) | public function byAuthor($slug, $page = 1, $limit = 10, $all = false)
    method totalByAuthor (line 234) | protected function totalByAuthor($slug)
    method create (line 248) | public function create(array $data)
    method update (line 271) | public function update($snippet, array $input)
    method bySlug (line 295) | public function bySlug($slug, $all = false)

FILE: app/LaraSnipp/Repo/Snippet/SnippetRepositoryInterface.php
  type SnippetRepositoryInterface (line 3) | interface SnippetRepositoryInterface
    method byPage (line 13) | public function byPage($perPage = 30, $all = false, $q = null);
    method byTag (line 24) | public function byTag($slug, $page = 1, $limit = 10);
    method getMostViewed (line 32) | public function getMostViewed($limit = 5);
    method byAuthor (line 43) | public function byAuthor($slug, $page = 1, $limit = 10, $all = false);
    method create (line 51) | public function create(array $data);
    method update (line 61) | public function update($snippet, array $input);
    method bySlug (line 70) | public function bySlug($slug, $all = false);

FILE: app/LaraSnipp/Repo/Tag/EloquentTagRepository.php
  class EloquentTagRepository (line 7) | class EloquentTagRepository extends EloquentBaseRepository implements Ta...
    method __construct (line 17) | public function __construct(Model $tag)

FILE: app/LaraSnipp/Repo/Tag/TagRepositoryInterface.php
  type TagRepositoryInterface (line 3) | interface TagRepositoryInterface {}

FILE: app/LaraSnipp/Repo/User/EloquentUserRepository.php
  class EloquentUserRepository (line 8) | class EloquentUserRepository extends EloquentBaseRepository implements U...
    method __construct (line 17) | public function __construct(Model $user)
    method getTopSnippetContributors (line 29) | public function getTopSnippetContributors($limit = 5)
    method byPage (line 51) | public function byPage($page = 1, $limit = 10, $all = false)
    method totalUsers (line 83) | protected function totalUsers($all = false)

FILE: app/LaraSnipp/Repo/User/UserRepositoryInterface.php
  type UserRepositoryInterface (line 3) | interface UserRepositoryInterface
    method getTopSnippetContributors (line 11) | public function getTopSnippetContributors($limit = 5);
    method byPage (line 21) | public function byPage($page = 1, $limit = 10, $all = false);

FILE: app/LaraSnipp/Service/Form/FormServiceProvider.php
  class FormServiceProvider (line 9) | class FormServiceProvider extends ServiceProvider
    method register (line 16) | public function register()

FILE: app/LaraSnipp/Service/Form/Snippet/SnippetForm.php
  class SnippetForm (line 9) | class SnippetForm
    method __construct (line 39) | public function __construct(
    method create (line 55) | public function create(array $input)
    method update (line 83) | public function update($slug, array $input)
    method errors (line 116) | public function errors()
    method valid (line 127) | protected function valid(array $input, $mode)

FILE: app/LaraSnipp/Service/Form/Snippet/SnippetFormLaravelValidator.php
  class SnippetFormLaravelValidator (line 5) | class SnippetFormLaravelValidator extends AbstractLaravelValidator

FILE: app/LaraSnipp/Service/Form/User/UserForm.php
  class UserForm (line 7) | class UserForm
    method __construct (line 30) | public function __construct(ValidableInterface $validator, UserReposit...
    method create (line 42) | public function create(array $input)
    method update (line 58) | public function update($user, array $input)
    method errors (line 71) | public function errors()
    method valid (line 83) | protected function valid(array $input, $mode)

FILE: app/LaraSnipp/Service/Form/User/UserFormLaravelValidator.php
  class UserFormLaravelValidator (line 5) | class UserFormLaravelValidator extends AbstractLaravelValidator

FILE: app/LaraSnipp/Service/Validation/AbstractLaravelValidator.php
  class AbstractLaravelValidator (line 5) | abstract class AbstractLaravelValidator implements ValidableInterface
    method __construct (line 35) | public function __construct(Factory $validator)
    method with (line 46) | public function with(array $data)
    method passes (line 59) | public function passes($mode = 'creating')
    method errors (line 81) | public function errors()

FILE: app/LaraSnipp/Service/Validation/ValidableInterface.php
  type ValidableInterface (line 3) | interface ValidableInterface
    method with (line 11) | public function with(array $input);
    method passes (line 18) | public function passes();
    method errors (line 25) | public function errors();

FILE: app/controllers/Admin/IndexController.php
  class IndexController (line 3) | class IndexController extends \BaseController
    method getIndex (line 5) | public function getIndex()

FILE: app/controllers/AuthController.php
  class AuthController (line 6) | class AuthController extends BaseController
    method __construct (line 22) | public function __construct(UserRepositoryInterface $user, UserForm $u...
    method getSignup (line 32) | public function getSignup()
    method postSignup (line 41) | public function postSignup()
    method getActivateAccount (line 58) | public function getActivateAccount($userSlug, $activationKey)
    method getLogin (line 84) | public function getLogin()
    method postLogin (line 93) | public function postLogin()
    method getLogout (line 117) | public function getLogout()

FILE: app/controllers/BaseController.php
  class BaseController (line 3) | class BaseController extends Controller
    method setupLayout (line 10) | protected function setupLayout()

FILE: app/controllers/HomeController.php
  class HomeController (line 6) | class HomeController extends BaseController
    method __construct (line 29) | public function __construct(
    method getIndex (line 43) | public function getIndex()

FILE: app/controllers/Member/SnippetController.php
  class SnippetController (line 14) | class SnippetController extends BaseController
    method __construct (line 44) | public function __construct(
    method getShow (line 62) | public function getShow($slug)
    method getCreate (line 83) | public function getCreate()
    method postStore (line 94) | public function postStore()
    method getEdit (line 111) | public function getEdit($slug)
    method postUpdate (line 127) | public function postUpdate($slug)

FILE: app/controllers/Member/UserController.php
  class UserController (line 10) | class UserController extends BaseController
    method __construct (line 19) | public function __construct(SnippetRepositoryInterface $snippet)
    method dashboard (line 28) | public function dashboard()

FILE: app/controllers/RemindersController.php
  class RemindersController (line 4) | class RemindersController extends Controller
    method getRemind (line 12) | public function getRemind()
    method postRemind (line 22) | public function postRemind()
    method getReset (line 39) | public function getReset($token = null)
    method postReset (line 53) | public function postReset()

FILE: app/controllers/SnippetController.php
  class SnippetController (line 7) | class SnippetController extends BaseController
    method __construct (line 30) | public function __construct(
    method getIndex (line 44) | public function getIndex()
    method getShow (line 65) | public function getShow($slug)
    method starSnippet (line 104) | public function starSnippet($slug)
    method unstarSnippet (line 132) | public function unstarSnippet($slug)

FILE: app/controllers/TagController.php
  class TagController (line 7) | class TagController extends BaseController
    method __construct (line 30) | public function __construct(
    method getShow (line 44) | public function getShow($slug)

FILE: app/controllers/UserController.php
  class UserController (line 8) | class UserController extends BaseController
    method __construct (line 33) | public function __construct(UserRepositoryInterface $user, SnippetRepo...
    method getIndex (line 44) | public function getIndex()
    method getProfile (line 61) | public function getProfile($slug)
    method getSnippets (line 78) | public function getSnippets($slug)
    method getSettings (line 97) | public function getSettings($slug)
    method putSettings (line 108) | public function putSettings($slug)

FILE: app/controllers/website/PagesController.php
  class PagesController (line 5) | class PagesController extends \BaseController
    method showRoadmap (line 7) | public function showRoadmap()

FILE: app/database/migrations/2013_11_08_145020_create_snippets_table.php
  class CreateSnippetsTable (line 5) | class CreateSnippetsTable extends Migration
    method up (line 12) | public function up()
    method down (line 27) | public function down()

FILE: app/database/migrations/2013_12_05_122548_create_users_table.php
  class CreateUsersTable (line 5) | class CreateUsersTable extends Migration
    method up (line 12) | public function up()
    method down (line 30) | public function down()

FILE: app/database/migrations/2013_12_05_122952_add_author_id_in_snippets_table.php
  class AddAuthorIdInSnippetsTable (line 5) | class AddAuthorIdInSnippetsTable extends Migration
    method up (line 12) | public function up()
    method down (line 25) | public function down()

FILE: app/database/migrations/2013_12_08_055430_add_slug_and_activation_key_and_active_in_users_table.php
  class AddSlugAndActivationKeyAndActiveInUsersTable (line 5) | class AddSlugAndActivationKeyAndActiveInUsersTable extends Migration
    method up (line 12) | public function up()
    method down (line 26) | public function down()

FILE: app/database/migrations/2013_12_09_125456_drop_active_in_users_table.php
  class DropActiveInUsersTable (line 5) | class DropActiveInUsersTable extends Migration
    method up (line 12) | public function up()
    method down (line 24) | public function down()

FILE: app/database/migrations/2013_12_09_130122_add_active_in_users_table.php
  class AddActiveInUsersTable (line 5) | class AddActiveInUsersTable extends Migration
    method up (line 12) | public function up()
    method down (line 24) | public function down()

FILE: app/database/migrations/2013_12_10_112312_add_approved_in_snippets_table.php
  class AddApprovedInSnippetsTable (line 5) | class AddApprovedInSnippetsTable extends Migration
    method up (line 12) | public function up()
    method down (line 24) | public function down()

FILE: app/database/migrations/2013_12_10_132447_add_slug_in_snippets_table.php
  class AddSlugInSnippetsTable (line 5) | class AddSlugInSnippetsTable extends Migration
    method up (line 12) | public function up()
    method down (line 24) | public function down()

FILE: app/database/migrations/2013_12_11_012940_create_roles_table.php
  class CreateRolesTable (line 5) | class CreateRolesTable extends Migration
    method up (line 12) | public function up()
    method down (line 26) | public function down()

FILE: app/database/migrations/2013_12_11_013036_add_role_id_in_users_table.php
  class AddRoleIdInUsersTable (line 5) | class AddRoleIdInUsersTable extends Migration
    method up (line 12) | public function up()
    method down (line 24) | public function down()

FILE: app/database/migrations/2013_12_11_013559_add_description_credits_to_resource_deleted_at_in_snippets_table.php
  class AddDescriptionCreditsToResourceDeletedAtInSnippetsTable (line 5) | class AddDescriptionCreditsToResourceDeletedAtInSnippetsTable extends Mi...
    method up (line 12) | public function up()
    method down (line 27) | public function down()

FILE: app/database/migrations/2013_12_11_014226_create_tags_table.php
  class CreateTagsTable (line 5) | class CreateTagsTable extends Migration
    method up (line 12) | public function up()
    method down (line 25) | public function down()

FILE: app/database/migrations/2013_12_11_014317_create_snippet_tag_table.php
  class CreateSnippetTagTable (line 5) | class CreateSnippetTagTable extends Migration
    method up (line 12) | public function up()
    method down (line 26) | public function down()

FILE: app/database/migrations/2013_12_11_103428_add_slug_in_tags_table.php
  class AddSlugInTagsTable (line 5) | class AddSlugInTagsTable extends Migration
    method up (line 12) | public function up()
    method down (line 24) | public function down()

FILE: app/database/migrations/2013_12_12_093641_add_remaining_columns_in_users_table.php
  class AddRemainingColumnsInUsersTable (line 5) | class AddRemainingColumnsInUsersTable extends Migration
    method up (line 12) | public function up()
    method down (line 29) | public function down()

FILE: app/database/migrations/2013_12_19_134131_create_password_reminders_table.php
  class CreatePasswordRemindersTable (line 6) | class CreatePasswordRemindersTable extends Migration
    method up (line 13) | public function up()
    method down (line 27) | public function down()

FILE: app/database/migrations/2014_01_04_072223_add_disqus_columns_to_snippets_table.php
  class AddDisqusColumnsToSnippetsTable (line 5) | class AddDisqusColumnsToSnippetsTable
    method up (line 13) | public function up()
    method down (line 26) | public function down()

FILE: app/database/migrations/2014_01_06_212314_create_user_starred_table.php
  class CreateUserStarredTable (line 5) | class CreateUserStarredTable extends Migration
    method up (line 12) | public function up()
    method down (line 28) | public function down()

FILE: app/database/migrations/2014_04_17_151653_add_remember_token_to_users_table.php
  class AddRememberTokenToUsersTable (line 6) | class AddRememberTokenToUsersTable extends Migration {
    method up (line 13) | public function up()
    method down (line 26) | public function down()

FILE: app/database/seeds/DatabaseSeeder.php
  class DatabaseSeeder (line 3) | class DatabaseSeeder extends Seeder
    method run (line 10) | public function run()

FILE: app/database/seeds/RoleSeeder.php
  class RoleSeeder (line 3) | class RoleSeeder extends Seeder
    method run (line 5) | public function run()
    method generate (line 12) | private function generate()

FILE: app/database/seeds/TagSeeder.php
  class TagSeeder (line 3) | class TagSeeder extends Seeder
    method run (line 5) | public function run()
    method generate (line 12) | private function generate()

FILE: app/libraries/SiteHelpers.php
  class SiteHelpers (line 3) | class SiteHelpers
    method bodyId (line 10) | public static function bodyId()
    method bodyClass (line 21) | public static function bodyClass()
    method breadcrumbs (line 52) | public static function breadcrumbs()
    method navLinkTo (line 104) | public static function navLinkTo($url, $title, $has_sub_menu = false, ...
    method url (line 129) | public static function url($url, $https = false)

FILE: app/models/BaseModel.php
  class BaseModel (line 3) | class BaseModel extends Eloquent
    method getHumanCreatedAtAttribute (line 11) | public function getHumanCreatedAtAttribute()
    method getHumanUpdatedAtAttribute (line 21) | public function getHumanUpdatedAtAttribute()

FILE: app/models/Role.php
  class Role (line 3) | class Role extends BaseModel {}

FILE: app/models/Snippet.php
  class Snippet (line 5) | class Snippet extends BaseModel
    method author (line 44) | public function author()
    method tags (line 54) | public function tags()
    method getHitsAttribute (line 64) | public function getHitsAttribute()
    method hasHits (line 76) | public function hasHits()
    method isTheAuthor (line 87) | public function isTheAuthor($user)
    method incrementHits (line 95) | public function incrementHits()
    method testLink (line 104) | protected function testLink($url)
    method getCreditsToLinkAttribute (line 132) | public function getCreditsToLinkAttribute()
    method starred (line 163) | public function starred()
    method scopeLike (line 169) | public function scopeLike($query, $field, $value)

FILE: app/models/Starred.php
  class Starred (line 3) | class Starred extends BaseModel
    method snippet (line 34) | public function snippet()

FILE: app/models/Tag.php
  class Tag (line 3) | class Tag extends Eloquent
    method snippets (line 12) | public function snippets()
    method hasSnippets (line 22) | public function hasSnippets()

FILE: app/models/User.php
  class User (line 6) | class User extends BaseModel implements UserInterface, RemindableInterface
    method snippets (line 56) | public function snippets()
    method role (line 65) | public function role()
    method starred (line 75) | public function starred()
    method getAuthIdentifier (line 85) | public function getAuthIdentifier()
    method getAuthPassword (line 95) | public function getAuthPassword()
    method getRememberToken (line 105) | public function getRememberToken()
    method setRememberToken (line 116) | public function setRememberToken($value)
    method getRememberTokenName (line 126) | public function getRememberTokenName()
    method getReminderEmail (line 136) | public function getReminderEmail()
    method getFullNameAttribute (line 146) | public function getFullNameAttribute()
    method getAbsPhotoUrlAttribute (line 155) | public function getAbsPhotoUrlAttribute()
    method getSnippetsCountAttribute (line 173) | public function getSnippetsCountAttribute()
    method setPasswordAttribute (line 184) | public function setPasswordAttribute($value)
    method isActive (line 194) | public function isActive()
    method activate (line 206) | public function activate($key)
    method isAdmin (line 227) | public function isAdmin()
    method hasStarred (line 238) | public function hasStarred($snippet_id)
    method starSnippet (line 249) | public function starSnippet($snippet_id)
    method unstarSnippet (line 264) | public function unstarSnippet($snippet_id)

FILE: app/tests/TestCase.php
  class TestCase (line 3) | class TestCase extends Illuminate\Foundation\Testing\TestCase
    method setUp (line 9) | public function setUp()
    method createApplication (line 21) | public function createApplication()
    method prepareForTests (line 34) | private function prepareForTests()
    method generateRoles (line 50) | public function generateRoles()
    method invokeMethod (line 74) | public function invokeMethod(&$object, $methodName, array $parameters ...

FILE: app/tests/functional/Controller/AuthControllerTest.php
  class AuthControllerTest (line 8) | class AuthControllerTest extends TestCase
    method testGetSignup (line 10) | public function testGetSignup()
    method testSuccessfulSignup (line 16) | public function testSuccessfulSignup()
    method testInvalidSignup (line 36) | public function testInvalidSignup()
    method testSuccessfulAccountActivation (line 43) | public function testSuccessfulAccountActivation()
    method testInvalidAccountActivationUsingWrongKey (line 55) | public function testInvalidAccountActivationUsingWrongKey()
    method testGetLogin (line 67) | public function testGetLogin()
    method testSuccessfulLogin (line 73) | public function testSuccessfulLogin()
    method testInvalidLoginUsingUnregisteredUser (line 87) | public function testInvalidLoginUsingUnregisteredUser()
    method testInvalidLoginUsingInactiveUser (line 99) | public function testInvalidLoginUsingInactiveUser()
    method testInvalidLoginUsingWrongCredentials (line 114) | public function testInvalidLoginUsingWrongCredentials()

FILE: app/tests/functional/Controller/HomeControllerTest.php
  class HomeControllerTest (line 7) | class HomeControllerTest extends TestCase
    method testHomePageOnlyShowsApprovedSnippets (line 9) | public function testHomePageOnlyShowsApprovedSnippets()
    method testHomePageTopSnippetContributors (line 28) | public function testHomePageTopSnippetContributors()

FILE: app/tests/functional/Controller/Member/SnippetControllerTest.php
  class SnippetControllerTest (line 9) | class SnippetControllerTest extends TestCase
    method testGetShowRendersNotYetApprovedSnippets (line 11) | public function testGetShowRendersNotYetApprovedSnippets()
    method testGetShowRendersApprovedSnippets (line 26) | public function testGetShowRendersApprovedSnippets()
    method testGetCreate (line 41) | public function testGetCreate()
    method testPostStoreThrowsErrorOnBlankInput (line 48) | public function testPostStoreThrowsErrorOnBlankInput()
    method testPostStoreThrowsErrorOnInvalidResourceFormat (line 58) | public function testPostStoreThrowsErrorOnInvalidResourceFormat()
    method testPostStoreThrowsExceptionOnInvalidTags (line 77) | public function testPostStoreThrowsExceptionOnInvalidTags()
    method testPostStoreSavesSnippetOnValidInput (line 92) | public function testPostStoreSavesSnippetOnValidInput()
    method testGetEdit (line 112) | public function testGetEdit()
    method testPostUpdateUpdatesSnippetOnValidInput (line 131) | public function testPostUpdateUpdatesSnippetOnValidInput()

FILE: app/tests/functional/Controller/Member/UserControllerTest.php
  class UserControllerTest (line 8) | class UserControllerTest extends TestCase
    method testGetMySnippetsRendersApprovedAndNotYetApprovedSnippets (line 10) | public function testGetMySnippetsRendersApprovedAndNotYetApprovedSnipp...

FILE: app/tests/functional/Controller/SnippetControllerTest.php
  class SnippetControllerTest (line 7) | class SnippetControllerTest extends TestCase
    method testGetIndexOnlyShowsApprovedSnippets (line 9) | public function testGetIndexOnlyShowsApprovedSnippets()
    method testGetShowDoesNotRenderNotYetApprovedSnippets (line 34) | public function testGetShowDoesNotRenderNotYetApprovedSnippets()
    method testGetShowRendersApprovedSnippets (line 46) | public function testGetShowRendersApprovedSnippets()

FILE: app/tests/functional/Controller/TagControllerTest.php
  class TagControllerTest (line 7) | class TagControllerTest extends TestCase
    method testGetShowOnlyRendersApprovedSnippets (line 9) | public function testGetShowOnlyRendersApprovedSnippets()

FILE: app/tests/functional/Controller/UserControllerTest.php
  class UserControllerTest (line 7) | class UserControllerTest extends TestCase
    method testGetIndex (line 9) | public function testGetIndex()
    method testGetProfile (line 36) | public function testGetProfile()
    method testGetSnippets (line 47) | public function testGetSnippets()

FILE: app/tests/integration/Model/UserModelTest.php
  class UserModelTest (line 7) | class UserModelTest extends TestCase
    method testGetFullNameAttribute (line 9) | public function testGetFullNameAttribute()
    method testSetPasswordAttribute (line 18) | public function testSetPasswordAttribute()
    method testGetAbsPhotoUrlAttribute (line 26) | public function testGetAbsPhotoUrlAttribute()

FILE: app/tests/integration/Repo/EloquentSnippetRepositoryTest.php
  class EloquentSnippetRepositoryTest (line 9) | class EloquentSnippetRepositoryTest extends TestCase
    method testByPage (line 11) | public function testByPage()
    method testTotalSnippets (line 33) | public function testTotalSnippets()
    method testByTag (line 61) | public function testByTag()
    method testGetMostViewed (line 124) | public function testGetMostViewed()

FILE: app/tests/integration/Repo/EloquentUserRepositoryTest.php
  class EloquentUserRepositoryTest (line 8) | class EloquentUserRepositoryTest extends TestCase
    method testGetTopSnippetContributors (line 10) | public function testGetTopSnippetContributors()

FILE: app/tests/unit/Model/UserModelTest.php
  class UserModelTest (line 6) | class UserModelTest extends TestCase
    method testIsActive (line 8) | public function testIsActive()

FILE: public/assets/js/vendors/json2/json2.js
  function f (line 169) | function f(n) {
  function quote (line 211) | function quote(string) {
  function str (line 228) | function str(key, holder) {
  function walk (line 413) | function walk(holder, key) {

FILE: public/packages/chosen_v1.0.0/chosen.jquery.js
  function ctor (line 13) | function ctor() { this.constructor = child; }
  function SelectParser (line 16) | function SelectParser() {
  function AbstractChosen (line 117) | function AbstractChosen(form_field, options) {
  function Chosen (line 502) | function Chosen() {

FILE: public/packages/chosen_v1.0.0/chosen.proto.js
  function ctor (line 13) | function ctor() { this.constructor = child; }
  function SelectParser (line 16) | function SelectParser() {
  function AbstractChosen (line 117) | function AbstractChosen(form_field, options) {
  function Chosen (line 481) | function Chosen() {

FILE: public/packages/codemirror-3.19/addon/comment/comment.js
  function firstNonWS (line 8) | function firstNonWS(str) {

FILE: public/packages/codemirror-3.19/addon/comment/continuecomment.js
  function continueComment (line 6) | function continueComment(cm) {

FILE: public/packages/codemirror-3.19/addon/dialog/dialog.js
  function dialogDiv (line 4) | function dialogDiv(cm, template, bottom) {
  function close (line 20) | function close() {
  function close (line 57) | function close() {

FILE: public/packages/codemirror-3.19/addon/display/fullscreen.js
  function setFullscreen (line 11) | function setFullscreen(cm) {
  function setNormal (line 21) | function setNormal(cm) {

FILE: public/packages/codemirror-3.19/addon/display/placeholder.js
  function clearPlaceholder (line 21) | function clearPlaceholder(cm) {
  function setPlaceholder (line 27) | function setPlaceholder(cm) {
  function onFocus (line 36) | function onFocus(cm) {
  function onBlur (line 39) | function onBlur(cm) {
  function onChange (line 42) | function onChange(cm) {
  function isEmpty (line 51) | function isEmpty(cm) {

FILE: public/packages/codemirror-3.19/addon/edit/closebrackets.js
  function charsAround (line 21) | function charsAround(cm, pos) {
  function buildKeymap (line 27) | function buildKeymap(pairs) {
  function buildExplodeHandler (line 70) | function buildExplodeHandler(pairs) {

FILE: public/packages/codemirror-3.19/addon/edit/closetag.js
  function autoCloseGT (line 44) | function autoCloseGT(cm) {
  function autoCloseSlash (line 72) | function autoCloseSlash(cm) {
  function indexOf (line 81) | function indexOf(collection, elt) {

FILE: public/packages/codemirror-3.19/addon/edit/matchbrackets.js
  function findMatchingBracket (line 8) | function findMatchingBracket(cm, where, strict) {
  function matchBrackets (line 44) | function matchBrackets(cm, autoclear) {
  function doMatchBrackets (line 66) | function doMatchBrackets(cm) {

FILE: public/packages/codemirror-3.19/addon/edit/matchtags.js
  function clear (line 18) | function clear(cm) {
  function doMatchTags (line 24) | function doMatchTags(cm) {
  function maybeUpdateMatch (line 45) | function maybeUpdateMatch(cm) {

FILE: public/packages/codemirror-3.19/addon/fold/brace-fold.js
  function findOpening (line 5) | function findOpening(openCh) {
  function hasImport (line 51) | function hasImport(line) {
  function hasInclude (line 76) | function hasInclude(line) {

FILE: public/packages/codemirror-3.19/addon/fold/foldcode.js
  function doFold (line 4) | function doFold(cm, pos, options, force) {
  function makeWidget (line 45) | function makeWidget(options) {

FILE: public/packages/codemirror-3.19/addon/fold/foldgutter.js
  function State (line 29) | function State(options) {
  function parseOptions (line 34) | function parseOptions(opts) {
  function isFolded (line 42) | function isFolded(cm, line) {
  function marker (line 48) | function marker(spec) {
  function updateFoldInfo (line 58) | function updateFoldInfo(cm, from, to) {
  function updateInViewport (line 75) | function updateInViewport(cm) {
  function onGutterClick (line 84) | function onGutterClick(cm, line, gutter) {
  function onChange (line 90) | function onChange(cm) {
  function onViewportChange (line 97) | function onViewportChange(cm) {
  function onFold (line 119) | function onFold(cm, from) {

FILE: public/packages/codemirror-3.19/addon/fold/indent-fold.js
  function foldEnded (line 7) | function foldEnded(curColumn, prevColumn) {

FILE: public/packages/codemirror-3.19/addon/fold/xml-fold.js
  function cmp (line 5) | function cmp(a, b) { return a.line - b.line || a.ch - b.ch; }
  function Iter (line 11) | function Iter(cm, line, ch, range) {
  function tagAt (line 18) | function tagAt(iter, ch) {
  function nextLine (line 23) | function nextLine(iter) {
  function prevLine (line 29) | function prevLine(iter) {
  function toTagEnd (line 36) | function toTagEnd(iter) {
  function toTagStart (line 47) | function toTagStart(iter) {
  function toNextTag (line 59) | function toNextTag(iter) {
  function toPrevTag (line 69) | function toPrevTag(iter) {
  function findMatchingClose (line 81) | function findMatchingClose(iter, tag) {
  function findMatchingOpen (line 102) | function findMatchingOpen(iter, tag) {

FILE: public/packages/codemirror-3.19/addon/hint/anyword-hint.js
  function scan (line 16) | function scan(dir) {

FILE: public/packages/codemirror-3.19/addon/hint/css-hint.js
  function getHints (line 4) | function getHints(cm) {

FILE: public/packages/codemirror-3.19/addon/hint/html-hint.js
  function populate (line 320) | function populate(obj) {
  function htmlHint (line 330) | function htmlHint(cm, options) {

FILE: public/packages/codemirror-3.19/addon/hint/javascript-hint.js
  function forEach (line 4) | function forEach(arr, f) {
  function arrayContains (line 8) | function arrayContains(arr, item) {
  function scriptHint (line 21) | function scriptHint(editor, keywords, getToken, options) {
  function javascriptHint (line 44) | function javascriptHint(editor, options) {
  function getCoffeeScriptToken (line 52) | function getCoffeeScriptToken(editor, cur) {
  function coffeescriptHint (line 70) | function coffeescriptHint(editor, options) {
  function getCompletions (line 86) | function getCompletions(token, context, keywords, options) {

FILE: public/packages/codemirror-3.19/addon/hint/pig-hint.js
  function forEach (line 4) | function forEach(arr, f) {
  function arrayContains (line 8) | function arrayContains(arr, item) {
  function scriptHint (line 21) | function scriptHint(editor, _keywords, getToken) {
  function pigHint (line 46) | function pigHint(editor) {
  function getCompletions (line 84) | function getCompletions(token, context) {

FILE: public/packages/codemirror-3.19/addon/hint/python-hint.js
  function forEach (line 2) | function forEach(arr, f) {
  function arrayContains (line 6) | function arrayContains(arr, item) {
  function scriptHint (line 19) | function scriptHint(editor, _keywords, getToken) {
  function pythonHint (line 44) | function pythonHint(editor) {
  function getCompletions (line 66) | function getCompletions(token, context) {

FILE: public/packages/codemirror-3.19/addon/hint/show-hint.js
  function Completion (line 20) | function Completion(cm, getHints, options) {
  function done (line 65) | function done() {
  function update (line 73) | function update() {
  function finishUpdate (line 81) | function finishUpdate(data_) {
  function activity (line 88) | function activity() {
  function getText (line 105) | function getText(completion) {
  function buildKeyMap (line 110) | function buildKeyMap(options, handle) {
  function Widget (line 143) | function Widget(completion, data) {

FILE: public/packages/codemirror-3.19/addon/hint/sql-hint.js
  function getKeywords (line 7) | function getKeywords(editor) {
  function match (line 13) | function match(string, word) {
  function addMatches (line 19) | function addMatches(result, search, wordlist, formatter) {
  function columnCompletion (line 31) | function columnCompletion(result, editor) {
  function eachWord (line 49) | function eachWord(line, f) {
  function findTableByAlias (line 57) | function findTableByAlias(alias, editor) {
  function sqlHint (line 78) | function sqlHint(editor, options) {

FILE: public/packages/codemirror-3.19/addon/hint/xml-hint.js
  function getHints (line 6) | function getHints(cm, options) {

FILE: public/packages/codemirror-3.19/addon/lint/javascript-lint.js
  function validator (line 14) | function validator(text, options) {
  function cleanup (line 24) | function cleanup(error) {
  function fixWith (line 32) | function fixWith(error, fixes, severity, force) {
  function isBogus (line 52) | function isBogus(error) {
  function parseErrors (line 62) | function parseErrors(errors, output) {

FILE: public/packages/codemirror-3.19/addon/lint/lint.js
  function showTooltip (line 6) | function showTooltip(e, content) {
  function rm (line 22) | function rm(elt) {
  function hideTooltip (line 25) | function hideTooltip(tt) {
  function showTooltipFor (line 32) | function showTooltipFor(e, content, node) {
  function LintState (line 48) | function LintState(cm, options, hasGutter) {
  function parseOptions (line 56) | function parseOptions(cm, options) {
  function clearMarks (line 64) | function clearMarks(cm) {
  function makeMarker (line 72) | function makeMarker(labels, severity, multiple, tooltips) {
  function getMaxSeverity (line 87) | function getMaxSeverity(a, b) {
  function groupByLine (line 92) | function groupByLine(annotations) {
  function annotationTooltip (line 101) | function annotationTooltip(ann) {
  function startLinting (line 110) | function startLinting(cm) {
  function updateLinting (line 118) | function updateLinting(cm, annotationsNotSorted) {
  function onChange (line 153) | function onChange(cm) {
  function popupSpanTooltip (line 159) | function popupSpanTooltip(ann, e) {
  function onMouseOver (line 169) | function onMouseOver(cm, e) {
  function optionHandler (line 181) | function optionHandler(cm, val, old) {

FILE: public/packages/codemirror-3.19/addon/merge/dep/diff_match_patch.js
  function diff_match_patch (line 2) | function diff_match_patch(){this.Diff_Timeout=1;this.Diff_EditCost=4;thi...
  function c (line 11) | function c(a){for(var b="",c=0,f=-1,g=d.length;f<a.length-1;){f=a.indexO...
  function c (line 15) | function c(a,b,c){for(var d=a.substring(c,c+Math.floor(a.length/4)),e=-1...
  function b (line 19) | function b(a,b){if(!a||!b)return 6;var c=a.charAt(a.length-1),d=b.charAt...
  function d (line 31) | function d(a,d){var e=a/b.length,g=Math.abs(c-d);return!f.Match_Distance...

FILE: public/packages/codemirror-3.19/addon/merge/merge.js
  function DiffView (line 8) | function DiffView(mv, type) {
  function registerUpdate (line 49) | function registerUpdate(dv) {
  function registerScroll (line 91) | function registerScroll(dv) {
  function syncScroll (line 100) | function syncScroll(dv, type) {
  function getOffsets (line 137) | function getOffsets(editor, around) {
  function setScrollLock (line 144) | function setScrollLock(dv, val, action) {
  function clearMarks (line 152) | function clearMarks(editor, arr, classes) {
  function updateMarks (line 167) | function updateMarks(editor, diff, state, type, classes) {
  function markChanges (line 187) | function markChanges(editor, diff, type, marks, from, to, classes) {
  function drawConnectors (line 234) | function drawConnectors(dv) {
  function copyChunk (line 272) | function copyChunk(dv, chunk) {
  function buildGap (line 325) | function buildGap(dv) {
  function getDiff (line 358) | function getDiff(a, b) {
  function iterateChunks (line 374) | function iterateChunks(diff, f) {
  function endOfLineClean (line 397) | function endOfLineClean(diff, i) {
  function startOfLineClean (line 406) | function startOfLineClean(diff, i) {
  function chunkBoundariesAround (line 415) | function chunkBoundariesAround(diff, n, nInEdit) {
  function elt (line 432) | function elt(tag, content, className, style) {
  function clear (line 441) | function clear(node) {
  function attrs (line 446) | function attrs(elt) {
  function copyObj (line 451) | function copyObj(obj, target) {
  function moveOver (line 457) | function moveOver(pos, str, copy, other) {
  function posMin (line 471) | function posMin(a, b) { return (a.line - b.line || a.ch - b.ch) < 0 ? a ...
  function posMax (line 472) | function posMax(a, b) { return (a.line - b.line || a.ch - b.ch) > 0 ? a ...
  function posEq (line 473) | function posEq(a, b) { return a.line == b.line && a.ch == b.ch; }

FILE: public/packages/codemirror-3.19/addon/mode/loadmode.js
  function splitCallback (line 5) | function splitCallback(cont, n) {
  function ensureDeps (line 9) | function ensureDeps(mode, cont) {

FILE: public/packages/codemirror-3.19/addon/mode/multiplex.js
  function indexOf (line 6) | function indexOf(string, pattern, from) {

FILE: public/packages/codemirror-3.19/addon/mode/multiplex_test.js
  function MT (line 19) | function MT(name) {

FILE: public/packages/codemirror-3.19/addon/runmode/colorize.js
  function textContent (line 5) | function textContent(node, out) {

FILE: public/packages/codemirror-3.19/addon/runmode/runmode-standalone.js
  function splitLines (line 8) | function splitLines(string){ return string.split(/\r?\n|\r/); }
  function StringStream (line 10) | function StringStream(string) {

FILE: public/packages/codemirror-3.19/addon/runmode/runmode.node.js
  function splitLines (line 3) | function splitLines(string){ return string.split(/\r?\n|\r/); }
  function StringStream (line 5) | function StringStream(string) {

FILE: public/packages/codemirror-3.19/addon/scroll/scrollpastend.js
  function onChange (line 16) | function onChange(cm, change) {
  function updateBottomMargin (line 21) | function updateBottomMargin(cm) {

FILE: public/packages/codemirror-3.19/addon/search/match-highlighter.js
  function State (line 20) | function State(options) {
  function cursorActivity (line 48) | function cursorActivity(cm) {
  function highlightMatches (line 54) | function highlightMatches(cm) {
  function boundariesAround (line 77) | function boundariesAround(stream, re) {
  function makeOverlay (line 82) | function makeOverlay(query, hasBoundary, style) {

FILE: public/packages/codemirror-3.19/addon/search/search.js
  function searchOverlay (line 10) | function searchOverlay(query) {
  function SearchState (line 25) | function SearchState() {
  function getSearchState (line 29) | function getSearchState(cm) {
  function getSearchCursor (line 32) | function getSearchCursor(cm, query, pos) {
  function dialog (line 36) | function dialog(cm, text, shortText, f) {
  function confirmDialog (line 40) | function confirmDialog(cm, text, shortText, fs) {
  function parseQuery (line 44) | function parseQuery(query) {
  function doSearch (line 50) | function doSearch(cm, rev) {
  function findNext (line 65) | function findNext(cm, rev) {cm.operation(function() {
  function clearSearch (line 76) | function clearSearch(cm) {cm.operation(function() {
  function replace (line 87) | function replace(cm, all) {

FILE: public/packages/codemirror-3.19/addon/search/searchcursor.js
  function SearchCursor (line 4) | function SearchCursor(doc, query, pos, caseFold) {
  function savePosAndFail (line 100) | function savePosAndFail(line) {

FILE: public/packages/codemirror-3.19/addon/selection/active-line.js
  function clearActiveLine (line 24) | function clearActiveLine(cm) {
  function updateActiveLine (line 31) | function updateActiveLine(cm) {

FILE: public/packages/codemirror-3.19/addon/selection/mark-selection.js
  function onCursorActivity (line 26) | function onCursorActivity(cm) {
  function onChange (line 30) | function onChange(cm) {
  function cmp (line 38) | function cmp(pos1, pos2) {
  function coverRange (line 42) | function coverRange(cm, from, to, addAt) {
  function clear (line 58) | function clear(cm) {
  function reset (line 64) | function reset(cm) {
  function update (line 70) | function update(cm) {

FILE: public/packages/codemirror-3.19/addon/tern/tern.js
  function getFile (line 126) | function getFile(ts, name, c) {
  function findDoc (line 136) | function findDoc(ts, doc, name) {
  function trackChange (line 148) | function trackChange(ts, doc, change) {
  function sendDoc (line 168) | function sendDoc(ts, doc) {
  function hint (line 177) | function hint(ts, cm, c) {
  function typeToIcon (line 212) | function typeToIcon(type) {
  function showType (line 224) | function showType(ts, cm) {
  function updateArgHints (line 244) | function updateArgHints(ts, cm) {
  function showArgHints (line 286) | function showArgHints(ts, cm, pos) {
  function parseFnType (line 307) | function parseFnType(text) {
  function jumpToDef (line 340) | function jumpToDef(ts, cm) {
  function jumpBack (line 368) | function jumpBack(ts, cm) {
  function moveTo (line 374) | function moveTo(ts, curDoc, doc, start, end) {
  function findContext (line 383) | function findContext(doc, data) {
  function atInterestingExpression (line 413) | function atInterestingExpression(cm) {
  function rename (line 421) | function rename(ts, cm) {
  function applyChanges (line 433) | function applyChanges(ts, changes) {
  function buildRequest (line 453) | function buildRequest(ts, doc, query) {
  function getFragmentAround (line 495) | function getFragmentAround(data, start, end) {
  function cmpPos (line 524) | function cmpPos(a, b) { return a.line - b.line || a.ch - b.ch; }
  function elt (line 526) | function elt(tagname, cls /*, ... elts*/) {
  function dialog (line 537) | function dialog(cm, text, f) {
  function tempTooltip (line 546) | function tempTooltip(cm, content) {
  function makeTooltip (line 558) | function makeTooltip(x, y, content) {
  function remove (line 566) | function remove(node) {
  function fadeOut (line 571) | function fadeOut(tooltip) {
  function showError (line 576) | function showError(ts, cm, msg) {
  function closeArgHints (line 583) | function closeArgHints(ts) {
  function docValue (line 587) | function docValue(ts, doc) {
  function WorkerServer (line 595) | function WorkerServer(ts) {

FILE: public/packages/codemirror-3.19/addon/tern/worker.js
  function getFile (line 23) | function getFile(file, c) {
  function startServer (line 28) | function startServer(defs, plugins, scripts) {

FILE: public/packages/codemirror-3.19/addon/wrap/hardwrap.js
  function findParagraph (line 6) | function findParagraph(cm, pos, options) {
  function findBreakPoint (line 22) | function findBreakPoint(text, column, wrapOn, killTrailingSpace) {
  function wrapRange (line 32) | function wrapRange(cm, from, to, options) {

FILE: public/packages/codemirror-3.19/doc/activebookmark.js
  function updateSoon (line 4) | function updateSoon() {
  function update (line 11) | function update() {

FILE: public/packages/codemirror-3.19/keymap/emacs.js
  function posEq (line 5) | function posEq(a, b) { return a.line == b.line && a.ch == b.ch; }
  function addToRing (line 10) | function addToRing(str) {
  function growRingTop (line 14) | function growRingTop(str) {
  function getFromRing (line 18) | function getFromRing(n) { return killRing[killRing.length - (n ? Math.mi...
  function popFromRing (line 19) | function popFromRing() { if (killRing.length > 1) killRing.pop(); return...
  function kill (line 23) | function kill(cm, from, to, mayGrow, text) {
  function byChar (line 38) | function byChar(cm, pos, dir) {
  function byWord (line 42) | function byWord(cm, pos, dir) {
  function byLine (line 46) | function byLine(cm, pos, dir) {
  function byPage (line 50) | function byPage(cm, pos, dir) {
  function byParagraph (line 54) | function byParagraph(cm, pos, dir) {
  function bySentence (line 69) | function bySentence(cm, pos, dir) {
  function byExpr (line 88) | function byExpr(cm, pos, dir) {
  function getPrefix (line 109) | function getPrefix(cm, precise) {
  function repeated (line 116) | function repeated(cmd) {
  function findEnd (line 125) | function findEnd(cm, by, dir) {
  function move (line 136) | function move(by, dir) {
  function killTo (line 144) | function killTo(cm, by, dir) {
  function addPrefix (line 148) | function addPrefix(cm, digit) {
  function maybeClearPrefix (line 161) | function maybeClearPrefix(cm, arg) {
  function clearPrefix (line 166) | function clearPrefix(cm) {
  function maybeDuplicateInput (line 172) | function maybeDuplicateInput(cm, event) {
  function addPrefixMap (line 181) | function addPrefixMap(cm) {
  function maybeRemovePrefixMap (line 188) | function maybeRemovePrefixMap(cm, arg) {
  function setMark (line 198) | function setMark(cm) {
  function getInput (line 204) | function getInput(cm, msg, f) {
  function operateOnWord (line 211) | function operateOnWord(cm, op) {
  function toEnclosingExpr (line 217) | function toEnclosingExpr(cm) {
  function regPrefix (line 380) | function regPrefix(d) {

FILE: public/packages/codemirror-3.19/keymap/extra.js
  function moveLines (line 9) | function moveLines(cm, start, end, dist) {
  function moveSelectedLines (line 30) | function moveSelectedLines(cm, dist) {

FILE: public/packages/codemirror-3.19/keymap/vim.js
  function beforeSelectionChange (line 336) | function beforeSelectionChange(cm, cur) {
  function makeKeyRange (line 348) | function makeKeyRange(start, size) {
  function isLine (line 364) | function isLine(cm, line) {
  function isLowerCase (line 367) | function isLowerCase(k) {
  function isMatchableSymbol (line 370) | function isMatchableSymbol(k) {
  function isNumber (line 373) | function isNumber(k) {
  function isUpperCase (line 376) | function isUpperCase(k) {
  function isWhiteSpaceString (line 379) | function isWhiteSpaceString(k) {
  function inArray (line 382) | function inArray(val, arr) {
  function add (line 397) | function add(cm, oldCur, newCur) {
  function move (line 424) | function move(cm, offset) {
  function maybeInitVimState (line 482) | function maybeInitVimState(cm) {
  function resetVimGlobalState (line 517) | function resetVimGlobalState() {
  function InputState (line 621) | function InputState() {
  function Register (line 659) | function Register(text, linewise) {
  function RegisterController (line 694) | function RegisterController(registers) {
  function getFullyMatchedCommandOrNull (line 811) | function getFullyMatchedCommandOrNull(command) {
  function handleQuery (line 951) | function handleQuery(query, ignoreCase, smartCase) {
  function onPromptClose (line 964) | function onPromptClose(query) {
  function onPromptKeyUp (line 968) | function onPromptKeyUp(_e, query) {
  function onPromptKeyDown (line 983) | function onPromptKeyDown(e, _query, close) {
  function onPromptClose (line 1038) | function onPromptClose(input) {
  function onPromptKeyDown (line 1043) | function onPromptKeyDown(e, _input, close) {
  function clipCursorToContent (line 1989) | function clipCursorToContent(cm, cur, includeLineBreak) {
  function copyArgs (line 1996) | function copyArgs(args) {
  function offsetCursor (line 2005) | function offsetCursor(cur, offsetLine, offsetCh) {
  function matchKeysPartial (line 2008) | function matchKeysPartial(pressed, mapped) {
  function repeatFn (line 2017) | function repeatFn(cm, fn, repeat) {
  function copyCursor (line 2024) | function copyCursor(cur) {
  function cursorEqual (line 2027) | function cursorEqual(cur1, cur2) {
  function cursorIsBefore (line 2030) | function cursorIsBefore(cur1, cur2) {
  function cusrorIsBetween (line 2039) | function cusrorIsBetween(cur1, cur2, cur3) {
  function lineLength (line 2045) | function lineLength(cm, lineNum) {
  function reverse (line 2048) | function reverse(s){
  function trim (line 2051) | function trim(s) {
  function escapeRegex (line 2057) | function escapeRegex(s) {
  function exitVisualMode (line 2061) | function exitVisualMode(cm) {
  function clipToLine (line 2081) | function clipToLine(cm, curStart, curEnd) {
  function expandSelectionToLine (line 2110) | function expandSelectionToLine(_cm, curStart, curEnd) {
  function findFirstNonWhiteSpaceCharacter (line 2116) | function findFirstNonWhiteSpaceCharacter(text) {
  function expandWordUnderCursor (line 2124) | function expandWordUnderCursor(cm, inclusive, _forward, bigWord, noSymbo...
  function recordJumpPosition (line 2186) | function recordJumpPosition(cm, oldCur, newCur) {
  function recordLastCharacterSearch (line 2192) | function recordLastCharacterSearch(increment, args) {
  function findSymbol (line 2270) | function findSymbol(cm, repeat, forward, symb) {
  function findWord (line 2336) | function findWord(cm, cur, forward, bigWord, emptyLineIsWord) {
  function moveToWord (line 2409) | function moveToWord(cm, repeat, forward, wordEnd, bigWord) {
  function moveToCharacter (line 2455) | function moveToCharacter(cm, repeat, forward, character) {
  function moveToColumn (line 2470) | function moveToColumn(cm, repeat) {
  function updateMark (line 2477) | function updateMark(cm, vim, markName, pos) {
  function charIdxInLine (line 2487) | function charIdxInLine(start, line, character, forward, includeChar) {
  function getContextLevel (line 2508) | function getContextLevel(ctx) {
  function findMatchedSymbol (line 2512) | function findMatchedSymbol(cm, cur, symb) {
  function selectCompanionObject (line 2570) | function selectCompanionObject(cm, revSymb, inclusive) {
  function findBeginningAndEnd (line 2584) | function findBeginningAndEnd(cm, symb, inclusive) {
  function SearchState (line 2643) | function SearchState() {}
  function getSearchState (line 2664) | function getSearchState(cm) {
  function dialog (line 2668) | function dialog(cm, template, shortText, onClose, options) {
  function findUnescapedSlashes (line 2678) | function findUnescapedSlashes(str) {
  function parseQuery (line 2700) | function parseQuery(query, ignoreCase, smartCase) {
  function showConfirm (line 2728) | function showConfirm(cm, text) {
  function makePrompt (line 2737) | function makePrompt(prefix, desc) {
  function showPrompt (line 2752) | function showPrompt(cm, options) {
  function regexEqual (line 2757) | function regexEqual(r1, r2) {
  function updateSearchQuery (line 2771) | function updateSearchQuery(cm, rawQuery, ignoreCase, smartCase) {
  function searchOverlay (line 2787) | function searchOverlay(query) {
  function highlightSearchMatches (line 2823) | function highlightSearchMatches(cm, query) {
  function findNext (line 2834) | function findNext(cm, prev, query, repeat) {
  function clearSearchHighlight (line 2855) | function clearSearchHighlight(cm) {
  function isInRange (line 2870) | function isInRange(pos, start, end) {
  function getUserVisibleLines (line 2885) | function getUserVisibleLines(cm) {
  function parseKeyString (line 3080) | function parseKeyString(str) {
  function parseArgs (line 3114) | function parseArgs() {
  function compareFn (line 3157) | function compareFn(a, b) {
  function doReplace (line 3328) | function doReplace(cm, confirm, lineStart, lineEnd, searchCursor, query,
  function buildVimKeyMap (line 3411) | function buildVimKeyMap() {
  function exitInsertMode (line 3478) | function exitInsertMode(cm) {
  function parseRegisterToKeyBuffer (line 3521) | function parseRegisterToKeyBuffer(macroModeState, registerName) {
  function parseKeyBufferToRegister (line 3537) | function parseKeyBufferToRegister(registerName, keyBuffer) {
  function emptyMacroKeyBuffer (line 3542) | function emptyMacroKeyBuffer(macroModeState) {
  function executeMacroKeyBuffer (line 3548) | function executeMacroKeyBuffer(cm, macroModeState, keyBuffer) {
  function logKey (line 3556) | function logKey(macroModeState, key) {
  function onChange (line 3566) | function onChange(_cm, changeObj) {
  function onCursorActivity (line 3586) | function onCursorActivity() {
  function InsertModeKey (line 3598) | function InsertModeKey(keyName) {
  function onKeyEventTargetKeyDown (line 3607) | function onKeyEventTargetKeyDown(e) {
  function repeatLastEdit (line 3629) | function repeatLastEdit(cm, vim, repeat, repeatForInsert) {
  function repeatLastInsertModeChanges (line 3675) | function repeatLastInsertModeChanges(cm, repeat, macroModeState) {

FILE: public/packages/codemirror-3.19/lib/codemirror.js
  function CodeMirror (line 43) | function CodeMirror(place, options) {
  function makeDisplay (line 95) | function makeDisplay(place, docStart) {
  function loadMode (line 194) | function loadMode(cm) {
  function wrappingChanged (line 206) | function wrappingChanged(cm) {
  function estimateHeight (line 220) | function estimateHeight(cm) {
  function estimateLineHeights (line 233) | function estimateLineHeights(cm) {
  function keyMapChanged (line 241) | function keyMapChanged(cm) {
  function themeChanged (line 248) | function themeChanged(cm) {
  function guttersChanged (line 254) | function guttersChanged(cm) {
  function updateGutters (line 260) | function updateGutters(cm) {
  function lineLength (line 274) | function lineLength(doc, line) {
  function computeMaxLength (line 292) | function computeMaxLength(cm) {
  function setGuttersForLineNumbers (line 308) | function setGuttersForLineNumbers(options) {
  function updateScrollbars (line 322) | function updateScrollbars(cm) {
  function visibleLines (line 364) | function visibleLines(display, doc, viewPort) {
  function alignHorizontally (line 375) | function alignHorizontally(cm) {
  function maybeUpdateLineNumberWidth (line 387) | function maybeUpdateLineNumberWidth(cm) {
  function lineNumberFor (line 404) | function lineNumberFor(options, i) {
  function compensateForHScroll (line 407) | function compensateForHScroll(display) {
  function updateDisplay (line 413) | function updateDisplay(cm, changes, viewPort, forced) {
  function updateDisplayInner (line 449) | function updateDisplayInner(cm, changes, visible, forced) {
  function updateHeightsInViewport (line 542) | function updateHeightsInViewport(cm) {
  function updateViewOffset (line 565) | function updateViewOffset(cm) {
  function computeIntact (line 571) | function computeIntact(intact, changes) {
  function getDimensions (line 592) | function getDimensions(cm) {
  function patchDisplay (line 605) | function patchDisplay(cm, from, to, intact, updateNumbersFrom) {
  function buildLineElement (line 672) | function buildLineElement(cm, line, lineNo, dims, reuse) {
  function positionLineWidget (line 750) | function positionLineWidget(widget, node, wrap, dims) {
  function updateSelection (line 770) | function updateSelection(cm) {
  function updateSelectionCursor (line 794) | function updateSelectionCursor(cm) {
  function updateSelectionRange (line 810) | function updateSelectionRange(cm) {
  function restartBlink (line 882) | function restartBlink(cm) {
  function startWorker (line 896) | function startWorker(cm, time) {
  function highlightWorker (line 901) | function highlightWorker(cm) {
  function findStartLine (line 941) | function findStartLine(cm, n, precise) {
  function getStateBefore (line 957) | function getStateBefore(cm, n, precise) {
  function paddingTop (line 975) | function paddingTop(display) {return display.lineSpace.offsetTop;}
  function paddingVert (line 976) | function paddingVert(display) {return display.mover.offsetHeight - displ...
  function paddingLeft (line 977) | function paddingLeft(display) {
  function measureChar (line 982) | function measureChar(cm, line, ch, data, bias) {
  function findCachedMeasurement (line 1004) | function findCachedMeasurement(cm, line) {
  function clearCachedMeasurement (line 1015) | function clearCachedMeasurement(cm, line) {
  function measureLine (line 1020) | function measureLine(cm, line) {
  function measureLineInner (line 1036) | function measureLineInner(cm, line) {
  function crudelyMeasureLine (line 1126) | function crudelyMeasureLine(cm, line) {
  function measureLineWidth (line 1135) | function measureLineWidth(cm, line) {
  function clearCaches (line 1151) | function clearCaches(cm) {
  function pageScrollX (line 1158) | function pageScrollX() { return window.pageXOffset || (document.document...
  function pageScrollY (line 1159) | function pageScrollY() { return window.pageYOffset || (document.document...
  function intoCoordSystem (line 1162) | function intoCoordSystem(cm, lineObj, rect, context) {
  function fromCoordSystem (line 1184) | function fromCoordSystem(cm, coords, context) {
  function charCoords (line 1201) | function charCoords(cm, pos, context, lineObj, bias) {
  function cursorCoords (line 1206) | function cursorCoords(cm, pos, context, lineObj, measurement) {
  function PosWithInfo (line 1236) | function PosWithInfo(line, ch, outside, xRel) {
  function coordsChar (line 1244) | function coordsChar(cm, x, y) {
  function coordsCharInner (line 1265) | function coordsCharInner(cm, lineObj, lineNo, x, y) {
  function textHeight (line 1307) | function textHeight(display) {
  function charWidth (line 1326) | function charWidth(display) {
  function startOperation (line 1344) | function startOperation(cm) {
  function endOperation (line 1362) | function endOperation(cm) {
  function operation (line 1420) | function operation(cm1, f) {
  function docOperation (line 1429) | function docOperation(f) {
  function runInOp (line 1438) | function runInOp(cm, f) {
  function regChange (line 1446) | function regChange(cm, from, to, lendiff) {
  function slowPoll (line 1454) | function slowPoll(cm) {
  function fastPoll (line 1462) | function fastPoll(cm) {
  function readInput (line 1478) | function readInput(cm) {
  function resetInput (line 1517) | function resetInput(cm, user) {
  function focusInput (line 1534) | function focusInput(cm) {
  function isReadOnly (line 1539) | function isReadOnly(cm) {
  function registerEventHandlers (line 1545) | function registerEventHandlers(cm) {
  function eventInWidget (line 1672) | function eventInWidget(display, e) {
  function posFromMouse (line 1678) | function posFromMouse(cm, e, liberal) {
  function onMouseDown (line 1693) | function onMouseDown(e) {
  function gutterEvent (line 1834) | function gutterEvent(cm, e, type, prevent, signalfn) {
  function contextMenuInGutter (line 1857) | function contextMenuInGutter(cm, e) {
  function clickInGutter (line 1862) | function clickInGutter(cm, e) {
  function onDrop (line 1870) | function onDrop(e) {
  function onDragStart (line 1915) | function onDragStart(cm, e) {
  function setScrollTop (line 1938) | function setScrollTop(cm, val) {
  function setScrollLeft (line 1947) | function setScrollLeft(cm, val, isScroller) {
  function onScrollWheel (line 1977) | function onScrollWheel(cm, e) {
  function doHandleBinding (line 2045) | function doHandleBinding(cm, bound, dropShift) {
  function allKeyMaps (line 2065) | function allKeyMaps(cm) {
  function handleKeyBinding (line 2073) | function handleKeyBinding(cm, e) {
  function handleCharBinding (line 2110) | function handleCharBinding(cm, e, ch) {
  function onKeyDown (line 2122) | function onKeyDown(e) {
  function onKeyPress (line 2140) | function onKeyPress(e) {
  function onFocus (line 2156) | function onFocus(cm) {
  function onBlur (line 2171) | function onBlur(cm) {
  function onContextMenu (line 2182) | function onContextMenu(cm, e) {
  function clipPostChange (line 2255) | function clipPostChange(doc, change, pos) {
  function computeSelAfterChange (line 2271) | function computeSelAfterChange(doc, change, hint) {
  function filterChange (line 2294) | function filterChange(doc, change, update) {
  function makeChange (line 2318) | function makeChange(doc, change, selUpdate, ignoreReadOnly) {
  function makeChangeNoReadonly (line 2342) | function makeChangeNoReadonly(doc, change, selUpdate) {
  function makeChangeFromHistory (line 2359) | function makeChangeFromHistory(doc, type) {
  function shiftDoc (line 2399) | function shiftDoc(doc, distance) {
  function makeChangeSingleDoc (line 2407) | function makeChangeSingleDoc(doc, change, selAfter, spans) {
  function makeChangeSingleDocInEditor (line 2437) | function makeChangeSingleDocInEditor(cm, change, spans, selAfter) {
  function replaceRange (line 2489) | function replaceRange(doc, code, from, to, origin) {
  function Pos (line 2498) | function Pos(line, ch) {
  function posEq (line 2504) | function posEq(a, b) {return a.line == b.line && a.ch == b.ch;}
  function posLess (line 2505) | function posLess(a, b) {return a.line < b.line || (a.line == b.line && a...
  function copyPos (line 2506) | function copyPos(x) {return Pos(x.line, x.ch);}
  function clipLine (line 2510) | function clipLine(doc, n) {return Math.max(doc.first, Math.min(n, doc.fi...
  function clipPos (line 2511) | function clipPos(doc, pos) {
  function clipToLen (line 2517) | function clipToLen(pos, linelen) {
  function isLine (line 2523) | function isLine(doc, l) {return l >= doc.first && l < doc.first + doc.si...
  function extendSelection (line 2527) | function extendSelection(doc, pos, other, bias) {
  function filterSelectionChange (line 2546) | function filterSelectionChange(doc, anchor, head) {
  function setSelection (line 2557) | function setSelection(doc, anchor, head, bias, checkAtomic) {
  function reCheckSelection (line 2587) | function reCheckSelection(cm) {
  function skipAtomic (line 2591) | function skipAtomic(doc, pos, bias, mayClear) {
  function scrollCursorIntoView (line 2643) | function scrollCursorIntoView(cm) {
  function scrollPosIntoView (line 2661) | function scrollPosIntoView(cm, pos, end, margin) {
  function scrollIntoView (line 2683) | function scrollIntoView(cm, x1, y1, x2, y2) {
  function calculateScrollPos (line 2689) | function calculateScrollPos(cm, x1, y1, x2, y2) {
  function updateScrollPos (line 2715) | function updateScrollPos(cm, left, top) {
  function addToScrollPos (line 2720) | function addToScrollPos(cm, left, top) {
  function indentLine (line 2729) | function indentLine(cm, n, how, aggressive) {
  function changeLine (line 2769) | function changeLine(cm, handle, op) {
  function findPosH (line 2779) | function findPosH(doc, pos, dir, unit, visually) {
  function findPosV (line 2824) | function findPosV(cm, pos, dir, unit) {
  function findWordAt (line 2841) | function findWordAt(line, pos) {
  function selectLine (line 2855) | function selectLine(cm, line) {
  function interpret (line 3208) | function interpret(val) {
  function option (line 3253) | function option(name, deflt, handle, notOnInit) {
  function copyState (line 3427) | function copyState(mode, state) {
  function startState (line 3440) | function startState(mode, a1, a2) {
  function getKeyMap (line 3582) | function getKeyMap(val) {
  function lookupKey (line 3587) | function lookupKey(name, maps, handle) {
  function isModifierKey (line 3611) | function isModifierKey(event) {
  function keyName (line 3615) | function keyName(event, noShift) {
  function save (line 3648) | function save() {textarea.value = cm.getValue();}
  function StringStream (line 3690) | function StringStream(string, tabSize) {
  function TextMarker (line 3756) | function TextMarker(doc, type) {
  function markText (line 3850) | function markText(doc, from, to, options, type) {
  function SharedTextMarker (line 3912) | function SharedTextMarker(markers, primary) {
  function markTextShared (line 3934) | function markTextShared(doc, from, to, options, type) {
  function getMarkedSpanFor (line 3951) | function getMarkedSpanFor(spans, marker) {
  function removeMarkedSpan (line 3957) | function removeMarkedSpan(spans, span) {
  function addMarkedSpan (line 3962) | function addMarkedSpan(line, span) {
  function markedSpansBefore (line 3967) | function markedSpansBefore(old, startCh, isInsert) {
  function markedSpansAfter (line 3981) | function markedSpansAfter(old, endCh, isInsert) {
  function stretchSpansOverChange (line 3995) | function stretchSpansOverChange(doc, change) {
  function mergeOldSpans (line 4058) | function mergeOldSpans(doc, change) {
  function removeReadOnlyRanges (line 4080) | function removeReadOnlyRanges(doc, from, to) {
  function collapsedSpanAt (line 4108) | function collapsedSpanAt(line, ch) {
  function collapsedSpanAtStart (line 4120) | function collapsedSpanAtStart(line) { return collapsedSpanAt(line, -1); }
  function collapsedSpanAtEnd (line 4121) | function collapsedSpanAtEnd(line) { return collapsedSpanAt(line, line.te...
  function visualLine (line 4123) | function visualLine(doc, line) {
  function lineIsHidden (line 4130) | function lineIsHidden(doc, line) {
  function lineIsHiddenInner (line 4141) | function lineIsHiddenInner(doc, line, span) {
  function detachMarkedSpans (line 4156) | function detachMarkedSpans(line) {
  function attachMarkedSpans (line 4164) | function attachMarkedSpans(line, spans) {
  function widgetOperation (line 4180) | function widgetOperation(f) {
  function widgetHeight (line 4209) | function widgetHeight(widget) {
  function addLineWidget (line 4216) | function addLineWidget(cm, handle, node, options) {
  function updateLine (line 4245) | function updateLine(line, text, markedSpans, estimateHeight) {
  function cleanUpLine (line 4256) | function cleanUpLine(line) {
  function runMode (line 4264) | function runMode(cm, text, mode, state, f) {
  function highlightLine (line 4292) | function highlightLine(cm, line, state) {
  function getLineStyles (line 4328) | function getLineStyles(cm, line) {
  function processLine (line 4336) | function processLine(cm, line, state) {
  function interpretTokenStyle (line 4347) | function interpretTokenStyle(style, builder) {
  function buildLineContent (line 4363) | function buildLineContent(cm, realLine, measure, copyWidgets) {
  function buildToken (line 4415) | function buildToken(builder, text, style, startStyle, endStyle, title) {
  function buildTokenMeasure (line 4455) | function buildTokenMeasure(builder, text, style, startStyle, endStyle) {
  function buildTokenSplitSpaces (line 4481) | function buildTokenSplitSpaces(inner) {
  function buildCollapsedSpan (line 4493) | function buildCollapsedSpan(builder, size, marker, ignoreWidget) {
  function insertLineContent (line 4518) | function insertLineContent(line, builder, styles) {
  function updateDoc (line 4579) | function updateDoc(doc, change, markedSpans, selAfter, estimateHeight) {
  function LeafChunk (line 4625) | function LeafChunk(lines) {
  function BranchChunk (line 4660) | function BranchChunk(children) {
  function linkedDocs (line 5001) | function linkedDocs(doc, f, sharedHistOnly) {
  function attachDoc (line 5015) | function attachDoc(cm, doc) {
  function getLine (line 5028) | function getLine(chunk, n) {
  function getBetween (line 5040) | function getBetween(doc, start, end) {
  function getLines (line 5051) | function getLines(doc, from, to) {
  function updateLineHeight (line 5057) | function updateLineHeight(line, height) {
  function lineNo (line 5062) | function lineNo(line) {
  function lineAtHeight (line 5074) | function lineAtHeight(chunk, h) {
  function heightAtLine (line 5093) | function heightAtLine(cm, lineObj) {
  function getOrder (line 5112) | function getOrder(line) {
  function makeHistory (line 5120) | function makeHistory(startGen) {
  function attachLocalSpans (line 5134) | function attachLocalSpans(doc, change, from, to) {
  function historyChangeFromChange (line 5143) | function historyChangeFromChange(doc, change) {
  function addToHistory (line 5151) | function addToHistory(doc, change, selAfter, opId) {
  function removeClearedSpans (line 5188) | function removeClearedSpans(spans) {
  function getOldSpans (line 5197) | function getOldSpans(doc, change) {
  function copyHistoryArray (line 5207) | function copyHistoryArray(events, newGroup) {
  function rebaseHistSel (line 5228) | function rebaseHistSel(pos, from, to, diff) {
  function rebaseHistArray (line 5244) | function rebaseHistArray(array, from, to, diff) {
  function rebaseHist (line 5273) | function rebaseHist(hist, change) {
  function stopMethod (line 5281) | function stopMethod() {e_stop(this);}
  function addStop (line 5283) | function addStop(event) {
  function e_preventDefault (line 5288) | function e_preventDefault(e) {
  function e_stopPropagation (line 5292) | function e_stopPropagation(e) {
  function e_defaultPrevented (line 5296) | function e_defaultPrevented(e) {
  function e_stop (line 5299) | function e_stop(e) {e_preventDefault(e); e_stopPropagation(e);}
  function e_target (line 5304) | function e_target(e) {return e.target || e.srcElement;}
  function e_button (line 5305) | function e_button(e) {
  function on (line 5318) | function on(emitter, type, f) {
  function off (line 5330) | function off(emitter, type, f) {
  function signal (line 5343) | function signal(emitter, type /*, values...*/) {
  function signalLater (line 5351) | function signalLater(emitter, type /*, values...*/) {
  function signalDOMEvent (line 5365) | function signalDOMEvent(cm, e, override) {
  function fireDelayed (line 5370) | function fireDelayed() {
  function hasHandler (line 5377) | function hasHandler(emitter, type) {
  function eventMixin (line 5384) | function eventMixin(ctor) {
  function Delayed (line 5398) | function Delayed() {this.id = null;}
  function countColumn (line 5403) | function countColumn(string, end, tabSize, startIndex, startValue) {
  function spaceStr (line 5417) | function spaceStr(n) {
  function lst (line 5423) | function lst(arr) { return arr[arr.length-1]; }
  function selectInput (line 5425) | function selectInput(node) {
  function indexOf (line 5436) | function indexOf(collection, elt) {
  function createObj (line 5443) | function createObj(base, props) {
  function copyObj (line 5451) | function copyObj(obj, target) {
  function emptyArray (line 5457) | function emptyArray(size) {
  function bind (line 5462) | function bind(f) {
  function isWordChar (line 5468) | function isWordChar(ch) {
  function isEmpty (line 5473) | function isEmpty(obj) {
  function elt (line 5482) | function elt(tag, content, className, style) {
  function removeChildren (line 5491) | function removeChildren(e) {
  function removeChildrenAndAdd (line 5497) | function removeChildrenAndAdd(parent, e) {
  function setTextContent (line 5501) | function setTextContent(e, str) {
  function getRect (line 5508) | function getRect(node) {
  function spanAffectsWrapping (line 5531) | function spanAffectsWrapping() { return false; }
  function scrollbarWidth (line 5555) | function scrollbarWidth(measure) {
  function zeroWidthElement (line 5565) | function zeroWidthElement(measure) {
  function iterateBidiSections (line 5635) | function iterateBidiSections(order, from, to, f) {
  function bidiLeft (line 5648) | function bidiLeft(part) { return part.level % 2 ? part.to : part.from; }
  function bidiRight (line 5649) | function bidiRight(part) { return part.level % 2 ? part.from : part.to; }
  function lineLeft (line 5651) | function lineLeft(line) { var order = getOrder(line); return order ? bid...
  function lineRight (line 5652) | function lineRight(line) {
  function lineStart (line 5658) | function lineStart(cm, lineN) {
  function lineEnd (line 5666) | function lineEnd(cm, lineN) {
  function compareBidiLevel (line 5675) | function compareBidiLevel(order, a, b) {
  function getBidiPartAt (line 5682) | function getBidiPartAt(order, pos) {
  function moveInLine (line 5702) | function moveInLine(line, pos, dir, byUnit) {
  function moveVisually (line 5715) | function moveVisually(line, start, dir, byUnit) {
  function moveLogically (line 5738) | function moveLogically(line, start, dir, byUnit) {
  function charType (line 5772) | function charType(code) {

FILE: public/packages/codemirror-3.19/mode/asterisk/asterisk.js
  function basicToken (line 53) | function basicToken(stream,state){

FILE: public/packages/codemirror-3.19/mode/clike/clike.js
  function tokenBase (line 15) | function tokenBase(stream, state) {
  function tokenString (line 61) | function tokenString(quote) {
  function tokenComment (line 74) | function tokenComment(stream, state) {
  function Context (line 86) | function Context(indented, column, type, align, prev) {
  function pushContext (line 93) | function pushContext(state, col, type) {
  function popContext (line 99) | function popContext(state) {
  function words (line 167) | function words(str) {
  function cppHook (line 176) | function cppHook(stream, state) {
  function tokenAtString (line 195) | function tokenAtString(stream, state) {
  function mimes (line 206) | function mimes(ms, mode) {

FILE: public/packages/codemirror-3.19/mode/clojure/clojure.js
  function makeKeywords (line 10) | function makeKeywords(str) {
  function stateStack (line 50) | function stateStack(indent, type, prev) { // represents a state stack ob...
  function pushStack (line 56) | function pushStack(state, indent, type) {
  function popStack (line 60) | function popStack(state) {
  function isNumber (line 64) | function isNumber(ch, stream){
  function eatCharacter (line 98) | function eatCharacter(stream) {

FILE: public/packages/codemirror-3.19/mode/cobol/cobol.js
  function makeKeywords (line 9) | function makeKeywords(str) {
  function isNumber (line 137) | function isNumber(ch, stream){

FILE: public/packages/codemirror-3.19/mode/coffeescript/coffeescript.js
  function wordRegexp (line 8) | function wordRegexp(words) {
  function tokenBase (line 37) | function tokenBase(stream, state) {
  function tokenFactory (line 164) | function tokenFactory(delimiter, outclass) {
  function longComment (line 192) | function longComment(stream, state) {
  function indent (line 204) | function indent(stream, state, type) {
  function dedent (line 226) | function dedent(stream, state) {
  function tokenLexer (line 250) | function tokenLexer(stream, state) {

FILE: public/packages/codemirror-3.19/mode/commonlisp/commonlisp.js
  function readSym (line 7) | function readSym(stream) {
  function base (line 16) | function base(stream, state) {
  function inString (line 49) | function inString(stream, state) {
  function inComment (line 58) | function inComment(stream, state) {

FILE: public/packages/codemirror-3.19/mode/css/css.js
  function ret (line 16) | function ret(style, tp) { type = tp; return style; }
  function tokenBase (line 18) | function tokenBase(stream, state) {
  function tokenString (line 75) | function tokenString(quote, nonInclusive) {
  function tokenParenthesized (line 91) | function tokenParenthesized(stream, state) {
  function keySet (line 316) | function keySet(array) {
  function tokenCComment (line 544) | function tokenCComment(stream, state) {
  function tokenSGMLComment (line 564) | function tokenSGMLComment(stream, state) {

FILE: public/packages/codemirror-3.19/mode/css/scss_test.js
  function MT (line 3) | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arg...
  function IT (line 4) | function IT(name) { test.indentation(name, mode, Array.prototype.slice.c...

FILE: public/packages/codemirror-3.19/mode/css/test.js
  function MT (line 3) | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arg...
  function IT (line 4) | function IT(name) { test.indentation(name, mode, Array.prototype.slice.c...

FILE: public/packages/codemirror-3.19/mode/d/d.js
  function tokenBase (line 14) | function tokenBase(stream, state) {
  function tokenString (line 64) | function tokenString(quote) {
  function tokenComment (line 77) | function tokenComment(stream, state) {
  function tokenNestedComment (line 89) | function tokenNestedComment(stream, state) {
  function Context (line 101) | function Context(indented, column, type, align, prev) {
  function pushContext (line 108) | function pushContext(state, col, type) {
  function popContext (line 114) | function popContext(state) {
  function words (line 177) | function words(str) {

FILE: public/packages/codemirror-3.19/mode/dtd/dtd.js
  function ret (line 10) | function ret(style, tp) {type = tp; return style;}
  function tokenBase (line 12) | function tokenBase(stream, state) {
  function tokenSGMLComment (line 41) | function tokenSGMLComment(stream, state) {
  function tokenString (line 53) | function tokenString(quote) {
  function inBlock (line 67) | function inBlock(style, terminator) {

FILE: public/packages/codemirror-3.19/mode/ecl/ecl.js
  function words (line 3) | function words(str) {
  function metaHook (line 9) | function metaHook(stream, state) {
  function tokenBase (line 29) | function tokenBase(stream, state) {
  function tokenString (line 95) | function tokenString(quote) {
  function tokenComment (line 108) | function tokenComment(stream, state) {
  function Context (line 120) | function Context(indented, column, type, align, prev) {
  function pushContext (line 127) | function pushContext(state, col, type) {
  function popContext (line 130) | function popContext(state) {

FILE: public/packages/codemirror-3.19/mode/eiffel/eiffel.js
  function wordObj (line 2) | function wordObj(words) {
  function chain (line 76) | function chain(newtok, stream, state) {
  function tokenBase (line 81) | function tokenBase(stream, state) {
  function readQuoted (line 108) | function readQuoted(quote, style,  unescaped) {

FILE: public/packages/codemirror-3.19/mode/erlang/erlang.js
  function rval (line 14) | function rval(state,_stream,type) {
  function tokenize (line 108) | function tokenize(stream, state) {
  function isPrev (line 280) | function isPrev(stream,string) {
  function nongreedy (line 291) | function nongreedy(stream,re,words) {
  function greedy (line 305) | function greedy(stream,re,words) {
  function doubleQuote (line 322) | function doubleQuote(stream) {
  function singleQuote (line 326) | function singleQuote(stream) {
  function quote (line 330) | function quote(stream,quoteChar,escapeChar) {
  function isMember (line 342) | function isMember(element,list) {
  function myIndent (line 347) | function myIndent(state,textAfter) {
  function takewhile (line 379) | function takewhile(str,re) {
  function Token (line 384) | function Token(stream) {
  function popToken (line 390) | function popToken(state) {
  function peekToken (line 394) | function peekToken(state,depth) {
  function pushToken (line 404) | function pushToken(state,stream) {
  function drop_last (line 429) | function drop_last(open, close) {
  function drop_first (line 436) | function drop_first(open, close) {
  function drop_both (line 444) | function drop_both(open, close) {

FILE: public/packages/codemirror-3.19/mode/fortran/fortran.js
  function words (line 2) | function words(array) {
  function tokenBase (line 104) | function tokenBase(stream, state) {
  function tokenString (line 142) | function tokenString(quote) {

FILE: public/packages/codemirror-3.19/mode/gas/gas.js
  function x86 (line 131) | function x86(_parserConfig) {
  function armv6 (line 178) | function armv6(_parserConfig) {
  function nextUntilUnescaped (line 221) | function nextUntilUnescaped(stream, end) {
  function clikeComment (line 232) | function clikeComment(stream, state) {

FILE: public/packages/codemirror-3.19/mode/gfm/gfm.js
  function blankLine (line 3) | function blankLine(state) {

FILE: public/packages/codemirror-3.19/mode/gfm/test.js
  function MT (line 3) | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arg...

FILE: public/packages/codemirror-3.19/mode/go/go.js
  function tokenBase (line 27) | function tokenBase(stream, state) {
  function tokenString (line 71) | function tokenString(quote) {
  function tokenComment (line 84) | function tokenComment(stream, state) {
  function Context (line 96) | function Context(indented, column, type, align, prev) {
  function pushContext (line 103) | function pushContext(state, col, type) {
  function popContext (line 106) | function popContext(state) {

FILE: public/packages/codemirror-3.19/mode/groovy/groovy.js
  function words (line 2) | function words(str) {
  function tokenBase (line 17) | function tokenBase(stream, state) {
  function startString (line 66) | function startString(quote, stream, state) {
  function tokenBaseUntilBrace (line 92) | function tokenBaseUntilBrace() {
  function tokenComment (line 110) | function tokenComment(stream, state) {
  function expectExpression (line 122) | function expectExpression(last) {
  function Context (line 127) | function Context(indented, column, type, align, prev) {
  function pushContext (line 134) | function pushContext(state, col, type) {
  function popContext (line 137) | function popContext(state) {

FILE: public/packages/codemirror-3.19/mode/haml/haml.js
  function rubyInQuote (line 9) | function rubyInQuote(endQuote) {
  function ruby (line 23) | function ruby(stream, state) {
  function html (line 31) | function html(stream, state) {

FILE: public/packages/codemirror-3.19/mode/haml/test.js
  function MT (line 3) | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arg...

FILE: public/packages/codemirror-3.19/mode/haskell/haskell.js
  function switchState (line 3) | function switchState(source, setState, f) {
  function normal (line 19) | function normal(source, setState) {
  function ncomment (line 110) | function ncomment(type, nest) {
  function stringLiteral (line 134) | function stringLiteral(source, setState) {
  function stringGap (line 157) | function stringGap(source, setState) {
  function setType (line 169) | function setType(t) {

FILE: public/packages/codemirror-3.19/mode/haxe/haxe.js
  function kw (line 7) | function kw(type) {return {type: type, style: "keyword"};}
  function chain (line 26) | function chain(stream, state, f) {
  function nextUntilUnescaped (line 31) | function nextUntilUnescaped(stream, end) {
  function ret (line 44) | function ret(tp, style, cont) {
  function haxeTokenBase (line 49) | function haxeTokenBase(stream, state) {
  function haxeTokenString (line 112) | function haxeTokenString(quote) {
  function haxeTokenComment (line 120) | function haxeTokenComment(stream, state) {
  function HaxeLexical (line 136) | function HaxeLexical(indented, column, type, align, prev, info) {
  function inScope (line 145) | function inScope(state, varname) {
  function parseHaxe (line 150) | function parseHaxe(state, style, type, content, stream) {
  function imported (line 172) | function imported(state, typename)
  function registerimport (line 182) | function registerimport(importname) {
  function pass (line 191) | function pass() {
  function cont (line 194) | function cont() {
  function register (line 198) | function register(varname) {
  function pushcontext (line 211) | function pushcontext() {
  function popcontext (line 215) | function popcontext() {
  function pushlex (line 219) | function pushlex(type, info) {
  function poplex (line 227) | function poplex() {
  function expect (line 237) | function expect(wanted) {
  function statement (line 245) | function statement(type) {
  function expression (line 267) | function expression(type) {
  function maybeexpression (line 277) | function maybeexpression(type) {
  function maybeoperator (line 282) | function maybeoperator(type, value) {
  function maybeattribute (line 291) | function maybeattribute(type) {
  function metadef (line 297) | function metadef(type) {
  function metaargs (line 302) | function metaargs(type) {
  function importdef (line 306) | function importdef (type, value) {
  function typedef (line 311) | function typedef (type, value)
  function maybelabel (line 316) | function maybelabel(type) {
  function property (line 320) | function property(type) {
  function objprop (line 323) | function objprop(type) {
  function commasep (line 327) | function commasep(what, end) {
  function block (line 338) | function block(type) {
  function vardef1 (line 342) | function vardef1(type, value) {
  function vardef2 (line 346) | function vardef2(type, value) {
  function forspec1 (line 350) | function forspec1(type, value) {
  function forin (line 356) | function forin(_type, value) {
  function functiondef (line 359) | function functiondef(type, value) {
  function typeuse (line 364) | function typeuse(type) {
  function typestring (line 367) | function typestring(type) {
  function typeprop (line 372) | function typeprop(type) {
  function funarg (line 375) | function funarg(type, value) {

FILE: public/packages/codemirror-3.19/mode/htmlembedded/htmlembedded.js
  function htmlDispatch (line 11) | function htmlDispatch(stream, state) {
  function scriptingDispatch (line 21) | function scriptingDispatch(stream, state) {

FILE: public/packages/codemirror-3.19/mode/htmlmixed/htmlmixed.js
  function html (line 15) | function html(stream, state) {
  function maybeBackup (line 41) | function maybeBackup(stream, pat, style) {
  function script (line 51) | function script(stream, state) {
  function css (line 60) | function css(stream, state) {

FILE: public/packages/codemirror-3.19/mode/http/http.js
  function failFirstLine (line 2) | function failFirstLine(stream, state) {
  function start (line 8) | function start(stream, state) {
  function responseStatusCode (line 20) | function responseStatusCode(stream, state) {
  function responseStatusText (line 41) | function responseStatusText(stream, state) {
  function requestPath (line 47) | function requestPath(stream, state) {
  function requestProtocol (line 53) | function requestProtocol(stream, state) {
  function header (line 62) | function header(stream) {
  function body (line 76) | function body(stream) {

FILE: public/packages/codemirror-3.19/mode/javascript/javascript.js
  function kw (line 12) | function kw(type) {return {type: type, style: "keyword"};}
  function chain (line 59) | function chain(stream, state, f) {
  function nextUntilUnescaped (line 64) | function nextUntilUnescaped(stream, end) {
  function ret (line 77) | function ret(tp, style, cont) {
  function jsTokenBase (line 81) | function jsTokenBase(stream, state) {
  function jsTokenString (line 132) | function jsTokenString(quote) {
  function jsTokenComment (line 140) | function jsTokenComment(stream, state) {
  function JSLexical (line 156) | function JSLexical(indented, column, type, align, prev, info) {
  function inScope (line 165) | function inScope(state, varname) {
  function parseJS (line 170) | function parseJS(state, style, type, content, stream) {
  function pass (line 194) | function pass() {
  function cont (line 197) | function cont() {
  function register (line 201) | function register(varname) {
  function pushcontext (line 221) | function pushcontext() {
  function popcontext (line 225) | function popcontext() {
  function pushlex (line 229) | function pushlex(type, info) {
  function poplex (line 238) | function poplex() {
  function expect (line 248) | function expect(wanted) {
  function statement (line 256) | function statement(type) {
  function expression (line 275) | function expression(type) {
  function expressionNoComma (line 278) | function expressionNoComma(type) {
  function expressionInner (line 281) | function expressionInner(type, noComma) {
  function maybeexpression (line 292) | function maybeexpression(type) {
  function maybeexpressionNoComma (line 296) | function maybeexpressionNoComma(type) {
  function maybeoperatorComma (line 301) | function maybeoperatorComma(type, value) {
  function maybeoperatorNoComma (line 305) | function maybeoperatorNoComma(type, value, noComma) {
  function maybelabel (line 318) | function maybelabel(type) {
  function property (line 322) | function property(type) {
  function objprop (line 325) | function objprop(type, value) {
  function getterSetter (line 334) | function getterSetter(type) {
  function commasep (line 340) | function commasep(what, end) {
  function block (line 355) | function block(type) {
  function maybetype (line 359) | function maybetype(type) {
  function typedef (line 363) | function typedef(type) {
  function vardef1 (line 367) | function vardef1(type, value) {
  function vardef2 (line 374) | function vardef2(type, value) {
  function maybeelse (line 378) | function maybeelse(type, value) {
  function forspec1 (line 381) | function forspec1(type) {
  function formaybein (line 387) | function formaybein(_type, value) {
  function forspec2 (line 391) | function forspec2(type, value) {
  function forspec3 (line 396) | function forspec3(type) {
  function functiondef (line 399) | function functiondef(type, value) {
  function funarg (line 403) | function funarg(type, value) {

FILE: public/packages/codemirror-3.19/mode/javascript/test.js
  function MT (line 3) | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arg...

FILE: public/packages/codemirror-3.19/mode/jinja2/jinja2.js
  function tokenBase (line 7) | function tokenBase (stream, state) {
  function inTag (line 17) | function inTag (close) {

FILE: public/packages/codemirror-3.19/mode/less/less.js
  function ret (line 10) | function ret(style, tp) {type = tp; return style;}
  function tokenBase (line 14) | function tokenBase(stream, state) {
  function tokenSComment (line 242) | function tokenSComment(stream, state) { // SComment = Slash comment
  function tokenCComment (line 248) | function tokenCComment(stream, state) {
  function tokenSGMLComment (line 260) | function tokenSGMLComment(stream, state) {
  function tokenString (line 272) | function tokenString(quote) {

FILE: public/packages/codemirror-3.19/mode/lua/lua.js
  function prefixRE (line 8) | function prefixRE(words) {
  function wordRE (line 11) | function wordRE(words) {
  function readBracket (line 57) | function readBracket(stream) {
  function normal (line 64) | function normal(stream, state) {
  function bracketed (line 87) | function bracketed(level, style) {
  function string (line 100) | function string(quote) {

FILE: public/packages/codemirror-3.19/mode/markdown/markdown.js
  function switchInline (line 80) | function switchInline(stream, state, f) {
  function switchBlock (line 85) | function switchBlock(stream, state, f) {
  function blankLine (line 93) | function blankLine(state) {
  function blockNormal (line 114) | function blockNormal(stream, state) {
  function htmlBlock (line 168) | function htmlBlock(stream, state) {
  function local (line 182) | function local(stream, state) {
  function getType (line 197) | function getType(state) {
  function handleText (line 232) | function handleText(stream, state) {
  function inlineNormal (line 239) | function inlineNormal(stream, state) {
  function linkHref (line 392) | function linkHref(stream, state) {
  function footnoteLink (line 404) | function footnoteLink(stream, state) {
  function footnoteUrl (line 412) | function footnoteUrl(stream, state) {
  function inlineRE (line 430) | function inlineRE(endChar) {
  function inlineElement (line 441) | function inlineElement(type, endChar, next) {

FILE: public/packages/codemirror-3.19/mode/markdown/test.js
  function MT (line 3) | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arg...

FILE: public/packages/codemirror-3.19/mode/mirc/mirc.js
  function parseWords (line 4) | function parseWords(str) {
  function chain (line 72) | function chain(stream, state, f) {
  function tokenBase (line 76) | function tokenBase(stream, state) {
  function tokenComment (line 139) | function tokenComment(stream, state) {
  function tokenUnparsed (line 150) | function tokenUnparsed(stream, state) {

FILE: public/packages/codemirror-3.19/mode/nginx/nginx.js
  function words (line 3) | function words(str) {
  function ret (line 23) | function ret(style, tp) {type = tp; return style;}
  function tokenBase (line 25) | function tokenBase(stream, state) {
  function tokenCComment (line 84) | function tokenCComment(stream, state) {
  function tokenSGMLComment (line 96) | function tokenSGMLComment(stream, state) {
  function tokenString (line 108) | function tokenString(quote) {

FILE: public/packages/codemirror-3.19/mode/ntriples/ntriples.js
  function transitState (line 45) | function transitState(currState, c) {

FILE: public/packages/codemirror-3.19/mode/ocaml/ocaml.js
  function tokenBase (line 39) | function tokenBase(stream, state) {
  function tokenString (line 76) | function tokenString(stream, state) {
  function tokenComment (line 91) | function tokenComment(stream, state) {

FILE: public/packages/codemirror-3.19/mode/octave/octave.js
  function wordRegexp (line 2) | function wordRegexp(words) {
  function tokenTranspose (line 31) | function tokenTranspose(stream, state) {
  function tokenComment (line 42) | function tokenComment(stream, state) {
  function tokenBase (line 51) | function tokenBase(stream, state) {

FILE: public/packages/codemirror-3.19/mode/pascal/pascal.js
  function words (line 2) | function words(str) {
  function tokenBase (line 14) | function tokenBase(stream, state) {
  function tokenString (line 52) | function tokenString(quote) {
  function tokenComment (line 64) | function tokenComment(stream, state) {

FILE: public/packages/codemirror-3.19/mode/perl/perl.js
  function tokenChain (line 469) | function tokenChain(stream,state,chain,style,tail){     // NOTE: chain.l...
  function tokenSOMETHING (line 489) | function tokenSOMETHING(stream,state,string){
  function tokenPerl (line 497) | function tokenPerl(stream,state){

FILE: public/packages/codemirror-3.19/mode/php/php.js
  function keywords (line 2) | function keywords(str) {
  function heredoc (line 7) | function heredoc(delim) {
  function dispatch (line 57) | function dispatch(stream, state) {

FILE: public/packages/codemirror-3.19/mode/pig/pig.js
  function chain (line 15) | function chain(stream, state, f) {
  function ret (line 21) | function ret(tp, style) {
  function tokenComment (line 26) | function tokenComment(stream, state) {
  function tokenString (line 39) | function tokenString(quote) {
  function tokenBase (line 54) | function tokenBase(stream, state) {
  function keywords (line 137) | function keywords(str) {

FILE: public/packages/codemirror-3.19/mode/python/python.js
  function wordRegexp (line 4) | function wordRegexp(words) {
  function tokenBase (line 60) | function tokenBase(stream, state) {
  function tokenStringFactory (line 165) | function tokenStringFactory(delimiter) {
  function indent (line 200) | function indent(stream, state, type) {
  function dedent (line 223) | function dedent(stream, state, type) {
  function tokenLexer (line 256) | function tokenLexer(stream, state) {

FILE: public/packages/codemirror-3.19/mode/q/q.js
  function buildRE (line 6) | function buildRE(w){return new RegExp("^("+w.join("|")+")$");}
  function tokenBase (line 7) | function tokenBase(stream,state){
  function tokenLineComment (line 49) | function tokenLineComment(stream,state){
  function tokenBlockComment (line 52) | function tokenBlockComment(stream,state){
  function tokenCommentToEOF (line 59) | function tokenCommentToEOF(stream){return stream.skipToEnd(),"comment";}
  function tokenString (line 60) | function tokenString(stream,state){
  function pushContext (line 69) | function pushContext(state,type,col){state.context={prev:state.context,i...
  function popContext (line 70) | function popContext(state){state.indent=state.context.indent;state.conte...

FILE: public/packages/codemirror-3.19/mode/r/r.js
  function wordObj (line 2) | function wordObj(str) {
  function tokenBase (line 14) | function tokenBase(stream, state) {
  function tokenString (line 64) | function tokenString(quote) {
  function push (line 85) | function push(state, type, stream) {
  function pop (line 92) | function pop(state) {

FILE: public/packages/codemirror-3.19/mode/rst/rst.js
  function format (line 6) | function format(string) {
  function AssertException (line 13) | function AssertException(message) {
  function assert (line 21) | function assert(expression, message) {
  function to_normal (line 99) | function to_normal(stream, state) {
  function to_explicit (line 304) | function to_explicit(stream, state) {
  function to_comment (line 414) | function to_comment(stream, state) {
  function to_verbatim (line 418) | function to_verbatim(stream, state) {
  function as_block (line 422) | function as_block(stream, state, token) {
  function to_mode (line 435) | function to_mode(stream, state) {
  function context (line 454) | function context(phase, stage, mode, local) {
  function change (line 458) | function change(state, tok, ctx) {
  function stage (line 463) | function stage(state) {
  function phase (line 467) | function phase(state) {

FILE: public/packages/codemirror-3.19/mode/ruby/ruby.js
  function wordObj (line 2) | function wordObj(words) {
  function chain (line 21) | function chain(newtok, stream, state) {
  function tokenBase (line 26) | function tokenBase(stream, state) {
  function tokenBaseUntilBrace (line 123) | function tokenBaseUntilBrace() {
  function tokenBaseOnce (line 138) | function tokenBaseOnce() {
  function readQuoted (line 149) | function readQuoted(quote, style, embed, unescaped) {
  function readHereDoc (line 180) | function readHereDoc(phrase) {
  function readBlockComment (line 187) | function readBlockComment(stream, state) {

FILE: public/packages/codemirror-3.19/mode/rust/rust.js
  function r (line 27) | function r(tc, style) {
  function tokenBase (line 32) | function tokenBase(stream, state) {
  function tokenString (line 91) | function tokenString(stream, state) {
  function tokenComment (line 105) | function tokenComment(depth) {
  function pass (line 131) | function pass() {
  function cont (line 134) | function cont() {
  function pushlex (line 139) | function pushlex(type, info) {
  function poplex (line 148) | function poplex() {
  function typecx (line 156) | function typecx() { cx.state.keywords = typeKeywords; }
  function valcx (line 157) | function valcx() { cx.state.keywords = valKeywords; }
  function commasep (line 160) | function commasep(comb, end) {
  function stat_of (line 172) | function stat_of(comb, tag) {
  function block (line 175) | function block(type) {
  function endstatement (line 188) | function endstatement(type) {
  function expression (line 192) | function expression(type) {
  function maybeop (line 205) | function maybeop(type) {
  function maybeprop (line 212) | function maybeprop() {
  function exprbrace (line 216) | function exprbrace(type) {
  function record_of (line 226) | function record_of(comb) {
  function blockvars (line 236) | function blockvars(type) {
  function letdef1 (line 242) | function letdef1(type) {
  function letdef2 (line 248) | function letdef2(type) {
  function maybetype (line 252) | function maybetype(type) {
  function inop (line 256) | function inop(type) {
  function fndef (line 260) | function fndef(type) {
  function tydef (line 270) | function tydef(type) {
  function enumdef (line 276) | function enumdef(type) {
  function enumblock (line 283) | function enumblock(type) {
  function mod (line 289) | function mod(type) {
  function iface (line 294) | function iface(type) {
  function impl (line 300) | function impl(type) {
  function typarams (line 307) | function typarams() {
  function argdef (line 313) | function argdef(type) {
  function rtype (line 318) | function rtype(type) {
  function rtypemaybeparam (line 327) | function rtypemaybeparam() {
  function fntype (line 331) | function fntype(type) {
  function pattern (line 336) | function pattern(type) {
  function patternmaybeop (line 343) | function patternmaybeop(type) {
  function altbody (line 348) | function altbody(type) {
  function altblock1 (line 352) | function altblock1(type) {
  function altblock2 (line 359) | function altblock2(type) {
  function macro (line 364) | function macro(type) {
  function matchBrackets (line 368) | function matchBrackets(type, comb) {
  function parse (line 375) | function parse(state, stream, style) {

FILE: public/packages/codemirror-3.19/mode/sass/sass.js
  function stringTokenizer (line 49) | function stringTokenizer(stream, state){

FILE: public/packages/codemirror-3.19/mode/scheme/scheme.js
  function makeKeywords (line 9) | function makeKeywords(str) {
  function stateStack (line 18) | function stateStack(indent, type, prev) { // represents a state stack ob...
  function pushStack (line 24) | function pushStack(state, indent, type) {
  function popStack (line 28) | function popStack(state) {
  function isBinaryNumber (line 37) | function isBinaryNumber (stream) {
  function isOctalNumber (line 41) | function isOctalNumber (stream) {
  function isDecimalNumber (line 45) | function isDecimalNumber (stream, backup) {
  function isHexNumber (line 52) | function isHexNumber (stream) {

FILE: public/packages/codemirror-3.19/mode/shell/shell.js
  function define (line 4) | function define(style, string) {
  function tokenBase (line 25) | function tokenBase(stream, state) {
  function tokenString (line 66) | function tokenString(quote) {
  function tokenize (line 105) | function tokenize(stream, state) {

FILE: public/packages/codemirror-3.19/mode/sieve/sieve.js
  function words (line 7) | function words(str) {
  function tokenBase (line 17) | function tokenBase(stream, state) {
  function tokenMultiLineString (line 104) | function tokenMultiLineString(stream, state)
  function tokenCComment (line 129) | function tokenCComment(stream, state) {
  function tokenString (line 141) | function tokenString(quote) {

FILE: public/packages/codemirror-3.19/mode/sparql/sparql.js
  function wordRegexp (line 5) | function wordRegexp(words) {
  function tokenBase (line 17) | function tokenBase(stream, state) {
  function tokenLiteral (line 64) | function tokenLiteral(quote) {
  function pushContext (line 78) | function pushContext(state, type, col) {
  function popContext (line 81) | function popContext(state) {

FILE: public/packages/codemirror-3.19/mode/sql/sql.js
  function tokenBase (line 13) | function tokenBase(stream, state) {
  function tokenLiteral (line 107) | function tokenLiteral(quote) {
  function tokenComment (line 120) | function tokenComment(stream, state) {
  function pushContext (line 136) | function pushContext(stream, state, type) {
  function popContext (line 145) | function popContext(state) {
  function hookIdentifier (line 195) | function hookIdentifier(stream) {
  function hookVar (line 206) | function hookVar(stream) {
  function hookClient (line 233) | function hookClient(stream) {
  function set (line 248) | function set(str) {

FILE: public/packages/codemirror-3.19/mode/stex/stex.js
  function pushCommand (line 9) | function pushCommand(state, command) {
  function peekCommand (line 13) | function peekCommand(state) {
  function popCommand (line 21) | function popCommand(state) {
  function getMostPowerful (line 29) | function getMostPowerful(state) {
  function addPluginPattern (line 41) | function addPluginPattern(pluginName, cmdStyle, styles) {
  function setState (line 75) | function setState(state, f) {
  function normal (line 80) | function normal(source, state) {
  function inCComment (line 153) | function inCComment(source, state) {
  function inMathMode (line 159) | function inMathMode(source, state, endModeSeq) {
  function beginParams (line 207) | function beginParams(source, state) {

FILE: public/packages/codemirror-3.19/mode/stex/test.js
  function MT (line 3) | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arg...

FILE: public/packages/codemirror-3.19/mode/tcl/tcl.js
  function parseWords (line 3) | function parseWords(str) {
  function chain (line 23) | function chain(stream, state, f) {
  function tokenBase (line 27) | function tokenBase(stream, state) {
  function tokenString (line 78) | function tokenString(quote) {
  function tokenComment (line 92) | function tokenComment(stream, state) {
  function tokenUnparsed (line 103) | function tokenUnparsed(stream, state) {

FILE: public/packages/codemirror-3.19/mode/tiddlywiki/tiddlywiki.js
  function kw (line 22) | function kw(type) {
  function chain (line 55) | function chain(stream, state, f) {
  function ret (line 64) | function ret(tp, style, cont) {
  function jsTokenBase (line 70) | function jsTokenBase(stream, state) {
  function twTokenComment (line 207) | function twTokenComment(stream, state) {
  function twTokenStrong (line 221) | function twTokenStrong(stream, state) {
  function twTokenCode (line 235) | function twTokenCode(stream, state) {
  function twTokenEm (line 257) | function twTokenEm(stream, state) {
  function twTokenUnderline (line 271) | function twTokenUnderline(stream, state) {
  function twTokenStrike (line 286) | function twTokenStrike(stream, state) {
  function twTokenMacro (line 300) | function twTokenMacro(stream, state) {

FILE: public/packages/codemirror-3.19/mode/tiki/tiki.js
  function inBlock (line 2) | function inBlock(style, terminator, returnTokenizer) {
  function inLine (line 18) | function inLine(style) {
  function inText (line 28) | function inText(stream, state) {
  function inPlugin (line 131) | function inPlugin(stream, state) {
  function inAttribute (line 165) | function inAttribute(quote) {
  function inAttributeNoQuote (line 177) | function inAttributeNoQuote() {
  function pass (line 192) | function pass() {
  function cont (line 196) | function cont() {
  function pushContext (line 201) | function pushContext(pluginName, startOfLine) {
  function popContext (line 212) | function popContext() {
  function element (line 216) | function element(type) {
  function endplugin (line 237) | function endplugin(startOfLine) {
  function endcloseplugin (line 249) | function endcloseplugin(err) {
  function attributes (line 257) | function attributes(type) {
  function attvalue (line 262) | function attvalue(type) {
  function attvaluemaybe (line 267) | function attvaluemaybe(type) {

FILE: public/packages/codemirror-3.19/mode/turtle/turtle.js
  function wordRegexp (line 5) | function wordRegexp(words) {
  function tokenBase (line 12) | function tokenBase(stream, state) {
  function tokenLiteral (line 64) | function tokenLiteral(quote) {
  function pushContext (line 78) | function pushContext(state, type, col) {
  function popContext (line 81) | function popContext(state) {

FILE: public/packages/codemirror-3.19/mode/vb/vb.js
  function wordRegexp (line 4) | function wordRegexp(words) {
  function indent (line 40) | function indent(_stream, state) {
  function dedent (line 44) | function dedent(_stream, state) {
  function tokenBase (line 48) | function tokenBase(stream, state) {
  function tokenStringFactory (line 158) | function tokenStringFactory(delimiter) {
  function tokenLexer (line 184) | function tokenLexer(stream, state) {

FILE: public/packages/codemirror-3.19/mode/vbscript/vbscript.js
  function wordRegexp (line 14) | function wordRegexp(words) {
  function indent (line 94) | function indent(_stream, state) {
  function dedent (line 98) | function dedent(_stream, state) {
  function tokenBase (line 102) | function tokenBase(stream, state) {
  function tokenStringFactory (line 245) | function tokenStringFactory(delimiter) {
  function tokenLexer (line 271) | function tokenLexer(stream, state) {

FILE: public/packages/codemirror-3.19/mode/velocity/velocity.js
  function parseWords (line 2) | function parseWords(str) {
  function chain (line 15) | function chain(stream, state, f) {
  function tokenBase (line 19) | function tokenBase(stream, state) {
  function tokenString (line 116) | function tokenString(quote) {
  function tokenComment (line 136) | function tokenComment(stream, state) {
  function tokenUnparsed (line 148) | function tokenUnparsed(stream, state) {

FILE: public/packages/codemirror-3.19/mode/verilog/verilog.js
  function tokenBase (line 12) | function tokenBase(stream, state) {
  function tokenString (line 54) | function tokenString(quote) {
  function tokenComment (line 67) | function tokenComment(stream, state) {
  function Context (line 79) | function Context(indented, column, type, align, prev) {
  function pushContext (line 86) | function pushContext(state, col, type) {
  function popContext (line 89) | function popContext(state) {
  function words (line 150) | function words(str) {
  function metaHook (line 170) | function metaHook(stream) {

FILE: public/packages/codemirror-3.19/mode/xml/xml.js
  function inText (line 50) | function inText(stream, state) {
  function inTag (line 102) | function inTag(stream, state) {
  function inAttribute (line 125) | function inAttribute(quote) {
  function inBlock (line 139) | function inBlock(style, terminator) {
  function doctype (line 151) | function doctype(depth) {
  function pass (line 173) | function pass() {
  function cont (line 176) | function cont() {
  function pushContext (line 181) | function pushContext(tagName, startOfLine) {
  function popContext (line 191) | function popContext() {
  function element (line 195) | function element(type) {
  function endtag (line 217) | function endtag(startOfLine) {
  function endclosetag (line 234) | function endclosetag(err) {
  function maybePopContext (line 242) | function maybePopContext(nextTagName) {
  function attributes (line 257) | function attributes(type) {
  function attribute (line 263) | function attribute(type) {
  function attvalue (line 269) | function attvalue(type) {
  function attvaluemaybe (line 275) | function attvaluemaybe(type) {

FILE: public/packages/codemirror-3.19/mode/xquery/test.js
  function MT (line 8) | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arg...

FILE: public/packages/codemirror-3.19/mode/xquery/xquery.js
  function kw (line 8) | function kw(type) {return {type: type, style: "keyword"};}
  function ret (line 62) | function ret(tp, style, cont) {
  function chain (line 67) | function chain(stream, state, f) {
  function tokenBase (line 73) | function tokenBase(stream, state) {
  function tokenComment (line 207) | function tokenComment(stream, state) {
  function tokenString (line 230) | function tokenString(quote, f) {
  function tokenVariable (line 270) | function tokenVariable(stream, state) {
  function tokenTag (line 287) | function tokenTag(name, isclose) {
  function tokenAttribute (line 310) | function tokenAttribute(stream, state) {
  function tokenXMLComment (line 345) | function tokenXMLComment(stream, state) {
  function tokenCDATA (line 357) | function tokenCDATA(stream, state) {
  function tokenPreProcessing (line 368) | function tokenPreProcessing(stream, state) {
  function isInXmlBlock (line 380) | function isInXmlBlock(state) { return isIn(state, "tag"); }
  function isInXmlAttributeBlock (line 381) | function isInXmlAttributeBlock(state) { return isIn(state, "attribute"); }
  function isInXmlConstructor (line 382) | function isInXmlConstructor(state) { return isIn(state, "xmlconstructor"...
  function isInString (line 383) | function isInString(state) { return isIn(state, "string"); }
  function isEQNameAhead (line 385) | function isEQNameAhead(stream) {
  function isIn (line 395) | function isIn(state, type) {
  function pushStateStack (line 399) | function pushStateStack(state, newState) {
  function popStateStack (line 403) | function popStateStack(state) {

FILE: public/packages/codemirror-3.19/test/comment_test.js
  function test (line 4) | function test(name, mode, run, before, after) {

FILE: public/packages/codemirror-3.19/test/doc_test.js
  function instantiateSpec (line 3) | function instantiateSpec(spec, place, opts) {
  function clone (line 30) | function clone(obj, props) {
  function eqAll (line 39) | function eqAll(val) {
  function testDoc (line 48) | function testDoc(name, spec, run, opts, expectFail) {
  function testBasic (line 73) | function testBasic(a, b) {

FILE: public/packages/codemirror-3.19/test/driver.js
  function Failure (line 3) | function Failure(why) {this.message = why;}
  function indexOf (line 6) | function indexOf(collection, elt) {
  function test (line 13) | function test(name, run, expectedFail) {
  function testCM (line 27) | function testCM(name, run, opts, expectedFail) {
  function runTests (line 44) | function runTests(callback) {
  function label (line 111) | function label(str, msg) {
  function eq (line 115) | function eq(a, b, msg) {
  function eqPos (line 118) | function eqPos(a, b, msg) {
  function is (line 125) | function is(a, msg) {
  function countTests (line 129) | function countTests() {

FILE: public/packages/codemirror-3.19/test/emacs_test.js
  function fakeEvent (line 8) | function fakeEvent(keyName) {
  function sim (line 30) | function sim(name, start /*, actions... */) {
  function at (line 42) | function at(line, ch) { return function(cm) { eqPos(cm.getCursor(), Pos(...
  function txt (line 43) | function txt(str) { return function(cm) { eq(cm.getValue(), str); }; }

FILE: public/packages/codemirror-3.19/test/lint/acorn.js
  function raise (line 174) | function raise(pos, message) {
  function makePredicate (line 282) | function makePredicate(words) {
  function isIdentifierStart (line 365) | function isIdentifierStart(code) {
  function isIdentifierChar (line 375) | function isIdentifierChar(code) {
  function nextLineStart (line 391) | function nextLineStart() {
  function curLineLoc (line 397) | function curLineLoc() {
  function initTokenState (line 408) | function initTokenState() {
  function finishToken (line 422) | function finishToken(type, val) {
  function skipBlockComment (line 432) | function skipBlockComment() {
  function skipLineComment (line 440) | function skipLineComment() {
  function skipSpace (line 454) | function skipSpace() {
  function readToken (line 489) | function readToken(forceRegexp) {
  function finishOp (line 588) | function finishOp(type, size) {
  function readRegexp (line 597) | function readRegexp() {
  function readInt (line 624) | function readInt(radix, len) {
  function readHexNumber (line 641) | function readHexNumber() {
  function readNumber (line 651) | function readNumber(ch) {
  function readString (line 678) | function readString(quote) {
  function readHexChar (line 726) | function readHexChar(len) {
  function readWord1 (line 744) | function readWord1() {
  function readWord (line 775) | function readWord() {
  function next (line 812) | function next() {
  function setStrict (line 822) | function setStrict(strct) {
  function startNode (line 832) | function startNode() {
  function startNodeFrom (line 850) | function startNodeFrom(other) {
  function finishNode (line 874) | function finishNode(node, type) {
  function isUseStrict (line 896) | function isUseStrict(stmt) {
  function eat (line 904) | function eat(type) {
  function canInsertSemicolon (line 913) | function canInsertSemicolon() {
  function semicolon (line 921) | function semicolon() {
  function expect (line 928) | function expect(type) {
  function unexpected (line 935) | function unexpected() {
  function checkLVal (line 942) | function checkLVal(expr) {
  function parseTopLevel (line 956) | function parseTopLevel(program) {
  function parseStatement (line 984) | function parseStatement() {
  function parseParenExpression (line 1196) | function parseParenExpression() {
  function parseBlock (line 1207) | function parseBlock(allowStrict) {
  function parseFor (line 1228) | function parseFor(node, init) {
  function parseForIn (line 1242) | function parseForIn(node, init) {
  function parseVar (line 1253) | function parseVar(node, noIn) {
  function parseExpression (line 1280) | function parseExpression(noComma, noIn) {
  function parseMaybeAssign (line 1294) | function parseMaybeAssign(noIn) {
  function parseMaybeConditional (line 1310) | function parseMaybeConditional(noIn) {
  function parseExprOps (line 1325) | function parseExprOps(noIn) {
  function parseExprOp (line 1335) | function parseExprOp(left, minPrec, noIn) {
  function parseMaybeUnary (line 1353) | function parseMaybeUnary(noIn) {
  function parseExprSubscripts (line 1381) | function parseExprSubscripts() {
  function parseSubscripts (line 1385) | function parseSubscripts(base, noCalls) {
  function parseExprAtom (line 1412) | function parseExprAtom() {
  function parseNew (line 1465) | function parseNew() {
  function parseObj (line 1476) | function parseObj() {
  function parsePropertyName (line 1519) | function parsePropertyName() {
  function parseFunction (line 1527) | function parseFunction(node, isStatement) {
  function parseExprList (line 1568) | function parseExprList(close, allowTrailingComma, allowEmpty) {
  function parseIdent (line 1586) | function parseIdent(liberal) {

FILE: public/packages/codemirror-3.19/test/lint/lint.js
  function checkFile (line 33) | function checkFile(fileName) {
  function fail (line 123) | function fail(msg, pos) {
  function checkDir (line 129) | function checkDir(dir) {

FILE: public/packages/codemirror-3.19/test/lint/walk.js
  function c (line 23) | function c(node, st, override) {
  function c (line 38) | function c(node, st, override) {
  function skipThrough (line 54) | function skipThrough(node, st, c) { c(node, st); }
  function ignore (line 55) | function ignore(node, st, c) {}
  function makeScope (line 183) | function makeScope(prev) {

FILE: public/packages/codemirror-3.19/test/mode_test.js
  function findSingle (line 22) | function findSingle(str, pos, ch) {
  function parseTokens (line 32) | function parseTokens(strs) {
  function compare (line 76) | function compare(text, expected, mode, compareIndentation) {
  function highlight (line 124) | function highlight(string, mode, compareIndentation) {
  function highlightOutputsEqual (line 166) | function highlightOutputsEqual(o1, o2) {
  function prettyPrintOutputTable (line 181) | function prettyPrintOutputTable(output) {

FILE: public/packages/codemirror-3.19/test/phantom_driver.js
  function waitFor (line 25) | function waitFor (test, cb) {

FILE: public/packages/codemirror-3.19/test/test.js
  function forEach (line 5) | function forEach(arr, f) {
  function addDoc (line 9) | function addDoc(cm, width, height) {
  function byClassName (line 16) | function byClassName(elt, cls) {
  function p (line 378) | function p(v) { return v && Pos(v[0], v[1]); }
  function p (line 473) | function p(v) { return v && Pos(v[0], v[1]); }
  function add (line 525) | function add(insertLeft) {
  function test (line 577) | function test(line, ch) {
  function foldLines (line 680) | function foldLines(cm, start, end, autoClear) {
  function enterPress (line 750) | function enterPress() {
  function fold (line 809) | function fold(ll, cl, lr, cr) {
  function fakeKey (line 1001) | function fakeKey(expected, code, props) {
  function cls (line 1288) | function cls(line, text, bg, wrap) {
  function atom (line 1318) | function atom(ll, cl, lr, cr, li, ri) {
  function mark (line 1365) | function mark(ll, cl, lr, cr, at) {
  function sendKey (line 1418) | function sendKey(code) {
  function notAtEnd (line 1502) | function notAtEnd(cm, pos) {

FILE: public/packages/codemirror-3.19/test/vim_test.js
  function copyCursor (line 95) | function copyCursor(cur) {
  function testVim (line 99) | function testVim(name, run, opts, expectedFail) {
  function testJumplist (line 226) | function testJumplist(name, keys, endPos, startPos, dialog) {
  function testMotion (line 270) | function testMotion(name, keys, endPos, startPos) {
  function makeCursor (line 281) | function makeCursor(line, ch) {
  function offsetCursor (line 285) | function offsetCursor(cur, offsetLine, offsetCh) {
  function testEdit (line 954) | function testEdit(name, before, pos, edit, after) {
  function testSubstituteConfirm (line 2240) | function testSubstituteConfirm(name, command, initialValue, expectedValu...

FILE: public/packages/google-code-prettify/prettify.js
  function S (line 2) | function S(a){function d(e){var b=e.charCodeAt(0);if(b!==92)return b;var...
  function T (line 6) | function T(a,d){function g(a){var c=a.nodeType;if(c==1){if(!b.test(a.cla...
  function H (line 7) | function H(a,d,g,b){d&&(a={a:d,e:a},g(a),b.push.apply(b,a.g))}
  function U (line 7) | function U(a){for(var d=void 0,g=a.firstChild;g;g=g.nextSibling)var b=g....
  function C (line 7) | function C(a,d){function g(a){for(var j=a.e,k=[j,"pln"],c=0,i=a.a.match(...
  function v (line 9) | function v(a){var d=[],g=[];a.tripleQuotedStrings?d.push(["str",/^(?:'''...
  function J (line 13) | function J(a,d,g){function b(a){var c=a.nodeType;if(c==1&&!x.test(a.clas...
  function p (line 15) | function p(a,d){for(var g=d.length;--g>=0;){var b=d[g];F.hasOwnProperty(...
  function I (line 15) | function I(a,d){if(!a||!F.hasOwnProperty(a))a=/^\s*</.test(d)?"default-m...
  function K (line 15) | function K(a){var d=a.h;try{var g=T(a.c,a.i),b=g.a;
  function g (line 27) | function g(){for(var b=D.PR_SHOULD_USE_CONTINUATION?c.now()+250:Infinity...

FILE: public/packages/google-code-prettify/run_prettify.js
  function X (line 2) | function X(e){function j(){try{J.doScroll("left")}catch(e){P(j,50);retur...
  function Q (line 3) | function Q(){S&&X(function(){var e=K.length;$(e?function(){for(var j=0;j...
  function j (line 5) | function j(m){if(m!==w){var n=x.createElement("link");n.rel="stylesheet"...
  function j (line 6) | function j(a){function d(f){var b=f.charCodeAt(0);if(b!==92)return b;var...
  function m (line 10) | function m(a,d){function h(a){var c=a.nodeType;if(c==1){if(!b.test(a.cla...
  function n (line 11) | function n(a,d,h,b){d&&(a={a:d,e:a},h(a),b.push.apply(b,a.g))}
  function x (line 11) | function x(a){for(var d=void 0,h=a.firstChild;h;h=h.nextSibling)var b=h....
  function C (line 11) | function C(a,d){function h(a){for(var l=a.e,j=[l,"pln"],c=
  function t (line 13) | function t(a){var d=[],h=[];a.tripleQuotedStrings?d.push(["str",/^(?:'''...
  function z (line 17) | function z(a,d,h){function b(a){var c=a.nodeType;if(c==1&&!j.test(a.clas...
  function i (line 19) | function i(a,d){for(var h=d.length;--h>=0;){var b=d[h];U.hasOwnProperty(...
  function A (line 19) | function A(a,d){if(!a||!U.hasOwnProperty(a))a=/^\s*</.test(d)?"default-m...
  function D (line 19) | function D(a){var d=
  function e (line 31) | function e(){for(var b=V.PR_SHOULD_USE_CONTINUATION?c.now()+250:Infinity...

FILE: public/packages/jquery-file-upload-8.9.0/js/cors/jquery.xdr-transport.js
  function callback (line 40) | function callback(status, statusText, responses, responseHeaders) {

FILE: public/packages/jquery-file-upload-8.9.0/js/vendor/jquery.ui.widget.js
  function handlerProxy (line 396) | function handlerProxy() {
  function handlerProxy (line 432) | function handlerProxy() {

FILE: public/packages/jquery-file-upload-8.9.0/server/gae-go/app/main.go
  constant WEBSITE (line 33) | WEBSITE           = "http://blueimp.github.io/jQuery-File-Upload/"
  constant MIN_FILE_SIZE (line 34) | MIN_FILE_SIZE     = 1
  constant MAX_FILE_SIZE (line 35) | MAX_FILE_SIZE     = 5000000
  constant IMAGE_TYPES (line 36) | IMAGE_TYPES       = "image/(gif|p?jpeg|(x-)?png)"
  constant ACCEPT_FILE_TYPES (line 37) | ACCEPT_FILE_TYPES = IMAGE_TYPES
  constant EXPIRATION_TIME (line 38) | EXPIRATION_TIME   = 300
  constant THUMBNAIL_PARAM (line 39) | THUMBNAIL_PARAM   = "=s80"
  type FileInfo (line 47) | type FileInfo struct
    method ValidateType (line 59) | func (fi *FileInfo) ValidateType() (valid bool) {
    method ValidateSize (line 67) | func (fi *FileInfo) ValidateSize() (valid bool) {
    method CreateUrls (line 78) | func (fi *FileInfo) CreateUrls(r *http.Request, c appengine.Context) {
  function check (line 104) | func check(err error) {
  function escape (line 110) | func escape(s string) string {
  function delayedDelete (line 114) | func delayedDelete(c appengine.Context, fi *FileInfo) {
  function handleUpload (line 125) | func handleUpload(r *http.Request, p *multipart.Part) (fi *FileInfo) {
  function getFormValue (line 160) | func getFormValue(p *multipart.Part) string {
  function handleUploads (line 166) | func handleUploads(r *http.Request) (fileInfos []*FileInfo) {
  function get (line 186) | func get(w http.ResponseWriter, r *http.Request) {
  function post (line 217) | func post(w http.ResponseWriter, r *http.Request) {
  function delete (line 240) | func delete(w http.ResponseWriter, r *http.Request) {
  function handle (line 255) | func handle(w http.ResponseWriter, r *http.Request) {
  function init (line 285) | func init() {

FILE: public/packages/jquery-file-upload-8.9.0/server/gae-python/main.py
  function cleanup (line 31) | def cleanup(blob_keys):
  class UploadHandler (line 35) | class UploadHandler(webapp2.RequestHandler):
    method initialize (line 37) | def initialize(self, request, response):
    method validate (line 47) | def validate(self, file):
    method get_file_size (line 58) | def get_file_size(self, file):
    method write_blob (line 64) | def write_blob(self, data, info):
    method handle_upload (line 74) | def handle_upload(self):
    method options (line 120) | def options(self):
    method head (line 123) | def head(self):
    method get (line 126) | def get(self):
    method post (line 129) | def post(self):
    method delete (line 143) | def delete(self):
  class DownloadHandler (line 147) | class DownloadHandler(blobstore_handlers.BlobstoreDownloadHandler):
    method get (line 148) | def get(self, key, filename):

FILE: public/packages/jquery-file-upload-8.9.0/server/php/UploadHandler.php
  class UploadHandler (line 13) | class UploadHandler
    method __construct (line 41) | function __construct($options = null, $initialize = true, $error_messa...
    method initialize (line 147) | protected function initialize() {
    method get_full_url (line 169) | protected function get_full_url() {
    method get_user_id (line 180) | protected function get_user_id() {
    method get_user_path (line 185) | protected function get_user_path() {
    method get_upload_path (line 192) | protected function get_upload_path($file_name = null, $version = null) {
    method get_query_separator (line 207) | protected function get_query_separator($url) {
    method get_download_url (line 211) | protected function get_download_url($file_name, $version = null, $dire...
    method set_additional_file_properties (line 234) | protected function set_additional_file_properties($file) {
    method fix_integer_overflow (line 250) | protected function fix_integer_overflow($size) {
    method get_file_size (line 257) | protected function get_file_size($file_path, $clear_stat_cache = false) {
    method is_valid_file_object (line 265) | protected function is_valid_file_object($file_name) {
    method get_file_object (line 273) | protected function get_file_object($file_name) {
    method get_file_objects (line 297) | protected function get_file_objects($iteration_method = 'get_file_obje...
    method count_file_objects (line 308) | protected function count_file_objects() {
    method get_error_message (line 312) | protected function get_error_message($error) {
    method get_config_bytes (line 317) | function get_config_bytes($val) {
    method validate (line 331) | protected function validate($uploaded_file, $file, $error, $index) {
    method upcount_name_callback (line 395) | protected function upcount_name_callback($matches) {
    method upcount_name (line 401) | protected function upcount_name($name) {
    method get_unique_filename (line 410) | protected function get_unique_filename($name,
    method trim_file_name (line 427) | protected function trim_file_name($name,
    method get_file_name (line 445) | protected function get_file_name($name,
    method handle_form_data (line 455) | protected function handle_form_data($file, $index) {
    method get_scaled_image_file_paths (line 459) | protected function get_scaled_image_file_paths($file_name, $version) {
    method gd_get_image_object (line 473) | protected function gd_get_image_object($file_path, $func, $no_cache = ...
    method gd_set_image_object (line 481) | protected function gd_set_image_object($file_path, $image) {
    method gd_destroy_image_object (line 485) | protected function gd_destroy_image_object($file_path) {
    method gd_create_scaled_image (line 490) | protected function gd_create_scaled_image($file_name, $version, $optio...
    method gd_imageflip (line 585) | protected function gd_imageflip($image, $mode) {
    method gd_orient_image (line 627) | protected function gd_orient_image($file_path) {
    method imagick_get_image_object (line 686) | protected function imagick_get_image_object($file_path, $no_cache = fa...
    method imagick_destroy_image_object (line 694) | protected function imagick_destroy_image_object($file_path) {
    method imagick_create_scaled_image (line 699) | protected function imagick_create_scaled_image($file_name, $version, $...
    method imagick_orient_image (line 769) | protected function imagick_orient_image($file_path) {
    method get_image_size (line 804) | protected function get_image_size($file_path) {
    method create_scaled_image (line 816) | protected function create_scaled_image($file_name, $version, $options) {
    method orient_image (line 823) | protected function orient_image($file_path) {
    method destroy_image_object (line 830) | protected function destroy_image_object($file_path) {
    method is_valid_image_file (line 836) | protected function is_valid_image_file($file_path) {
    method handle_image_file (line 851) | protected function handle_image_file($file_path, $file) {
    method handle_file_upload (line 885) | protected function handle_file_upload($uploaded_file, $name, $size, $t...
    method readfile (line 937) | protected function readfile($file_path) {
    method body (line 953) | protected function body($str) {
    method header (line 957) | protected function header($str) {
    method get_server_var (line 961) | protected function get_server_var($id) {
    method generate_response (line 965) | protected function generate_response($content, $print_response = true) {
    method get_version_param (line 989) | protected function get_version_param() {
    method get_singular_param_name (line 993) | protected function get_singular_param_name() {
    method get_file_name_param (line 997) | protected function get_file_name_param() {
    method get_file_names_params (line 1002) | protected function get_file_names_params() {
    method get_file_type (line 1011) | protected function get_file_type($file_path) {
    method download (line 1025) | protected function download() {
    method send_content_type_header (line 1067) | protected function send_content_type_header() {
    method send_access_control_headers (line 1076) | protected function send_access_control_headers() {
    method head (line 1086) | public function head() {
    method get (line 1098) | public function get($print_response = true) {
    method post (line 1115) | public function post($print_response = true) {
    method delete (line 1170) | public function delete($print_response = true) {
Condensed preview — 615 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (3,618K chars).
[
  {
    "path": ".gitattributes",
    "chars": 11,
    "preview": "* text=auto"
  },
  {
    "path": ".gitignore",
    "chars": 312,
    "preview": "/bootstrap/compiled.php\n/vendor\ncomposer.phar\n.DS_Store\nThumbs.db\n\n# OSX\n.DS_Store\n\n# Project specific\n.sass-cache\n/publ"
  },
  {
    "path": "app/LaraSnipp/Command/CommentsCommand.php",
    "chars": 1735,
    "preview": "<?php\n\nnamespace LaraSnipp\\Command;\n\nuse Config;\nuse Illuminate\\Console\\Command;\nuse Snippet;\n\nclass CommentsCommand ext"
  },
  {
    "path": "app/LaraSnipp/Composer/LayoutMasterComposer.php",
    "chars": 67,
    "preview": "<?php namespace LaraSnipp\\Composer;\n\nclass LayoutMasterComposer\n{\n}"
  },
  {
    "path": "app/LaraSnipp/LaraSnippServiceProvider.php",
    "chars": 913,
    "preview": "<?php namespace LaraSnipp;\n\nuse App;\nuse Illuminate\\Support\\ServiceProvider;\n// use Redis;\nuse View;\n\n// use Tag;\n\nclass"
  },
  {
    "path": "app/LaraSnipp/Mailer/Mailer.php",
    "chars": 490,
    "preview": "<?php namespace LaraSnipp\\Mailer;\n\nabstract class Mailer\n{\n    /**\n     * @param $user\n     * @param $subject\n     * @pa"
  },
  {
    "path": "app/LaraSnipp/Mailer/UserMailer.php",
    "chars": 494,
    "preview": "<?php namespace LaraSnipp\\Mailer;\n\nclass UserMailer extends Mailer\n{\n    /**\n     * @param User $user\n     */\n    public"
  },
  {
    "path": "app/LaraSnipp/Observer/ObserverServiceProvider.php",
    "chars": 469,
    "preview": "<?php namespace LaraSnipp\\Observer;\n\nuse LaraSnipp\\Mailer\\UserMailer;\nuse User;\nuse Snippet;\nuse LaraSnipp\\Observer\\User"
  },
  {
    "path": "app/LaraSnipp/Observer/Snippet/SnippetObserver.php",
    "chars": 309,
    "preview": "<?php namespace LaraSnipp\\Observer\\Snippet;\n\nuse Auth;\n\nclass SnippetObserver\n{\n    /**\n     * Assign the currently user"
  },
  {
    "path": "app/LaraSnipp/Observer/User/UserObserver.php",
    "chars": 958,
    "preview": "<?php namespace LaraSnipp\\Observer\\User;\n\nuse LaraSnipp\\Mailer\\UserMailer;\n\nclass UserObserver\n{\n    /**\n     * @var Use"
  },
  {
    "path": "app/LaraSnipp/Repo/EloquentBaseRepository.php",
    "chars": 1256,
    "preview": "<?php namespace LaraSnipp\\Repo;\n\nuse Illuminate\\Database\\Eloquent\\Model;\n\nabstract class EloquentBaseRepository\n{\n    /*"
  },
  {
    "path": "app/LaraSnipp/Repo/RepoServiceProvider.php",
    "chars": 1107,
    "preview": "<?php namespace LaraSnipp\\Repo;\n\nuse Snippet;\nuse User;\nuse Tag;\nuse LaraSnipp\\Repo\\Snippet\\EloquentSnippetRepository;\nu"
  },
  {
    "path": "app/LaraSnipp/Repo/Snippet/EloquentSnippetRepository.php",
    "chars": 8136,
    "preview": "<?php namespace LaraSnipp\\Repo\\Snippet;\n\nuse App;\nuse DB;\nuse LaraSnipp\\Repo\\EloquentBaseRepository;\nuse LaraSnipp\\Repo\\"
  },
  {
    "path": "app/LaraSnipp/Repo/Snippet/SnippetRepositoryInterface.php",
    "chars": 2022,
    "preview": "<?php namespace LaraSnipp\\Repo\\Snippet;\n\ninterface SnippetRepositoryInterface\n{\n    /**\n     * Get paginated snippets\n  "
  },
  {
    "path": "app/LaraSnipp/Repo/Tag/EloquentTagRepository.php",
    "chars": 552,
    "preview": "<?php namespace LaraSnipp\\Repo\\Tag;\n\nuse LaraSnipp\\Repo\\EloquentBaseRepository;\nuse LaraSnipp\\Repo\\Tag\\TagRepositoryInte"
  },
  {
    "path": "app/LaraSnipp/Repo/Tag/TagRepositoryInterface.php",
    "chars": 73,
    "preview": "<?php namespace LaraSnipp\\Repo\\Tag;\n\ninterface TagRepositoryInterface {}\n"
  },
  {
    "path": "app/LaraSnipp/Repo/User/EloquentUserRepository.php",
    "chars": 2574,
    "preview": "<?php namespace LaraSnipp\\Repo\\User;\n\nuse DB;\nuse LaraSnipp\\Repo\\EloquentBaseRepository;\nuse LaraSnipp\\Repo\\User\\UserRep"
  },
  {
    "path": "app/LaraSnipp/Repo/User/UserRepositoryInterface.php",
    "chars": 638,
    "preview": "<?php namespace LaraSnipp\\Repo\\User;\n\ninterface UserRepositoryInterface\n{\n    /**\n     * Get top snippets contributors\n "
  },
  {
    "path": "app/LaraSnipp/Service/Form/FormServiceProvider.php",
    "chars": 1135,
    "preview": "<?php namespace LaraSnipp\\Service\\Form;\n\nuse Illuminate\\Support\\ServiceProvider;\nuse LaraSnipp\\Service\\Form\\User\\UserFor"
  },
  {
    "path": "app/LaraSnipp/Service/Form/Snippet/SnippetForm.php",
    "chars": 3063,
    "preview": "<?php namespace LaraSnipp\\Service\\Form\\Snippet;\n\nuse App;\nuse Auth;\nuse LaraSnipp\\Service\\Validation\\ValidableInterface;"
  },
  {
    "path": "app/LaraSnipp/Service/Form/Snippet/SnippetFormLaravelValidator.php",
    "chars": 548,
    "preview": "<?php namespace LaraSnipp\\Service\\Form\\Snippet;\n\nuse LaraSnipp\\Service\\Validation\\AbstractLaravelValidator;\n\nclass Snipp"
  },
  {
    "path": "app/LaraSnipp/Service/Form/User/UserForm.php",
    "chars": 1720,
    "preview": "<?php namespace LaraSnipp\\Service\\Form\\User;\n\nuse LaraSnipp\\Service\\Validation\\ValidableInterface;\nuse LaraSnipp\\Repo\\Us"
  },
  {
    "path": "app/LaraSnipp/Service/Form/User/UserFormLaravelValidator.php",
    "chars": 962,
    "preview": "<?php namespace LaraSnipp\\Service\\Form\\User;\n\nuse LaraSnipp\\Service\\Validation\\AbstractLaravelValidator;\n\nclass UserForm"
  },
  {
    "path": "app/LaraSnipp/Service/Validation/AbstractLaravelValidator.php",
    "chars": 1629,
    "preview": "<?php namespace LaraSnipp\\Service\\Validation;\n\nuse Illuminate\\Validation\\Factory;\n\nabstract class AbstractLaravelValidat"
  },
  {
    "path": "app/LaraSnipp/Service/Validation/ValidableInterface.php",
    "chars": 491,
    "preview": "<?php namespace LaraSnipp\\Service\\Validation;\n\ninterface ValidableInterface\n{\n    /**\n     * Add data to validation agai"
  },
  {
    "path": "app/commands/.gitkeep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "app/config/app.php",
    "chars": 8106,
    "preview": "<?php\n\nreturn array(\n\n  /*\n  |--------------------------------------------------------------------------\n  | Application"
  },
  {
    "path": "app/config/auth.php",
    "chars": 2282,
    "preview": "<?php\n\nreturn array(\n\n    /*\n    |--------------------------------------------------------------------------\n    | Defau"
  },
  {
    "path": "app/config/cache.php",
    "chars": 2968,
    "preview": "<?php\n\nreturn array(\n\n    /*\n    |--------------------------------------------------------------------------\n    | Defau"
  },
  {
    "path": "app/config/compile.php",
    "chars": 472,
    "preview": "<?php\n\nreturn array(\n\n    /*\n    |--------------------------------------------------------------------------\n    | Addit"
  },
  {
    "path": "app/config/database.php",
    "chars": 3827,
    "preview": "<?php\n\nreturn array(\n\n    /*\n    |--------------------------------------------------------------------------\n    | PDO F"
  },
  {
    "path": "app/config/disqus.php",
    "chars": 173,
    "preview": "<?php\n\nreturn [\n    \"key\"       => null,\n    \"shortname\" => null,\n    \"endpoint\"  => \"http://disqus.com/api/3.0/threads/"
  },
  {
    "path": "app/config/mail.php",
    "chars": 4267,
    "preview": "<?php\n\nreturn array(\n\n    /*\n    |--------------------------------------------------------------------------\n    | Mail "
  },
  {
    "path": "app/config/packages/.gitkeep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "app/config/purifier.php",
    "chars": 629,
    "preview": "<?php\n\nreturn array(\n\n    'encoding' => 'UTF-8',\n    'finalize' => true,\n    'preload'  => false,\n    'settings' => arra"
  },
  {
    "path": "app/config/queue.php",
    "chars": 2296,
    "preview": "<?php\n\nreturn array(\n\n    /*\n    |--------------------------------------------------------------------------\n    | Defau"
  },
  {
    "path": "app/config/remote.php",
    "chars": 1600,
    "preview": "<?php\n\nreturn array(\n\n  /*\n  |--------------------------------------------------------------------------\n  | Default Rem"
  },
  {
    "path": "app/config/session.php",
    "chars": 4820,
    "preview": "<?php\n\nreturn array(\n\n    /*\n    |--------------------------------------------------------------------------\n    | Defau"
  },
  {
    "path": "app/config/site.php",
    "chars": 2796,
    "preview": "<?php\n\nreturn array(\n\n    /*\n    |--------------------------------------------------------------------------\n    | URL C"
  },
  {
    "path": "app/config/testing/app.php",
    "chars": 480,
    "preview": "<?php\n\nreturn array(\n\n    /*\n    |--------------------------------------------------------------------------\n    | Appli"
  },
  {
    "path": "app/config/testing/cache.php",
    "chars": 568,
    "preview": "<?php\n\nreturn array(\n\n    /*\n    |--------------------------------------------------------------------------\n    | Defau"
  },
  {
    "path": "app/config/testing/database.php",
    "chars": 2159,
    "preview": "<?php\n\nreturn array(\n\n    /*\n    |--------------------------------------------------------------------------\n    | Defau"
  },
  {
    "path": "app/config/testing/mail.php",
    "chars": 480,
    "preview": "<?php\n\nreturn array(\n\n    /*\n    |--------------------------------------------------------------------------\n    | Mail "
  },
  {
    "path": "app/config/testing/session.php",
    "chars": 599,
    "preview": "<?php\n\nreturn array(\n\n    /*\n    |--------------------------------------------------------------------------\n    | Defau"
  },
  {
    "path": "app/config/view.php",
    "chars": 1022,
    "preview": "<?php\n\nreturn array(\n\n    /*\n    |--------------------------------------------------------------------------\n    | View "
  },
  {
    "path": "app/config/workbench.php",
    "chars": 949,
    "preview": "<?php\n\nreturn array(\n\n    /*\n    |--------------------------------------------------------------------------\n    | Workb"
  },
  {
    "path": "app/controllers/.gitkeep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "app/controllers/Admin/IndexController.php",
    "chars": 159,
    "preview": "<?php namespace Admin;\n\nclass IndexController extends \\BaseController\n{\n    public function getIndex()\n    {\n        ret"
  },
  {
    "path": "app/controllers/AuthController.php",
    "chars": 2926,
    "preview": "<?php\n\nuse LaraSnipp\\Repo\\User\\UserRepositoryInterface;\nuse LaraSnipp\\Service\\Form\\User\\UserForm;\n\nclass AuthController "
  },
  {
    "path": "app/controllers/BaseController.php",
    "chars": 296,
    "preview": "<?php\n\nclass BaseController extends Controller\n{\n    /**\n     * Setup the layout used by the controller.\n     *\n     * @"
  },
  {
    "path": "app/controllers/HomeController.php",
    "chars": 1364,
    "preview": "<?php\nuse LaraSnipp\\Repo\\Snippet\\SnippetRepositoryInterface;\nuse LaraSnipp\\Repo\\User\\UserRepositoryInterface;\nuse LaraSn"
  },
  {
    "path": "app/controllers/Member/SnippetController.php",
    "chars": 3692,
    "preview": "<?php namespace Member;\n\nuse BaseController;\nuse View;\nuse Input;\nuse Redirect;\nuse Auth;\nuse App;\nuse LaraSnipp\\Repo\\Sn"
  },
  {
    "path": "app/controllers/Member/UserController.php",
    "chars": 1113,
    "preview": "<?php namespace Member;\n\nuse BaseController;\nuse View;\nuse Input;\nuse Paginator;\nuse Auth;\nuse LaraSnipp\\Repo\\Snippet\\Sn"
  },
  {
    "path": "app/controllers/RemindersController.php",
    "chars": 2447,
    "preview": "<?php\n\n\nclass RemindersController extends Controller\n{\n\n    /**\n     * Display the password reminder view.\n     *\n     *"
  },
  {
    "path": "app/controllers/SnippetController.php",
    "chars": 4256,
    "preview": "<?php\n\nuse LaraSnipp\\Repo\\Snippet\\SnippetRepositoryInterface;\nuse LaraSnipp\\Repo\\User\\UserRepositoryInterface;\nuse LaraS"
  },
  {
    "path": "app/controllers/TagController.php",
    "chars": 1577,
    "preview": "<?php\n\nuse LaraSnipp\\Repo\\Snippet\\SnippetRepositoryInterface;\nuse LaraSnipp\\Repo\\Tag\\TagRepositoryInterface;\nuse LaraSni"
  },
  {
    "path": "app/controllers/UserController.php",
    "chars": 3076,
    "preview": "<?php\n\nuse Illuminate\\Support\\Facades\\Redirect;\nuse LaraSnipp\\Repo\\Snippet\\SnippetRepositoryInterface;\nuse LaraSnipp\\Rep"
  },
  {
    "path": "app/controllers/website/PagesController.php",
    "chars": 186,
    "preview": "<?php namespace Website;\n\nuse View;\n\nclass PagesController extends \\BaseController\n{\n    public function showRoadmap()\n "
  },
  {
    "path": "app/database/migrations/.gitkeep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "app/database/migrations/2013_11_08_145020_create_snippets_table.php",
    "chars": 568,
    "preview": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateSnippetsTable extends Migration\n{\n    /**\n     * Run t"
  },
  {
    "path": "app/database/migrations/2013_12_05_122548_create_users_table.php",
    "chars": 688,
    "preview": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateUsersTable extends Migration\n{\n    /**\n     * Run the "
  },
  {
    "path": "app/database/migrations/2013_12_05_122952_add_author_id_in_snippets_table.php",
    "chars": 694,
    "preview": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass AddAuthorIdInSnippetsTable extends Migration\n{\n    /**\n     "
  },
  {
    "path": "app/database/migrations/2013_12_08_055430_add_slug_and_activation_key_and_active_in_users_table.php",
    "chars": 733,
    "preview": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass AddSlugAndActivationKeyAndActiveInUsersTable extends Migrati"
  },
  {
    "path": "app/database/migrations/2013_12_09_125456_drop_active_in_users_table.php",
    "chars": 533,
    "preview": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass DropActiveInUsersTable extends Migration\n{\n    /**\n     * Ru"
  },
  {
    "path": "app/database/migrations/2013_12_09_130122_add_active_in_users_table.php",
    "chars": 544,
    "preview": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass AddActiveInUsersTable extends Migration\n{\n    /**\n     * Run"
  },
  {
    "path": "app/database/migrations/2013_12_10_112312_add_approved_in_snippets_table.php",
    "chars": 560,
    "preview": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass AddApprovedInSnippetsTable extends Migration\n{\n    /**\n     "
  },
  {
    "path": "app/database/migrations/2013_12_10_132447_add_slug_in_snippets_table.php",
    "chars": 547,
    "preview": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass AddSlugInSnippetsTable extends Migration\n{\n    /**\n     * Ru"
  },
  {
    "path": "app/database/migrations/2013_12_11_012940_create_roles_table.php",
    "chars": 524,
    "preview": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateRolesTable extends Migration\n{\n    /**\n     * Run the "
  },
  {
    "path": "app/database/migrations/2013_12_11_013036_add_role_id_in_users_table.php",
    "chars": 543,
    "preview": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass AddRoleIdInUsersTable extends Migration\n{\n    /**\n     * Run"
  },
  {
    "path": "app/database/migrations/2013_12_11_013559_add_description_credits_to_resource_deleted_at_in_snippets_table.php",
    "chars": 869,
    "preview": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass AddDescriptionCreditsToResourceDeletedAtInSnippetsTable exte"
  },
  {
    "path": "app/database/migrations/2013_12_11_014226_create_tags_table.php",
    "chars": 487,
    "preview": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateTagsTable extends Migration\n{\n    /**\n     * Run the m"
  },
  {
    "path": "app/database/migrations/2013_12_11_014317_create_snippet_tag_table.php",
    "chars": 569,
    "preview": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateSnippetTagTable extends Migration\n{\n    /**\n     * Run"
  },
  {
    "path": "app/database/migrations/2013_12_11_103428_add_slug_in_tags_table.php",
    "chars": 525,
    "preview": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass AddSlugInTagsTable extends Migration\n{\n    /**\n     * Run th"
  },
  {
    "path": "app/database/migrations/2013_12_12_093641_add_remaining_columns_in_users_table.php",
    "chars": 1062,
    "preview": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass AddRemainingColumnsInUsersTable extends Migration\n{\n    /**\n"
  },
  {
    "path": "app/database/migrations/2013_12_19_134131_create_password_reminders_table.php",
    "chars": 643,
    "preview": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreatePasswordRemi"
  },
  {
    "path": "app/database/migrations/2014_01_04_072223_add_disqus_columns_to_snippets_table.php",
    "chars": 589,
    "preview": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass AddDisqusColumnsToSnippetsTable\nextends Migration\n{\n  /**\n  "
  },
  {
    "path": "app/database/migrations/2014_01_06_212314_create_user_starred_table.php",
    "chars": 652,
    "preview": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateUserStarredTable extends Migration\n{\n    /**\n     * Ru"
  },
  {
    "path": "app/database/migrations/2014_04_17_151653_add_remember_token_to_users_table.php",
    "chars": 544,
    "preview": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\n\nclass AddRememberTokenTo"
  },
  {
    "path": "app/database/seeds/.gitkeep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "app/database/seeds/DatabaseSeeder.php",
    "chars": 259,
    "preview": "<?php\n\nclass DatabaseSeeder extends Seeder\n{\n    /**\n     * Run the database seeds.\n     *\n     * @return void\n     */\n "
  },
  {
    "path": "app/database/seeds/RoleSeeder.php",
    "chars": 405,
    "preview": "<?php\n\nclass RoleSeeder extends Seeder\n{\n    public function run()\n    {\n        if (Role::count() == 0) {\n            $"
  },
  {
    "path": "app/database/seeds/TagSeeder.php",
    "chars": 467,
    "preview": "<?php\n\nclass TagSeeder extends Seeder\n{\n    public function run()\n    {\n        if (Tag::count() == 0) {\n            $th"
  },
  {
    "path": "app/filters.php",
    "chars": 2846,
    "preview": "<?php\n\n/*\n|--------------------------------------------------------------------------\n| Application & Route Filters\n|---"
  },
  {
    "path": "app/lang/en/pagination.php",
    "chars": 544,
    "preview": "<?php\n\nreturn array(\n\n    /*\n    |--------------------------------------------------------------------------\n    | Pagin"
  },
  {
    "path": "app/lang/en/reminders.php",
    "chars": 730,
    "preview": "<?php\n\nreturn array(\n\n    /*\n    |--------------------------------------------------------------------------\n    | Passw"
  },
  {
    "path": "app/lang/en/validation.php",
    "chars": 4919,
    "preview": "<?php\n\nreturn array(\n\n    /*\n    |--------------------------------------------------------------------------\n    | Valid"
  },
  {
    "path": "app/libraries/SiteHelpers.php",
    "chars": 3519,
    "preview": "<?php\n\nclass SiteHelpers\n{\n    /**\n     * Returns body id made up by URI segments\n     *\n     * @return string\n     */\n "
  },
  {
    "path": "app/macros.php",
    "chars": 4921,
    "preview": "<?php\n\nForm::macro('rawLabel', function ($name, $value = null, $options = array()) {\n    $label = Form::label($name, '%s"
  },
  {
    "path": "app/models/BaseModel.php",
    "chars": 424,
    "preview": "<?php\n\nclass BaseModel extends Eloquent\n{\n\n    /**\n     * Get human created at date\n     *\n     * @return mixed\n     */\n"
  },
  {
    "path": "app/models/Role.php",
    "chars": 39,
    "preview": "<?php\n\nclass Role extends BaseModel {}\n"
  },
  {
    "path": "app/models/Snippet.php",
    "chars": 3515,
    "preview": "<?php\n\nuse Illuminate\\Database\\Eloquent\\SoftDeletingTrait;\n\nclass Snippet extends BaseModel\n{\n    /**\n     * The fields "
  },
  {
    "path": "app/models/Starred.php",
    "chars": 701,
    "preview": "<?php\n\nclass Starred extends BaseModel\n{\n    /**\n     * The database table used by the model.\n     *\n     * @var $table "
  },
  {
    "path": "app/models/Tag.php",
    "chars": 483,
    "preview": "<?php\n\nclass Tag extends Eloquent\n{\n    public $timestamps = false;\n\n    public static $sluggable = array(\n        'buil"
  },
  {
    "path": "app/models/User.php",
    "chars": 5550,
    "preview": "<?php\n\nuse Illuminate\\Auth\\UserInterface;\nuse Illuminate\\Auth\\Reminders\\RemindableInterface;\n\nclass User extends BaseMod"
  },
  {
    "path": "app/routes.php",
    "chars": 4086,
    "preview": "<?php\n\n/*\n|--------------------------------------------------------------------------\n| Application Routes\n|------------"
  },
  {
    "path": "app/start/artisan.php",
    "chars": 409,
    "preview": "<?php\n\n/*\n|--------------------------------------------------------------------------\n| Register The Artisan Commands\n|-"
  },
  {
    "path": "app/start/global.php",
    "chars": 3068,
    "preview": "<?php\n\n/*\n|--------------------------------------------------------------------------\n| Register The Laravel Class Loade"
  },
  {
    "path": "app/start/local.php",
    "chars": 10,
    "preview": "<?php\n\n//\n"
  },
  {
    "path": "app/storage/.gitignore",
    "chars": 17,
    "preview": "services.manifest"
  },
  {
    "path": "app/storage/cache/.gitignore",
    "chars": 13,
    "preview": "*\n!.gitignore"
  },
  {
    "path": "app/storage/logs/.gitignore",
    "chars": 13,
    "preview": "*\n!.gitignore"
  },
  {
    "path": "app/storage/meta/.gitignore",
    "chars": 13,
    "preview": "*\n!.gitignore"
  },
  {
    "path": "app/storage/sessions/.gitignore",
    "chars": 13,
    "preview": "*\n!.gitignore"
  },
  {
    "path": "app/storage/views/.gitignore",
    "chars": 13,
    "preview": "*\n!.gitignore"
  },
  {
    "path": "app/tests/TestCase.php",
    "chars": 1810,
    "preview": "<?php\n\nclass TestCase extends Illuminate\\Foundation\\Testing\\TestCase\n{\n    /**\n     * Prepare for tests\n     *\n     */\n "
  },
  {
    "path": "app/tests/functional/Controller/AuthControllerTest.php",
    "chars": 4684,
    "preview": "<?php namespace Tests\\Functional\\Controller;\n\nuse TestCase;\nuse User;\nuse Hash;\nuse Way\\Tests\\Factory;\n\nclass AuthContro"
  },
  {
    "path": "app/tests/functional/Controller/HomeControllerTest.php",
    "chars": 2907,
    "preview": "<?php namespace Tests\\Functional\\Controller;\n\nuse TestCase;\nuse Way\\Tests\\Factory;\nuse Snippet;\n\nclass HomeControllerTes"
  },
  {
    "path": "app/tests/functional/Controller/Member/SnippetControllerTest.php",
    "chars": 6053,
    "preview": "<?php namespace Tests\\Functional\\Controller\\Member;\n\nuse TestCase;\nuse Config;\nuse User;\nuse Snippet;\nuse Way\\Tests\\Fact"
  },
  {
    "path": "app/tests/functional/Controller/Member/UserControllerTest.php",
    "chars": 827,
    "preview": "<?php namespace Tests\\Functional\\Controller\\Member;\n\nuse TestCase;\nuse User;\nuse Snippet;\nuse Way\\Tests\\Factory;\n\nclass "
  },
  {
    "path": "app/tests/functional/Controller/SnippetControllerTest.php",
    "chars": 1838,
    "preview": "<?php namespace Tests\\Functional\\Controller;\n\nuse TestCase;\nuse User;\nuse Way\\Tests\\Factory;\n\nclass SnippetControllerTes"
  },
  {
    "path": "app/tests/functional/Controller/TagControllerTest.php",
    "chars": 862,
    "preview": "<?php namespace Tests\\Functional\\Controller;\n\nuse TestCase;\nuse User;\nuse Way\\Tests\\Factory;\n\nclass TagControllerTest ex"
  },
  {
    "path": "app/tests/functional/Controller/UserControllerTest.php",
    "chars": 2210,
    "preview": "<?php namespace Tests\\Functional\\Controller;\n\nuse TestCase;\nuse User;\nuse Way\\Tests\\Factory;\n\nclass UserControllerTest e"
  },
  {
    "path": "app/tests/integration/Model/UserModelTest.php",
    "chars": 870,
    "preview": "<?php namespace Tests\\Integration\\Model;\n\nuse TestCase;\nuse User;\nuse Hash;\n\nclass UserModelTest extends TestCase\n{\n    "
  },
  {
    "path": "app/tests/integration/Repo/EloquentSnippetRepositoryTest.php",
    "chars": 5475,
    "preview": "<?php namespace Tests\\Integration\\Repo;\n\nuse TestCase;\nuse Way\\Tests\\Factory;\nuse Snippet;\nuse App;\nuse LaraSnipp\\Repo\\S"
  },
  {
    "path": "app/tests/integration/Repo/EloquentUserRepositoryTest.php",
    "chars": 1793,
    "preview": "<?php namespace Tests\\Integration\\Repo;\n\nuse TestCase;\nuse Way\\Tests\\Factory;\nuse User;\nuse LaraSnipp\\Repo\\User\\Eloquent"
  },
  {
    "path": "app/tests/unit/Model/UserModelTest.php",
    "chars": 324,
    "preview": "<?php namespace Tests\\Unit\\Model;\n\nuse TestCase;\nuse User;\n\nclass UserModelTest extends TestCase\n{\n    public function t"
  },
  {
    "path": "app/views/admin/index.blade.php",
    "chars": 7546,
    "preview": "@extends('admin.layouts.master')\n\n@section('content')\n    <div class=\"row\">\n        <div class=\"col-lg-12\">\n            "
  },
  {
    "path": "app/views/admin/layouts/master.blade.php",
    "chars": 1924,
    "preview": "<!DOCTYPE html>\n<html lang=\"en\">\n\n<head>\n\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE="
  },
  {
    "path": "app/views/admin/partials/navbar.blade.php",
    "chars": 3154,
    "preview": "<nav class=\"navbar navbar-default navbar-static-top\" role=\"navigation\" style=\"margin-bottom: 0\">\n    <div class=\"navbar-"
  },
  {
    "path": "app/views/auth/login.blade.php",
    "chars": 1471,
    "preview": "@extends('layouts.master')\n\n@section('content')\n\n\t<div class=\"band\">\n\n\t\t@if( $errors->has() )\n\t\t\t<p>We encountered the f"
  },
  {
    "path": "app/views/auth/signup.blade.php",
    "chars": 1722,
    "preview": "@extends('layouts.master')\n\n@section('content')\n\n\t<div class=\"band\">\n\n\t\t@if ($errors->has())\n\t\t\t<p>We encountered the fo"
  },
  {
    "path": "app/views/emails/auth/activate.blade.php",
    "chars": 100,
    "preview": "Activate your account by clicking this link <a href=\"{{ $activationUrl }}\">{{ $activationUrl }}</a>\n"
  },
  {
    "path": "app/views/emails/auth/reminder.blade.php",
    "chars": 241,
    "preview": "<!DOCTYPE html>\n<html lang=\"en-US\">\n\t<head>\n\t\t<meta charset=\"utf-8\">\n\t</head>\n\t<body>\n\t\t<h2>Password Reset</h2>\n\n\t\t<div>"
  },
  {
    "path": "app/views/layouts/master.blade.php",
    "chars": 4715,
    "preview": "<!DOCTYPE html>\n<html lang=\"en\">\n\t<head>\n\t\t<base href=\"/\">\n\t\t<meta charset=\"utf-8\">\n\t\t<meta http-equiv=\"X-UA-Compatible\""
  },
  {
    "path": "app/views/member/snippets/create.blade.php",
    "chars": 2208,
    "preview": "@extends('layouts.master')\n\n@section('content')\n\n  <div class=\"row submit-snippet-page-wrapper\">\n\n    @if($errors->has()"
  },
  {
    "path": "app/views/member/snippets/edit.blade.php",
    "chars": 2254,
    "preview": "@extends('layouts.master')\n\n@section('content')\n\n  <div class=\"row submit-snippet-page-wrapper\">\n\n    @if($errors->has()"
  },
  {
    "path": "app/views/member/users/dashboard.blade.php",
    "chars": 2698,
    "preview": "@extends('layouts.master')\n\n@section('content')\n\n  <div class=\"starred-snippets\">\n\n    <h4 class=\"heading\">Starred Snipp"
  },
  {
    "path": "app/views/partials/footer.blade.php",
    "chars": 1236,
    "preview": "<div class=\"contribute-band\">\n\t<div class=\"container\">\n\t\t<p>Want to help with the site? We accept pull requests! <a href"
  },
  {
    "path": "app/views/partials/header.blade.php",
    "chars": 2518,
    "preview": "<div class=\"navbar navbar-default\" role=\"navigation\">\n    <div class=\"container\">\n\n        <div class=\"navbar-header\">\n "
  },
  {
    "path": "app/views/partials/notifications.blade.php",
    "chars": 142,
    "preview": "@if (Session::has('message'))\n\t<div class=\"alert alert-{{ Session::get('messageType', 'danger') }}\">{{ Session::get('mes"
  },
  {
    "path": "app/views/partials/pagination.blade.php",
    "chars": 264,
    "preview": "<div class=\"pagination-container\">\n\n\t<?php\n\t$presenter = new Illuminate\\Pagination\\BootstrapPresenter($paginator);\n\t?>\n\n"
  },
  {
    "path": "app/views/partials/search-narrow.blade.php",
    "chars": 119,
    "preview": "<div class=\"search-band narrow\">\n    <div class=\"container\">\n        <div class=\"row\">\n        </div>\n    </div>\n</div>"
  },
  {
    "path": "app/views/partials/search.blade.php",
    "chars": 505,
    "preview": "<div class=\"search-band\">\n    <div class=\"container\">\n\n        <div class=\"row\">\n            <div class=\"col-md-12\">\n   "
  },
  {
    "path": "app/views/partials/searchForm.blade.php",
    "chars": 435,
    "preview": "{{Form::open(['route' => 'snippet.getIndex', 'method' => 'GET', 'class' => $formClass])}}\n<div class=\"form-group\">\n    {"
  },
  {
    "path": "app/views/partials/sidebars/default.blade.php",
    "chars": 196,
    "preview": "<div id=\"sidebar\" class=\"col-md-3\">\n\n\t@include('partials/sidebars/widgets/categories')\n\t@include('partials/sidebars/widg"
  },
  {
    "path": "app/views/partials/sidebars/snippet.blade.php",
    "chars": 242,
    "preview": "<div id=\"sidebar\" class=\"col-md-3\">\n\n\t@include('partials/sidebars/widgets/author')\n\t@include('partials/sidebars/widgets/"
  },
  {
    "path": "app/views/partials/sidebars/widgets/author.blade.php",
    "chars": 1433,
    "preview": "<div class=\"sidebar-widget widget-author\">\n\n\t<h4><a href=\"{{ route('user.getProfile', $snippet->author->slug) }}\">{{ e($"
  },
  {
    "path": "app/views/partials/sidebars/widgets/categories.blade.php",
    "chars": 276,
    "preview": "@if ( count( $tags ) > 0 )\n\n\t<div class=\"sidebar-widget widget-categories\">\n\t\t<h4>Categories</h4>\n\t\t<ul>\n\t\t\t@foreach ( $"
  },
  {
    "path": "app/views/partials/sidebars/widgets/social.blade.php",
    "chars": 1139,
    "preview": "<div class=\"sidebar-widget widget-social\">\n\t<h4>Get Involved</h4>\n\t<p><a href=\"{{ route('home') }}\">{{ Config::get('site"
  },
  {
    "path": "app/views/partials/sidebars/widgets/top-contributors.blade.php",
    "chars": 500,
    "preview": "@if ( count( $topSnippetContributors ) > 0 )\n\n\t<div class=\"sidebar-widget widget-contributors\">\n\t\t<h4>Top 5 Snippet Cont"
  },
  {
    "path": "app/views/partials/snippets.php",
    "chars": 953,
    "preview": "<?php if ( count( $snippets ) > 0 ): ?>\n\n\t<div class=\"table-responsive\">\n\t\t<table class=\"table snippets-table\">\n\t\t\t<thea"
  },
  {
    "path": "app/views/password/remind.blade.php",
    "chars": 678,
    "preview": "@extends('layouts.master')\n\n@section('content')\n\n\t<div class=\"row\">\n\n\t\t@if ($errors->has())\n\t\t\t<p>We encountered the fol"
  },
  {
    "path": "app/views/password/reset.blade.php",
    "chars": 1178,
    "preview": "@extends('layouts.master')\n\n@section('content')\n\n<div class=\"row login-page-wrapper\">\n\n  @if($errors->has())\n  <p>We enc"
  },
  {
    "path": "app/views/snippets/index.blade.php",
    "chars": 793,
    "preview": "@extends('layouts.master')\n\n@section('content')\n\n    <div class=\"band\">\n        <div class=\"row\">\n\n            <div clas"
  },
  {
    "path": "app/views/snippets/show.blade.php",
    "chars": 4496,
    "preview": "@extends('layouts.master')\n\n@if ($snippet->description)\n\t@section('meta_description')\n\t\t<meta name=\"description\" content"
  },
  {
    "path": "app/views/tags/snippets.blade.php",
    "chars": 308,
    "preview": "@extends('layouts.master')\n\n@section('content')\n\n\t<div class=\"row\">\n\n\t\t<div class=\"col-md-9\">\n\t\t\t<h1>{{ substr( $tag->na"
  },
  {
    "path": "app/views/users/index.blade.php",
    "chars": 1507,
    "preview": "@extends('layouts.master')\n\n@section('content')\n\n    <div class=\"band\">\n        <div class=\"user-profiles-wrapper\">\n\n   "
  },
  {
    "path": "app/views/users/profile.blade.php",
    "chars": 1555,
    "preview": "@extends('layouts.master')\n\n@section('content')\n\n  <div class=\"row user-profile-wrapper\">\n    <div class=\"col-md-12\">\n\n "
  },
  {
    "path": "app/views/users/settings.blade.php",
    "chars": 6898,
    "preview": "@extends('layouts.master')\n@section('content')\n    {{ Form::model($user,['route' => ['user.putSettings',$user->slug], 'm"
  },
  {
    "path": "app/views/users/snippets.blade.php",
    "chars": 135,
    "preview": "@extends('layouts.master')\n\n@section('content')\n\n\t<h1>{{ e($user->full_name) }}'s Snippets</h1>\n\t{{ HTML::snippets($snip"
  },
  {
    "path": "app/views/website/pages/404.blade.php",
    "chars": 253,
    "preview": "@extends('layouts.master')\n\n@section('content')\n\n    <div class=\"band text-center\">\n        <h1>404</h1>\n        <h2>We "
  },
  {
    "path": "app/views/website/pages/index.blade.php",
    "chars": 632,
    "preview": "@extends('layouts.master')\n\n@section('content')\n\n\t<div class=\"band\">\n\t\t<div class=\"row\">\n\n\t\t\t<div class=\"col-md-9\">\n\n\t\t\t"
  },
  {
    "path": "app/views/website/pages/roadmap.blade.php",
    "chars": 975,
    "preview": "@extends('layouts.master')\n\n@section('content')\n\n\t<div class=\"band\">\n\t\t<h1>Roadmap</h1>\n\t\t<p>OK, you're right, you've fo"
  },
  {
    "path": "artisan",
    "chars": 2451,
    "preview": "#!/usr/bin/env php\n<?php\n\n/*\n|--------------------------------------------------------------------------\n| Register The "
  },
  {
    "path": "bootstrap/autoload.php",
    "chars": 2453,
    "preview": "<?php\n\ndefine('LARAVEL_START', microtime(true));\n\n/*\n|------------------------------------------------------------------"
  },
  {
    "path": "bootstrap/paths.php",
    "chars": 1753,
    "preview": "<?php\n\nreturn array(\n\n\t/*\n\t|--------------------------------------------------------------------------\n\t| Application Pa"
  },
  {
    "path": "bootstrap/start.php",
    "chars": 2422,
    "preview": "<?php\n\n/*\n|--------------------------------------------------------------------------\n| Create The Application\n|--------"
  },
  {
    "path": "composer.json",
    "chars": 1256,
    "preview": "{\n  \"name\"        : \"laravel/laravel\",\n  \"description\" : \"The Laravel Framework.\",\n  \"keywords\"    : [\"framework\", \"lara"
  },
  {
    "path": "gulpfile.js",
    "chars": 1563,
    "preview": "// Require plugins.\nvar gulp = require('gulp'),\n    gutil = require('gulp-util'),\n    notify = require('gulp-notify'),\n "
  },
  {
    "path": "package.json",
    "chars": 232,
    "preview": "{\n  \"devDependencies\": {\n    \"gulp\": \"~3.5.6\",\n    \"gulp-ruby-sass\": \"~0.4.0\",\n    \"gulp-util\": \"~2.2.14\",\n    \"gulp-cof"
  },
  {
    "path": "phpunit.xml",
    "chars": 910,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<phpunit backupGlobals=\"false\"\n         backupStaticAttributes=\"false\"\n         b"
  },
  {
    "path": "public/.htaccess",
    "chars": 195,
    "preview": "<IfModule mod_rewrite.c>\n    Options -MultiViews\n    RewriteEngine On\n\n    RewriteCond %{REQUEST_FILENAME} !-d\n    Rewri"
  },
  {
    "path": "public/administration/css/sb-admin-2.css",
    "chars": 5593,
    "preview": "/*!\n * Start Bootstrap - SB Admin 2 Bootstrap Admin Theme (http://startbootstrap.com)\n * Code licensed under the Apache "
  },
  {
    "path": "public/administration/css/timeline.css",
    "chars": 3423,
    "preview": ".timeline {\n    position: relative;\n    padding: 20px 0 20px;\n    list-style: none;\n}\n\n.timeline:before {\n    content: \""
  },
  {
    "path": "public/administration/js/sb-admin-2.js",
    "chars": 1181,
    "preview": "$(function() {\n\n    $('#side-menu').metisMenu();\n\n});\n\n//Loads the correct sidebar on window load,\n//collapses the sideb"
  },
  {
    "path": "public/assets/coffee/common.coffee",
    "chars": 46,
    "preview": "root = (exports ? window)\n\nroot.LaraSnipp = {}"
  },
  {
    "path": "public/assets/coffee/snippet.coffee",
    "chars": 529,
    "preview": "$ ->\n  \"use strict\"\n\n  if $('.js-submit-snippet-form').length > 0\n    editor = CodeMirror.fromTextArea(document.getEleme"
  },
  {
    "path": "public/assets/css/styles.css",
    "chars": 13393,
    "preview": "*{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-font-smoothing:antialiased;text"
  },
  {
    "path": "public/assets/js/common.js",
    "chars": 147,
    "preview": "(function() {\n  var root;\n\n  root = typeof exports !== \"undefined\" && exports !== null ? exports : window;\n\n  root.LaraS"
  },
  {
    "path": "public/assets/js/snippet.js",
    "chars": 715,
    "preview": "(function() {\n  $(function() {\n    \"use strict\";\n    var editor;\n    if ($('.js-submit-snippet-form').length > 0) {\n    "
  },
  {
    "path": "public/assets/js/vendors/json2/json2.js",
    "chars": 17523,
    "preview": "/*\n    json2.js\n    2013-05-26\n\n    Public Domain.\n\n    NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n\n    See"
  },
  {
    "path": "public/assets/scss/core/_band.scss",
    "chars": 170,
    "preview": ".band {\n\t@include clearfix;\n\tpadding: 20px 0 0;\n\n\t@include min-screen-width(tablet-portrait) {\n\t\tpadding: 45px 0 25px;\n\t"
  },
  {
    "path": "public/assets/scss/core/_global.scss",
    "chars": 3833,
    "preview": "/****************************************************\n* Global Tags\n****************************************************"
  },
  {
    "path": "public/assets/scss/core/_mixins.scss",
    "chars": 1009,
    "preview": "@mixin min-screen-width( $media ) {\n\n\t@if $media == mobile-landscape {\n\t\t@media only screen and (min-width:480px) {\n\t\t\t@"
  },
  {
    "path": "public/assets/scss/core/_variables.scss",
    "chars": 190,
    "preview": "$gutter: 30px;\n$margin: 20px;\n$accent: #6D9FBF;\n$site-text-colour: #656565;\n$copy-font: 'Source Sans Pro';\n$detail-font:"
  },
  {
    "path": "public/assets/scss/pages/_profiles.scss",
    "chars": 55,
    "preview": "body.profiles {\n\t.profile {\n\t\tmargin-bottom: 30px;\n\t}\n}"
  },
  {
    "path": "public/assets/scss/pages/_snippet.scss",
    "chars": 2035,
    "preview": "body.single-snippet {\n\th1 {\n\t\tmargin: 0 0 10px;\n\n\t\t@include min-screen-width(tablet-portrait) {\n\t\t\tmargin: 0;\n\t\t}\n\t}\n\n\t."
  },
  {
    "path": "public/assets/scss/partials/_breadcrumbs.scss",
    "chars": 136,
    "preview": ".breadcrumbs {\n\tfont-size: 13px;\n\tmargin: 45px 0 15px;\n\n\t.fa-chevron-right {\n\t\tcolor: #BABABA;\n\t\tfont-size: 10px;\n\t\tmarg"
  },
  {
    "path": "public/assets/scss/partials/_footer.scss",
    "chars": 1006,
    "preview": ".contribute-band {\n\tbackground-color: #fbfbfb;\n\tborder-top: 2px solid #E2E2E2;\n\tcolor: #656565;\n\tfont-size: 30px;\n\tline-"
  },
  {
    "path": "public/assets/scss/partials/_nav-bar.scss",
    "chars": 690,
    "preview": ".navbar {\n\t@include box-shadow(0 2px 0 rgba(0,0,0,.1));\n\tbackground-color: #FFF;\n\tborder: none;\n\tfont-size: 15px;\n\tmargi"
  },
  {
    "path": "public/assets/scss/partials/_pagination.scss",
    "chars": 273,
    "preview": ".pagination-container {\n\ttext-align: center;\n}\n\n.pagination {\n\t> li {\n\t\t> a,\n\t\t> span {\n\t\t\tborder: none;\n\t\t\tcolor: #6d9f"
  },
  {
    "path": "public/assets/scss/partials/_search-band.scss",
    "chars": 334,
    "preview": ".search-band {\n\t@include box-shadow(0 2px 0 rgba(0,0,0,.1));\n\tbackground-color: #6d9fbf;\n\tcolor: #39515F;\n\tfont-size: 14"
  },
  {
    "path": "public/assets/scss/partials/_sidebar.scss",
    "chars": 2822,
    "preview": "#sidebar {\n\n\t.sidebar-widget {\n\t\tmargin-bottom: 30px;\n\t}\n\n\t.widget-categories ul {\n\t\tborder-top: 1px solid #F5F5F5;\n\t\tli"
  },
  {
    "path": "public/assets/scss/partials/_snippets.scss",
    "chars": 95,
    "preview": ".snippets-table {\n\tth, td {\n\t\ttext-align: center;\n\n\t\t&.textleft {\n\t\t\ttext-align: left;\n\t\t}\n\t}\n}"
  },
  {
    "path": "public/assets/scss/styles.scss",
    "chars": 895,
    "preview": "@charset \"utf-8\";\n@import \"compass/css3\";\n\n// Setup\n@import \"core/variables\";\n@import \"core/mixins\";\n\n// Core\n@import \"c"
  },
  {
    "path": "public/index.php",
    "chars": 1585,
    "preview": "<?php\n/**\n * Laravel - A PHP Framework For Web Artisans\n *\n * @package  Laravel\n * @author   Taylor Otwell <taylorotwell"
  },
  {
    "path": "public/packages/.gitkeep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "public/packages/chosen_v1.0.0/chosen.css",
    "chars": 13586,
    "preview": "/* @group Base */\n.chosen-container {\n  position: relative;\n  display: inline-block;\n  vertical-align: middle;\n  font-si"
  },
  {
    "path": "public/packages/chosen_v1.0.0/chosen.jquery.js",
    "chars": 40437,
    "preview": "// Chosen, a Select Box Enhancer for jQuery and Prototype\n// by Patrick Filler for Harvest, http://getharvest.com\n//\n// "
  },
  {
    "path": "public/packages/chosen_v1.0.0/chosen.proto.js",
    "chars": 40895,
    "preview": "// Chosen, a Select Box Enhancer for jQuery and Prototype\n// by Patrick Filler for Harvest, http://getharvest.com\n//\n// "
  },
  {
    "path": "public/packages/chosen_v1.0.0/docsupport/prism.css",
    "chars": 1492,
    "preview": "/**\n * okaidia theme for JavaScript, CSS and HTML\n * Loosely based on Monokai textmate theme by http://www.monokai.nl/\n "
  },
  {
    "path": "public/packages/chosen_v1.0.0/docsupport/prism.js",
    "chars": 6659,
    "preview": "/**\n * Prism: Lightweight, robust, elegant syntax highlighting\n * MIT license http://www.opensource.org/licenses/mit-lic"
  },
  {
    "path": "public/packages/chosen_v1.0.0/docsupport/style.css",
    "chars": 6864,
    "preview": "/* Reset */\nhtml, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, abbr, address, cite, code"
  },
  {
    "path": "public/packages/chosen_v1.0.0/index.html",
    "chars": 85528,
    "preview": "<!doctype html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"utf-8\">\n  <title>Chosen: A jQuery Plugin by Harvest to Tame Unw"
  },
  {
    "path": "public/packages/chosen_v1.0.0/index.proto.html",
    "chars": 86020,
    "preview": "<!doctype html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"utf-8\">\n  <title>Chosen: A Prototype Plugin by Harvest to Tame "
  },
  {
    "path": "public/packages/chosen_v1.0.0/options.html",
    "chars": 10657,
    "preview": "<!doctype html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"utf-8\">\n  <title>Chosen: A jQuery Plugin by Harvest to Tame Unw"
  },
  {
    "path": "public/packages/codemirror-3.19/.gitattributes",
    "chars": 104,
    "preview": "*.txt   text\n*.js    text\n*.html  text\n*.md    text\n*.json  text\n*.yml   text\n*.css   text\n*.svg   text\n"
  },
  {
    "path": "public/packages/codemirror-3.19/.gitignore",
    "chars": 56,
    "preview": "/node_modules\n/npm-debug.log\ntest.html\n.tern-*\n*~\n*.swp\n"
  },
  {
    "path": "public/packages/codemirror-3.19/.travis.yml",
    "chars": 35,
    "preview": "language: node_js\nnode_js:\n  - 0.8\n"
  },
  {
    "path": "public/packages/codemirror-3.19/AUTHORS",
    "chars": 3263,
    "preview": "List of CodeMirror contributors. Updated before every release.\n\n4r2r\nAaron Brooks\nAdam King\nadanlobato\nAdán Lobato\naeros"
  }
]

// ... and 415 more files (download for full content)

About this extraction

This page contains the full source code of the basco-johnkevin/laravelsnippets GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 615 files (3.3 MB), approximately 890.0k tokens, and a symbol index with 1641 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!