[
  {
    "path": ".gitignore",
    "content": "# Miscelleaneous\n.DS_Store\n\n# Editors\n.vscode/\n\n# Vim\n*.swp\n"
  },
  {
    "path": ".husky/commit-msg",
    "content": "#!/bin/sh\n. \"$(dirname \"$0\")/_/husky.sh\"\n\nnpx --no -- commitlint --edit \"\"\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2018 Julien Le Coupanec\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "[![AWESOME CHEATSHEETS LOGO](_design/cover_github@2x.png)](https://lecoupa.github.io/awesome-cheatsheets/)\n\n<p align=center>\n     <a href=\"https://trendshift.io/repositories/5584\" target=\"_blank\"><img src=\"https://trendshift.io/api/badge/repositories/5584\" alt=\"LeCoupa%2Fawesome-cheatsheets | Trendshift\" style=\"width: 250px; height: 55px;\" width=\"250\" height=\"55\"/></a>\n</p>\n\n[![Awesome](https://awesome.re/badge.svg)](https://awesome.re) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/LeCoupa/awesome-cheatsheets/blob/master/LICENSE)\n\n**WEBSITE DIRECTORY**: [Available here](https://lecoupa.github.io/awesome-cheatsheets/).\n\n> 📚 Awesome cheatsheets for popular programming languages, frameworks and development tools. They include everything you should know in one single file.\n\n## 🤔 Why Awesome-Cheatsheets?\n\nI usually make a cheat sheet when I want to improve my skills in a programming language, a framework or a development tool. [I started doing these kinds of things a long time ago on Gist](https://gist.github.com/LeCoupa). To better keep track of the history and to let people contribute, I re-organized all of them into this single repository. Most of the content is coming from official documentation and some books I have read.\n\nFeel free to take a look. You might learn new things. They have been designed to provide a quick way to assess your knowledge and to save you time.\n\n## 📚 Table of Contents\n\n### 📃 Languages\n\n<details>\n<summary>View cheatsheets</summary>\n\n#### Command line interface\n\n- [Bash](languages/bash.sh)\n\n#### Imperative\n\n- [C](languages/C.txt)\n- [C#](languages/C%23.txt)\n- [Go](languages/golang.md)\n- [Java](languages/java.md)\n- [PHP](languages/php.php)\n- [Python](languages/python.md)\n\n#### Functional\n\n- [JavaScript](languages/javascript.js)\n\n</details>\n\n### 📦 Backend\n\n<details>\n<summary>View cheatsheets</summary>\n\n#### PHP\n\n- [Laravel](backend/laravel.php)\n\n#### Python\n\n- [Django](backend/django.py)\n\n#### Javascript\n\n- [Adonis.js](backend/adonis.js)\n- [Express.js](backend/express.js)\n- [Feathers.js](backend/feathers.js)\n- [Moleculer](backend/moleculer.js)\n- [Node.js](backend/node.js)\n- [Sails.js](backend/sails.js)\n  </details>\n\n### 🌐 Frontend\n\n<details>\n<summary>View cheatsheets</summary>\n\n#### Basics\n\n- [HTML5](frontend/html5.html)\n- [CSS3](frontend/css3.css)\n\n#### Frameworks\n\n- [React.js](frontend/react.js)\n- [Vue.js](frontend/vue.js)\n- [Tailwind.css](frontend/tailwind.css)\n- [Ember.js](frontend/ember.js)\n- [Angular (2+)](frontend/angular.js)\n- [AngularJS](frontend/angularjs.js)\n  </details>\n\n### 🗃️ Databases\n\n<details>\n<summary>View cheatsheets</summary>\n\n#### SQL\n\n- [MySQL](databases/mysql.sh)\n\n#### NoSQL\n\n- [Redis](databases/redis.sh)\n  </details>\n\n### 🔧 Tools\n\n<details>\n<summary>View cheatsheets</summary>\n\n#### Development\n\n- [cURL](tools/curl.sh)\n- [Drush](tools/drush.sh)\n- [Elasticsearch](tools/elasticsearch.js)\n- [Emmet](tools/emmet.md)\n- [Git](tools/git.sh)\n- [Puppeteer](tools/puppeteer.js)\n- [Sublime Text](tools/sublime_text.md)\n- [VIM](tools/vim.txt)\n- [Visual Studio Code](tools/vscode.md)\n- [Xcode](tools/xcode.txt)\n\n#### Infrastructure\n\n- [AWS CLI](tools/aws.sh)\n- [Docker](tools/docker.sh)\n- [Heroku CLI](tools/heroku.sh)\n- [Kubernetes](tools/kubernetes.md)\n- [Nanobox Boxfile](tools/nanobox_boxfile.yml)\n- [Nanobox CLI](tools/nanobox_cli.sh)\n- [Nginx](tools/nginx.sh)\n- [PM2](tools/pm2.sh)\n- [Ubuntu](tools/ubuntu.sh)\n- [Firebase CLI](tools/firebase_cli.md)\n  </details>\n\n## 🙌🏼 How to Contribute?\n\nYou are more than welcome to contribute and build your own cheat sheet for your favorite programming language, framework or development tool. Just submit changes via pull request and I will review them before merging.\n\n## 👩‍💻👨‍💻 Our valuable Contributors\n\n<p align=\"center\"><a href=\"https://github.com/LeCoupa/awesome-cheatsheets/graphs/contributors\">\n  <img src=\"https://contributors-img.web.app/image?repo=LeCoupa/awesome-cheatsheets\" />\n</a></p>\n"
  },
  {
    "path": "backend/adonis.js",
    "content": "/********************************************************************************************\n * ADONIS CHEATSHEET\n * https://adonisjs.com/\n ********************************************************************************************/\n\n/********************************************************************************************\n* AVAILABLE CLI COMMANDS\n* https://adonisjs.com/docs/ace\n********************************************************************************************/\n\nbuild   // Compile typescript code to Javascript. Optionally watch for file changes.\ninvoke  // Invoke post install instructions on a given AdonisJs package.\nserve   // Compile typescript code to Javascript and start the HTTP server.\n\n// Dump\n\ndump:rcfile  // Dump contents of .adonisrc.json file along with defaults.\n\n// Generate\n\ngenerate:key       // Generate a new APP_KEY secret.\ngenerate:manifest  // Generate manifest file to execute ace commands.\n\n// List\n\nlist:routes  // List application routes.\n\n// Make\n\nmake:command     // Make a new ace command.\nmake:controller  // Make a new HTTP controller.\nmake:middleware  // Make a new middleware.\nmake:migration   // Make a new migration.\nmake:provider    // Make a new IoC container provider.\nmake:validator   // Make a new validator.\nmake:view        // Make a new view template.\n\n// Migrations\n\nmigration:run       // Run all pending migrations.\nmigration:rollback  // Rollback last set of migrations.\nmigration:refresh   // Rollback all migrations to the 0 batch then re-run them from the start.\nmigration:reset     // Rollback all migrations to the 0 batch.\nmigration:status    // Get the status of all the migrations.\n\n/********************************************************************************************\n* REQUEST\n* https://adonisjs.com/docs/request\n********************************************************************************************/\n\nrequest.all()                             // Returns an object containing all request data (merges query params and request body data).\nrequest.get()                             // Returns an object containing query params data.\nrequest.post()                            // Returns an object containing request body data.\nrequest.raw()                             // Returns raw body data as a string.\nrequest.only(['username', 'age'])         // Returns an object with only the specified keys.\nrequest.collect(['username', 'age'])      // Formats so it’s ready to save to the database.\nrequest.except(['csrf_token', 'submit'])  // Returns an object with everything except the specified keys (opposite of only).\nrequest.input('drink', 'coffee')          // Get the value of a given key (if it doesn’t exist, return the default value).\n\nrequest.headers()                               // Returns an object of all header data.\nrequest.header('some-other-header', 'default')  // The header value for a given key (optionally with default value).\n\nrequest.cookies()                     // Returns an object of all cookie data.\nrequest.cookie('cart_total', 0)       // Returns the cookie value for a given key (optionally with default value).\nrequest.plainCookies()                // Returns an object of all raw cookie data.\nrequest.plainCookie('cart_total', 0)  // Returns the raw cookie value for a given key (optionally with default value).\n\nrequest.accepts(['json', 'html'])  // Reads the Accept header to help determine the response format.\nrequest.language(['en', 'fr'])     // Language can also be negotiated based upon the Accept-Language header.\n\nrequest.url()                 // Returns the current request url.\nrequest.originalUrl()         // Returns the full current request url with query strings.\nrequest.method()              // Returns the HTTP request method.\nrequest.intended()            // Returns the intended request HTTP method.\nrequest.ip()                  // Returns the most trusted ip address for the user.\nrequest.ips()                 // Returns an array of ips from most to the least trusted (removes the default ip address, which can be accessed via the ip method).\nrequest.subdomains()          // Returns a list of request subdomains (removes www from the list).\nrequest.ajax()                // Checks for X-Requested-With header to determine if the request is ajax or not.\nrequest.pjax()                // This methods looks for the X-PJAX header to identify if a request is pjax or not.\nrequest.hostname()            // Returns the request hostname.\nrequest.protocol()            // Return the request protocol.\nrequest.match(['posts/:id'])  // Returns whether the passed set of expressions match the current request URL.\nrequest.hasBody()             // A boolean indicating if the request has a post body (mainly used by the BodyParser to determine whether or not to parse the body).\nrequest.is(['json', 'html'])  // The is method returns the best matching content type for the current request. The check is entirely based upon the content-type header.\n\n/********************************************************************************************\n* RESPONSE\n* https://adonisjs.com/docs/response\n********************************************************************************************/\n\nresponse.header(\"Content-type\", \"application/json\");      // Set a header value.\nresponse.safeHeader(\"Content-type\", \"application/json\");  // Only set a header value if it does not already exist.\nresponse.removeHeader(\"Content-type\");                    // Remove an existing header.\nresponse.type(\"application/json\");                        // Set the Content-Type header.\n\nresponse.cookie(\"cartTotal\", 20);       // Set a cookie value.\nresponse.clearCookie(\"cartTotal\");      // Remove an existing cookie value (by setting its expiry in the past).\nresponse.plainCookie(\"cartTotal\", 20);  // Set a plain cookie.\n\nresponse.redirect(url, [(sendParams = false)], [(status = 302)]);                   // Redirect request to a different url (by default it will set the status as 302).\nresponse.route(route, [data], [domain], [(sendParams = false)], [(status = 302)]);  // Redirect to a route (via route name or controller method).\n\nresponse.download(filePath);                           // Stream the file to the client.\nresponse.attachment(filePath, [name], [disposition]);  // Force download the file.\n\nresponse.continue();                      // 100 status code\nresponse.switchingProtocols();            // 101 status code\nresponse.ok();                            // 200 status code\nresponse.created();                       // 201 status code\nresponse.accepted();                      // 202 status code\nresponse.nonAuthoritativeInformation();   // 203 status code\nresponse.noContent();                     // 204 status code\nresponse.resetContent();                  // 205 status code\nresponse.partialContent();                // 206 status code\nresponse.multipleChoices();               // 300 status code\nresponse.movedPermanently();              // 301 status code\nresponse.found();                         // 302 status code\nresponse.seeOther();                      // 303 status code\nresponse.notModified();                   // 304 status code\nresponse.useProxy();                      // 305 status code\nresponse.temporaryRedirect();             // 307 status code\nresponse.badRequest();                    // 400 status code\nresponse.unauthorized();                  // 401 status code\nresponse.paymentRequired();               // 402 status code\nresponse.forbidden();                     // 403 status code\nresponse.notFound();                      // 404 status code\nresponse.methodNotAllowed();              // 405 status code\nresponse.notAcceptable();                 // 406 status code\nresponse.proxyAuthenticationRequired();   // 407 status code\nresponse.requestTimeout();                // 408 status code\nresponse.conflict();                      // 409 status code\nresponse.gone();                          // 410 status code\nresponse.lengthRequired();                // 411 status code\nresponse.preconditionFailed();            // 412 status code\nresponse.requestEntityTooLarge();         // 413 status code\nresponse.requestUriTooLong();             // 414 status code\nresponse.unsupportedMediaType();          // 415 status code\nresponse.requestedRangeNotSatisfiable();  // 416 status code\nresponse.expectationFailed();             // 417 status code\nresponse.unprocessableEntity();           // 422 status code\nresponse.tooManyRequests();               // 429 status code\nresponse.internalServerError();           // 500 status code\nresponse.notImplemented();                // 501 status code\nresponse.badGateway();                    // 502 status code\nresponse.serviceUnavailable();            // 503 status code\nresponse.gatewayTimeout();                // 504 status code\nresponse.httpVersionNotSupported();       // 505 status code\n\n/********************************************************************************************\n* ROUTING\n* https://adonisjs.com/docs/routing\n********************************************************************************************/\n\nRoute.get(url, closure)     // Register route for GET verb.\nRoute.post(url, closure)    // Register route for POST verb.\nRoute.put(url, closure)     // Register route for PUT verb.\nRoute.patch(url, closure)   // Register route for PATCH verb.\nRoute.delete(url, closure)  // Register route for DELETED verb.\nRoute.any(url, closure)     // Register route for all HTTP verbs.\n\nRoute.on('/').render('welcome')  // Render a view directly.\n\nRoute.route('/', () => {}, ['GET', 'POST', 'PUT'])           // Register route for multiple verbs.\nRoute.get('users', closure).as('users.index')                // Assign a unique name to the route.\nRoute.get('users', closure).formats(['json', 'html'], true)  // Force client to define the route format.\n\nRoute.resource('users', 'UserController')                    // Define a resource route for CRUD operations.\nRoute.resource('users', 'UserController').apiOnly()          // Remove create and edit routes.\nRoute.resource('users', 'UserController').only(['index'])    // Keeps only the passed routes.\nRoute.resource('users', 'UserController').except(['index'])  //Keeps all routes except the passed routes.\n\nRoute.group(() => {})                          // Define a group of routes.\nRoute.group(() => {}).middleware(['auth'])     // Attach a middleware.\nRoute.group(() => {}).formats(['json'])        // Define response formats.\nRoute.group(() => {}).prefix('api/v1')         // Define a prefix for a group of routes.\nRoute.group(() => {}).namespace('Admin')       // Prefix the namespace of the bound controller.\nRoute.group(() => {}).domain('blog.sthg.com')  // Specify which domain goup routes belong to.\n\n/********************************************************************************************\n* VALIDATOR\n* https://indicative-v5.adonisjs.com/\n********************************************************************************************/\n\nconst indicative = require(\"indicative\");\n\nconst rules = {\n  email: \"required|email|unique:users\",\n  password: \"required|min:6|max:30\",\n};\n\n// Indivative methods\n\nindicative.validate(data, rules);                   //  Validate data with defined rules.\nindicative.validateAll(data, rules);                //  Same as validate but continues to validate all fields, whereas the validate method stops on first error.\nindicative.is.email(emailAddress);                  //  Raw validator.\nindicative.extend(\"exists\", existsFn);              //  Add your own rules.\nindicative.sanitize(data, rules);                   //  Returns a new object with sanitized data:.\nindicative.sanitizor.normalizeEmail(emailAddress);  //  Raw sanitizor.\n\n// Validations\n\nabove               // Makes sure the value provided by the end user is above the expected value.\naccepted            // Ensures that the field under validation is accepted.\nafter               // Ensures the value of the field is after the expected date.\nafterOffsetOf       // Ensures the date is after a given offset of a given time period.\nalpha               // Makes sure the field under validation is alpha only.\nalphaNumeric        // Makes sure the field under validation is alpha numeric only.\narray               // Ensure the value is a valid array. Also this validation will never validate the size of array.\nbefore              // Ensures the value of field under validation is before a given date.\nbeforeOffsetOf      // Ensures the date is before a given offset of a given time period.\nboolean             // Ensures the value of a field is a boolean.\nconfirmed           // Ensures a field value as confirmed using a _confirmation convention. This is mainly used for password confirmation field.\ndate                // Ensures the field under validation is a valid date. The value can be a date object or a valid date string.\ndateFormat          // Ensures the date or date time is valid as the one of the defined formats.\ndifferent           // Ensures the value of the field under validation is always different from the targeted field value.\nemail               // Ensures the field under validation is a valid email format.\nendsWith            // Ensure the value of field under validation ends with a certain substr. This validation will also trim whitespaces before making the check.\nequals              // Ensures 2 values are lossely same. This validation will not check for the same type, but instead checks for the same value.\nin                  // Ensures the value of a given field matches one of expected values.\nincludes            // Ensures the value of field under validation contains a given substring.\ninteger             // Ensures the value is a valid integer. Also string representation of a number will return true.\nip                  // Ensures the value is a valid ip address as per ipv4 and ipv6 specs.\nipv4                // Ensures the value is a valid ip address as per ipv4 spec only.\nipv6                // Ensures the value is a valid ip address as per ipv6 spec only.\njson                // Ensures the value of field under validation is safe to be parsed using JSON.parse method.\nmax                 // Ensures the length of a string or array is not greater than the defined length.\nmin                 // Ensures the length of a string or array is not is not less than the expected length\nnotEquals           // Makes sure that the value of field under validation is not same as the defined value.\nnotIn               // Makes sure that the value of field under validation is not from one of the defined values.\nnumber              // Makes sure that the value of field under validation is a valid number. The validation will pass for floats too, since it uses typeof internally.\nobject              // Ensures the value of field under validation is a valid Javascript object. The validation will fail for Arrays, though they are objects too in Javascript.\nrange               // Ensures the value of field under validation is under a given range. The values will be cased to Number automatically.\nregex               // Ensures the value of field under validation, passes the regex test. The regex can be defined as a string or a RegExp object.\nrequired            // Ensures the value of field under validation is not empty (i.e. not an empty object, empty array, empty string, null or undefined).\nrequiredIf          // The field is checked for required validation, when expected field exists.\nrequiredWhen        // The field is checked for required validation, when expected field value is same as the expected value.\nrequiredWithAll     // Ensures the field is required when all other fields have non-empty values.\nrequiredWithAny     // Ensures the field is required when any of the other fields have non-empty values.\nrequiredWithoutAll  // Ensures the field is required when all of the other fields has empty values.\nrequiredWithoutAny  // Ensures the field is required when any of the other fields has empty values.\nsame                // Ensures the value of 2 fields are same.\nstartsWith          // Ensure the value of field under validation starts with a certain substr. This validation will also trim whitespaces before making the check.\nstring              // Ensures the value is a string.\nunder               // Ensures the value of a field is under a certain value. All values will be casted to Number.\nurl                 // Ensures the value is a valid URL format.\n\n/********************************************************************************************\n* LUCID\n* https://adonisjs.com/docs/lucid\n********************************************************************************************/\n\nModel.find()                                 // Find a record using the primary key (always returns one record).\nModel.findOrFail()                           // Similar to find, but instead throws a ModelNotFoundException when unable to find a record.\nModel.findBy()                               // Find a record using a key/value pair (returns the first matching record).\nModel.findByOrFail()                         // Similar to findBy, but instead throws a ModelNotFoundException when unable to find a record.\nModel.first()                                // Find the first row from the database.\nModel.firstOrFail()                          // Similar to first, but instead throws a ModelNotFoundException when unable to find a record.\nModel.last()                                 // Find the latest row from the database.\nModel.findOrCreate(whereAttributes, values)  // Find a record, if not found a new record will be created and returned.\nModel.pick(rows = 1)                         // Pick x number of rows from the database table (defaults to 1 row).\nModel.pickInverse(rows = 1)                  // Pick x number of rows from the database table from last (defaults to 1 row).\nModel.ids()                                  // Return an array of primary keys.\nModel.pair(lhs, rhs)                         // Returns an object of key/value pairs (lhs is the key, rhs is the value).\nModel.all()                                  // Select all rows.\nModel.truncate()                             // Delete all rows (truncate table).\nModel.getCount()                             // Return a count of records in a given result set.\nModel.create(jsonAttributes)                 // Return model instance after saving it into the database.\nModel.createMany(arrayAttributes)            // Return an array of model instances after saving them into the database.\nModel.toJSON()                               // Converts a serializable instance to a plain array/object.\n\nModel.query().setHidden(['password'])        // Define hidden fields.\nModel.query().setVisible(['title', 'body'])  // Define visible fields.\nModel.query().paginate()                     // Returns an object with metadata and data property that has a list of model results.\n\ninstance.fill(jsonAttributes)                // Remove all existing values, only set the specified attributes.\ninstance.merge(jsonAttributes)               // Modifies the specified attributes.\ninstance.save()                              // Save the instance to the database.\ninstance.delete()                            // Delete model instance from the database.\n\ninstance.associate(id)                 // Exclusive to belongsTo relationship, where it associates two model instances together.\ninstance.dissociate(id)                // The opposite of associate, where you just drop the relationship\ninstance.attach(arrayOfIds, callback)  // Works with the belongsToMany relationship to attach a relationship inside the pivot table. The attach method accepts an optional callback receiving the pivotModel instance, allowing you to set extra properties on a pivot table if required:\ninstance.detach(arrayOfIds)            // The opposite of the attach method, and it removes the relationship from the pivot table only.\n\n/********************************************************************************************\n* QUERY BUILDER\n* https://adonisjs.com/docs/query-builder\n* http://knexjs.org/\n********************************************************************************************/\n\nconst Database = use('Database')\n\n// Available where clauses\n\nwhere(~mixed~)\norWhere(~mixed~)\nwhereNot(~mixed~)\norWhereNot(~mixed~)\nwhereIn(column|columns, array|callback|builder)\norWhereIn(column | columns, array | callback | builder)\nwhereNotIn(column, array|callback|builder)\norWhereNotIn(column, array | callback | builder)\nwhereNull(column)\norWhereNull(column)\nwhereNotNull(column)\norWhereNotNull(column)\nwhereExists(builder | callback)\norWhereExists(builder | callback)\nwhereNotExists(builder | callback)\norWhereNotExists(builder | callback)\nwhereBetween(column, range)\norWhereBetween(column, range)\nwhereNotBetween(column, range)\norWhereNotBetween(column, range)\nwhereRaw(query, [bindings])\n\n/********************************************************************************************\n* DATABASE HOOKS\n* https://adonisjs.com/docs/database-hooks\n********************************************************************************************/\n\nbeforeCreate   // Before creating a new record.\nafterCreate    // After a new record is created.\nbeforeUpdate   // Before updating a record.\nafterUpdate    // After a record has been updated.\nbeforeSave     // Before creating or updating a new record.\nafterSave      // After a new record has been created or updated.\nbeforeDelete   // Before removing a record.\nafterDelete    // After a record is removed.\nafterFind      // After a single record is fetched from the database.\nafterFetch     // After the fetch method is executed.The hook method receives an array of model instances.\nafterPaginate  // After the paginate method is executed.The hook method receives two arguments: an array of model instances and the pagination metadata.\n\n/********************************************************************************************\n* EVENTS\n* https://adonisjs.com/docs/events\n********************************************************************************************/\n\nEvent.on(event, listener)              // Bind single or multiple listeners for a given event. The listener can be a closure function or reference to one (or many) IoC container bindings.\nEvent.when(event, listener)            // The when method aliases the on method.\nEvent.once(event, listener)            // Same as on, but only called one time.\nEvent.onAny(listener)                  // Bind listener for any event\nEvent.times(number)                    // The times method is chained with on or when to limit the number of times the listener should be fired.\nEvent.emit(event, data)                // Emit an event with optional data.\nEvent.fire(event, data)                // The fire method aliases the emit method.\nEvent.removeListener(event, listener)  // Remove listener(s) for a given event.\nEvent.off(event, listener)             // The off method aliases the removeListener method.\nEvent.removeAllListeners(event)        // Remove all listeners for a given event.\nEvent.listenersCount(event)            // Return the number of listeners for a given event.\nEvent.getListeners(event)              // Return an array of listeners for a given event.\nEvent.hasListeners(event)              // Return a boolean indicating whether there are any listeners for a given event.\n\n/********************************************************************************************\n* LOGGER\n* https://adonisjs.com/docs/sessions\n********************************************************************************************/\n\nconst Logger = use('Logger')\n\nLogger.level = 'debug'  // Sed default config level\n\nLogger.emerg(msg[, …​data])    // Print an emergency log (level 0).\nLogger.alert(msg[, …​data])    // Print an alert log (level 1).\nLogger.crit(msg[, …​data])     // Print a critical log (level 2).\nLogger.error(msg[, …​data])    // Print an error log (level 3).\nLogger.warning(msg[, …​data])  // Print a warning log (level 4).\nLogger.notice(msg[, …​data])   // Print a notice log (level 5).\nLogger.info(msg[, …​data])     // Print an info log (level 6).\nLogger.debug(msg[, …​data])    // Print a debug log (level 7).\n\nLogger.transport(transport)  // Switch transport on the fly.\n\n/********************************************************************************************\n* ENCRYPTION AND HASHING\n* https://adonisjs.com/docs/encryption-and-hashing\n********************************************************************************************/\n\nconst Encryption = use('Encryption')\n\nEncryption.encrypt(string)  // Encrypt a given value.\nEncryption.decrypt(string)  // Decrypt an encrypted value.\n\nconst Hash = use('Hash')\n\nawait Hash.make(string[, config])        // Hash a plain string value.\nawait Hash.verify(string, hashedString)  // Since you cannot decrypt a hash, you can verify the user input against the previously hashed value.\n\n/********************************************************************************************\n* SESSIONS\n* https://adonisjs.com/docs/sessions\n********************************************************************************************/\n\nsession.put(key, value);            // Add a key/value pair to the session store.\nsession.get(key, [defaultValue]);   // Return the value for a given key (accepts an optional default value).\nsession.all();                      // Get everything back as an object from the session store.\nsession.increment(key, [steps]);    // Increment the value for a given key (ensure the previous value is a number).\nsession.decrement(key, [steps]);    // Decrement the value for a given key (ensure the previous value is a number).\nsession.forget(key);                // Remove a key/value pair from the session store.\nsession.pull(key, [defaultValue]);  // Return (and then remove) a key/value pair from the session store.\nsession.clear();                    // Empty the session store.\n\nsession.flashAll()     // Flash the request form data.\nsession.flashOnly()    // Flash only the selected fields.\nsession.flashExcept()  // Flash the request form data except the selected fields.\nsession.withErrors()   // Flash with an array of errors.\nsession.flash()        // Flash a custom object.\n\n/********************************************************************************************\n* FILE STORAGE\n* https://adonisjs.com/docs/file-system\n********************************************************************************************/\n\nconst Drive = use('Drive')\n\nDrive.exists(relativePath)                          // Find if a file/directory exists or not.\nDrive.get(relativePath, encoding = utf-8)           // Get file contents as a buffer or string.\nDrive.getStream(relativePath)                       // Get file as a stream.\nDrive.put(relativePath, content, options = {})      // Create a new file with given contents (creates any missing directories).\nDrive.prepend(relativePath, content, options = {})  // Prepend content to a file (creates a new file if path doesn’t exist).\nDrive.append(relativePath, content, options = {})   // Append content to a file (creates a new file if path doesn’t exist).\nDrive.delete(relativePath)                          // Remove existing file.\nDrive.move(src, dest, options = {})                 // Move file from one directory to another.\nDrive.copy(src, dest, options = {})                 // Copy file from one directory to another.\n\n// For S3 & Spaces drivers\n\nDrive.getObject(location, params)                   // Get S3 object for a given file (for params info, see S3 params).\nDrive.getUrl(location, [bucket])                    // Get url for a given file (accepts optional alternative bucket param).\nDrive.getSignedUrl(location, expiry = 900, params)  // Get signed url for a given file (expiry set to 15mins by default).\n\n/********************************************************************************************\n* HELPERS\n* https://adonisjs.com/docs/helpers\n********************************************************************************************/\n\nconst Helpers = use('Helpers')\n\nHelpers.appRoot()                 // Returns path to the application root.\nHelpers.publicPath([toFile])      // Returns path to the public directory or file inside the directory.\nHelpers.configPath([toFile])      // Returns path to the config directory or file inside the directory.\nHelpers.resourcesPath([toFile])   // Returns path to the resources directory or file inside the directory.\nHelpers.migrationsPath([toFile])  // Returns path to the migrations directory or file inside the directory.\nHelpers.seedsPath([toFile])       // Returns path to the seeds directory or file inside the directory.\nHelpers.databasePath([toFile])    // Returns path to the database directory or file inside the directory.\nHelpers.viewsPath([toFile])       // Returns path to the views directory or file inside the directory.\nHelpers.tmpPath([toFile])         // Returns path to the tmp directory or file inside the directory.\n\nHelpers.promisify()               // Returns promisified callback functions.\nHelpers.isAceCommand()            // Returns whether the process was started as the ace command or not.\n\n/********************************************************************************************\n* SOCIAL AUTHENTICATION\n* https://adonisjs.com/docs/social-auth\n********************************************************************************************/\n\n// Drivers: Facebook, Github, Google, Instagram, Linkedin, Twitter, Foursquare.\n\nally.redirect()                                   // Redirect user to the 3rd party website.\nally.getRedirectUrl()                             // Get redirect URL back as a string.\nally.scope(scopesArray)                           // Define runtime scopes before redirecting the user.\nally.fields(fieldsArray)                          // Fields to be fetched when getting the authenticated user profile.\nally.getUser()                                    // Get the user profile of an authenticated user (returns an AllyUser instance).\nally.getUserByToken(accessToken, [accessSecret])  // Returns the user details using the accessToken.\n\nuser.getId()            // Returns the user id.\nuser.getName()          // Returns the user name.\nuser.getEmail()         // Returns the user email.\nuser.getNickname()      // Returns the nickname / display name of the user.\nuser.getAvatar()        // Returns public URL to the user’s profile picture.\nuser.getAccessToken()   // Returns the access token which may be used later to update the user profile.\nuser.getRefreshToken()  // Refresh token to be used when access token expires.\nuser.getExpires()       // Access token expiry data.\nuser.getTokenSecret()   // Returns token secret.\nuser.getOriginal()      // Original payload returned by the 3rd party provider.\n"
  },
  {
    "path": "backend/django.py",
    "content": "# *****************************************************************************\n# CODING STYLE > MAKING YOUR CODE READABLE\n# *****************************************************************************\n\n\n# 1. Avoid abbreviating variable names.\n# 2. Write out your function argument names.\n# 3. Document your classes and methods.\n# 4. Comment your code.\n# 5. Refactor repeated lines of code into reusable functions or methods.\n# 6. Keep functions and methods short. A good rule of thumb is that scrolling\n# should not be necessary to read an entire function or method.\n\n# TIP: Use Flake8 for Checking Code Quality.\n\n\n# *****************************************************************************\n# CODING STYLE > THE WORD ON IMPORTS\n# *****************************************************************************\n\n\n# Imports should be grouped in the following order:\n\n# 1. Standard library imports.\n# 2. Core Django imports.\n# 3. Third-party app imports.\n# 4. Imports from your apps.\n\n# Use explicit relative imports.\n# Avoid using import *\n\n\n# *****************************************************************************\n# CODING STYLE > OTHERS\n# *****************************************************************************\n\n\n# Use underscores in URL pattern names rather than dashes.\n\n# *****************************************************************************\n# CODING STYLE > DATABASE\n# *****************************************************************************\n\n# 1.Register your app in admin file in your app folder to use admin panel in django\n# 2.Create a superuser using command python manage.py createsuperuser\n# 3.Remember to migrate after you change anything in your models.py file\n# 4.Use /admin/ page to add data in your tables for testing purpose\n\n\n# *****************************************************************************\n# Deployment\n# *****************************************************************************\n\n\n# add your media, database, venv, __pycache__ to the .gitignore (there is a compelete list that you can find here: https://github.com/jpadilla/django-project-template/blob/master/.gitignore)\n# keep migration files in the git (you will need to migrate them in target server)\n# don't run \"makemigrations\" in the target server (you will need to just run \"migrate\")\n# $ pip freeze > requirements.txt\n# make appropriate changes in your project settings.py file (change DEBUG to False and etc)\n# push your code to your git-server\n# pull your code in your target server\n# give right permissions to the web-server (e.g. $ chown www-data:www-data -R /var/www/myproject)\n# make a new venv in the target server and activate it\n# $ sudo pip install -r requirements.txt\n# sudo ./venv/bin/python3 manage.py migrate\n# restart your web-server (in case of apache: $ sudo service apache2 restart)\n\n\n# *****************************************************************************\n# DJANGO-ADMIN\n# *****************************************************************************\n\n\ndjango-admin check                       # Checks the entire django project for potential problems\ndjango-admin changepassword <username>   # Allows changing a user’s password. It prompts you to enter a new password twice for the given user.\ndjango-admin clearsessions               # Can be run as a cron job or directly to clean out expired sessions.\ndjango-admin collectstatic               # Helps to collect all the static files in the one mentioned directory\ndjango-admin createsuperuser             # Creates a superuser account (a user who has all permissions).\ndjango-admin compilemessages             # Compiles .po files to .mo files for use with builtin gettext support\ndjango-admin createcachetable            # Creates the tables needed to use the SQL cache backend.\ndjango-admin dbshell                     # Runs the command-line client for specified database, or the default database if none is provided.\ndjango-admin diffsettings                # Displays differences between the current settings.py and Django's default settings.\ndjango-admin dumpdata                    # Output the contents of the database as a fixture of the given format (using each model's default manager unless --all is specified).\ndjango-admin flush                       # Removes ALL DATA from the database, including data added during migrations. Does not achieve a \"fresh install\" state.\ndjango-admin inspectdb                   # Introspects the database tables in the given database and outputs a Django model module.\ndjango-admin loaddata                    # Installs the named fixture(s) in the database.\ndjango-admin makemessages                # Runs over the entire source tree of the current directory and pulls out all strings marked for translation. It creates (or updates) a message file in the conf/locale (in the django tree) or locale (for projects and applications) directory. You must run this command with one of either the --locale, --exclude, or --all options.\ndjango-admin help                        # display usage information and a list of the commands provided by each application\ndjango-admin makemigrations              # create new migrations to the database based on the changes detected in the models\ndjango-admin migrate                     # synchronize the database state with your current state project models and migrations\ndjango-admin remove_stale_contenttypes   # Deletes stale content types (from deleted models) in your database.y.\ndjango-admin runserver <port>            # start the development webserver at 127.0.0.1 with the port <port> default 8000\ndjango-admin sendtestemail               # Sends a test email to the email addresses specified as arguments.\ndjango-admin shell                       # Runs a Python interactive interpreter. Tries to use IPython or bpython, if one of them is available. Any standard input is executed as code.\ndjango-admin showmigrations              # Shows all available migrations for the current project.\ndjango-admin sqlflush                    # Returns a list of the SQL statements required to return all tables in the database to the state they were in just after they were installed.\ndjango-admin sqlmigrate                  # Prints the SQL statements for the named migration.\ndjango-admin sqlsequencereset            # Prints the SQL statements for resetting sequences for the given app name(s).\ndjango-admin squashmigrations            # Squashes an existing set of migrations (from first until specified) into a single new one.\ndjango-admin startapp <Appname>          # create a new django application with the specified name\ndjango-admin startproject <ProjectName>  # create a new project directory structure\ndjango-admin testserver                  # Runs a development server with data from the given fixture(s).\ndjango-admin version                     # display the current django version\n\n\n# *****************************************************************************\n# Starting a django project in python3\n# *****************************************************************************\n\n\n# 1. $ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py; python3 get-pip.py\t\t\t\t\t\t\n# 2. $ pip install virtualenv\n# 3. $ mkdir django-projects\n# 4. $ cd django-projects  \n# 5. $ virtualenv venv \t\t\t\t\t\t\t\t\n# 6. $ source venv/bin/activate\t\n# 7. $ pip install django\t\t\t\t\t\t\t\n# 8. $ django-admin startproject myproject\n# 9. $ django-admin startapp myapp\n# 10. $ python manage.py runserver\n"
  },
  {
    "path": "backend/express.js",
    "content": "/* *******************************************************************************************\n * API\n * http://expressjs.com/en/api.html\n * ******************************************************************************************* */\n`npm i express --save` or`yarn add -D express``(-D saves it as a dev dependency)`\n`yarn add -D @types/express``(Installing for TS)`\n\nconst express = require(\"express\"); // Importing the express library.\nconst app = express(); // Intializing the imported express application\n\n/* *******************************************************************************************\n * GLOBAL OBJECTS\n * http://expressjs.com/en/api.html#express.json\n * ******************************************************************************************* */\n\n```Methods```;\n\n`express.json([options]);`\n\noptions: `\ninflate                   // to manage the deflated bodies like enabling and disabling\n\nlimit                     // Controls the maximum request body size.\n\nreviver                   // It is passed directly to JSON.parse as an second argument\n\ntype                      // This is used to determine the type of middleware will parse\n\nverify                    // It is an undefined function which used to verify the middleware parsing.\n\n`;\n\n`express.raw([options]);`\n\noptions: `\ninflate                   // to manage the deflated bodies like enabling and disabling\n\nlimit                     // Controls the maximum request body size.\n\ntype                      // This is used to determine the type of middleware will parse\n\nverify                    // It is an undefined function which used to verify the middleware parsing.\n`;\n\n`express.Router([options]);`\n\noptions: `\ncaseSensitive             //Enables case sensitivity\n\nmergeParams               //if param names of child and parent are conflicted then the child takes the precedence\n\nstrict                    // Enables Strict routing\n`;\n\n`express.static(root, [options]);`\n\noptions: `\ndotfiles                 // determines how dotfiles are used\n\netag                     // Operates etag generation\n\nextensions               // Operates file extension fallback\n\nfallthrough              //\tEnable or disable the immutable directive in the Cache-Control response header\n\nindex                    // sends the specified directory index file\n\nLastModified             // sets the Last-Modified header to the last modified date\n\nsetHeaders               // Function for setting HTTP headers to serve with the file\n`;\n\n`express.text([options]);`\n\noptions: `\ndefaultCharset          // Sets the default charset for the text context.\n\ninflate                 // to manage the deflated bodies like enabling and disabling\n\nlimit                   // Controls the maximum request body size.\n\ntype                    // This is used to determine the type of middleware will parse\n\nverify                  // It is an undefined function which used to verify the middleware parsing.\n`;\n\n`express.urlencoded([options]);`\n\noptions: `\nextended                // it allows to choose between parsing the URL-encoded data or the qs library\n\nparameterLimit          // It controls the no of params.\n\ninflate                 // to manage the deflated bodies like enabling and disabling\n\nlimit                   // Controls the maximum request body size.\n\ntype                    // This is used to determine the type of middleware will parse\n\nverify                  // It is an undefined function which used to verify the middleware parsing.\n`;\n\n```Application`````;\nProperties```app.local`;\n\n`app.locals.title = \"My Cheatsheet\";\n\nconsole.dir(app.locals.title)`;                     `// Creating objects with local variables`\n\napp.mountpath`\n\n``app.mountpath``const admin = express()\nadmin.get('/', function(req,res){\n    console.log(admin.mountpath)\n    res.send('Admin Homepage')\n})                            \n\napp.use('<admin dir>', admin)`;                    `// Mounting a sub - app`\n\n``Event``\n\n`admin.on('mount', (parent){\n    console.log('Admin Mounted')\n})`                                                `// Mounting on a parent app`\n\n``Methods``\n`app.get('/', function(req, res){\n    res.send('GET request to message')\n})`                                               `// get requests to the specified path`\n\n`app.post('/', function(req,res){\n    res.send('POST request to a webpage')\n})`                                               `// post request to the specified path`\n\n`app.put('/', function(req,res){\n    res.send('PUT request to a webpage')\n})`                                               `// post request to the specified path`\n\n`app.delete('/', function(req,res){\n    res.send('DELETE request to a webpage')\n})`                                               `// delete request to the specified path`\n\n`app.all('/', function(req,res,next){\n    console.log('Accessing the secret section....')\n    next()\n})`                                               `// Routing all types of HTTP request`\n\n`app.param('user', function(req,res,next){\n    User.find(id, function(err, user){\n        if(err){\n            next(err)\n        } else if (user){\n            req.user = user\n            next()\n        } else {\n            next(new Error('Failed to load user'))\n        }\n    })\n})`                                               `// Adding callback trigger to route parameters`\n\n`app.use(function(req,res,next){\n    res.send('Hey There!')\n})`                                               `// To Invoke the middleware layer that you want to add`\n\n```Request```\n``Methods``\n\n`req.get('content-type')`                         `// Returns the specified HTTP req header`\n\n`req.accepts('html')`                             `// Checks if the specified content types are available or not`\n\n`req.is('json')`                                  `// Requests the matching content-type`\n    \n`var range = req.range(1000)\nif (range.type === 'bytes'){\n    range.forEach(function(r){\n        // Your code\n    })\n}`                                                `// Range header parser`\n    \n``Properties``\n\n`req.param('name')`                               `// Requests the param name when present`\n    \n`app.post('/', function (req, res, next) {\n    console.log(req.body)\n    res.json(req.body)\n})`                                                `// Data submitted in the request body`\n\n`console.dir(req.cookies.name)`                    `// Contains cookies sent by the request`\n\n`console.dir(req.query.q)`                         `// Query string parameter in the route`\n\n`console.log(req.route)\nres.send('GET')`                                   `// Outputs all the layer, methods, path`\n\n`console.dir(req.signedCookies.user)`              `// Logs all the signed cookies sent by the request`\n\n\n```Response```\n``Methods``\n        \n`res.redirect('https://google.com')`               `// Redirects to the intended page`\n\n`res.send({message: 'Awesome Stuffs'})`            `// Response to the webpage` \n        \n`res.json({alert: 'awesomecheatsheets'})`          `// Response in JSON type`\n\n`const file = req.params.name;\nres.sendFile(file, options, function(err){\n    if(err){\n        next(err)\n    }else{\n        console.log('Sent:', file)\n    }\n})`                                                `// Sends file to the intended path`\n\n`res.render('index')`                              `// Rendering the intended file`\n\n```BodyParser```\n    \n`const BodyParser = require('body-parser')\napp.use(BodyParser.json())\napp.use(BodyParser.urlencoded({\n    extended: true\n}))`                                               `// Parses incoming request bodies`"
  },
  {
    "path": "backend/feathers.js",
    "content": "/* *******************************************************************************************\n * FEATHERS.JS CHEATSHEET\n * https://docs.feathersjs.com/api/readme.html\n * \n * 1. CORE: Feathers core functionality.\n * 2. TRANSPORT: Expose a Feathers application as an API server.\n * 3. CLIENT: More details on how to use Feathers on the client.\n * 4. AUTHENTICATION: Feathers authentication mechanism.\n * 5. DATABASE: Feathers common database adapter API and querying mechanism.\n * ******************************************************************************************* */\n\n\n/* *******************************************************************************************\n * 1. CORE: Feathers core functionality.\n * ******************************************************************************************* */\n\n\n```\n# Provides the ability to initialize new application instances\nnpm install @feathersjs/feathers --save\n\n# Provides a set of standard error classes used by all other Feathers modules\nnpm install @feathersjs/errors --save\n```\n\n// --> APPLICATION <--\n// https://docs.feathersjs.com/api/application.html\n\nconst feathers = require('@feathersjs/feathers');\n\nconst app = feathers();                      // application initialization\n\napp.mixins                                   // contains a list of service mixins\n\napp.use(path, service)                       // allows registering a service object on a given path\napp.service(path)                            // returns the wrapped service object for the given path\napp.hooks(hooks)                             // allows registration of application-level hooks\napp.publish([event,], publisher)             // registers a global event publisher\napp.configure(callback)                      // runs a callback function that gets passed the application object\napp.listen(port)                             // starts the application on the given port\napp.setup([server])                          // used to initialize all services by calling each services .setup(app, path) method (if available)\napp.set(name, value)                         // assigns setting name to value\napp.get(name)                                // retrieves the setting name\napp.on(eventname, listener)                  // registers a listener method for the given eventname\napp.emit(eventname, data)                    // emits the event eventname to all event listeners\napp.removeListener(eventname, [ listener ])  // removes all or the given listener for eventname\n\n// --> SERVICES <--\n// https://docs.feathersjs.com/api/services.html\n\n// \"Services\" are the heart of every Feathers application.\n// Services are JavaScript objects (or instances of ES6 classes) that implement certain methods.\n// Feathers itself will also add some additional methods and functionality to its services.\nclass MyService {\n  // Retrieves a list of all resources from the service.\n  // Provider parameters will be passed as params.query.\n  async find(params) {\n    return [];\n  }\n\n  // Retrieves a single resource with the given id from the service.\n  async get(id, params) {}\n\n  // Creates a new resource with data.\n  // The method should return the newly created data. data may also be an array.\n  async create(data, params) {}\n\n  // Replaces the resource identified by id with data.\n  // The method should return the complete, updated resource data.\n  // id can also be null when updating multiple records, with params.query containing the query criteria.\n  async update(id, data, params) {}\n\n  // Merges the existing data of the resource identified by id with the new data.\n  // id can also be null indicating that multiple resources should be patched with params.query containing the query criteria.\n  async patch(id, data, params) {}\n\n  // Removes the resource with id.\n  // The method should return the removed resource.\n  // id can also be null, which indicates the deletion of multiple resources, with params.query containing the query criteria.\n  async remove(id, params) {}\n\n  // A special method that initializes the service, passing an instance of the Feathers application\n  // and the path it has been registered on.\n  // For services registered before app.listen is invoked, the setup function of each registered service\n  // is called on invoking app.listen. For services registered after app.listen is invoked, setup is\n  // called automatically by Feathers when a service is registered.\n  setup(app, path) {}\n}\n\nparams.query     // contains the URL query parameters sent from the client\nparams.provider  // for any service method call made through REST params.provider will be set to rest\n\napp.use('/my-service', new MyService());\n\n// Important: Always use the service returned by app.service(path)\nconst myService = app.service('my-service');\n\nmyService.hooks(hooks)                             // register hooks for this service\nmyService.publish([event,], publisher)             // register an event publishing callback\nmyService.mixin(mixin)                             // extends the functionality of a service\nmyService.on(eventname, listener)                  // registers a listener method for the given eventname\nmyService.once(eventname, listener)                // registers a listener method for the given eventname that will be triggered only one time\nmyService.emit(eventname, data)                    // emits the event eventname to all event listeners\nmyService.removeListener(eventname, [ listener ])  // removes all listeners (or the given listener) for eventname\n\n// --> HOOKS <--\n// https://docs.feathersjs.com/api/hooks.html\n\n// Hooks are pluggable middleware functions that can be registered\n// before, after or on errors of a service method. You can register a\n// single hook function or create a chain of them to create complex work-flows.\napp.service('my-service').hooks({\n  before: {\n    all: [\n      // Use normal functions\n      async function(context) { console.log('before all hook ran'); }\n    ],\n\n    find: [\n      // Use ES6 arrow functions\n      context => console.log('before find hook 1 ran'),\n      async context => console.log('before find hook 2 ran')\n    ],\n\n    async create (context) {\n      return context\n    },\n  },\n\n  after: {\n    all: [],\n    find: [],\n    get: [],\n    create: [],\n    update: [],\n    patch: [],\n    remove: []\n  },\n\n  // Here is an example for a very useful application hook that logs every service method error\n  // with the service and method name as well as the error stack\n  error(context) {\n    console.error(`Error in ${context.path} calling ${context.method} method`, context.error);\n  }\n});\n\ncontext.app       // [read only] contains the Feathers application object\ncontext.service   // [read only] contains the service this hook currently runs on\ncontext.path      // [read only] contains the service name (or path) without leading or trailing slashes\ncontext.method    // [read only] contains the name of the service method (find, get, create, update...)\ncontext.type      // [read only] contains the hook type (one of before, after or error)\ncontext.params    // [writable] contains the service method parameters (including params.query)\ncontext.id        // [writable] contains the id for a get, remove, update and patch service method call\ncontext.data      // [writable] contains the data of a create, update and patch service method call\ncontext.error     // [writable] contains the error object that was thrown in a failed method call (only available in error hooks)\ncontext.result    // [writable] contains the result of the successful service method call (only available in after hooks)\ncontext.dispatch  // [writable and optional] contains a \"safe\" version of the data that should be sent to any client\n\n// --> CHANNELS <--\n// https://docs.feathersjs.com/api/channels.html\n\n// A channel is an object that contains a number of connections.\n// It can be created via app.channel and allows a connection to join or leave it.\napp.channel(name)                     // when given a single name, returns an existing or new named channel\napp.channel(name1, name2, ... nameN)  // when given multiples names, will return a combined channel.\napp.channels                          // returns a list of all existing channel names\n\nchannel.join(connection)      // adds a connection to this channel\nchannel.leave(connection|fn)  // removes a connection from this channel\nchannel.filter(fn)            // returns a new channel filtered by a given function which gets passed the connection\nchannel.send(data)            // returns a copy of this channel with customized data that should be sent for this event\n\nchannel.connections  // contains a list of all connections in this channel\nchannel.length       // returns the total number of connections in this channel\n\nservice.publish([event,] fn)  // registers a publishing function for a specific service for a specific event or all events if no event name was given\napp.publish([event,] fn)      // registers an event publishing callback\n\napp.on('connection', connection => {})  // fired every time a new real-time connection is established\napp.on('disconnection', connection => {})\napp.on('login', (authenticationResult, params, context) => {})  // sent by the authentication module and also contains the connection in the info object that is passed as the second parameter\n\n\n/* *******************************************************************************************\n * 2. TRANSPORT: Expose a Feathers application as an API server.\n * ******************************************************************************************* */\n\n\n```\n# Contains Express framework integrations\nnpm install @feathersjs/express --save\n\n# Allows to call service methods and receive real-time events\nnpm install @feathersjs/socketio --save\n\n# Allows to call service methods and receive real-time events via Primus\nnpm install @feathersjs/primus --save\n```\n\n// --> EXPRESS <--\n// https://docs.feathersjs.com/api/express.html\n\nconst feathers = require('@feathersjs/feathers');\nconst express = require('@feathersjs/express');\n\n// Create an app that is a Feathers AND Express application\nconst app = express(feathers());\n\n// If no Feathers application is passed, express() returns a plain Express application\n// just like a normal call to Express would\nconst app = express();\n\napp.use(path, service|mw)        // registers either a service object or an Express middleware on the given path\napp.listen(port)                 // will first call Express app.listen and then internally also call the Feathers app.setup(server)\napp.setup(server)                // usually called internally by app.listen but in the cases described below needs to be called explicitly\n\nexpress.rest()                   // registers a Feathers transport mechanism that allows you to expose and consume services through a RESTful API.\napp.configure(express.rest())    // configures the transport provider with a standard formatter sending JSON response via res.json\n\nexpress.notFound()               // returns middleware that returns a NotFound (404) Feathers error\nexpress.errorHandler()           // middleware that formats any error response to a REST call as JSON and sets the appropriate error code\napp.use(express.errorHandler())  // set up the error handler with the default configuration\n\n// --> SOCKET.IO <--\n// https://docs.feathersjs.com/api/client/socketio.html\n\nconst feathers = require('@feathersjs/feathers');\nconst socketio = require('@feathersjs/socketio');\n\nconst app = feathers();\n\napp.configure(socketio());                            // sets up the Socket.io transport with the default configuration using either the server provided by app.listen or passed in app.setup(server)\napp.configure(socketio(callback))                     // sets up the Socket.io transport with the default configuration and call callback with the Socket.io server object\napp.configure(socketio(options [, callback]))         // sets up the Socket.io transport with the given Socket.io options object and optionally calls the callback\napp.configure(socketio(port, [options], [callback]))  // creates a new Socket.io server on a separate port. Options and a callback are optional\n\n// --> PRIMUS <--\n// https://docs.feathersjs.com/api/client/primus.html\n\napp.configure(primus(options))            // sets up the Primus transport with the given Primus options\napp.configure(primus(options, callback))  // sets up the Primus transport with the given Primus options and calls the callback with the Primus server instance\n\n\n/* *******************************************************************************************\n * 3. CLIENT: More details on how to use Feathers on the client.\n * ******************************************************************************************* */\n\n\n```\n# Bundles the separate Feathers client side modules into one providing the code as ES5 (compatible with modern browsers)\n# You do not have to install or load any of the other modules listed below\nnpm install @feathersjs/client --save\n\n# Allows to connect to services through REST HTTP\nnpm install @feathersjs/rest-client --save\n\n# Allows to connect to services through Socket.io\nnpm install @feathersjs/socketio-client --save\n\n# Allows to connect to services through Primus\nnpm install @feathersjs/primus-client --save\n\n# Allows you to easily authenticate against a Feathers server\nnpm install @feathersjs/authentication-client --save\n```\n\n// --> REST CLIENT <--\n// https://docs.feathersjs.com/api/client/rest.html\n\nrest([baseUrl])  // Initialize a client object with a base URL\n\napp.configure(restClient.jquery(window.jQuery));   // connect to a service using jQuery\napp.configure(restClient.request(requestClient));  // connect to a service using request\napp.configure(restClient.superagent(superagent));  // connect to a service using Superagent\napp.configure(restClient.axios(axios));            // connect to a service using Axios\napp.configure(restClient.fetch(window.fetch));     // connect to a service using Fetch\n\n// --> SOCKET.IO <--\n// https://docs.feathersjs.com/api/client/socketio.html\n\nsocketio(socket)           // initialize the Socket.io client using a given socket and the default options\nsocketio(socket, options)  // initialize the Socket.io client using a given socket and the given options\n\n// --> PRIMUS <--\n// https://docs.feathersjs.com/api/client/primus.html\n\nprimus(socket)           // initialize the Primus client using a given socket and the default options\nprimus(socket, options)  // initialize the Primus client using a given socket and the given options\n\n\n/* *******************************************************************************************\n * 4. AUTHENTICATION: Feathers authentication mechanism.\n * ******************************************************************************************* */\n\n\n```\n# Assists in using JWT for authentication\nnpm install @feathersjs/authentication --save\n\n# Wraps the passport-local authentication strategy (username and password)\nnpm install @feathersjs/authentication-local --save\n\n# Allows to use 180+ oAuth providers (Facebook, Google, Twitter etc.)\nnpm install @feathersjs/authentication-oauth --save\n```\n\n// --> SERVER <--\n// https://docs.feathersjs.com/api/authentication/server.html\n\nconst options = {\n  \"authentication\": {\n    \"secret\": \"CHANGE_ME\", // The token signing secret\n    \"entity\": \"user\", // the entity that will be added to the request, socket, and context.params. (ie. req.user, socket.user, context.params.user)\n    \"service\": \"users\", // the service to look up the entity\n    \"authStrategies\": [ \"jwt\", \"local\" ], // The authentication strategies to allow to create a token\n    \"jwtOptions\": {\n      \"header\": { \"typ\": \"access\" }, // by default is an access token but can be any type\n      \"audience\": \"https://yourdomain.com\", // The resource server where the token is processed\n      \"issuer\": \"feathers\", // The issuing server, application or resource\n      \"algorithm\": \"HS256\", // the algorithm to use\n      \"expiresIn\": \"1d\" // the access token expiry\n    }\n  }\n}\n\nconst { AuthenticationService, JWTStrategy } = require('@feathersjs/authentication');\n\nlet authService = new AuthenticationService(app);\n\nservice.register('jwt', new JWTStrategy());\n\napp.use('/authentication', authService);\napp.configure(expressOauth());\n\napp.get('defaultAuthentication') // The name of the default authentication service\n\nauthService = app.service('authentication')  // service for creating JWT (implements only the create and remove methods)\n\nauthService.hooks({ before })  // registers hooks for this service\nauthService.hooks({ after })   // registers hooks for this service\n\nnew AuthenticationService(app) // Create a new authentication service\n\nclass MyAuthenticationService extends AuthenticationService {} // Customize the authentication service\n\nauthService.authenticate(data, params, ...strategies) // Authenticate with strategies\nauthService.create(data, params) // Authenticate with data and params\nauthService.create({ // Authenticate and create a JWT using the local strategy email/password\n  strategy: 'local',\n  email: 'hello@feathersjs.com',\n  password: 'supersecret'\n});\nauthService.remove(id, params) // removes the JWT token (mostly exists for the logout process)\nauthService.configuration // The current configuration\nauthService.register(name, strategy) // Register a new authentication strategy\nauthService.createAccessToken(payload) // Create a new access token with payload\nauthService.verifyAccessToken(accessToken) // Verify an existing access token\nauthService.getTokenOptions(authResult, params) // Get the options for a token\nauthService.getPayload(authResult, params) // Return the payload for an authentication result\nauthService.parse(req, res, ...strategies) // Parse an HTTP request and response with using a list of strategies\n\n\napp.on('login', callback))   // emits an event whenever a client successfully authenticates\napp.on('logout', callback))  // emits an event whenever a client successfully logout\n\n// --> CLIENT <--\n// https://docs.feathersjs.com/api/authentication/client.html\n\nconst options = {\n  storage: window.localStorage, // The storage to store the access token\n  path: '/authentication', // The path of the authentication service\n  locationKey: 'access_token', // The name of the window hash parameter to parse for an access token from the window.location. Usually used by the oAuth flow.\n  locationErrorKey: 'error', // The name of the window hash parameter to parse for authentication errors. Usually used by the oAuth flow.\n  jwtStrategy: 'jwt', // The access token authentication strategy\n  storageKey: 'feathers-jwt', // Key for storing the token in e.g. localStorage\n  header: 'Authorization', // Name of the accessToken header\n  scheme: 'Bearer', // The HTTP header scheme\n  Authentication: AuthenticationClient // Allows to provide a customized authentication client class\n}\n\napp.configure(auth(options))  // configure the authentication plugin with the given options\n\napp.reAuthenticate()        // authenticates using the JWT from the storage\napp.authenticate(options)  // authenticate with a Feathers server by passing a strategy and other properties as credentials\napp.logout()               // removes the JWT accessToken from storage on the client\n\nconst authenticationInfo = await app.get('authentication'); // The authenticatoin information (like the user)\n\napp.on('login', callback)  // emits an event whenever the client successfully authenticates\napp.on('logout', callback) // emits an event whenever the client successfully authenticates\n\n// --> LOCAL (EMAIL & PASSWORD) <--\n// https://docs.feathersjs.com/api/authentication/local.html\n\nconst { LocalStrategy } = require('@feathersjs/authentication-local');\n\nconst options = {\n  usernameField: 'email', // Name of the username field in the (e.g. 'email')\n  passwordField: 'password', // Name of the password field (e.g. 'password')\n  hashSize: 10, // The BCrypt hash size\n  errorMessage: 'Invalid login', // The error message to return on errors\n  entityUsernameField: usernameField, // Name of the username field on the entity if authentication request data and entity field names are different\n  entityPasswordField: passwordField // Name of the password field on the entity if authentication request data and entity field names are different\n}\n\nauthService.register('local', new LocalStrategy());\n\nlocal.hooks.hashPassword()       // hashes plain text passwords before they are saved to the database\nlocal.hooks.protect('password')  // makes sure that protected fields don't get sent to a client\n\n// --> OAUTH <--\n// https://docs.feathersjs.com/api/authentication/oauth.html\nconst { expressOauth, OAuthStrategy } = require('@feathersjs/authentication-oauth');\n\nclass GitHubStrategy extends OAuthStrategy {\n  async getEntityData(profile) {\n    const baseData = await super.getEntityData(profile);\n\n    return {\n      ...baseData,\n      email: profile.email\n    };\n  }\n}\n\nauthService.register('github', new MyGitHubStrategy());\n\nconst options = {\n  authentication: {\n    oauth: {\n      redirect: '/', // The redirect after a successful login\n      github: { // The per-strategy configuration\n        key: '<Client ID>',\n        secret: '<Client secret>'\n      }\n    }\n  }\n}\n\napp.configure(expressOauth(options));\n\n\n/* *******************************************************************************************\n * 5. DATABASE: Feathers common database adapter API and querying mechanism.\n * ******************************************************************************************* */\n\n\n```\n# [MEMORY/FILESYSTEM] In-memory database adapter\nnpm install feathers-memory --save\n\n# [MEMORY/FILESYSTEM] Database adapter for NeDB an in-memory or file system based standalone database\nnpm install feathers-nedb --save\n\n# [MEMORY/FILESYSTEM] Adapter for Client side Feathers that can use the browsers LocalStorage or ReactNative's AsyncStorage\nnpm install feathers-localstorage --save\n\n# [SQL] Adapter for KnexJS, an SQL query builder for NodeJS supporting PostgreSQL, MySQL, SQLite and MSSQL\nnpm install feathers-knex --save\n\n# [SQL] Adapter for Sequelize an ORM for NodeJS supporting PostgreSQL, MySQL, SQLite and MSSQL\nnpm install feathers-sequelize --save\n\n# [NOSSQL] Database adapter for MongoDB using the official NodeJS database driver\nnpm install feathers-mongodb --save\n\n# [NOSSQL] Database adapter for Mongoose an Object Modelling library for NodeJS and MongoDB\nnpm install feathers-mongoose --save\n\n# [NOSSQL] Database adapter for Elasticsearch\nnpm install feathers-elasticsearch --save\n\n# [NOSSQL] Database adapter for RethinkDB a real-time database.\nnpm install feathers-rethinkdb --save\n```\n\n// --> COMMON API <--\n// https://docs.feathersjs.com/api/databases/common.html\n\nconst service = require('feathers-<adaptername>');\n\napp.use('/messages', service({\n  id: undefined,         // (optional) name of the id field property (usually set by default to id or _id)\n  events: undefined,     // (optional) list of custom service events sent by this service\n  paginate: {            // (optional) a pagination object containing a default and max page size\n    default: undefined,  // sets the default number of items when $limit is not set\n    max: undefined       // sets the maximum allowed number of items per page (even if the $limit query parameter is set higher)\n  },\n  whitelist: [],          // A list of additional non-standard query parameters to allow (e.g [ '$regex', '$populate' ])\n  multi: true             // Allow create with arrays and update and remove with id null to change multiple items\n}));\n\nadapter.find()                    // returns a list of all records matching the query in params.query using the common querying mechanism\nadapter.get(id, params)           // retrieves a single record by its unique identifier (the field set in the id option during initialization)\nadapter.create(data, params)      // creates a new record with data. data can also be an array to create multiple records\nadapter.update(id, data, params)  // completely replaces a single record identified by id with data. Does not allow replacing multiple records (id can't be null). id can not be changed.\nadapter.patch(id, data, params)   // merges a record identified by id with data. id can be null to allow replacing multiple records (all records that match params.query the same as in .find). id can not be changed\nadapter.remove(id, params)        // removes a record identified by id. id can be null to allow removing multiple records (all records that match params.query the same as in .find)\n\n// Hook-less\nadapter._find()\nadapter._get(id, params)\nadapter._create(data, params)\nadapter._update(id, data, params)\nadapter._patch(id, data, params)\nadapter._remove(id, params)\n\n// --> QUERYING <--\n// https://docs.feathersjs.com/api/databases/querying.html\n\napp.service('messages').find({\n  query: {\n    $limit: 2,                      // will return only the number of results you specify\n    $select: [ 'text', 'userId' ],  // allows to pick which fields to include in the result\n    $skip: 2,                       // will skip the specified number of results\n    $sort: {                        // will sort based on the object you provide. It can contain a list of properties by which to sort mapped to the order\n      createdAt: -1\n    },\n    $or: [                          // find all records that match any of the given criteria\n      { archived: { $ne: true } },\n      { roomId: 2 }\n    ],\n    read: false,                    // compared directly for equality\n    roomId: {\n      $in: [ 2, 5 ],                // find all records where the property does match any of the given values\n      $nin: [ 1, 3 ]                // find all records where the property does not match any of the given values\n    },\n    createdAt: {\n      $lt: new Date().getTime(),    // find all records where the value is less to a given value\n      $lte: new Date().getTime(),   // find all records where the value is less and equal to a given value\n      $gt: new Date().getTime(),    // find all records where the value is more to a given value\n      $gte: new Date().getTime(),   // find all records where the value is more and equal to a given value\n    },\n    archived: {\n      $ne: true                     // find all records that do not equal the given property value\n    }\n  }\n});\n\n// With pagination enabled, to just get the number of available records set $limit to 0.\n// This will only run a (fast) counting query against the database and return a page object with\n// the total and an empty data array.\n\n\n/* *******************************************************************************************\n * 5. APPLICATION ARCHITECTURE\n * ******************************************************************************************* */\n\n\n// .\n// ├── config/              # contains the configuration files for the app\n// │   ├── default.json     # default configuration variables\n// │   ├── production.json  # override default configurations variables when NODE_ENV=production\n// │   └── ...\n// │\n// ├── node_modules/        # project dependencies using NPM or Yarn\n// │   └── ...\n// │\n// ├── public/              # contains static files to be served\n// │   └── ...\n// │\n// ├── src/                 # contains the Feathers server code\n// │   ├── hooks/           # contains our custom hooks\n// │   │   └── ...\n// │   ├── middleware/      # contains our Express middlewares\n// │   │   └── ...\n// │   ├── services/        # contains our services\n// │   │   └── ...\n// │   │\n// │   ├── index.js         # is used to load and start the application\n// │   ├── app.js           # configures our Feathers application\n// │   ├── app.hooks.js     # contains hooks which that run for all services\n// │   └── channels.js      # set up Feathers event channels\n// ├── tests/               # contains Mocha test files for the app, hooks and services\n// │   └── ...\n// ├── .editorconfig        # helps developers define and maintain consistent coding styles\n// ├── .eslintrc.json       # eslint configuration\n// └── package.json         # express server for production\n"
  },
  {
    "path": "backend/laravel.php",
    "content": "<?php\n\n/********************************************************************************************\n * CLI AVAILABLE COMMANDS FOR ARTISAN\n * https://laravel.com/docs/5.8/artisan\n ********************************************************************************************/\n\n// MAIN.\n\nphp artisan clear-compiled       // Remove the compiled class file\nphp artisan db                   // Start a new database CLI session\nphp artisan docs                 // Access the Laravel documentation\nphp artisan down                 // Put the application into maintenance mode\nphp artisan dump-server          // Start the dump server to collect dump information.\nphp artisan env                  // Display the current framework environment\nphp artisan help                 // Displays help for a command\nphp artisan inspire              // Display an inspiring quote\nphp artisan list                 // Lists commands\nphp artisan migrate              // Run the database migrations\nphp artisan optimize             // Cache the framework bootstrap files\nphp artisan preset               // Swap the front-end scaffolding for the application\nphp artisan serve                // Serve the application on the PHP development server\nphp artisan tinker               // Interact with your application\nphp artisan up                   // Bring the application out of maintenance mode\n\n// APP.\n\nphp artisan app:name             // Set the application namespace\n\n// AUTH\n\nphp artisan auth:clear-resets    // Flush expired password reset tokens\n\n// CACHE\n\nphp artisan cache:clear          // Flush the application cache\nphp artisan cache:forget         // Remove an item from the cache\nphp artisan cache:table          // Create a migration for the cache database table\n \n// CONFIG\n\nphp artisan config:cache         // Create a cache file for faster configuration loading\nphp artisan config:clear         // Remove the configuration cache file\n \n// DB\n\nphp artisan db:seed              // Seed the database with records\nphp artisan db:show              // Display information about the given database\nphp artisan db:table             // Display information about the given database table\nphp artisan db:wipe              // Drop all tables, views, and types\n\n// EVENT\n\nphp artisan event:generate       // Generate the missing events and listeners based on registration\n\n// KEY\n\nphp artisan key:generate         // Set the application key\n\n// MAKE\n\nphp artisan make:cast            // Create a new custom Eloquent cast class\nphp artisan make:channel         // Create a new channel class\nphp artisan make:command         // Create a new Artisan command\nphp artisan make:component       // Create a new view component class\nphp artisan make:controller      // Create a new controller class\nphp artisan make:event           // Create a new event class\nphp artisan make:exception       // Create a new custom exception class\nphp artisan make:factory         // Create a new model factory\nphp artisan make:job             // Create a new job class\nphp artisan make:listener        // Create a new event listener class\nphp artisan make:mail            // Create a new email class\nphp artisan make:middleware      // Create a new middleware class\nphp artisan make:migration       // Create a new migration file\nphp artisan make:model           // Create a new Eloquent model class\nphp artisan make:notification    // Create a new notification class\nphp artisan make:observer        // Create a new observer class\nphp artisan make:policy          // Create a new policy class\nphp artisan make:provider        // Create a new service provider class\nphp artisan make:request         // Create a new form request class\nphp artisan make:resource        // Create a new resource\nphp artisan make:rule            // Create a new validation rule\nphp artisan make:scope           // Create a new scope class\nphp artisan make:seeder          // Create a new seeder class\nphp artisan make:test            // Create a new test class\n\n// MIGRATE\n\nphp artisan migrate:fresh        // Drop all tables and re-run all migrations\nphp artisan migrate:install      // Create the migration repository\nphp artisan migrate:refresh      // Reset and re-run all migrations\nphp artisan migrate:reset        // Rollback all database migrations\nphp artisan migrate:rollback     // Rollback the last database migration\nphp artisan migrate:status       // Show the status of each migration\n\n// MODEL\nphp artisan model:prune          // Prune models that are no longer needed\nphp artisan model:show           // Show information about an Eloquent model\n\n// NOTIFICATIONS\n\nphp artisan notifications:table  // Create a migration for the notifications table\n\n// OPTIMIZE\n\nphp artisan optimize:clear       // Remove the cached bootstrap files\n\n// PACKAGE\n\nphp artisan package:discover     // Rebuild the cached package manifest\n\n// QUEUE\n\nphp artisan queue:batches-table  // Create a migration for the batches database table\nphp artisan queue:clear          // Delete all of the jobs from the specified queue\nphp artisan queue:failed         // List all of the failed queue jobs\nphp artisan queue:failed-table   // Create a migration for the failed queue jobs database table\nphp artisan queue:flush          // Flush all of the failed queue jobs\nphp artisan queue:forget         // Delete a failed queue job\nphp artisan queue:listen         // Listen to a given queue\nphp artisan queue:monitor        // Monitor the size of the specified queues\nphp artisan queue:prune-batches  // Prune stale entries from the batches database\nphp artisan queue:prune-failed   // Prune stale entries from the failed jobs table\nphp artisan queue:restart        // Restart queue worker daemons after their current job\nphp artisan queue:retry          // Retry a failed queue job\nphp artisan queue:retry-batch    // Retry the failed jobs for a batch\nphp artisan queue:table          // Create a migration for the queue jobs database table\nphp artisan queue:work           // Start processing jobs on the queue as a daemon\n\n// ROUTE\n\nphp artisan route:cache          // Create a route cache file for faster route registration\nphp artisan route:clear          // Remove the route cache file\nphp artisan route:list           // List all registered routes\n\n// SAIL\n\nphp artisan sail:install         // Install Laravel Sail's default Docker Compose file\nphp artisan sail:publish         // Publish the Laravel Sail Docker files\n\n// SANCTUM\n\nphp artisan sanctum:prune-expired // Prune tokens expired for more than specified number of hours.\n\n// SCHEDULE\n\nphp artisan schedule:clear-cache  // Delete the cached mutex files created by scheduler\nphp artisan schedule:list         // List the scheduled commands\nphp artisan schedule:run          // Run the scheduled commands\nphp artisan schedule:test         // Run a scheduled command\nphp artisan schedule:work         // Start the schedule worker\n\n// SCHEMA\n\nphp artisan schema:dump           // Dump the given database schema\n\n// SESSION\n\nphp artisan session:table        // Create a migration for the session database table\n\n// STORAGE\n\nphp artisan storage:link         // Create a symbolic link from \"public/storage\" to \"storage/app/public\"\n\n// STUD\n\nphp artisan stub:publish         // Publish all stubs that are available for customization\n\n// VENDOR\n\nphp artisan vendor:publish       // Publish any publishable assets from vendor packages\n\n// VIEW\n\nphp artisan view:cache           // Compile all of the application's Blade templates\nphp artisan view:clear           // Clear all compiled view files\n\n/********************************************************************************************\n * REQUEST\n * https://laravel.com/api/5.8/Illuminate/Http/Request.html\n * https://laravel.com/docs/5.8/requests\n ********************************************************************************************/\n\n\n\n/********************************************************************************************\n * RESPONSE\n * https://laravel.com/api/5.8/Illuminate/Http/Response.html\n * https://laravel.com/docs/5.8/responses\n ********************************************************************************************/\n\n\n\n/********************************************************************************************\n * ROUTING\n * https://laravel.com/docs/5.8/routing\n ********************************************************************************************/\n\n\n\n /********************************************************************************************\n * MIDDLEWARE\n * https://laravel.com/docs/5.8/middleware\n ********************************************************************************************/\n\n\n/********************************************************************************************\n * CONTROLLERS\n * https://laravel.com/docs/5.8/controllers\n ********************************************************************************************/\n\n\n\n/********************************************************************************************\n * SESSION\n * https://laravel.com/docs/5.8/session\n ********************************************************************************************/\n\n\n\n/********************************************************************************************\n * URL GENERATION\n * https://laravel.com/docs/5.8/urls\n ********************************************************************************************/\n\n\n\n/********************************************************************************************\n * VALIDATION\n * https://laravel.com/docs/5.8/validation\n ********************************************************************************************/\n\naccepted                               // The field under validation must be yes, on, 1, or true.\nactive_url                             // The field under validation must have a valid A or AAAA record according to the dns_get_record PHP function.\nafter:date                             // The field under validation must be a value after a given date.\nafter_or_equal:date                    // The field under validation must be a value after or equal to the given date.\nalpha                                  // The field under validation must be entirely alphabetic characters.\nalpha_dash                             // The field under validation may have alpha-numeric characters, as well as dashes and underscores.\nalpha_num                              // The field under validation must be entirely alpha-numeric characters.\narray                                  // The field under validation must be a PHP array.\nbail                                   // Stop running validation rules after the first validation failure.\nbefore:date                            // The field under validation must be a value preceding the given date.\nbefore_or_equal:date                   // The field under validation must be a value preceding or equal to the given date.\nbetween:min,max                        // The field under validation must have a size between the given min and max.\nboolean                                // The field under validation must be able to be cast as a boolean. Accepted input are true, false, 1, 0, \"1\", and \"0\".\nconfirmed                              // The field under validation must have a matching field of foo_confirmation.\ndate                                   // The field under validation must be a valid, non-relative date according to the strtotime PHP function.\ndate_equals:date                       // The field under validation must be equal to the given date.\ndate_format:format                     // The field under validation must match the given format.\ndifferent:field                        // The field under validation must have a different value than field.\ndigits:value                           // The field under validation must be numeric and must have an exact length of value.\ndigits_between:min,max                 // The field under validation must have a length between the given min and max.\ndimensions                             // The file under validation must be an image meeting the dimension constraints as specified by the rule's parameters.\ndistinct                               // When working with arrays, the field under validation must not have any duplicate values.\nemail                                  // The field under validation must be formatted as an e-mail address.\nends_with:foo,bar,...                  // The field under validation must end with one of the given values.\nexists:table,column                    // The field under validation must exist on a given database table.\nfile                                   // The field under validation must be a successfully uploaded file.\nfilled                                 // The field under validation must not be empty when it is present.\ngt:field                               // The field under validation must be greater than the given field.\ngte:field                              // The field under validation must be greater than or equal to the given field.\nimage                                  // The file under validation must be an image (jpeg, png, bmp, gif, svg, or webp)\nin:foo,bar,...                         // The field under validation must be included in the given list of values.\nin_array:anotherfield.*                // The field under validation must exist in anotherfield's values.\ninteger                                // The field under validation must be an integer.\nip                                     // The field under validation must be an IP address.\nipv4                                   // The field under validation must be an IPv4 address.\nipv6                                   // The field under validation must be an IPv6 address.\njson                                   // The field under validation must be a valid JSON string.\nlt:field                               // The field under validation must be less than the given field.\nlte:field                              // The field under validation must be less than or equal to the given field.\nmax:value                              // The field under validation must be less than or equal to a maximum value.\nmimetypes:text/plain,...               // The file under validation must match one of the given MIME types:\nmimes:foo,bar,...                      // The file under validation must have a MIME type corresponding to one of the listed extensions.\nmin:value                              // The field under validation must have a minimum value.\nnot_in:foo,bar,...                     // The field under validation must not be included in the given list of values.\nnot_regex:pattern                      // The field under validation must not match the given regular expression.\nnullable                               // The field under validation may be null.\nnumeric                                // The field under validation must be numeric.\npresent                                // The field under validation must be present in the input data but can be empty.\nregex:pattern                          // The field under validation must match the given regular expression.\nrequired                               // The field under validation must be present in the input data and not empty.\nrequired_if:anotherfield,value,...     // The field under validation must be present and not empty if the anotherfield field is equal to any value.\nrequired_unless:anotherfield,value,... // The field under validation must be present and not empty unless the anotherfield field is equal to any value.\nrequired_with:foo,bar,...              // The field under validation must be present and not empty only if any of the other specified fields are present.\nrequired_with_all:foo,bar,...          // The field under validation must be present and not empty only if all of the other specified fields are present.\nrequired_without:foo,bar,...           // The field under validation must be present and not empty only when any of the other specified fields are not present.\nrequired_without_all:foo,bar,...       // The field under validation must be present and not empty only when all of the other specified fields are not present.\nsame:field                             // The given field must match the field under validation.\nsize:value                             // The field under validation must have a size matching the given value.\nstarts_with:foo,bar,...                // The field under validation must start with one of the given values.\nstring                                 // The field under validation must be a string.\ntimezone                               // The field under validation must be a valid timezone identifier according to the timezone_identifiers_list PHP function.\nunique:table,column,except,idColumn    // The field under validation must not exist within the given database table.\nurl                                    // The field under validation must be a valid URL.\nuuid                                   // The field under validation must be a valid RFC 4122 (version 1, 3, 4, or 5) universally unique identifier (UUID).\n\n/********************************************************************************************\n * ERROR HANDLING\n * https://laravel.com/docs/5.8/errors\n ********************************************************************************************/\n\n/********************************************************************************************\n * MIGRATION COMMANDS\n * https://laravel.com/docs/5.8/migrations\n ********************************************************************************************/\n\n// TABLE OPTIONS\n\n$table->engine = 'InnoDB';             // Specify the table storage engine (MySQL).\n$table->charset = 'utf8';              // Specify a default character set for the table (MySQL).\n$table->collation = 'utf8_unicode_ci'; // Specify a default collation for the table (MySQL).\n$table->temporary();                   // Create a temporary table (except SQL Server).\n\n// COLUMN TYPES\n\n$table->bigIncrements('id');                       // Auto-incrementing UNSIGNED BIGINT (primary key) equivalent column.\n$table->bigInteger('votes');                       // BIGINT equivalent column.\n$table->binary('data');                            // BLOB equivalent column.\n$table->boolean('confirmed');                      // BOOLEAN equivalent column.\n$table->char('name', 100);                         // CHAR equivalent column with an optional length.\n$table->date('created_at');                        // DATE equivalent column.\n$table->dateTime('created_at');                    // DATETIME equivalent column.\n$table->dateTimeTz('created_at');                  // DATETIME (with timezone) equivalent column.\n$table->decimal('amount', 8, 2);                   // DECIMAL equivalent column with a precision (total digits) and scale (decimal digits).\n$table->double('amount', 8, 2);                    // DOUBLE equivalent column with a precision (total digits) and scale (decimal digits).\n$table->enum('level', ['easy', 'hard']);           // ENUM equivalent column.\n$table->float('amount', 8, 2);                     // FLOAT equivalent column with a precision (total digits) and scale (decimal digits).\n$table->geometry('positions');                     // GEOMETRY equivalent column.\n$table->geometryCollection('positions');           // GEOMETRYCOLLECTION equivalent column.\n$table->increments('id');                          // Auto-incrementing UNSIGNED INTEGER (primary key) equivalent column.\n$table->integer('votes');                          // INTEGER equivalent column.\n$table->ipAddress('visitor');                      // IP address equivalent column.\n$table->json('options');                           // JSON equivalent column.\n$table->jsonb('options');                          // JSONB equivalent column.\n$table->lineString('positions');                   // LINESTRING equivalent column.\n$table->longText('description');                   // LONGTEXT equivalent column.\n$table->macAddress('device');                      // MAC address equivalent column.\n$table->mediumIncrements('id');                    // Auto-incrementing UNSIGNED MEDIUMINT (primary key) equivalent column.\n$table->mediumInteger('votes');                    // MEDIUMINT equivalent column.\n$table->mediumText('description');                 // MEDIUMTEXT equivalent column.\n$table->morphs('taggable');                        // Adds taggable_id UNSIGNED BIGINT and taggable_type VARCHAR equivalent columns.\n$table->uuidMorphs('taggable');                    // Adds taggable_id CHAR(36) and taggable_type VARCHAR(255) UUID equivalent columns.\n$table->multiLineString('positions');              // MULTILINESTRING equivalent column.\n$table->multiPoint('positions');                   // MULTIPOINT equivalent column.\n$table->multiPolygon('positions');                 // MULTIPOLYGON equivalent column.\n$table->nullableMorphs('taggable');                // Adds nullable versions of morphs() columns.\n$table->nullableUuidMorphs('taggable');            // Adds nullable versions of uuidMorphs() columns.\n$table->nullableTimestamps();                      // Alias of timestamps() method.\n$table->point('position');                         // POINT equivalent column.\n$table->polygon('positions');                      // POLYGON equivalent column.\n$table->rememberToken();                           // Adds a nullable remember_token VARCHAR(100) equivalent column.\n$table->set('flavors', ['strawberry', 'vanilla']); // SET equivalent column.\n$table->smallIncrements('id');                     // Auto-incrementing UNSIGNED SMALLINT (primary key) equivalent column.\n$table->smallInteger('votes');                     // SMALLINT equivalent column.\n$table->softDeletes();                             // Adds a nullable deleted_at TIMESTAMP equivalent column for soft deletes.\n$table->softDeletesTz();                           // Adds a nullable deleted_at TIMESTAMP (with timezone) equivalent column for soft deletes.\n$table->string('name', 100);                       // VARCHAR equivalent column with a optional length.\n$table->text('description');                       // TEXT equivalent column.\n$table->time('sunrise');                           // TIME equivalent column.\n$table->timeTz('sunrise');                         // TIME (with timezone) equivalent column.\n$table->timestamp('added_on');                     // TIMESTAMP equivalent column.\n$table->timestampTz('added_on');                   // TIMESTAMP (with timezone) equivalent column.\n$table->timestamps();                              // Adds nullable created_at and updated_at TIMESTAMP equivalent columns.\n$table->timestampsTz();                            // Adds nullable created_at and updated_at TIMESTAMP (with timezone) equivalent columns.\n$table->tinyIncrements('id');                      // Auto-incrementing UNSIGNED TINYINT (primary key) equivalent column.\n$table->tinyInteger('votes');                      // TINYINT equivalent column.\n$table->unsignedBigInteger('votes');               // UNSIGNED BIGINT equivalent column.\n$table->unsignedDecimal('amount', 8, 2);           // UNSIGNED DECIMAL equivalent column with a precision (total digits) and scale (decimal digits).\n$table->unsignedInteger('votes');                  // UNSIGNED INTEGER equivalent column.\n$table->unsignedMediumInteger('votes');            // UNSIGNED MEDIUMINT equivalent column.\n$table->unsignedSmallInteger('votes');             // UNSIGNED SMALLINT equivalent column.\n$table->unsignedTinyInteger('votes');              // UNSIGNED TINYINT equivalent column.\n$table->uuid('id');                                // UUID equivalent column.\n$table->year('birth_year');                        // YEAR equivalent column.\n\n// COLUMN MODIFIERS\n\n$table->someType()->after('column');              // Place the column \"after\" another column (MySQL)\n$table->someType()->autoIncrement();              // Set INTEGER columns as auto-increment (primary key)\n$table->someType()->charset('utf8');              // Specify a character set for the column (MySQL)\n$table->someType()->collation('utf8_unicode_ci'); // Specify a collation for the column (MySQL/SQL Server)\n$table->someType()->comment('my comment');        // Add a comment to a column (MySQL/PostgreSQL)\n$table->someType()->default($value);              // Specify a \"default\" value for the column\n$table->someType()->first();                      // Place the column \"first\" in the table (MySQL)\n$table->someType()->nullable($value = true);      // Allows (by default) NULL values to be inserted into the column\n$table->someType()->storedAs($expression);        // Create a stored generated column (MySQL)\n$table->someType()->unsigned();                   // Set INTEGER columns as UNSIGNED (MySQL)\n$table->someType()->useCurrent();                 // Set TIMESTAMP columns to use CURRENT_TIMESTAMP as default value\n$table->someType()->virtualAs($expression);       // Create a virtual generated column (MySQL)\n$table->someType()->generatedAs($expression);     // Create an identity column with specified sequence options (PostgreSQL)\n$table->someType()->always();                     // Defines the precedence of sequence values over input for an identity column (PostgreSQL)\n\n// UPDATING COLUMNS\n\n$table->someType()->change();       // Allows you to modify some existing column types to a new type or modify the column's attributes.\n$table->renameColumn('from', 'to'); // Rename a column\n\n$table->dropColumn('column');       // Drop a given column (accepts an array of columns).\n$table->dropRememberToken();        // Drop the remember_token column.\n$table->dropSoftDeletes();          // Drop the deleted_at column.\n$table->dropSoftDeletesTz();        // Alias of dropSoftDeletes() method.\n$table->dropTimestamps();           // Drop the created_at and updated_at columns.\n$table->dropTimestampsTz();         // Alias of dropTimestamps() method.\n\n// INDEXES\n\n$table->primary('id');                // Adds a primary key.\n$table->primary(['id', 'parent_id']); // Adds composite keys.\n$table->unique('email');              // Adds a unique index.\n$table->index('state');               // Adds a plain index.\n$table->spatialIndex('location');     // Adds a spatial index. (except SQLite)\n\n$table->dropPrimary('users_id_primary');               // Drop a primary key from the \"users\" table.\n$table->dropUnique('users_email_unique');              // Drop a unique index from the \"users\" table.\n$table->dropIndex('geo_state_index');                  // Drop a basic index from the \"geo\" table.\n$table->dropSpatialIndex('geo_location_spatialindex'); // Drop a spatial index from the \"geo\" table (except SQLite).\n\n// FOREIGN KEY CONSTRAINTS\n\n$table->foreign('user_id')->references('id')->on('users'); // Create foreign key constraints.\n$table->dropForeign('posts_user_id_foreign');              // Drop foreign key (accepts an array of strings).\n\nSchema::enableForeignKeyConstraints();  // Enable foreign key constraints within your migrations.\nSchema::disableForeignKeyConstraints(); // Disable foreign key constraints within your migrations.\n\n/********************************************************************************************\n * COLLECTION ELOQUENT METHODS\n * https://laravel.com/docs/5.7/collections\n ********************************************************************************************/\n\nall\naverage\navg\nchunk\ncollapse\ncombine\nconcat\ncontains\ncontainsStrict\ncount\ncrossJoin\ndd\ndiff\ndiffAssoc\ndiffKeys\ndump\neach\neachSpread\nevery\nexcept\nfilter\nfirst\nfirstWhere\nflatMap\nflatten\nflip\nforget\nforPage\nget\ngroupBy\nhas\nimplode\nintersect\nintersectByKeys\nisEmpty\nisNotEmpty\nkeyBy\nkeys\nlast\nmacro\nmake\nmap\nmapInto\nmapSpread\nmapToGroups\nmapWithKeys\nmax\nmedian\nmerge\nmin\nmode\nnth\nonly\npad\npartition\npipe\npluck\npop\nprepend\npull\npush\nput\nrandom\nreduce\nreject\nreverse\nsearch\nshift\nshuffle\nslice\nsome\nsort\nsortBy\nsortByDesc\nsortKeys\nsortKeysDesc\nsplice\nsplit\nsum\ntake\ntap\ntimes\ntoArray\ntoJson\ntransform\nunion\nunique\nuniqueStrict\nunless\nunlessEmpty\nunlessNotEmpty\nunwrap\nvalues\nwhen\nwhenEmpty\nwhenNotEmpty\nwhere\nwhereStrict\nwhereBetween\nwhereIn\nwhereInStrict\nwhereInstanceOf\nwhereNotBetween\nwhereNotIn\nwhereNotInStrict\nwrap\nzip\n\n/********************************************************************************************\n * HTTP TESTS\n * https://laravel.com/docs/5.7/http-tests\n ********************************************************************************************/\n\n$response->assertStatus($code);                            // Assert that the response has a given code.\n$response->assertForbidden();                              // Assert that the response has a forbidden status code.\n$response->assertNotFound();                               // Assert that the response has a not found status code.\n$response->assertOk();                                     // Assert that the response has a 200 status code.\n$response->assertSuccessful();                             // Assert that the response has a successful status code.\n$response->assertRedirect($uri);                           // Assert that the response is a redirect to a given URI.\n\n$response->assertHeader($headerName, $value = null);       // Assert that the given header is present on the response.\n$response->assertHeaderMissing($headerName);               // Assert that the given header is not present on the response.\n\n$response->assertExactJson(array $data);                   // Assert that the response contains an exact match of the given JSON data.\n$response->assertJson(array $data);                        // Assert that the response contains the given JSON data.\n$response->assertJsonCount($count, $key = null);           // Assert that the response JSON has an array with the expected number of items at the given key.\n$response->assertJsonFragment(array $data);                // Assert that the response contains the given JSON fragment.\n$response->assertJsonMissing(array $data);                 // Assert that the response does not contain the given JSON fragment.\n$response->assertJsonMissingExact(array $data);            // Assert that the response does not contain the exact JSON fragment.\n$response->assertJsonMissingValidationErrors($keys);       // Assert that the response has no JSON validation errors for the given keys.\n$response->assertJsonStructure(array $structure);          // Assert that the response has a given JSON structure.\n$response->assertJsonValidationErrors($keys);              // Assert that the response has the given JSON validation errors for the given keys.\n\n$response->assertDontSee($value);                          // Assert that the given string is not contained within the response.\n$response->assertDontSeeText($value);                      // Assert that the given string is not contained within the response text.\n$response->assertSee($value);                              // Assert that the given string is contained within the response.\n$response->assertSeeInOrder(array $values);                // Assert that the given strings are contained in order within the response.\n$response->assertSeeText($value);                          // Assert that the given string is contained within the response text.\n$response->assertSeeTextInOrder(array $values);            // Assert that the given strings are contained in order within the response text.\n\n$response->assertCookie($cookieName, $value = null);       // Assert that the response contains the given cookie.\n$response->assertCookieExpired($cookieName);               // Assert that the response contains the given cookie and it is expired.\n$response->assertCookieNotExpired($cookieName);            // Assert that the response contains the given cookie and it is not expired.\n$response->assertCookieMissing($cookieName);               // Assert that the response does not contains the given cookie.\n$response->assertPlainCookie($cookieName, $value = null);  // Assert that the response contains the given cookie (unencrypted).\n\n$response->assertSessionHas($key, $value = null);                                             // Assert that the session contains the given piece of data.\n$response->assertSessionHasAll(array $data);                                                  // Assert that the session has a given list of values.\n$response->assertSessionHasErrors(array $keys, $format = null, $errorBag = 'default');        // Assert that the session contains an error for the given field.\n$response->assertSessionHasErrorsIn($errorBag, $keys = [], $format = null);                   // Assert that the session has the given errors.\n$response->assertSessionHasNoErrors();                                                        // Assert that the session has no errors.\n$response->assertSessionDoesntHaveErrors($keys = [], $format = null, $errorBag = 'default');  // Assert that the session has no errors for the given keys.\n$response->assertSessionMissing($key);                                                        // Assert that the session does not contain the given key.\n\n$response->assertViewHas($key, $value = null);             // Assert that the response view was given a piece of data.\n$response->assertViewHasAll(array $data);                  // Assert that the response view has a given list of data.\n$response->assertViewIs($value);                           // Assert that the given view was returned by the route.\n$response->assertViewMissing($key);                        // Assert that the response view is missing a piece of bound data.\n\n$this->assertAuthenticated($guard = null);                           // Assert that the user is authenticated.\n$this->assertGuest($guard = null);                                   // Assert that the user is not authenticated.\n$this->assertAuthenticatedAs($user, $guard = null);                  // Assert that the given user is authenticated.\n$this->assertCredentials(array $credentials, $guard = null);         // $this->assertCredentials(array $credentials, $guard = null).\n$this->assertInvalidCredentials(array $credentials, $guard = null);  // Assert that the given credentials are invalid.\n\n/********************************************************************************************\n * LARAVEL VALET COMMANDS\n * https://laravel.com/docs/6.0/valet\n ********************************************************************************************/\n\nvalet install     // Install the Valet daemon.\nvalet uninstall   // Uninstall the Valet daemon.\nvalet use php@7.2 // Allows you to switch between php versions.\n\nvalet start       // Start the Valet daemon.\nvalet stop        // Stop the Valet daemon.\nvalet restart     // Restart the Valet daemon.\n\nvalet park        // Register your current working directory as a path which Valet should search for sites.\nvalet forget      // Run this command from a \"parked\" directory to remove it from the parked directory list.\nvalet paths       // View all of your \"parked\" paths.\n\nvalet link <name>   // Link a single site in the current directory and not the entire directory.\nvalet unlink <name> // Unlink a single site in the current directory\nvalet links         // View all of your \"linked\" paths.\n\nvalet secure      // Serve site into https\nvalet unsecure    // Revert back to http\n\nvalet log          // View a list of logs which are written by Valet's services.\nvalet trust        // Add sudoers files for Brew and Valet to allow Valet commands to be run without prompting for passwords.\nvalet tld <suffix> // Update tld for your domains (default to test).\nvalet share        // Share your site with the world.\n"
  },
  {
    "path": "backend/moleculer.js",
    "content": "/* *******************************************************************************************\n * MOLECULER MICROSERVICES FRAMEWORK - CORE CHEATSHEET\n * http://moleculer.services/0.12/docs/\n *\n * Version: 0.12.x\n * ******************************************************************************************* */\n\n\n/* *******************************************************************************************\n * Install Moleculer\n * ******************************************************************************************* */\n\n\n```bash\nnpm i moleculer\n```\n\n\n/* *******************************************************************************************\n * SERVICE BROKER OPTIONS\n * ******************************************************************************************* */\n\n\n// All ServiceBroker options with default values\nconst broker = new ServiceBroker({\n    namespace: \"\",                          // Namespace for node segmentation\n    nodeID: null,                           // NodeID. Default value is generated from hostname and PID\n\n    logger: null,                           // Logger instance.\n    logLevel: null,                         // Log level\n    logFormatter: \"default\",                // Log formatter. Options: \"default\", \"simple\"\n\n    transporter: null,                      // Transporter config\n    requestTimeout: 0 * 1000,               // Timeout of requests\n    requestRetry: 0,                        // Retries for requests\n    maxCallLevel: 0,                        // Maximum calling level.\n    heartbeatInterval: 5,                   // Heartbeat sending interval in seconds\n    heartbeatTimeout: 15,                   // Heartbeat timeout in seconds\n\n    disableBalancer: false,                 // Disable the built-in Moleculer balancer\n\n    registry: {                             // Service Registry options\n        strategy: \"RoundRobin\",             // Invocation strategy\n        strategyOptions: null,              // Strategy options\n        preferLocal: true                   // Prefer local invocations\n    },\n\n    circuitBreaker: {                       // Circuit-breaker options\n        enabled: false,                     // Enable circuit-breaker\n        maxFailures: 3,                     // Maximum failures\n        halfOpenTime: 10 * 1000,            // Half-open time interval\n        failureOnTimeout: true,             // Failure on timeouts\n        failureOnReject: true               // Failure on rejects\n    },\n\n    transit: {                              // Transit options\n        maxQueueSize: 50 * 1000             // Max items in outgoing queue\n    },\n\n    cacher: null,                           // Cacher config\n    serializer: null,                       // Serializer config\n\n    validation: true,                       // Enable params validation\n    validator: null,                        // Validator instance\n    metrics: false,                         // Enable metrics\n    metricsRate: 1,                         // Metrics rate\n    statistics: false,                      // Enable statistics\n    internalServices: true,                 // Load internal ($node) services\n\n    hotReload: false,                       // Hot-reload  services\n\n    middlewares: null,                      // List of middlewares\n\n    replCommands: null,                     // Custom REPL commands\n\n    ServiceFactory: null,                   // Custom Service factory class\n    ContextFactory: null                    // Custom Context factory class\n});\n\n\n/* *******************************************************************************************\n * SERVICE BROKER METHODS\n * ******************************************************************************************* */\n\n\n// Broker properties\nbroker.Promise                                  // Pointer to Bluebird Promise lib\nbroker.namespace                                // Namespace from options\nbroker.nodeID                                   // Local NodeID\nbroker.logger                                   // Logger instance\nbroker.cacher                                   // Cacher instance\nbroker.serializer                               // Serializer instance\nbroker.validator                                // Validator instance\n\n// Broker methods\nbroker.start();                                 // Start broker & all services. Returns a Promise\nbroker.stop();                                  // Stop broker & all services. Returns a Promise\nbroker.fatal(message, err, needExit = true);    // Fired a fatal error.\nbroker.repl();                                  // Switch broker to REPL mode.\n\nbroker.getLogger(module, service, version);     // Create a custom logger instance for modules\n\nbroker.loadServices(folder, fileMask);          // Load all services from directory\nbroker.loadService(filePath);                   // Load a service from a file\nbroker.createService(schema, schemaMods);       // Create a local service from schema\nbroker.destroyService(service);                 // Destroy a local service\nbroker.getLocalService(name, version);          // Get a local service instance by name\n\n// Wait for services. Returns a Promise\nawait broker.waitForServices(serviceNames, timeout, interval);\nawait broker.waitForServices([\"posts\", \"users\"], 5000);\nawait broker.waitForServices({\n    name: \"posts\", version: 2,\n    name: \"users\", version: 1\n}, 5000);\n\nbroker.use(...middlewares);                     // Register middlewares\n\nbroker.call(actionName, params, opts);          // Call a service\nbroker.mcall(def);                              // Multiple service calls\n\nbroker.emit(eventName, payload, groups);                    // Emit a balanced event\nbroker.broadcast(eventName, payload, groups = null)         // Broadcast an event\nbroker.broadcastLocal(eventName, payload, groups = null)    // Broadcast an event to local services\n\nbroker.sendPing(nodeID);                        // Ping a remote node\nbroker.MOLECULER_VERSION                        // Version number of Moleculer lib\nbroker.PROTOCOL_VERSION                         // Version number of Moleculer protocol\n\n\n/* *******************************************************************************************\n * BROKER SERVICE CALLS\n * ******************************************************************************************* */\n\n\n// Call the \"users.get\" service with params\nbroker.call(\"users.get\", { id: 150 }).then(user => console.log(user));\n\n// Call with async/await\nconst user = await broker.call(\"users.get\", { id: 150});\n\n// Call with calling options\nconst user = await broker.call(\"users.get\", { id: 150}, { timeout: 5000, retryCount: 3 });\n\n// Direct call to a remote node\nconst info = await broker.call(\"$node.services\", null, { nodeID: \"node-123\" });\n\n// Multiple calls with array def\nconst [posts, users] = await broker.mcall([\n    { action: \"posts.find\", params: { limit: 5, offset: 0 } },\n    { action: \"users.find\", params: { limit: 5, sort: \"username\" }, opts: { timeout: 500 } }\n]);\n\n// Multip calls with object def\nconst res = await broker.mcall({\n    posts: { action: \"posts.find\", params: { limit: 5, offset: 0 } },\n    users: { action: \"users.find\", params: { limit: 5, sort: \"username\" }, opts: { timeout: 500 } }\n});\nconsole.log(res.posts, res.users);\n\n\n/* *******************************************************************************************\n * BROKER EVENTS\n * ******************************************************************************************* */\n\n\n// Send a balanced event with payload\nbroker.emit(\"user.created\", { user: user });\n\n// Send a balanced event only for \"mail\" and \"payment\" service (only one instance)\nbroker.emit(\"user.created\", { user: user }, [\"mail\", \"payment\"]);\n\n// Send a broadcast event (for all service instances)\nbroker.broadcast(\"user.created\", { user: user });\n\n// Send a broadcast event only for \"mail\" and \"payment\" services (all instances)\nbroker.broadcast(\"user.created\", { user: user }, [\"mail\", \"payment\"]);\n\n\n/* *******************************************************************************************\n * NATS TRANSPORTER\n * Requirement: `npm i nats`\n * ******************************************************************************************* */\n\n\n// Default options\nconst broker = new ServiceBroker({\n    transporter: \"NATS\"\n});\n\n// With URI\nconst broker = new ServiceBroker({\n    transporter: \"nats://localhost:4222\"\n});\n\n// With options\nconst broker = new ServiceBroker({\n    transporter: {\n        type: \"NATS\",\n        options: {\n            url: \"nats://localhost:4222\",\n            user: \"admin\",\n            pass: \"1234\"\n        }\n    }\n});\n\n// With TLS (https://github.com/nats-io/node-nats#tls)\nconst broker = new ServiceBroker({\n    transporter: {\n        type: \"NATS\",\n        options: {\n            url: \"nats://localhost:4222\",\n            tls: {\n                key: fs.readFileSync('./client-key.pem'),\n                cert: fs.readFileSync('./client-cert.pem'),\n                ca: [ fs.readFileSync('./ca.pem') ]\n            }\n        }\n    }\n});\n\n\n/* *******************************************************************************************\n * REDIS TRANSPORTER\n * Requirement: `npm i ioredis`\n * ******************************************************************************************* */\n\n\n// Default options\nconst broker = new ServiceBroker({\n    transporter: \"Redis\"\n});\n\n// With URI\nconst broker = new ServiceBroker({\n    transporter: \"redis://redis-server:6379\"\n});\n\n// With options\nconst broker = new ServiceBroker({\n    transporter: {\n        type: \"Redis\",\n        options: {\n            port: 6379,             // Redis port\n            host: 'redis-server',   // Redis host\n            family: 4,              // 4 (IPv4) or 6 (IPv6)\n            password: 'auth',       // Password\n            db: 0                   // Database index\n        }\n    }\n});\n\n\n/* *******************************************************************************************\n * MQTT TRANSPORTER\n * Requirement: `npm i mqtt`\n * ******************************************************************************************* */\n\n\n// Default options\nconst broker = new ServiceBroker({\n    transporter: \"MQTT\"\n});\n\n// With URI\nconst broker = new ServiceBroker({\n    transporter: \"mqtt://mqtt-server:1883\"\n});\n\n// With options\nconst broker = new ServiceBroker({\n    transporter: {\n        type: \"MQTT\",\n        options: {\n            host: \"mqtt-server\",\n            port: 1883,\n            username: \"admin\",\n            password: \"1234\"\n        }\n    }\n});\n\n\n/* *******************************************************************************************\n * AMQP TRANSPORTER\n * Requirement: `npm i amqplib`\n * ******************************************************************************************* */\n\n\n// Default options\nconst broker = new ServiceBroker({\n    transporter: \"AMQP\"\n});\n\n// With URI\nconst broker = new ServiceBroker({\n    transporter: \"amqp://rabbitmq-server:5672\"\n});\n\n// With options\nconst broker = new ServiceBroker({\n    transporter: {\n        type: \"AMQP\",\n        options: {\n            url: \"amqp://user:pass@rabbitmq-server:5672\",\n            eventTimeToLive: 5000,\n            prefetch: 1\n        }\n    }\n});\n\n\n/* *******************************************************************************************\n * KAFKA TRANSPORTER\n * Requirement: `npm i kafka-node`\n * ******************************************************************************************* */\n\n\n// Default options\nconst broker = new ServiceBroker({\n    transporter: \"Kafka\"\n});\n\n// With URI\nconst broker = new ServiceBroker({\n    transporter: \"kafka://192.168.51.29:2181\"\n});\n\n// With options\nconst broker = new ServiceBroker({\n    transporter: {\n        type: \"kafka\",\n        options: {\n            host: \"192.168.51.29:2181\",\n\n            // KafkaClient options. More info: https://github.com/SOHU-Co/kafka-node#clientconnectionstring-clientid-zkoptions-noackbatchoptions-ssloptions\n            client: {\n                zkOptions: undefined,\n                noAckBatchOptions: undefined,\n                sslOptions: undefined\n            },\n\n            // KafkaProducer options. More info: https://github.com/SOHU-Co/kafka-node#producerclient-options-custompartitioner\n            producer: {},\n            customPartitioner: undefined,\n\n            // ConsumerGroup options. More info: https://github.com/SOHU-Co/kafka-node#consumergroupoptions-topics\n            consumer: {\n            },\n\n            // Advanced options for `send`. More info: https://github.com/SOHU-Co/kafka-node#sendpayloads-cb\n            publish: {\n                partition: 0,\n                attributes: 0\n            }\n        }\n    }\n});\n\n\n/* *******************************************************************************************\n * NATS STREAMING TRANSPORTER\n * Requirement: `npm i node-nats-streaming`\n * ******************************************************************************************* */\n\n\n// Default options\nconst broker = new ServiceBroker({\n    transporter: \"STAN\"\n});\n\n// With URI\nconst broker = new ServiceBroker({\n    transporter: \"stan://192.168.0.120:4222\"\n});\n\n// With options\nconst broker = new ServiceBroker({\n    transporter: {\n        type: \"STAN\",\n        options: {\n            url: \"stan://127.0.0.1:4222\",\n            clusterID: \"my-cluster\"\n        }\n    }\n});\n\n\n/* *******************************************************************************************\n * TCP STREAMING TRANSPORTER\n * No requirements\n * ******************************************************************************************* */\n\n\n// Default options\nconst broker = new ServiceBroker({\n    transporter: \"TCP\"\n});\n\n// With static node list\nconst broker = new ServiceBroker({\n    transporter: \"tcp://172.17.0.1:6000/node-1,172.17.0.2:6000/node-2\"\n});\n\nconst broker = new ServiceBroker({\n    nodeID: \"node-1\",\n    transporter: {\n        type: \"TCP\",\n        options: {\n            udpDiscovery: false,\n            urls: [\n                \"172.17.0.1:6000/node-1\",\n                \"172.17.0.2:6000/node-2\",\n                \"172.17.0.3:6000/node-3\"\n            ]\n        }\n    }\n});\n\n// With full options\nconst broker = new ServiceBroker({\n    logger: true,\n    transporter: {\n        type: \"TCP\",\n        options: {\n            // Enable UDP discovery\n            udpDiscovery: true,\n            // Reusing UDP server socket\n            udpReuseAddr: true,\n\n            // UDP port\n            udpPort: 4445,\n            // UDP bind address\n            udpBindAddress: null,\n            // UDP sending period\n            udpPeriod: 5,\n\n            // Multicast address.\n            udpMulticast: \"239.0.0.0\",\n            // Multicast TTL setting\n            udpMulticastTTL: 1,\n\n            // Send broadcast\n            udpBroadcast: false,\n\n            // TCP server port. Null or 0 means random port\n            port: null,\n            // Static remote nodes address list (when UDP discovery is not available)\n            urls: null,\n            // Use hostname as preffered connection address\n            useHostname: true,\n\n            // Gossip sending period in seconds\n            gossipPeriod: 2,\n            // Maximum enabled outgoing connections. If reach, close the old connections\n            maxConnections: 32,\n            // Maximum TCP packet size\n            maxPacketSize: 1 * 1024 * 1024\n        }\n    }\n});\n\n\n/* *******************************************************************************************\n * CACHERS\n * http://moleculer.services/docs/cachers.html\n * ******************************************************************************************* */\n\n\n// Memory cacher\nconst broker = new ServiceBroker({\n    cacher: \"Memory\"\n});\n// or\nconst broker = new ServiceBroker({\n    cacher: true\n});\n\n// Memory cacher with options\nconst broker = new ServiceBroker({\n    cacher: {\n        type: \"Memory\",\n        options: {\n            ttl: 30\n        }\n    }\n});\n\n// Redis cacher\nconst broker = new ServiceBroker({\n    cacher: \"Redis\"\n});\n\n// Redis cacher with URI\nconst broker = new ServiceBroker({\n    cacher: \"redis://redis-server:6379\"\n});\n\n// Redis cacher with options\nconst broker = new ServiceBroker({\n    cacher: {\n        type: \"Redis\",\n        options: {\n            prefix: \"MOL\",\n            redis: {\n                host: \"redis\",\n                port: 6379,\n                password: \"1234\",\n                db: 0\n            }\n        }\n    }\n});\n\n\n/* *******************************************************************************************\n * Manual caching\n * ******************************************************************************************* */\n\n\n// Save to cache\nbroker.cacher.set(\"mykey.a\", { a: 5 });\n\n// Get from cache\nconst obj = await broker.cacher.get(\"mykey.a\");\n\n// Remove entry from cache\nbroker.cacher.del(\"mykey.a\");\n\n// Clean all 'mykey' entries\nbroker.cacher.clean(\"mykey.*\");\n\n// Clean all entries\nbroker.cacher.clean();\n\n\n/* *******************************************************************************************\n * SERIALIZER\n * http://moleculer.services/docs/serializers.html\n * ******************************************************************************************* */\n\n\n// JSON serializer (default)\nconst broker = new ServiceBroker({\n    serializer: \"JSON\"\n});\n\n// Avro serializer (need `npm i avsc`)\nconst broker = new ServiceBroker({\n    serializer: \"Avro\"\n});\n\n// Protocol Buffer serializer (need `npm i protobufjs`)\nconst broker = new ServiceBroker({\n    serializer: \"ProtoBuf\"\n});\n\n// MsgPack serializer (need `npm i msgpack5`)\nconst broker = new ServiceBroker({\n    serializer: \"MsgPack\"\n});\n\n\n/* *******************************************************************************************\n * STRATEGY\n * ******************************************************************************************* */\n\n\n// Round-robin strategy (default)\nconst broker = new ServiceBroker({\n    registry: {\n        strategy: \"RoundRobin\"\n    }\n});\n\n// Random strategy\nconst broker = new ServiceBroker({\n    registry: {\n        strategy: \"Random\"\n    }\n});\n\n// CPU usage-based strategy\nconst broker = new ServiceBroker({\n    registry: {\n        strategy: \"CpuUsageStrategy\"\n    }\n});\n\n// CPU usage-based strategy with options\nconst broker = new ServiceBroker({\n    registry: {\n        strategy: \"CpuUsageStrategy\",\n        strategyOptions: {\n            sampleCount: 3,\n            lowCpuUsage: 10\n        }\n    }\n});\n\n\n/* *******************************************************************************************\n * LOGGER\n * http://moleculer.services/docs/logger.html\n * ******************************************************************************************* */\n\n\n// Logger methods\nbroker.logger.fatal();\nbroker.logger.error();\nbroker.logger.warn();\nbroker.logger.info();\nbroker.logger.debug();\nbroker.logger.trace();\n\n// Custom log formatter\nconst broker = new ServiceBroker({\n    logger: console,\n    logFormatter(level, args, bindings) {\n        return level.toUpperCase() + \" \" + bindings.nodeID + \": \" + args.join(\" \");\n    }\n});\n\n// External Pino logger\nconst pino = require(\"pino\")({ level: \"info\" });\nconst broker = new ServiceBroker({\n    logger: bindings => pino.child(bindings)\n});\n\n// External Bunyan logger\nconst logger = require(\"bunyan\").createLogger({ name: \"moleculer\", level: \"info\" });\nconst broker = new ServiceBroker({\n    logger: bindings => logger.child(bindings)\n});\n\n\n/* *******************************************************************************************\n * SERVICE SCHEMA\n * ******************************************************************************************* */\n\n\nmodule.exports = {\n    // Name\n    name: \"greeter\",\n    // Version\n    version: 2,\n\n    // Settings\n    settings: {},\n    // Metadata\n    metadata: {},\n    // Dependencies\n    dependencies: [],\n\n    // Actions\n    actions: {\n        // Shorthand actions\n        hello() {\n            // Call a method\n            this.doSomething();\n\n            return \"Hello Moleculer\";\n        },\n\n        // With properties\n        welcome: {\n            // Cache options\n            cache: {\n                keys: [\"name\"]\n            },\n            // Validation options\n            params: {\n                name: \"string\"\n            },\n            // Action handler\n            handler(ctx) {\n                return `Welcome, ${ctx.params.name}`;\n            }\n        }\n    },\n\n    events: {\n        \"user.created\"(payload, sender) {\n\n        }\n    },\n\n    // Service methods\n    methods: {\n        doSomething() {}\n    },\n\n    // Lifecycle event handlers\n    created() {\n        console.log(\"Service created\");\n    },\n\n    started() {\n        console.log(\"Service started\");\n        return Promise.resolve();\n    },\n\n    stopped() {\n        console.log(\"Service stopped\");\n        return Promise.resolve();\n    }\n};\n\n\n/* *******************************************************************************************\n * SERVICE\n * ******************************************************************************************* */\n\n\nthis.name               // Name of service\nthis.version            // Version of service\nthis.settings           // Settings of service\nthis.schema             // Schema definition of service\nthis.broker             // Broker instance\nthis.Promise            // Class of Promise (Bluebird)\nthis.logger             // Logger instance\nthis.actions            // Actions of service.\nthis.waitForServices    // Pointer to ‘broker.waitForServices’ method\n\n\n/* *******************************************************************************************\n * CONTEXT\n * ******************************************************************************************* */\n\n \nctx.id                  // Context ID\nctx.broker              // Broker instance\nctx.action              // Action definition\nctx.nodeID              // Node ID\nctx.requestID           // Request ID\nctx.parentID            // ID of parent context (in case of sub-calls).\nctx.params              // Request params\nctx.meta                // Request metadata\nctx.callerNodeID        // Caller Node ID if it is requested from a remote node.\nctx.level               // Request level (in case of sub-calls). The first level is 1.\n\n// Make a sub-call\nctx.call(actionName, params, callingOptions)\n\n// Emit an event\nctx.emit(eventName, payload, groups);\n"
  },
  {
    "path": "backend/node.js",
    "content": "/* *******************************************************************************************\n * SYNOPSIS\n * http://nodejs.org/api/synopsis.html\n * ******************************************************************************************* */\n\n\nvar http = require('http');\n\n// An example of a web server written with Node which responds with 'Hello World'.\n// To run the server, put the code into a file called example.js and execute it with the node program.\nhttp.createServer(function (request, response) {\n  response.writeHead(200, {'Content-Type': 'text/plain'});\n  response.end('Hello World\\n');\n}).listen(8124);\n\nconsole.log('Server running at http://127.0.0.1:8124/');\n\n\n/* *******************************************************************************************\n * GLOBAL OBJECTS\n * http://nodejs.org/api/globals.html\n * ******************************************************************************************* */\n\n\n// In browsers, the top-level scope is the global scope.\n// That means that in browsers if you're in the global scope var something will define a global variable.\n// In Node this is different. The top-level scope is not the global scope; var something inside a Node module will be local to that module.\n\n__filename;  // The filename of the code being executed. (absolute path)\n__dirname;   // The name of the directory that the currently executing script resides in. (absolute path)\nmodule;      // A reference to the current module. In particular module.exports is used for defining what a module exports and makes available through require().\nexports;     // A reference to the module.exports that is shorter to type.\nprocess;     // The process object is a global object and can be accessed from anywhere. It is an instance of EventEmitter.\nBuffer;      // The Buffer class is a global type for dealing with binary data directly.\n\n\n/* *******************************************************************************************\n * CONSOLE\n * http://nodejs.org/api/console.html\n * ******************************************************************************************* */\n\n\nconsole.log([data], [...]);             // Prints to stdout with newline.\nconsole.info([data], [...]);            // Same as console.log.\nconsole.error([data], [...]);           // Same as console.log but prints to stderr.\nconsole.warn([data], [...]);            // Same as console.error.\nconsole.dir(obj);                       // Uses util.inspect on obj and prints resulting string to stdout.\nconsole.time(label);                    // Mark a time.\nconsole.timeEnd(label);                 // Finish timer, record output.\nconsole.trace(label);                   // Print a stack trace to stderr of the current position.\nconsole.assert(expression, [message]);  // Same as assert.ok() where if the expression evaluates as false throw an AssertionError with message.\n\n\n/* *******************************************************************************************\n * TIMERS\n * http://nodejs.org/api/timers.html\n * ******************************************************************************************* */\n\n\nsetTimeout(callback, delay, [arg], [...]);   // To schedule execution of a one-time callback after delay milliseconds. Optionally you can also pass arguments to the callback.\nclearTimeout(t);                             // Stop a timer that was previously created with setTimeout().\nsetInterval(callback, delay, [arg], [...]);  // To schedule the repeated execution of callback every delay milliseconds. Optionally you can also pass arguments to the callback.\nclearInterval(t);                            // Stop a timer that was previously created with setInterval().\nsetImmediate(callback, [arg], [...]);        // To schedule the \"immediate\" execution of callback after I/O events callbacks and before setTimeout and setInterval.\nclearImmediate(immediateObject);             // Stop a timer that was previously created with setImmediate().\n\nunref();  // Allow you to create a timer that is active but if it is the only item left in the event loop, node won't keep the program running.\nref();    // If you had previously unref()d a timer you can call ref() to explicitly request the timer hold the program open.\n\n\n/* *******************************************************************************************\n * MODULES\n * http://nodejs.org/api/modules.html\n * ******************************************************************************************* */\n\n\nvar module = require('./module.js');    // Loads the module module.js in the same directory.\nmodule.require('./another_module.js');  // load another_module as if require() was called from the module itself.\n\nmodule.id;        // The identifier for the module. Typically this is the fully resolved filename.\nmodule.filename;  // The fully resolved filename to the module.\nmodule.loaded;    // Whether or not the module is done loading, or is in the process of loading.\nmodule.parent;    // The module that required this one.\nmodule.children;  // The module objects required by this one.\n\nexports.area = function (r) {\n  return Math.PI * r * r;\n};\n\n// If you want the root of your module's export to be a function (such as a constructor)\n// or if you want to export a complete object in one assignment instead of building it one property at a time,\n// assign it to module.exports instead of exports.\nmodule.exports = function(width) {\n  return {\n    area: function() {\n      return width * width;\n    }\n  };\n}\n\n\n/* *******************************************************************************************\n * PROCESS\n * http://nodejs.org/api/process.html\n * ******************************************************************************************* */\n\n\nprocess.on('exit', function(code) {});              // Emitted when the process is about to exit\nprocess.on('uncaughtException', function(err) {});  // Emitted when an exception bubbles all the way back to the event loop. (should not be used)\n\nprocess.stdout;           // A writable stream to stdout.\nprocess.stderr;           // A writable stream to stderr.\nprocess.stdin;            // A readable stream for stdin.\n\nprocess.argv;             // An array containing the command line arguments.\nprocess.env;              // An object containing the user environment.\nprocess.execPath;         // This is the absolute pathname of the executable that started the process.\nprocess.execArgv;         // This is the set of node-specific command line options from the executable that started the process.\n\nprocess.arch;             // What processor architecture you're running on: 'arm', 'ia32', or 'x64'.\nprocess.config;           // An Object containing the JavaScript representation of the configure options that were used to compile the current node executable.\nprocess.pid;              // The PID of the process.\nprocess.platform;         // What platform you're running on: 'darwin', 'freebsd', 'linux', 'sunos' or 'win32'.\nprocess.title;            // Getter/setter to set what is displayed in 'ps'.\nprocess.version;          // A compiled-in property that exposes NODE_VERSION.\nprocess.versions;         // A property exposing version strings of node and its dependencies.\n\nprocess.abort();          // This causes node to emit an abort. This will cause node to exit and generate a core file.\nprocess.chdir(dir);       // Changes the current working directory of the process or throws an exception if that fails.\nprocess.cwd();            // Returns the current working directory of the process.\nprocess.exit([code]);     // Ends the process with the specified code. If omitted, exit uses the 'success' code 0.\nprocess.getgid();         // Gets the group identity of the process.\nprocess.setgid(id);       // Sets the group identity of the process.\nprocess.getuid();         // Gets the user identity of the process.\nprocess.setuid(id);       // Sets the user identity of the process.\nprocess.getgroups();      // Returns an array with the supplementary group IDs.\nprocess.setgroups(grps);  // Sets the supplementary group IDs.\n\nprocess.initgroups(user, extra_grp);  // Reads /etc/group and initializes the group access list, using all groups of which the user is a member.\nprocess.kill(pid, [signal]);          // Send a signal to a process. pid is the process id and signal is the string describing the signal to send.\nprocess.memoryUsage();                // Returns an object describing the memory usage of the Node process measured in bytes.\nprocess.nextTick(callback);           // On the next loop around the event loop call this callback.\nprocess.maxTickDepth;                 // Callbacks passed to process.nextTick will usually be called at the end of the current flow of execution, and are thus approximately as fast as calling a function synchronously.\nprocess.umask([mask]);                // Sets or reads the process's file mode creation mask.\nprocess.uptime();                     // Number of seconds Node has been running.\nprocess.hrtime();                     // Returns the current high-resolution real time in a [seconds, nanoseconds] tuple Array.\n\n\n/* *******************************************************************************************\n * CHILD PROCESS\n * http://nodejs.org/api/child_process.html\n * ******************************************************************************************* */\n\n\n// Node provides a tri-directional popen facility through the child_process module.\n// It is possible to stream data through a child's stdin, stdout, and stderr in a fully non-blocking way.\n\nChildProcess;                                                 // Class. ChildProcess is an EventEmitter.\n\nchild.stdin;                                                  // A Writable Stream that represents the child process's stdin\nchild.stdout;                                                 // A Readable Stream that represents the child process's stdout\nchild.stderr;                                                 // A Readable Stream that represents the child process's stderr.\nchild.pid;                                                    // The PID of the child process\nchild.connected;                                              // If .connected is false, it is no longer possible to send messages\nchild.kill([signal]);                                         // Send a signal to the child process\nchild.send(message, [sendHandle]);                            // When using child_process.fork() you can write to the child using child.send(message, [sendHandle]) and messages are received by a 'message' event on the child.\nchild.disconnect();                                           // Close the IPC channel between parent and child, allowing the child to exit gracefully once there are no other connections keeping it alive.\nchild_process.spawn(command, [args], [options]);              // Launches a new process with the given command, with command line arguments in args. If omitted, args defaults to an empty Array.\nchild_process.exec(command, [options], callback);             // Runs a command in a shell and buffers the output.\nchild_process.execFile(file, [args], [options], [callback]);  // Runs a command in a shell and buffers the output.\nchild_process.fork(modulePath, [args], [options]);            // This is a special case of the spawn() functionality for spawning Node processes. In addition to having all the methods in a normal ChildProcess instance, the returned object has a communication channel built-in. \n\n\n/* *******************************************************************************************\n * UTIL\n * http://nodejs.org/api/util.html\n * ******************************************************************************************* */\n\n\n// These functions are in the module 'util'. Use require('util') to access them.\n\nutil.format(format, [...]);    // Returns a formatted string using the first argument as a printf-like format. (%s, %d, %j)\nutil.debug(string);            // A synchronous output function. Will block the process and output string immediately to stderr.\nutil.error([...]);             // Same as util.debug() except this will output all arguments immediately to stderr.\nutil.puts([...]);              // A synchronous output function. Will block the process and output all arguments to stdout with newlines after each argument.\nutil.print([...]);             // A synchronous output function. Will block the process, cast each argument to a string then output to stdout. (no newlines)\nutil.log(string);              // Output with timestamp on stdout.\nutil.inspect(object, [opts]);  // Return a string representation of object, which is useful for debugging. (options: showHidden, depth, colors, customInspect)\nutil.isArray(object);          // Returns true if the given \"object\" is an Array. false otherwise.\nutil.isRegExp(object);         // Returns true if the given \"object\" is a RegExp. false otherwise.\nutil.isDate(object);           // Returns true if the given \"object\" is a Date. false otherwise.\nutil.isError(object);          // Returns true if the given \"object\" is an Error. false otherwise.\nutil.promisify(fn)             // Takes a function whose last argument is a callback and returns a version that returns promises.\n\nutil.inherits(constructor, superConstructor);  // Inherit the prototype methods from one constructor into another.\n\n\n/* *******************************************************************************************\n * EVENTS\n * http://nodejs.org/api/events.html\n * ******************************************************************************************* */\n\n\n// All objects which emit events are instances of events.EventEmitter. You can access this module by doing: require(\"events\");\n// To access the EventEmitter class, require('events').EventEmitter.\n// All EventEmitters emit the event 'newListener' when new listeners are added and 'removeListener' when a listener is removed.\n\nemitter.addListener(event, listener);        // Adds a listener to the end of the listeners array for the specified event.\nemitter.on(event, listener);                 // Same as emitter.addListener().\nemitter.once(event, listener);               // Adds a one time listener for the event. This listener is invoked only the next time the event is fired, after which it is removed.\nemitter.removeListener(event, listener);     // Remove a listener from the listener array for the specified event.\nemitter.removeAllListeners([event]);         // Removes all listeners, or those of the specified event.\nemitter.setMaxListeners(n);                  // By default EventEmitters will print a warning if more than 10 listeners are added for a particular event.\nemitter.listeners(event);                    // Returns an array of listeners for the specified event.\nemitter.emit(event, [arg1], [arg2], [...]);  // Execute each of the listeners in order with the supplied arguments. Returns true if event had listeners, false otherwise.\n\nEventEmitter.listenerCount(emitter, event);  // Return the number of listeners for a given event.\n\n\n/* *******************************************************************************************\n * STREAM\n * http://nodejs.org/api/stream.html\n * ******************************************************************************************* */\n\n\n// A stream is an abstract interface implemented by various objects in Node. For example a request to an HTTP server is a stream, as is stdout.\n// Streams are readable, writable, or both. All streams are instances of EventEmitter.\n\n// The Readable stream interface is the abstraction for a source of data that you are reading from.\n// In other words, data comes out of a Readable stream.\n// A Readable stream will not start emitting data until you indicate that you are ready to receive it.\n// Examples of readable streams include: http responses on the client, http requests on the server, fs read streams\n// zlib streams, crypto streams, tcp sockets, child process stdout and stderr, process.stdin.\n\nvar readable = getReadableStreamSomehow();\n\nreadable.on('readable', function() {});   // When a chunk of data can be read from the stream, it will emit a 'readable' event.\nreadable.on('data', function(chunk) {});  // If you attach a data event listener, then it will switch the stream into flowing mode, and data will be passed to your handler as soon as it is available.\nreadable.on('end', function() {});        // This event fires when there will be no more data to read.\nreadable.on('close', function() {});      // Emitted when the underlying resource (for example, the backing file descriptor) has been closed. Not all streams will emit this.\nreadable.on('error', function() {});      // Emitted if there was an error receiving data.\n\n// The read() method pulls some data out of the internal buffer and returns it. If there is no data available, then it will return null.\n// This method should only be called in non-flowing mode. In flowing-mode, this method is called automatically until the internal buffer is drained.\nreadable.read([size]);\n\nreadable.setEncoding(encoding);           // Call this function to cause the stream to return strings of the specified encoding instead of Buffer objects.\nreadable.resume();                        // This method will cause the readable stream to resume emitting data events.\nreadable.pause();                         // This method will cause a stream in flowing-mode to stop emitting data events.\nreadable.pipe(destination, [options]);    // This method pulls all the data out of a readable stream, and writes it to the supplied destination, automatically managing the flow so that the destination is not overwhelmed by a fast readable stream.\nreadable.unpipe([destination]);           // This method will remove the hooks set up for a previous pipe() call. If the destination is not specified, then all pipes are removed.\nreadable.unshift(chunk);                  // This is useful in certain cases where a stream is being consumed by a parser, which needs to \"un-consume\" some data that it has optimistically pulled out of the source, so that the stream can be passed on to some other party.\n\n\n// The Writable stream interface is an abstraction for a destination that you are writing data to.\n// Examples of writable streams include: http requests on the client, http responses on the server, fs write streams,\n// zlib streams, crypto streams, tcp sockets, child process stdin, process.stdout, process.stderr.\n\nvar writer = getWritableStreamSomehow();\n\nwritable.write(chunk, [encoding], [callback]);  // This method writes some data to the underlying system, and calls the supplied callback once the data has been fully handled.\nwriter.once('drain', write);                    // If a writable.write(chunk) call returns false, then the drain event will indicate when it is appropriate to begin writing more data to the stream.\n\nwritable.end([chunk], [encoding], [callback]);  // Call this method when no more data will be written to the stream.\nwriter.on('finish', function() {});             // When the end() method has been called, and all data has been flushed to the underlying system, this event is emitted.\nwriter.on('pipe', function(src) {});            // This is emitted whenever the pipe() method is called on a readable stream, adding this writable to its set of destinations.\nwriter.on('unpipe', function(src) {});          // This is emitted whenever the unpipe() method is called on a readable stream, removing this writable from its set of destinations.\nwriter.on('error', function(src) {});           // Emitted if there was an error when writing or piping data.\n\n\n// Duplex streams are streams that implement both the Readable and Writable interfaces. See above for usage.\n// Examples of Duplex streams include: tcp sockets, zlib streams, crypto streams.\n\n// Transform streams are Duplex streams where the output is in some way computed from the input. They implement both the Readable and Writable interfaces. See above for usage.\n// Examples of Transform streams include: zlib streams, crypto streams.\n\n\n/* *******************************************************************************************\n * FILE SYSTEM\n * http://nodejs.org/api/fs.html\n * ******************************************************************************************* */\n\n\n// To use this module do require('fs').\n// All the methods have asynchronous and synchronous forms.\n\nfs.rename(oldPath, newPath, callback);  // Asynchronous rename. No arguments other than a possible exception are given to the completion callback.Asynchronous ftruncate. No arguments other than a possible exception are given to the completion callback.\nfs.renameSync(oldPath, newPath);        // Synchronous rename.\n\nfs.ftruncate(fd, len, callback);        // Asynchronous ftruncate. No arguments other than a possible exception are given to the completion callback.\nfs.ftruncateSync(fd, len);              // Synchronous ftruncate.\nfs.truncate(path, len, callback);       // Asynchronous truncate. No arguments other than a possible exception are given to the completion callback.\nfs.truncateSync(path, len);             // Synchronous truncate.\n\nfs.chown(path, uid, gid, callback);     // Asynchronous chown. No arguments other than a possible exception are given to the completion callback.\nfs.chownSync(path, uid, gid);           // Synchronous chown.\nfs.fchown(fd, uid, gid, callback);      // Asynchronous fchown. No arguments other than a possible exception are given to the completion callback.\nfs.fchownSync(fd, uid, gid);            // Synchronous fchown.\nfs.lchown(path, uid, gid, callback);    // Asynchronous lchown. No arguments other than a possible exception are given to the completion callback.\nfs.lchownSync(path, uid, gid);          // Synchronous lchown.\n\nfs.chmod(path, mode, callback);         // Asynchronous chmod. No arguments other than a possible exception are given to the completion callback.\nfs.chmodSync(path, mode);               // Synchronous chmod.\nfs.fchmod(fd, mode, callback);          // Asynchronous fchmod. No arguments other than a possible exception are given to the completion callback.\nfs.fchmodSync(fd, mode);                // Synchronous fchmod.\nfs.lchmod(path, mode, callback);        // Asynchronous lchmod. No arguments other than a possible exception are given to the completion callback.\nfs.lchmodSync(path, mode);              // Synchronous lchmod.\n\nfs.stat(path, callback);                // Asynchronous stat. The callback gets two arguments (err, stats) where stats is a fs.Stats object. \nfs.statSync(path);                      // Synchronous stat. Returns an instance of fs.Stats.\nfs.lstat(path, callback);               // Asynchronous lstat. The callback gets two arguments (err, stats) where stats is a fs.Stats object. lstat() is identical to stat(), except that if path is a symbolic link, then the link itself is stat-ed, not the file that it refers to.\nfs.lstatSync(path);                     // Synchronous lstat. Returns an instance of fs.Stats.\nfs.fstat(fd, callback);                 // Asynchronous fstat. The callback gets two arguments (err, stats) where stats is a fs.Stats object. fstat() is identical to stat(), except that the file to be stat-ed is specified by the file descriptor fd.\nfs.fstatSync(fd);                       // Synchronous fstat. Returns an instance of fs.Stats.\n\nfs.link(srcpath, dstpath, callback);             // Asynchronous link. No arguments other than a possible exception are given to the completion callback.\nfs.linkSync(srcpath, dstpath);                   // Synchronous link.\nfs.symlink(srcpath, dstpath, [type], callback);  // Asynchronous symlink. No arguments other than a possible exception are given to the completion callback. The type argument can be set to 'dir', 'file', or 'junction' (default is 'file') and is only available on Windows (ignored on other platforms)\nfs.symlinkSync(srcpath, dstpath, [type]);        // Synchronous symlink.\nfs.readlink(path, callback);                     // Asynchronous readlink. The callback gets two arguments (err, linkString).\nfs.readlinkSync(path);                           // Synchronous readlink. Returns the symbolic link's string value.\nfs.unlink(path, callback);                       // Asynchronous unlink. No arguments other than a possible exception are given to the completion callback.\nfs.unlinkSync(path);                             // Synchronous unlink.\n\nfs.realpath(path, [cache], callback);     // Asynchronous realpath. The callback gets two arguments (err, resolvedPath).\nfs.realpathSync(path, [cache]);           // Synchronous realpath. Returns the resolved path.\n\nfs.rmdir(path, callback);                 // Asynchronous rmdir. No arguments other than a possible exception are given to the completion callback.\nfs.rmdirSync(path);                       // Synchronous rmdir.\nfs.mkdir(path, [mode], callback);         // Asynchronous mkdir. No arguments other than a possible exception are given to the completion callback. mode defaults to 0777.\nfs.mkdirSync(path, [mode]);               // Synchronous mkdir.\nfs.readdir(path, callback);               // Asynchronous readdir. Reads the contents of a directory. The callback gets two arguments (err, files) where files is an array of the names of the files in the directory excluding '.' and '..'.\nfs.readdirSync(path);                     // Synchronous readdir. Returns an array of filenames excluding '.' and '..'.\nfs.close(fd, callback);                   // Asynchronous close. No arguments other than a possible exception are given to the completion callback.\nfs.closeSync(fd);                         // Synchronous close.\nfs.open(path, flags, [mode], callback);   // Asynchronous file open.\nfs.openSync(path, flags, [mode]);         // Synchronous version of fs.open().\nfs.utimes(path, atime, mtime, callback);  // Change file timestamps of the file referenced by the supplied path.\nfs.utimesSync(path, atime, mtime);        // Synchronous version of fs.utimes().\nfs.futimes(fd, atime, mtime, callback);   // Change the file timestamps of a file referenced by the supplied file descriptor.\nfs.futimesSync(fd, atime, mtime);         // Synchronous version of fs.futimes().\nfs.fsync(fd, callback);                   // Asynchronous fsync. No arguments other than a possible exception are given to the completion callback.\nfs.fsyncSync(fd);                         // Synchronous fsync.\n\nfs.write(fd, buffer, offset, length, position, callback);  // Write buffer to the file specified by fd.\nfs.writeSync(fd, buffer, offset, length, position);        // Synchronous version of fs.write(). Returns the number of bytes written.\nfs.read(fd, buffer, offset, length, position, callback);   // Read data from the file specified by fd.\nfs.readSync(fd, buffer, offset, length, position);         // Synchronous version of fs.read. Returns the number of bytesRead.\nfs.readFile(filename, [options], callback);                // Asynchronously reads the entire contents of a file.\nfs.readFileSync(filename, [options]);                      // Synchronous version of fs.readFile. Returns the contents of the filename. If the encoding option is specified then this function returns a string. Otherwise it returns a buffer.\n\nfs.writeFile(filename, data, [options], callback);   // Asynchronously writes data to a file, replacing the file if it already exists. data can be a string or a buffer.\nfs.writeFileSync(filename, data, [options]);         // The synchronous version of fs.writeFile.\nfs.appendFile(filename, data, [options], callback);  // Asynchronously append data to a file, creating the file if it not yet exists. data can be a string or a buffer.\nfs.appendFileSync(filename, data, [options]);        // The synchronous version of fs.appendFile.\nfs.watch(filename, [options], [listener]);           // Watch for changes on filename, where filename is either a file or a directory. The returned object is a fs.FSWatcher. The listener callback gets two arguments (event, filename). event is either 'rename' or 'change', and filename is the name of the file which triggered the event.\nfs.exists(path, callback);                           // Test whether or not the given path exists by checking with the file system. Then call the callback argument with either true or false. (should not be used)\nfs.existsSync(path);                                 // Synchronous version of fs.exists. (should not be used)\n\n// fs.Stats: objects returned from fs.stat(), fs.lstat() and fs.fstat() and their synchronous counterparts are of this type.\nstats.isFile();\nstats.isDirectory()\nstats.isBlockDevice()\nstats.isCharacterDevice()\nstats.isSymbolicLink()  // (only valid with fs.lstat())\nstats.isFIFO()\nstats.isSocket()\n\nfs.createReadStream(path, [options]);   // Returns a new ReadStream object.\nfs.createWriteStream(path, [options]);  // Returns a new WriteStream object.\n\n\n/* *******************************************************************************************\n * PATH\n * http://nodejs.org/api/fs.html\n * ******************************************************************************************* */\n\n\n// Use require('path') to use this module.\n// This module contains utilities for handling and transforming file paths.\n// Almost all these methods perform only string transformations.\n// The file system is not consulted to check whether paths are valid.\n\npath.normalize(p);                    // Normalize a string path, taking care of '..' and '.' parts.\npath.join([path1], [path2], [...]);   // Join all arguments together and normalize the resulting path.\npath.resolve([from ...], to);         // Resolves 'to' to an absolute path.\npath.relative(from, to);              // Solve the relative path from 'from' to 'to'.\npath.dirname(p);                      // Return the directory name of a path. Similar to the Unix dirname command.\npath.basename(p, [ext]);              // Return the last portion of a path. Similar to the Unix basename command.\npath.extname(p);                      // Return the extension of the path, from the last '.' to end of string in the last portion of the path.\n\npath.sep;                             // The platform-specific file separator. '\\\\' or '/'.\npath.delimiter;                       // The platform-specific path delimiter, ';' or ':'.\n\n\n/* *******************************************************************************************\n * HTTP\n * http://nodejs.org/api/http.html\n * ******************************************************************************************* */\n\n\n// To use the HTTP server and client one must require('http').\n\nhttp.STATUS_CODES;                                             // A collection of all the standard HTTP response status codes, and the short description of each.\nhttp.request(options, [callback]);                             // This function allows one to transparently issue requests.\nhttp.get(options, [callback]);                                 // Set the method to GET and calls req.end() automatically.\n\nserver = http.createServer([requestListener]);                 // Returns a new web server object. The requestListener is a function which is automatically added to the 'request' event.\nserver.listen(port, [hostname], [backlog], [callback]);        // Begin accepting connections on the specified port and hostname.\nserver.listen(path, [callback]);                               // Start a UNIX socket server listening for connections on the given path.\nserver.listen(handle, [callback]);                             // The handle object can be set to either a server or socket (anything with an underlying _handle member), or a {fd: <n>} object.\nserver.close([callback]);                                      // Stops the server from accepting new connections. \nserver.setTimeout(msecs, callback);                            // Sets the timeout value for sockets, and emits a 'timeout' event on the Server object, passing the socket as an argument, if a timeout occurs.\n\nserver.maxHeadersCount;  // Limits maximum incoming headers count, equal to 1000 by default. If set to 0 - no limit will be applied.\nserver.timeout;          // The number of milliseconds of inactivity before a socket is presumed to have timed out.\n\nserver.on('request', function (request, response) { });        // Emitted each time there is a request.\nserver.on('connection', function (socket) { });                // When a new TCP stream is established.\nserver.on('close', function () { });                           // Emitted when the server closes.\nserver.on('checkContinue', function (request, response) { });  // Emitted each time a request with an http Expect: 100-continue is received.\nserver.on('connect', function (request, socket, head) { });    // Emitted each time a client requests a http CONNECT method.\nserver.on('upgrade', function (request, socket, head) { });    // Emitted each time a client requests a http upgrade.\nserver.on('clientError', function (exception, socket) { });    // If a client connection emits an 'error' event - it will forwarded here.\n\nrequest.write(chunk, [encoding]);                              // Sends a chunk of the body.\nrequest.end([data], [encoding]);                               // Finishes sending the request. If any parts of the body are unsent, it will flush them to the stream.\nrequest.abort();                                               // Aborts a request.\nrequest.setTimeout(timeout, [callback]);                       // Once a socket is assigned to this request and is connected socket.setTimeout() will be called.\nrequest.setNoDelay([noDelay]);                                 // Once a socket is assigned to this request and is connected socket.setNoDelay() will be called.\nrequest.setSocketKeepAlive([enable], [initialDelay]);          // Once a socket is assigned to this request and is connected socket.setKeepAlive() will be called.\n\nrequest.on('response', function(response) { });                // Emitted when a response is received to this request. This event is emitted only once.\nrequest.on('socket', function(socket) { });                    // Emitted after a socket is assigned to this request.\nrequest.on('connect', function(response, socket, head) { });   // Emitted each time a server responds to a request with a CONNECT method. If this event isn't being listened for, clients receiving a CONNECT method will have their connections closed.\nrequest.on('upgrade', function(response, socket, head) { });   // Emitted each time a server responds to a request with an upgrade. If this event isn't being listened for, clients receiving an upgrade header will have their connections closed.\nrequest.on('continue', function() { });                        // Emitted when the server sends a '100 Continue' HTTP response, usually because the request contained 'Expect: 100-continue'. This is an instruction that the client should send the request body.\n\nresponse.write(chunk, [encoding]);                             // This sends a chunk of the response body. If this method is called and response.writeHead() has not been called, it will switch to implicit header mode and flush the implicit headers.\nresponse.writeContinue();                                      // Sends a HTTP/1.1 100 Continue message to the client, indicating that the request body should be sent.\nresponse.writeHead(statusCode, [reasonPhrase], [headers]);     // Sends a response header to the request.\nresponse.setTimeout(msecs, callback);                          // Sets the Socket's timeout value to msecs. If a callback is provided, then it is added as a listener on the 'timeout' event on the response object.\nresponse.setHeader(name, value);                               // Sets a single header value for implicit headers. If this header already exists in the to-be-sent headers, its value will be replaced. Use an array of strings here if you need to send multiple headers with the same name.\nresponse.getHeader(name);                                      // Reads out a header that's already been queued but not sent to the client. Note that the name is case insensitive.\nresponse.removeHeader(name);                                   // Removes a header that's queued for implicit sending.\nresponse.addTrailers(headers);                                 // This method adds HTTP trailing headers (a header but at the end of the message) to the response.\nresponse.end([data], [encoding]);                              // This method signals to the server that all of the response headers and body have been sent; that server should consider this message complete. The method, response.end(), MUST be called on each response.\n\nresponse.statusCode;                                           // When using implicit headers (not calling response.writeHead() explicitly), this property controls the status code that will be sent to the client when the headers get flushed.\nresponse.headersSent;                                          // Boolean (read-only). True if headers were sent, false otherwise.\nresponse.sendDate;                                             // When true, the Date header will be automatically generated and sent in the response if it is not already present in the headers. Defaults to true.\n\nresponse.on('close', function () { });  // Indicates that the underlying connection was terminated before response.end() was called or able to flush.\nresponse.on('finish', function() { });  // Emitted when the response has been sent. \n\nmessage.httpVersion;                    // In case of server request, the HTTP version sent by the client. In the case of client response, the HTTP version of the connected-to server.\nmessage.headers;                        // The request/response headers object.\nmessage.trailers;                       // The request/response trailers object. Only populated after the 'end' event.\nmessage.method;                         // The request method as a string. Read only. Example: 'GET', 'DELETE'.\nmessage.url;                            // Request URL string. This contains only the URL that is present in the actual HTTP request.\nmessage.statusCode;                     // The 3-digit HTTP response status code. E.G. 404.\nmessage.socket;                         // The net.Socket object associated with the connection.\n\nmessage.setTimeout(msecs, callback);    // Calls message.connection.setTimeout(msecs, callback).\n\n\n/* *******************************************************************************************\n * URL\n * http://nodejs.org/api/url.html\n * ******************************************************************************************* */\n\n\n// This module has utilities for URL resolution and parsing. Call require('url') to use it.\n\nurl.parse(urlStr, [parseQueryString], [slashesDenoteHost]);  // Take a URL string, and return an object.\nurl.format(urlObj);                                          // Take a parsed URL object, and return a formatted URL string.\nurl.resolve(from, to);                                       // Take a base URL, and a href URL, and resolve them as a browser would for an anchor tag.\n\n\n/* *******************************************************************************************\n * QUERY STRING\n * http://nodejs.org/api/querystring.html\n * ******************************************************************************************* */\n\n\n// This module provides utilities for dealing with query strings. Call require('querystring') to use it.\n\nquerystring.stringify(obj, [sep], [eq]);         // Serialize an object to a query string. Optionally override the default separator ('&') and assignment ('=') characters.\nquerystring.parse(str, [sep], [eq], [options]);  // Deserialize a query string to an object. Optionally override the default separator ('&') and assignment ('=') characters.\n\n\n/* *******************************************************************************************\n * ASSERT\n * http://nodejs.org/api/assert.html\n * ******************************************************************************************* */\n\n\n// This module is used for writing unit tests for your applications, you can access it with require('assert').\n\nassert.fail(actual, expected, message, operator);     // Throws an exception that displays the values for actual and expected separated by the provided operator.\nassert(value, message); assert.ok(value, [message]);  // Tests if value is truthy, it is equivalent to assert.equal(true, !!value, message);\nassert.equal(actual, expected, [message]);            // Tests shallow, coercive equality with the equal comparison operator ( == ).\nassert.notEqual(actual, expected, [message]);         // Tests shallow, coercive non-equality with the not equal comparison operator ( != ).\nassert.deepEqual(actual, expected, [message]);        // Tests for deep equality.\nassert.notDeepEqual(actual, expected, [message]);     // Tests for any deep inequality.\nassert.strictEqual(actual, expected, [message]);      // Tests strict equality, as determined by the strict equality operator ( === )\nassert.notStrictEqual(actual, expected, [message]);   // Tests strict non-equality, as determined by the strict not equal operator ( !== )\nassert.throws(block, [error], [message]);             // Expects block to throw an error. error can be constructor, RegExp or validation function.\nassert.doesNotThrow(block, [message]);                // Expects block not to throw an error, see assert.throws for details.\nassert.ifError(value);                                // Tests if value is not a false value, throws if it is a true value. Useful when testing the first argument, error in callbacks.\n\n\n/* *******************************************************************************************\n * OS\n * http://nodejs.org/api/os.html\n * ******************************************************************************************* */\n\n\n// Provides a few basic operating-system related utility functions.\n// Use require('os') to access this module.\n\nos.tmpdir();             // Returns the operating system's default directory for temp files.\nos.endianness();         // Returns the endianness of the CPU. Possible values are \"BE\" or \"LE\".\nos.hostname();           // Returns the hostname of the operating system.\nos.type();               // Returns the operating system name.\nos.platform();           // Returns the operating system platform.\nos.arch();               // Returns the operating system CPU architecture.\nos.release();            // Returns the operating system release.\nos.uptime();             // Returns the system uptime in seconds.\nos.loadavg();            // Returns an array containing the 1, 5, and 15 minute load averages.\nos.totalmem();           // Returns the total amount of system memory in bytes.\nos.freemem();            // Returns the amount of free system memory in bytes.\nos.cpus();               // Returns an array of objects containing information about each CPU/core installed: model, speed (in MHz), and times (an object containing the number of milliseconds the CPU/core spent in: user, nice, sys, idle, and irq).\nos.networkInterfaces();  // Get a list of network interfaces.\nos.EOL;                  // A constant defining the appropriate End-of-line marker for the operating system.\n\n\n/* *******************************************************************************************\n * BUFFER\n * http://nodejs.org/api/buffer.html\n * ******************************************************************************************* */\n\n\n// Buffer is used to dealing with binary data\n// Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap\n\nBuffer.from(size);                                                  // Allocates a new buffer of size octets.\nBuffer.from(array);                                                 // Allocates a new buffer using an array of octets.\nBuffer.from(str, [encoding]);                                       // Allocates a new buffer containing the given str. encoding defaults to 'utf8'.\n\nBuffer.isEncoding(encoding);                                        // Returns true if the encoding is a valid encoding argument, or false otherwise.\nBuffer.isBuffer(obj);                                               // Tests if obj is a Buffer\nBuffer.concat(list, [totalLength]);                                 // Returns a buffer which is the result of concatenating all the buffers in the list together.\nBuffer.byteLength(string, [encoding]);                              // Gives the actual byte length of a string.\n\nbuf.write(string, [offset], [length], [encoding]);                  // Writes string to the buffer at offset using the given encoding\nbuf.toString([encoding], [start], [end]);                           // Decodes and returns a string from buffer data encoded with encoding (defaults to 'utf8') beginning at start (defaults to 0) and ending at end (defaults to buffer.length).\nbuf.toJSON();                                                       // Returns a JSON-representation of the Buffer instance, which is identical to the output for JSON Arrays\nbuf.copy(targetBuffer, [targetStart], [sourceStart], [sourceEnd]);  // Does copy between buffers. The source and target regions can be overlapped\nbuf.slice([start], [end]);                                          // Returns a new buffer which references the same memory as the old, but offset and cropped by the start (defaults to 0) and end (defaults to buffer.length) indexes. Negative indexes start from the end of the buffer.   \nbuf.fill(value, [offset], [end]);                                   // Fills the buffer with the specified value\nbuf[index];                                                         // Get and set the octet at index\nbuf.length;                                                         // The size of the buffer in bytes, Note that this is not necessarily the size of the contents\n\nbuffer.INSPECT_MAX_BYTES;                                           // How many bytes will be returned when buffer.inspect() is called. This can be overridden by user modules.\n"
  },
  {
    "path": "backend/sails.js",
    "content": "/********************************************************************************************\n * SAILS.JS CHEATSHEET\n * REFERENCE: https://sailsjs.com/documentation/reference\n * CONCEPTS: https://sailsjs.com/documentation/concepts\n * APP STRUCTURE: https://sailsjs.com/documentation/anatomy\n *\n * 1. APPLICATION\n * 2. BLUEPRINT API\n * 3. COMMAND-LINE INTERFACE\n * 4. CONFIGURATION\n * 5. REQUEST\n * 6. RESPONSE\n * 7. WATERLINE ORM\n * 8. WEBSOCKETS\n ********************************************************************************************/\n\n/********************************************************************************************\n * 1. APPLICATION\n * https://sailsjs.com/documentation/reference/application\n ********************************************************************************************/\n\n// A dictionary of all loaded Sails models, indexed by their identity.\nsails.models\n\n// A dictionary of all accessible helpers, including organics.\nsails.helpers\n\n// A dictionary of all loaded Sails hooks, indexed by their identity.\nsails.hooks\n\n// The full set of configuration options for the Sails instance\n// It is assembled automatically when Sails loads your app\n// merging together command-line arguments, environment variables, your .sailsrc file,\n// and the configuration objects exported from any and all modules in your app's config/ directory.\nsails.config\n\n// The runtime values of your app's custom configuration settings.\nsails.config.custom\n\n// A set of convenience methods for low - level interaction with connected websockets.\nsails.sockets\n\n// Talk to Socket.io directly.\nsails.io\n\n// A regular expression designed for use in identifying URL paths that seem like they are probably\n// for a static asset of some kind (e.g. image, stylesheet, favicon.ico, robots.txt, etc).\nsails.LOOKS_LIKE_ASSET_RX\n\n// Return a dictionary of Sails actions.\nsails.getActions()\n\n// Look up the first route pointing at the specified target (e.g. MeController.login)\n// and return a dictionary containing its method and URL.\nsails.getRouteFor(target)\n\n// Look up the first route pointing at the specified target (e.g. entrance/view-login)\n// and return its URL.\nsails.getUrlFor(target)\n\n// Lift a Sails app programmatically.\n// This does exactly what you might be used to seeing by now when you run sails lift.\nsailsApp.lift(configOverrides, function(err) {})\n\n// Load a Sails app into memory-- but without lifting an HTTP server.\n// Useful for writing tests, command - line scripts, and scheduled jobs.\nsailsApp.load(configOverrides, function(err) {})\n\n// Shut down a lifted Sails app and have it cease listening for / responding to any future requests.\nsails.lower(callback)\n\n// Register a new Sails action that can then be bound to a route.\nsails.registerAction(action, name)\n\n// Register a new action middleware function that will be applied to actions\n// with the specified identities.\nsails.registerActionMiddleware(actionMiddlewareFns, actionIdentities)\n\n// Flush and reload all Sails actions.\nsails.reloadActions()\n\n// Compile a view into an HTML template.\nsails.renderView(pathToView, templateData)\n\n// Make a virtual request to a running Sails instance.\nsails.request(request)\nsails.request(url, body)\nsails.request(url, callback)\nsails.request(url, body, callback)\n\n// Access a particular datastore, or the default datastore.\nsails.getDatastore(datastoreName)\n\n// Log a message or some data at the \"debug\" log level using Sails' built-in logger.\nsails.log(message)\n\n/********************************************************************************************\n * 2. BLUEPRINT API\n * https://sailsjs.com/documentation/reference/blueprint-api\n ********************************************************************************************/\n\n// Find a list of records that match the specified criteria\n// and (if possible) subscribe to each of them.\nGET /:model\n\n// Look up the record with the specified id from the database\n// and (if possible) subscribe to the record to hear about any future changes.\nGET /:model/:id\n\n// Populate and return foreign record(s) for the given association of this record.\nGET /:model/:id/:association\n\n// Create a new record in your database\n// and notify subscribed sockets that a newly record is created\nPOST /:model\n\n// Update an existing record in the database\n// and notify subscribed sockets that it has changed.\nPATCH /:model/:id\n\n// Replace all of the foreign records in one of this record's collections\n// and notify subscribed sockets to the parent record.\nPUT /:model/:id/:association\n\n// Add a foreign record to one of this record's collections\n// and notify subscribed sockets to the parent record.\nPUT /:model/:id/:association/:fk\n\n// Delete the record specified by id from the database forever\n// and notify subscribed sockets that a record has been deleted\nDELETE /:model/:id\n\n// Remove a foreign record from one of this record's collections\n// and notify subscribed sockets about this removed child\nDELETE /:model/:id/:association/:fk\n\n/********************************************************************************************\n * 3. COMMAND-LINE INTERFACE\n * https://sailsjs.com/documentation/reference/command-line-interface\n ********************************************************************************************/\n\n// Lift your Node.js/Sails.js app in interactive mode, and enter the REPL.\n// Useful for trying out Waterline queries, quickly managing your data, and checking\n// out your project's runtime configuration.\nsails console [--dontLift]\n\n// Generate api/models/Foo.js, including attributes with the specified types if provided.\nsails generate model\n\n// Generate a standalone action.\nsails generate action\n\n// Generate a helper at api/helpers/foo.js.\nsails generate helper\n\n// Generate api/controllers/FooController.js, including actions with the specified names if provided.\nsails generate controller\n\n// Generate a project hook in api/hooks/foo/.\nsails generate hook\n\n// Generate a foo folder containing the files necessary for building a new generator.\nsails generate generator\n\n// Generate a custom response at api/responses/foo.js\nsails generate response\n\n// Generate a api/adapters/foo/ folder containing the files necessary for building a new adapter.\nsails generate adapter\n\n// Generate a sails.io.js file at the specified location, overwriting the default sails.io.js if applicable.\nsails generate sails.io.js\n\n// Generate api/models/Foo.js and api/controllers/FooController.js.\nsails generate api\t\n\n// Alias for sails new.\nsails generate new\n\n// Experimental. Adds the following files to your app:\n// .gitignore, .jshintrc, .editorconfig, .npmignore, .travis.yml, .appveyor.yml\nsails generate etc\n\n// Attach the node debugger and lift the sails app; similar to running node--inspect app.js.\n// You can then use a tool like the Chrome DevTools to interactively debug your apps.\nsails inspect\n\n// Run the Sails app in the current dir\n// (if node_modules/sails exists, it will be used instead of the globally installed Sails)\nsails lift [--prod] [--port <portNum>] [--verbose] [--silly]\n\n// Create a new sails project.\nsails new <yourAppName> [--no-frontend] [--minimal] [--without=package,package,package]\n\n// Get the version of your computer's globally installed Sails command-line tool\n// (i.e. the version you installed with npm install -g sails).\nsails version\n\n/********************************************************************************************\n * 4. CONFIGURATION\n * https://sailsjs.com/documentation/reference/configuration\n ********************************************************************************************/\n\n// Determines which TCP port your Sails app will use to listen for incoming requests.\nsails.config.port\n\n// Declare the host name of your Sails app (By default, Sails will assume localhost).\nsails.config.explicitHost\n\n// The runtime “environment” of your Sails app (usually either development or production).\nsails.config.environment\n\n// A time limit, in milliseconds, imposed on all hooks in your app (default to 20000)\nsails.config.hookTimeout\n\n// Configure SSL settings for HTTPs and WSS\nsails.config.ssl\n\n// These configurable settings allow you to configure the blueprint API in Sails.\nsails.config.blueprints\n\n// Asynchronous bootstrap function that runs before your Sails app gets lifted (i.e. starts up).\n// Can be used for setting up baseline data, running sanity checks on the status of your database...\nsails.config.bootstrap\n\n// Custom configuration for your app (one-off settings specific to your application)\n// Things like the domain to use when sending emails, or 3rd party API keys for Stripe, Mailgun...\nsails.config.custom\n\n// Datastore configurations(or simply datastores) are like \"saved settings\" for your adapters.\nsails.config.datastores\n\n// Configuration for the global variables that Sails exposes by default.\nsails.config.globals\n\n// Configuration for your app's underlying HTTP server.\nsails.config.http\n\n// Configuration for Sails' built-in internationalization & localization features.\nsails.config.i18n\n\n// Configuration for the logger in your Sails app.\nsails.config.log\n\n// Your default project-wide model settings.\nsails.config.models\n\n// Dictionary that maps policies to an app’s actions.\nsails.config.policies\n\n// Configuration for custom (aka \"explicit\") routes.\nsails.config.routes\n\n// Configuration for your app's security settings.\nsails.config.security\n\n// Configuration for Sails's built-in session support.\nsails.config.session\n\n// Provide transparent access to Socket.io\nsails.config.sockets\n\n// Configuration for your app's server-side views.\nsails.config.views\n\n/********************************************************************************************\n * 5. REQUEST\n * https://sailsjs.com/documentation/reference/request-req\n ********************************************************************************************/\n\n// The moment that Sails started processing the request, as a Javascript Date object.\nreq._startTime\n\n// An object containing text parameters from the parsed request body, defaulting to {}.\n// If a request contains one or more file uploads, only the text parameters sent before\n// the first file parameter will be available in req.body.\nreq.body\n\n// An object containing all of the unsigned cookies from this request (req).\nreq.cookies\n\n// A flag indicating the user-agent sending this request (req) wants \"fresh\" data\n// (as indicated by the \"if-none-match\", \"cache-control\", and/or \"if-modified-since\" request headers.)\nreq.fresh\n\n// An object containing pre-defined/custom header given in the current request.\nreq.headers\n\n// Returns the hostname supplied in the host HTTP header.\n// This header may be set either by the client or by the proxy.\nreq.hostname\n\n// The IP address of the client who sent this request (req).\nreq.ip\n\n// Contains the IP addresses in this request's \"X-Forwarded-For\" header\n// as an array of the IP address strings.\nreq.ips\n\n// A flag indicating whether or not this request (req) originated from a Socket.io connection.\nreq.isSocket\n\n// The request method (aka \"verb\".)\n// All requests to a Sails server have a \"method\", even via WebSockets.\nreq.method\n\n// Dictionary (plain JavaScript object) of request-agnostic settings available in your app's actions.\nreq.options\n\n// Retains the original request URL allowing you to rewrite req.url freely for internal routing purposes.\n// In almost all cases, you’ll want to use req.url instead.\nreq.originalUrl\n\n// An object containing parameter values parsed from the URL path.\nreq.params\n\n// The URL pathname from the request URL string of the current request (req).\nreq.path\n\n// The protocol used to send this request (req).\nreq.protocol\n\n// A dictionary containing the parsed query-string, defaulting to {}.\nreq.query\n\n// Indicates whether or not the request was sent over a secure TLS connection (i.e. https:// or wss://).\nreq.secure\n\n// A dictionary containing all of the signed cookies from this request (req).\nreq.signedCookies\n\n// If the current Request (req) originated from a connected Socket.io client,\n// req.socket refers to the raw Socket.io socket instance.\nreq.socket\n\n// An array of all the subdomains in this request's URL.\nreq.subdomains\n\n// Like req.path, but also includes the query string suffix.\nreq.url\n\n// A flag indicating whether the requesting client would prefer a JSON response\n// (as opposed to some other format, like XML or HTML.)\nreq.wantsJSON\n\n// A flag indicating whether the current request (req) appears to be an AJAX request.\nreq.xhr\n\n// Return whether this request (req) advertises that it understands the specified media type.\nreq.accepts(mediaType)\n\n// Return whether this request (req) advertises that it is able to handle any of the specified\n// character set(s), and if so, which one.\nreq.acceptsCharsets(charset1, charset2, …)\n\n// Return whether this request (req) advertises that it understands any of the specified\n// language(s), and if so, which one.\nreq.acceptsLanguages(language1, language2, …)\n\n// Returns the value of all parameters sent in the request, merged together into a single dictionary\nreq.allParams()\n\n// Build and return a Skipper Upstream representing an incoming multipart file upload from the specified field.\nreq.file(field)\n\n// Returns the value of the specified header field in this request (req). Note that header names are case-insensitive.\nreq.get(header)\n\n// Returns true if this request's declared \"Content-Type\" matches the specified media/mime type.\nreq.is(type)\n\n// Returns the value of the parameter with the specified name.\nreq.param(name[, defaultValue])\n\n// Override the inferred locale for this request.\nreq.setLocale(override)\n\n// Time out this request if a response is not sent within the specified number of milliseconds.\nreq.setTimeout(numMilliseconds)\n\n/********************************************************************************************\n * 6. RESPONSE\n * https://sailsjs.com/documentation/reference/response-res\n ********************************************************************************************/\n\n// Indicate to a web browser or other user agent that an outgoing file download sent\n// in this response should be \"Saved as...\" rather than \"Opened\", and optionally specify the\n// name for the newly downloaded file on disk.\nres.attachment([filename])\n\n// This method is used to send a 200 (\"OK\") response back down to the client.\nres.ok(data)\n\n// This method is used to send a 400 (\"Bad Request\") response back down\n// to the client indicating that the request is invalid.\nres.badRequest(data)\n\n// This method is used to send a 403 (\"Forbidden\") response back down\n// to the client indicating that the request is not allowed.\nres.forbidden()\n\n// This method is used to send a 404 (\"Not Found\") response using either res.json() or res.view().\nres.notFound()\n\n// This method is used to send a 500 (\"Server Error\") response back down to the client indicating\n// that some kind of server error occurred (i.e. the error is not the requesting user agent's fault).\nres.serverError(err)\nres.serverError()\n\n// Sets a cookie with name (name) and value (value) to be sent along with the response.\nres.cookie(name, value[, options])\n\n// Clears cookie (name) in the response.\nres.clearCookie(name[, options])\n\n// Returns the current value of the specified response header (header).\nres.get(header)\n\n// Sets specified response header (header) to the specified value (value).\nres.set(header, value)\nres.set(headers)\n\n// Sends a JSON response composed of a stringified version of the specified data.\nres.json([statusCode,] data)\n\n// Send a JSON or JSONP response.\nres.jsonp()\n\n// Sets the \"Location\" response header to the specified URL expression(url).\nres.location(url)\n\n// Redirect the requesting user-agent to the given absolute or relative url.\nres.redirect(url)\nres.redirect(statusCode, url)\n\n// Send a string response in a format other than JSON (XML, CSV, plain text, etc.\n// If you want to send a dictionary or JSON, use res.json().\n// If you want to send a custom status code, call req.status() first.\nres.send([string])\n\n// Set the status code of this response.\nres.status(statusCode)\n\n// Sets the \"Content-Type\" response header to the specified type.\nres.type(type)\n\n// Respond with an HTML page.\nres.view(pathToView, locals)\nres.view(pathToView)\nres.view(locals)\nres.view()\n\n/********************************************************************************************\n * 7. WATERLINE ORM\n * https://sailsjs.com/documentation/reference/waterline-orm\n ********************************************************************************************/\n\n// --> DATASTORE <--\n\n// Return the default datastore\nvar datastore = sails.getDatastore()\n\n// The generic, stateless, low-level driver for this datastore (if the adapter supports it).\ndatastore.driver\n\n// The live connection manager for this datastore.\ndatastore.manager\n\n// Lease a new connection from the datastore for use in running multiple queries\n// on the same connection (i.e. so that the logic provided in during can reuse the db connection).\nawait datastore.leaseConnection(during)\n\n// Execute a raw SQL query using this datastore.\nawait datastore.sendNativeQuery(sql, valuesToEscape)\n\n// Fetch a preconfigured deferred object hooked up to the sails-mysql or sails-postgresql adapter\n// (and consequently the appropriate driver)\nawait datastore.transaction(during)\n\n// --> MODELS <--\n\n// Add one or more existing child records to the specified collection.\nMyModel.addToCollection(parentId, association).members(childIds)\n\n// Remove one or more members from the specified collection\nMyModel.removeFromCollection()\n\n// Replace all members of the specified collection\nMyModel.replaceCollection()\n\n// Archive (\"soft-delete\") records that match the specified criteria,\n// saving them as new records in the built-in Archive model, then destroying the originals.\nMyModel.archive(criteria)\n\n// Archive (\"soft-delete\") the record that matches the specified criteria,\n// saving it (if it exists) as a new record in the built-in Archive model, then destroying the original.\nMyModel.archiveOne(criteria);\n\n// Get the total number of records matching the specified criteria.\nMyModel.count(criteria)\n\n// Get the aggregate mean of the specified attribute across all matching records.\nMyModel.avg(numericAttrName, criteria)\n\n// Get the aggregate sum of the specified attribute across all matching records.\nMyModel.sum(numericAttrName, criteria)\n\n// Find records in your database that match the given criteria.\nMyModel.find(criteria)\n\n// Attempt to find a particular record in your database that matches the given criteria.\nMyModel.findOne(criteria)\n\n// Find the record matching the specified criteria.\n// If no such record exists, create one using the provided initial values.\nMyModel.findOrCreate(criteria, initialValues)\n\n// Create a record in the database.\nMyModel.create(initialValues)\nMyModel.create(initialValues).fetch()  // Created record will be returned\n\n// Create a set of records in the database.\nMyModel.createEach(initialValues)\nMyModel.createEach(initialValues).fetch()  // Created records will be returned\n\n// Update all records matching criteria.\nMyModel.update(criteria, valuesToSet)\nMyModel.update(criteria, valuesToSet).fetch()  // Updated records will be returned\n\n// Update the record that matches the given criteria, if one exists.\nMyModel.updateOne(criteria).set(valuesToSet);\n\n// Destroy records in your database that match the given criteria.\nMyModel.destroy(criteria)\nMyModel.destroy(criteria).fetch() // Destroyed record will be returned\n\n// Destroy the record in your database that matches the given criteria, if one exists.\nMyModel.destroyOne(criteria);\n\n// Access the datastore for a particular model.\nMyModel.getDatastore()\n\n// Stream records from your database one at a time or in batches,\n// without first having to buffer the entire result set in memory.\nMyModel.stream(criteria)\n\n// Verify that a value would be valid for a given attribute, then return it, loosely coerced.\nMyModel.validate(attrName, value)\n\n// --> QUERIES <--\n\n// Set the maximum number of records to retrieve when executing a query instance.\nquery.limit(maximum)\n\n// Indicate a number of records to skip before returning the results from executing a query instance.\nquery.skip(numRecordsToSkip)\n\n// Set the order in which retrieved records should be returned when executing a query instance.\nquery.sort(sortClause)\n\n// Specify a where clause for filtering a query.\nquery.where(whereClause)\n\n// Tell Waterline (and the underlying database adapter) to send back records that were\n// updated/destroyed/created when performing an .update(), .create(), .createEach() or .destroy()\n// query. Otherwise, no data will be returned (or if you are using callbacks, the second argument\n// to the .exec() callback will be undefined.)\n// This is just a shortcut for .meta({fetch: true})\n// Warning: This is not recommended for update/destroy queries that affect large numbers of records.\nquery.fetch()\n\n// Modify a query instance so that, when executed, it will populate child records for the\n// specified collection, optionally filtering by subcriteria. Populate may be called more than\n// once on the same query, as long as each call is for a different association.\nquery.populate()\n\n// Decrypt any auto-encrypted attributes in the records returned for this particular query.\n// This is just a shortcut for .meta({decrypt: true})\nquery.decrypt()\n\n// Execute a Waterline query instance.\nquery.exec(function (err, result) {})\n\n// Begin executing a Waterline query instance and return a promise.\n// This is an alternative to .exec().\nquery.toPromise()\n\n// Capture and intercept the specified error, automatically modifying and re-throwing it,\n// or specifying a new Error to be thrown instead. (Still throws.)\nquery.intercept(filter, handler)\nquery.intercept(handler)\n\n// Provide additional options to Waterline when executing a query instance.\nquery.meta(options)\n\n// Execute a Waterline query instance using promises.\n// Whenever possible, it is recommended that you use await instead of calling this method.\n// This is an alternative to .exec(). When combined with .catch(), it provides the same functionality.\nquery.then(callback)\n\n// Execute a Waterline query instance using promises.\n// Whenever possible, it is recommended that you use await instead of calling this method.\n// This is an alternative to .exec(). When combined with .then(), it provides the same functionality.\nquery.catch(callback)\n\n// Tolerate (swallow) the specified error, and return a new result value (or undefined) instead. (Don't throw.)\nquery.tolerate(filter, handler)\nquery.tolerate(filter)\nquery.tolerate(handler)\n\n// Specify an existing database connection to use for this query.\nquery.usingConnection(connection)\n\n/********************************************************************************************\n * 8. WEB SOCKETS\n * https://sailsjs.com/documentation/reference/web-sockets\n ********************************************************************************************/\n\n// --> RESOURCEFUL PUBSUB (HIGHER LEVEL ABSTRACTION WHICH ARE USED BY SAILS BLUEPRINT API) <--\n\n// Retrieve the name of the PubSub “room” for a given record.\nMyModel.getRoomName(id)\n\n// Broadcast an arbitrary message to socket clients subscribed to one or more of this model's records.\n// Be sure and check req.isSocket === true before passing in req to refer to the requesting socket.\n// If used, the provided req must be from a socket request, not just any old HTTP request.\n// Is like sails.sockets.broadcast()\nMyModel.publish(ids, data, req)\n\n// Subscribe the requesting client socket to changes/deletions of one or more database records.\n// Is like sails.sockets.join()\nMyModel.subscribe(req, ids)\n\n// Unsubscribe the requesting client socket from one or more database records.\n// Is like sails.sockets.leave()\nMyModel.unsubscribe(req, ids)\n\n// --> SAILS.SOCKETS <--\n\n// Subscribe all members of a room to one or more additional rooms.\n// In a multi-server environment, the callback function (cb) will be executed when the\n// .addRoomMembersToRooms() call completes on the current server. This does not guarantee that\n// other servers in the cluster have already finished running the operation.\nsails.sockets.addRoomMembersToRooms(sourceRoom, destRooms, cb)\n\n// Broadcast a message to all sockets connected to the server (or any server in the cluster,\n// if you have a multi-server deployment using Redis).\nsails.sockets.blast(data)\nsails.sockets.blast(eventName, data)\nsails.sockets.blast(data, socketToOmit)\nsails.sockets.blast(eventName, data, socketToOmit)\n\n// Broadcast a message to all sockets in a room (or to a particular socket).\nsails.sockets.broadcast(roomNames, data)\nsails.sockets.broadcast(roomNames, eventName, data)\nsails.sockets.broadcast(roomNames, data, socketToOmit)\nsails.sockets.broadcast(roomNames, eventName, data, socketToOmit)\n\n// Parse the socket ID from an incoming socket request (req).\nsails.sockets.getId(req)\n\n// Subscribe a socket to a room.\nsails.sockets.join(socket, roomName)\nsails.sockets.join(socket, roomName, cb)\n\n// Unsubscribe a socket from a room.\nsails.sockets.leave(socket, roomName)\nsails.sockets.leave(socket, roomName, cb)\n\n// Unsubscribe all members of a room (e.g. chatroom7) from that room and every other room\n// they are currently subscribed to; except the automatic room associated with their socket ID.\nsails.sockets.leaveAll(roomName, cb)\n\n// Unsubscribe all members of a room from one or more other rooms.\nsails.sockets.removeRoomMembersFromRooms(sourceRoom, destRooms, cb)\n\n// --> SOCKET CLIENT <--\n\n// Home of global configuration options for the sails.io.js library, as well as any sockets it creates.\nio.sails\n\n// Wait one cycle of the event loop after loading and then attempt to create a new SailsSocket\n// and connect it to the URL specified by io.sails.url. \nio.sails.autoConnect\n\n// Sockets will automatically (and continuously) attempt to reconnect to the server\n// if they become disconnected unexpectedly.\nio.sails.reconnection\n\n// Dictionary of headers to be sent by default with every request from this socket.\n// Can be overridden via the headers option in .request().\nio.sails.headers\n\n// Set an environment for sails.io.js, which affects how much information is logged to the console.\n// Valid values are development (full logs) and production (minimal logs).\nio.sails.environment\n\n// The URL that the socket is connected to, or will attempt to connect to.\nio.sails.url\n\n// The transports that the socket will attempt to connect using.\nio.sails.transports\n\n// Used for creating new socket connections manually.\nio.sails.connect([url], [options])\n\n// Unbind the specified event handler (opposite of .on()).\n// To force a client socket to stop receiving broadcasted messages, do not use this method.\n// Instead, unsubscribe the socket in your server-side code:\n// In order to use .off(), you will need to store the handlerFn argument you passed in to .on() in a variable.\nio.socket.off(eventIdentity, handlerFn)\n\n// Start listening for socket events from Sails with the specified eventName.\n// Will trigger the provided callback function when a matching event is received.\n// This happens when the server broadcasts a message to this socket directly, or to a room of which it is a member.\nio.socket.on(eventName, function (msg) { })\n\n// Send a virtual DELETE request to a Sails server using Socket.io.\nio.socket.delete(url, data, function (data, jwres) {})\n\n// Send a socket request(virtual GET) to a Sails server using Socket.io.\nio.socket.get(url, data, function (resData, jwres) {})\n\n// Send a socket request (virtual PATCH) to a Sails server using Socket.io.\nio.socket.patch(url, data, function (resData, jwres) {})\n\n// Send a socket request (virtual POST) to a Sails server using Socket.io.\nio.socket.post(url, data, function (resData, jwres) {})\n\n// Send a socket request (virtual PUT) to a Sails server using Socket.io.\nio.socket.put(url, data, function (resData, jwres) {})\n\n// Send a virtual request to a Sails server using Socket.io.\nio.socket.request(options, function (resData, jwres) {})\n"
  },
  {
    "path": "commitlint.config.js",
    "content": "module.exports = {extends: ['@commitlint/config-conventional']}\n"
  },
  {
    "path": "databases/mongodb.sh",
    "content": "# *****************************************************************************\n# BASICS\n# *****************************************************************************\n\n# Connect MongoDB Shell\nmongo # connects to mongodb://127.0.0.1:27017 by default\nmongo --host <host> --port <port> -u <user> -p <pwd> # omit the password if you want a prompt\n\n# Show All Databases\nshow dbs\n\n\n# Show Current Database\ndb\n\n\n# Create Or Switch Database\nuse <database_name>\n\n\n# Drop Database\ndb.dropDatabase()\n\n\n# Create Collection\ndb.createCollection('posts')\n\n\n# Show Collections\nshow collections\n\n\n# *****************************************************************************\n# CRUD\n# *****************************************************************************\n\n# Insert Row\ndb.posts.insert({\n  title: 'Post One',\n  body: 'Body of post one',\n  category: 'News',\n  tags: ['news', 'events'],\n  user: {\n    name: 'John Doe',\n    status: 'author'\n  },\n  date: Date()\n})\n\n\n# Insert Multiple Rows\ndb.posts.insertMany([\n  {\n    title: 'Post Two',\n    body: 'Body of post two',\n    category: 'Technology',\n    date: Date()\n  },\n  {\n    title: 'Post Three',\n    body: 'Body of post three',\n    category: 'News',\n    date: Date()\n  },\n  {\n    title: 'Post Four',\n    body: 'Body of post three',\n    category: 'Entertainment',\n    date: Date()\n  }\n])\n\n\n# Get All Rows\ndb.posts.find()\n\n\n# Get All Rows Formatted\ndb.posts.find().pretty()\n\n\n# Find One Row\ndb.posts.findOne({ category: 'News' })\n\n\n# Find Rows\ndb.posts.find({ category: 'News' })\n\n\n# Find Specific Fields\ndb.posts.find({ title: 'Post One' }, {\n  title: 1,\n  author: 1\n})\n\n\n# Update Row\ndb.posts.update({ title: 'Post Two' },\n{\n  title: 'Post Two',\n  body: 'New body for post 2',\n  date: Date()\n},\n{\n  upsert: true\n})\n\n\n# Update Specific Field\ndb.posts.update({ title: 'Post Two' },\n{\n  $set: {\n    body: 'Body for post 2',\n    category: 'Technology'\n  }\n})\n\n\n# Delete Row\ndb.posts.remove({ title: 'Post Four' })\n\n\n# *****************************************************************************\n# OTHER FUNCTIONS\n# *****************************************************************************\n\n# Sort Rows\ndb.posts.find().sort({ title: 1 }).pretty() # asc\ndb.posts.find().sort({ title: -1 }).pretty() # desc\n\n\n# Count Rows\ndb.posts.find().count()\ndb.posts.find({ category: 'news' }).count()\n\n\n# Limit Rows\ndb.posts.find().limit(2).pretty()\n\n\n# Chaining\ndb.posts.find().limit(2).sort({ title: 1 }).pretty()\n\n\n# Foreach\ndb.posts.find().forEach(function(doc) {\n  print(\"Blog Post: \" + doc.title)\n})\n\n\n# Increment Field (\\$inc)\ndb.posts.update({ title: 'Post Two' },\n{\n  $inc: {\n    likes: 5\n  }\n})\n\n\n# Rename Field\ndb.posts.update({ title: 'Post Two' },\n{\n  $rename: {\n    likes: 'views'\n  }\n})\n\n\n# Sub-Documents\ndb.posts.update({ title: 'Post One' },\n{\n  $set: {\n    comments: [\n      {\n        body: 'Comment One',\n        user: 'Mary Williams',\n        date: Date()\n      },\n      {\n        body: 'Comment Two',\n        user: 'Harry White',\n        date: Date()\n      }\n    ]\n  }\n})\n\n\n# Find By Element in Array (\\$elemMatch)\ndb.posts.find({\n  comments: {\n     $elemMatch: {\n       user: 'Mary Williams'\n       }\n    }\n  }\n)\n\n\n# Add Index\ndb.posts.createIndex({ title: 1 })\n\n\n# Drop Index\ndb.posts.dropIndex(\"title_1\")\n\n\n# Hide/Unhide Indexes\ndb.posts.hideIndex(\"title_1\")\ndb.posts.unhideIndex(\"title_1\")\n\n\n# Text Search\ndb.posts.find({\n  $text: {\n    $search: \"\\\"Post O\\\"\"\n    }\n})\n\n\n# Greater & Less Than\ndb.posts.find({ views: { $gt: 2 } })\ndb.posts.find({ views: { $gte: 7 } })\ndb.posts.find({ views: { $lt: 7 } })\ndb.posts.find({ views: { $lte: 7 } })\n"
  },
  {
    "path": "databases/mysql.sh",
    "content": "# *****************************************************************************\n# BASICS\n# *****************************************************************************\n\nmysqldump -h hostname -u username -p database_name -P port > file.sql # Export database\nmysql -u username -p database_name < file.sql                         # Import database\n\nSHOW PROCESSLIST; # Show you any queries that are currently running or in the queue to run\n\nshow status where `variable_name` = 'Threads_connected'; # Show all connected threads\nshow variables like 'max_connections'; # Show maximum number of allowed connections\nSET GLOBAL max_connections = 150; ## Set new value for maximum connections (no restart needed but for permanent change update my.cnf)\n\nGRANT ALL PRIVILEGES ON prospectwith.* TO 'power'@'localhost' WITH GRANT OPTION; # Grant all privileges on database\n\nCREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password'; # Create user\n\nmysql -u root -pmypassword -e \"MY SQL QUERY\" &>> query.log & disown # Run SQL query in the background\n\n# *****************************************************************************\n# Database and Table Operations\n# *****************************************************************************\n\nCREATE DATABASE database_name; # Create a new database\nDROP DATABASE database_name; # Delete a database\nCREATE TABLE table_name (column1 datatype, column2 datatype, ...); # Create a new table\nDROP TABLE table_name; # Delete a table\nSHOW TABLES; # Display all tables in the current database\nDESCRIBE table_name; # Show the structure of a table\n\n# *****************************************************************************\n# Data Manipulation\n# *****************************************************************************\n\nINSERT INTO table_name (column1, column2, ...) VALUES (value1, value2, ...); # Insert data into a table\nUPDATE table_name SET column1 = value1, column2 = value2, ... WHERE condition; # Update existing data in a table\nDELETE FROM table_name WHERE condition; # Delete data from a table\nSELECT column1, column2, ... FROM table_name WHERE condition; # Select data from a table\n\n# *****************************************************************************\n# Backup and Restore\n# *****************************************************************************\n\nmysqldump -u username -p database_name table1 table2 > file.sql # Backup specific tables\nmysql -u username -p database_name < file.sql # Restore specific tables\n\n# *****************************************************************************\n# User Management and Security\n# *****************************************************************************\n\nREVOKE privilege_type ON database_name.table_name FROM 'username'@'hostname'; # Revoke privileges from a user\nDROP USER 'username'@'hostname'; # Delete a user\nALTER USER 'username'@'hostname' IDENTIFIED BY 'newpassword'; # Reset a user's password\n\n# *****************************************************************************\n# Performance and Maintenance\n# *****************************************************************************\n\nOPTIMIZE TABLE table_name; # Optimize a table\nANALYZE TABLE table_name; # Analyze a table for key distribution and storage optimization\nCHECK TABLE table_name; # Check a table for errors\nREPAIR TABLE table_name; # Repair a corrupted table\n\n# *****************************************************************************\n# Advanced Queries\n# *****************************************************************************\n\nSELECT ... FROM table1 JOIN table2 ON table1.column = table2.column; # Perform a join operation between two tables\nSELECT ... FROM (SELECT ... FROM table_name) AS subquery; # Use a subquery within another query\nSELECT column, COUNT(*) FROM table_name GROUP BY column; # Group results and use aggregate functions\n\n# *****************************************************************************\n# System Information\n# *****************************************************************************\n\nSELECT VERSION(); # Show the current version of MySQL\nSELECT User, Host FROM mysql.user; # List all current MySQL users\n\n# *****************************************************************************\n# Miscellaneous\n# *****************************************************************************\n\nSET GLOBAL general_log = 'ON'; # Enable query logging\nSHOW FULL PROCESSLIST; # Show the last queries executed in MySQL\n"
  },
  {
    "path": "databases/redis.sh",
    "content": "# *****************************************************************************\n# BASICS\n# *****************************************************************************\n\n\nredis-server /path/redis.conf        # start redis with the related configuration file\nredis-cli                            # opens a redis prompt\nsudo systemctl restart redis.service # Restart Redis\nsudo systemctl status redis          # Check Redis status\n\n# *****************************************************************************\n# STRINGS\n# *****************************************************************************\n\n\nAPPEND key value                  # append a value to a key\nBITCOUNT key [start end]          # count set bits in a string\nSET key value                     # set value in key\nSETNX key value                   # set if not exist value in key\nSETRANGE key offset value         # overwrite part of a string at key starting at the specified offset\nSTRLEN key                        # get the length of the value stored in a key\nMSET key value [key value ...]    # set multiple keys to multiple values\nMSETNX key value [key value ...]  # set multiple keys to multiple values, only if none of the keys exist\nGET key                           # get value in key\nGETRANGE key start end            # get substring of stored value from start to end offsets (both inclusive)\nMGET key [key ...]                # get the values of all the given keys\nINCR key                          # increment value in key\nINCRBY key increment              # increment the integer value of a key by the given amount\nINCRBYFLOAT key increment         # increment the float value of a key by the given amount\nDECR key                          # decrement the integer value of key by one\nDECRBY key decrement              # decrement the integer value of a key by the given number\nDEL key                           # delete key\n\nEXPIRE key 120                    # key will be deleted in 120 seconds\nTTL key                           # returns the number of seconds until a key is deleted\n\n\n# *****************************************************************************\n# LISTS\n# A list is a series of ordered values\n# *****************************************************************************\n\n\nRPUSH key value [value ...]           # put the new value at the end of the list\nRPUSHX key value                      # append a value at the end of the list, only if it exists\nLPUSH key value [value ...]           # put the new value at the start of the list\nLPUSHX key value                      # append a value at the start of the list, only if it exists\nLRANGE key start stop                 # give a subset of the list\nLINDEX key index                      # get an element from a list by its index\nLINSERT key BEFORE|AFTER pivot value  # insert an element before or after another element in a list\nLLEN key                              # return the current length of the list\nLPOP key                              # remove the first element from the list and returns it\nLSET key index value                  # set the value of an element in a list by its index\nLREM key number_of_occurrences value  # delete occurrences of value if the list stored in key\nLTRIM key start stop                  # trim a list to the specified range\nRPOP key                              # remove the last element from the list and returns it\nRPOPLPUSH source destination          # remove the last element in a list, prepend it to another list and return it\nBLPOP key [key ...] timeout           # remove and get the first element in a list, or block until one is available\nBRPOP key [key ...] timeout           # remove and get the last element in a list, or block until one is available\n\n\n# *****************************************************************************\n# SETS\n# A set is similar to a list, except it does not have a specific order\n# and each element may only appear once. \n# *****************************************************************************\n\n\nSADD key member [member ...]     # add the given value to the set\nSCARD key                        # get the number of members in a set\nSREM key member [member ...]     # remove the given value from the set\nSISMEMBER myset value            # test if the given value is in the set.\nSMEMBERS myset                   # return a list of all the members of this set\nSUNION key [key ...]             # combine two or more sets and returns the list of all elements\nSINTER key [key ...]             # intersect multiple sets\nSMOVE source destination member  # move a member from one set to another\nSPOP key [count]                 # remove and return one or multiple random members from a set\n\n\n# *****************************************************************************\n# SORTED SETS\n# A sorted set is similar to a regular set, but now each value has an associated score.\n# This score is used to sort the elements in the set.\n# *****************************************************************************\n\n\nZADD key [NX|XX] [CH] [INCR] score member [score member ...]  # add one or more members to a sorted set, or update its score if it already exists\n\nZCARD key                           # get the number of members in a sorted set\nZCOUNT key min max                  # count the members in a sorted set with scores within the given values\nZINCRBY key increment member        # increment the score of a member in a sorted set\nZRANGE key start stop [WITHSCORES]  # returns a subset of the sorted set\nZRANK key member                    # determine the index of a member in a sorted set\nZREM key member [member ...]        # remove one or more members from a sorted set\nZREMRANGEBYRANK key start stop      # remove all members in a sorted set within the given indexes\nZREMRANGEBYSCORE key min max        # remove all members in a sorted set, by index, with scores ordered from high to low\nZSCORE key member                   # get the score associated with the given mmeber in a sorted set\n\nZRANGEBYSCORE key min max [WITHSCORES] [LIMIT offset count]  # return a range of members in a sorted set, by score\n\n\n# *****************************************************************************\n# HASHES\n# Hashes are maps between string fields and string values,\n# so they are the perfect data type to represent objects.\n# *****************************************************************************\n\n\nHGET key field          # get the value of a hash field\nHGETALL key             # get all the fields and values in a hash\nHSET key field value    # set the string value of a hash field\nHSETNX key field value  # set the string value of a hash field, only if the field does not exists\n\nHMSET key field value [field value ...]  # set multiple fields at once\n\nHINCRBY key field increment  # increment value in hash by X\nHDEL key field [field ...]   # delete one or more hash fields\nHEXISTS key field            # determine if a hash field exists\nHKEYS key                    # get all the fields in a hash\nHLEN key                     # get the number of fields in a hash\nHSTRLEN key field            # get the length of the value of a hash field\nHVALS key                    # get all the values in a hash\n\n\n# *****************************************************************************\n# HYPERLOGLOG\n# HyperLogLog uses randomization in order to provide an approximation of the number\n# of unique elements in a set using just a constant, and small, amount of memory\n# *****************************************************************************\n\n\nPFADD key element [element ...]  # add the specified elements to the specified HyperLogLog\nPFCOUNT key [key ...]            # return the approximated cardinality of the set(s) observed by the HyperLogLog at key's)\n\nPFMERGE destkey sourcekey [sourcekey ...]  # merge N HyperLogLogs into a single one\n\n\n# *****************************************************************************\n# PUBLICATION & SUBSCRIPTION\n# *****************************************************************************\n\n\nPSUBSCRIBE pattern [pattern ...]             # listen for messages published to channels matching the given patterns\nPUBSUB subcommand [argument [argument ...]]  # inspect the state of the Pub/Sub subsystem\nPUBLISH channel message                      # post a message to a channel\nPUNSUBSCRIBE [pattern [pattern ...]]         # stop listening for messages posted to channels matching the given patterns\nSUBSCRIBE channel [channel ...]              # listen for messages published to the given channels\nUNSUBSCRIBE [channel [channel ...]]          # stop listening for messages posted to the given channels\n\n\n# *****************************************************************************\n# OTHER COMMANDS\n# *****************************************************************************\n\n\nKEYS pattern  # find all keys matching the given pattern\n"
  },
  {
    "path": "frontend/angular.js",
    "content": "/* *******************************************************************************************\n * ANGULAR (2+) CHEATSHEET\n * BASED ON https://angular.io/guide/cheatsheet\n * DOCUMENTATION: https://angular.io/docs\n * STYLE GUIDE: https://angular.io/guide/styleguide\n * ******************************************************************************************* */\n\n\n```\nnpm install --save @angular/cli       // install command line interface (CLI) for Angular apps\nng serve                              // serve the app\nng build                              // build the release\n```\n\n\n/* *******************************************************************************************\n * BOOSTRAPPING\n * https://angular.io/guide/bootstrapping\n * ******************************************************************************************* */\n\n\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n\n// Bootstraps the app, using the root component from the specified NgModule.\nplatformBrowserDynamic().bootstrapModule(AppModule); \n\n\n/* *******************************************************************************************\n * NG MODULES\n * https://angular.io/guide/ngmodules\n * ******************************************************************************************* */\n\n\nimport { NgModule } from '@angular/core';\n\n@NgModule({\n  declarations: ...,\n  imports: ...,\n  exports: ...,\n  providers: ...,\n  bootstrap: ...\n})\n\n// Defines a module that contains components, directives, pipes, and providers.\nclass MyModule {} \n\n// List of components, directives, and pipes that belong to this module.\ndeclarations: [MyRedComponent, MyBlueComponent, MyDatePipe] \n\n// List of modules to import into this module. Everything from the imported modules is available \n// to declarations of this module.\nimports: [BrowserModule, SomeOtherModule] \n\n// List of components, directives, and pipes visible to modules that import this module.\nexports: [MyRedComponent, MyDatePipe] \n\n// List of dependency injection providers visible both to the contents of this module and to \n// importers of this module.\nproviders: [MyService, { provide: ... }]  \n\n// List of components to bootstrap when this module is bootstrapped.\nbootstrap: [MyAppComponent] \n\n\n/* *******************************************************************************************\n * TEMPLATE SYNTAX\n * https://angular.io/guide/template-syntax\n * ******************************************************************************************* */\n\n\n// Binds property value to the result of expression firstName.\n// <input [value]=\"firstName\"> \n\n// Binds attribute role to the result of expression myAriaRole.\n// <div [attr.role]=\"myAriaRole\">  \n\n// Binds the presence of the CSS class extra-sparkle on the element to the truthiness of the \n// expression isDelightful.\n// <div [class.extra-sparkle]=\"isDelightful\">  \n\n// Binds style property width to the result of expression mySize in pixels. Units are optional.\n// <div [style.width.px]=\"mySize\"> \n\n// Calls method readRainbow when a click event is triggered on this button element (or its\n// children) and passes in the event object.\n// <button (click)=\"readRainbow($event)\">  \n\n// Binds a property to an interpolated string, for example, \"Hello Seabiscuit\". \n// Equivalent to: <div [title]=\"'Hello ' + ponyName\">\n// <div title=\"Hello {{ponyName}}\">  \n\n// Binds text content to an interpolated string, for example, \"Hello Seabiscuit\".\n// <p>Hello {{ponyName}}</p> \n\n// Sets up two-way data binding. Equivalent to: <my-cmp [title]=\"name\" (titleChange)=\"name=$event\">\n// <my-cmp [(title)]=\"name\"> \n\n// Creates a local variable movieplayer that provides access to the video element instance in \n// data-binding and event-binding expressions in the current template.\n// <video #movieplayer ...>\n// <button (click)=\"movieplayer.play()\">\n// </video>  \n\n// The * symbol turns the current element into an embedded template. \n// Equivalent to: <ng-template [myUnless]=\"myExpression\"><p>...</p></ng-template>\n// <p *myUnless=\"myExpression\">...</p> \n\n// Transforms the current value of expression cardNumber via the pipe called myCardNumberFormatter.\n// <p>Card No.: {{cardNumber | myCardNumberFormatter}}</p> \n\n// The safe navigation operator (?) means that the employer field is optional and if undefined, \n// the rest of the expression should be ignored.\n// <p>Employer: {{employer?.companyName}}</p>  \n\n// An SVG snippet template needs an svg: prefix on its root element to disambiguate the SVG \n// element from an HTML component.\n// <svg:rect x=\"0\" y=\"0\" width=\"100\" height=\"100\"/>  \n\n// An <svg> root element is detected as an SVG element automatically, without the prefix.\n// <svg>\n// <rect x=\"0\" y=\"0\" width=\"100\" height=\"100\"/>\n// </svg>  \n\n\n/* *******************************************************************************************\n * BUILT-IN DIRECTIVES\n * https://angular.io/guide/attribute-directives\n * ******************************************************************************************* */\n\n\nimport { CommonModule } from '@angular/common';\n\n// Removes or recreates a portion of the DOM tree based on the showSection expression.\n// <section *ngIf=\"showSection\"> \n\n// Turns the li element and its contents into a template, and uses that to instantiate a view for\n// each item in list.\n// <li *ngFor=\"let item of list\">  \n\n// Conditionally swaps the contents of the div by selecting one of the embedded templates based on \n// the current value of conditionExpression.\n// <div [ngSwitch]=\"conditionExpression\">\n// <ng-template [ngSwitchCase]=\"case1Exp\">...</ng-template>\n// <ng-template ngSwitchCase=\"case2LiteralString\">...</ng-template>\n// <ng-template ngSwitchDefault>...</ng-template>\n// </div>  \n\n// Binds the presence of CSS classes on the element to the truthiness of the associated map \n// values. The right-hand expression should return {class-name: true/false} map.\n// <div [ngClass]=\"{'active': isActive, 'disabled': isDisabled}\">  \n\n// Allows you to assign styles to an HTML element using CSS. You can use CSS directly, as in the\n// first example, or you can call a method from the component.\n// <div [ngStyle]=\"{'property': 'value'}\">\n// <div [ngStyle]=\"dynamicStyles()\"> \n\n\n/* *******************************************************************************************\n * FORMS\n * https://angular.io/guide/forms\n * ******************************************************************************************* */\n\n\nimport { FormsModule } from '@angular/forms';\n\n// Provides two-way data-binding, parsing, and validation for form controls.\n// <input [(ngModel)]=\"userName\">  \n\n\n/* *******************************************************************************************\n * CLASS DECORATORS\n * ******************************************************************************************* */\n\n\nimport { Directive, ... } from '@angular/core';\n\n// Declares that a class is a component and provides metadata about the component.\n@Component({...})\nclass MyComponent() {}  \n\n// Declares that a class is a directive and provides metadata about the directive.\n@Directive({...})\nclass MyDirective() {}  \n\n// Declares that a class is a pipe and provides metadata about the pipe.\n@Pipe({...})\nclass MyPipe() {} \n\n// Declares that a class can be injected into the constructor of another class\n// by the dependency injector.\n@Injectable()\nclass MyService() {}  \n\n\n/* *******************************************************************************************\n * DIRECTIVE CONFIGURATION\n * ******************************************************************************************* */\n\n\n@Directive({ property1: value1, ... })\n\n// Specifies a CSS selector that identifies this directive within a template. Supported selectors\n// include element, [attribute], .class, and :not().\nselector: '.cool-button:not(a)' \n\n// Does not support parent-child relationship selectors.\n\n// List of dependency injection providers for this directive and its children.\nproviders: [MyService, { provide: ... }]  \n\n\n/* *******************************************************************************************\n * COMPONENT CONFIGURATION\n * https://angular.io/api/core/Component\n * ******************************************************************************************* */\n\n\n@Component extends @Directive, so the @Directive configuration applies to components as well\n\n// If set, the templateUrl and styleUrl are resolved relative to the component.\nmoduleId: module.id \n\n// List of dependency injection providers scoped to this component's view.\nviewProviders: [MyService, { provide: ... }]  \n\n// Inline template or external template URL of the component's view.\ntemplate: 'Hello {{name}}'\ntemplateUrl: 'my-component.html'  \n\n// List of inline CSS styles or external stylesheet URLs for styling the component’s view.\nstyles: ['.primary {color: red}']\nstyleUrls: ['my-component.css'] \n\n\n/* *******************************************************************************************\n * CLASS FIELD DECORATORS FOR DIRECTIVES AND COMPONENTS\n * ******************************************************************************************* */\n\n\nimport { Input, ... } from '@angular/core';\n\n// Declares an input property that you can update via property binding \n// (example: <my-cmp [myProperty]=\"someExpression\">).\n@Input() myProperty;  \n\n// Declares an output property that fires events that you can subscribe to with an event binding \n// (example: <my-cmp (myEvent)=\"doSomething()\">).\n@Output() myEvent = new EventEmitter(); \n\n// Binds a host element property (here, the CSS class valid) to a directive/component property \n// (isValid).\n@HostBinding('class.valid') isValid;  \n\n// Subscribes to a host element event (click) with a directive/component method (onClick), \n// optionally passing an argument ($event).\n@HostListener('click', ['$event']) onClick(e) {...} \n\n// Binds the first result of the component content query (myPredicate) to a property \n// (myChildComponent) of the class.\n@ContentChild(myPredicate) myChildComponent;  \n\n// Binds the results of the component content query (myPredicate) to a property \n// (myChildComponents) of the class.\n@ContentChildren(myPredicate) myChildComponents;  \n\n// Binds the first result of the component view query (myPredicate) to a property \n// (myChildComponent) of the class. Not available for directives.\n@ViewChild(myPredicate) myChildComponent; \n\n// Binds the results of the component view query (myPredicate) to a property (myChildComponents)\n// of the class. Not available for directives.\n@ViewChildren(myPredicate) myChildComponents; \n\n\n/* *******************************************************************************************\n * DIRECTIVE AND COMPONENT CHANGE DETECTION AND LIFECYCLE HOOKS\n * ******************************************************************************************* */\n\n// (implemented as class methods)\n\n// Called before any other lifecycle hook. Use it to inject dependencies, but avoid any serious \n// work here.\nconstructor(myService: MyService, ...) { ... }  \n\n// Called after every change to input properties and before processing content or child views.\nngOnChanges(changeRecord) { ... } \n\n// Called after the constructor, initializing input properties, and the first call to ngOnChanges.\nngOnInit() { ... }  \n\n// Called every time that the input properties of a component or a directive are checked. Use it\n// to extend change detection by performing a custom check.\nngDoCheck() { ... } \n\n// Called after ngOnInit when the component's or directive's content has been initialized.\nngAfterContentInit() { ... }  \n\n// Called after every check of the component's or directive's content.\nngAfterContentChecked() { ... } \n\n// Called after ngAfterContentInit when the component's views and child views / the view that a \n// directive is in has been initialized.\nngAfterViewInit() { ... } \n\n// Called after every check of the component's views and child views / the view that a directive \n// is in.\nngAfterViewChecked() { ... }  \n\n// Called once, before the instance is destroyed.\nngOnDestroy() { ... } \n\n\n/* *******************************************************************************************\n * DEPENDENCY INJECTION CONFIGURATION\n * https://angular.io/guide/dependency-injection\n * ******************************************************************************************* */\n\n\n// Sets or overrides the provider for MyService to the MyMockService class.\n{ provide: MyService, useClass: MyMockService } \n\n// Sets or overrides the provider for MyService to the myFactory factory function.\n{ provide: MyService, useFactory: myFactory } \n\n// Sets or overrides the provider for MyValue to the value 41.\n{ provide: MyValue, useValue: 41 }  \n\n\n/* *******************************************************************************************\n * ROUTING AND NAVIGATION\n * https://angular.io/guide/router\n * ******************************************************************************************* */\n\n\nimport { Routes, RouterModule, ... } from '@angular/router';\n\nconst routes: Routes = [\n  { path: '', component: HomeComponent },\n  { path: 'path/:routeParam', component: MyComponent },\n  { path: 'staticPath', component: ... },\n  { path: '**', component: ... },\n  { path: 'oldPath', redirectTo: '/staticPath' },\n  { path: ..., component: ..., data: { message: 'Custom' } }\n]);\n\n// Configures routes for the application. Supports static, parameterized, redirect, and wildcard \n// routes. Also supports custom route data and resolve.\nconst routing = RouterModule.forRoot(routes); \n\n// Marks the location to load the component of the active route.\n// <router-outlet></router-outlet>\n// <router-outlet name=\"aux\"></router-outlet>\n\n// Creates a link to a different view based on a route instruction consisting of a route path, \n// required and optional parameters, query parameters, and a fragment. To navigate to a root \n// route, use the / prefix; for a child route, use the ./prefix; for a sibling or parent, use the \n// ../ prefix.\n// <a routerLink=\"/path\">\n// <a [routerLink]=\"[ '/path', routeParam ]\">\n// <a [routerLink]=\"[ '/path', { matrixParam: 'value' } ]\">\n// <a [routerLink]=\"[ '/path' ]\" [queryParams]=\"{ page: 1 }\">\n// <a [routerLink]=\"[ '/path' ]\" fragment=\"anchor\">\n\n// The provided classes are added to the element when the routerLink becomes the current active\n// route.\n// <a [routerLink]=\"[ '/path' ]\" routerLinkActive=\"active\">  \n\nclass CanActivateGuard implements CanActivate {\n  canActivate(\n    route: ActivatedRouteSnapshot,\n    state: RouterStateSnapshot\n  ): Observable<boolean>|Promise<boolean>|boolean { ... }\n}\n\n// An interface for defining a class that the router should call first to determine if it should \n// activate this component. Should return a boolean or an Observable/Promise that resolves to a \n// boolean.\n{\n  path: ...,\n  canActivate: [CanActivateGuard]\n}  \n\nclass CanDeactivateGuard implements CanDeactivate<T> {\n  canDeactivate(\n    component: T,\n    route: ActivatedRouteSnapshot,\n    state: RouterStateSnapshot\n  ): Observable<boolean>|Promise<boolean>|boolean { ... }\n}\n\n// An interface for defining a class that the router should call first to determine if it should \n// deactivate this component after a navigation. Should return a boolean or an Observable/Promise \n// that resolves to a boolean.\n{\n  path: ...,\n  canDeactivate: [CanDeactivateGuard]\n}\n\nclass CanActivateChildGuard implements CanActivateChild {\n  canActivateChild(\n    route: ActivatedRouteSnapshot,\n    state: RouterStateSnapshot\n  ): Observable<boolean>|Promise<boolean>|boolean { ... }\n}\n\n// An interface for defining a class that the router should call first to determine if it should \n// activate the child route. Should return a boolean or an Observable/Promise that resolves to a \n// boolean.\n{\n  path: ...,\n  canActivateChild: [CanActivateGuard],\n  children: ...\n}\n\nclass ResolveGuard implements Resolve<T> {\n  resolve(\n    route: ActivatedRouteSnapshot,\n    state: RouterStateSnapshot\n  ): Observable<any>|Promise<any>|any { ... }\n}\n\n// An interface for defining a class that the router should call first to resolve route data \n// before rendering the route. Should return a value or an Observable/Promise that resolves to a \n// value.\n{\n  path: ...,\n  resolve: [ResolveGuard]\n}\n\nclass CanLoadGuard implements CanLoad {\n  canLoad(\n    route: Route\n  ): Observable<boolean>|Promise<boolean>|boolean { ... }\n}\n\n// An interface for defining a class that the router should call first to check if the lazy loaded \n// module should be loaded. Should return a boolean or an Observable/Promise that resolves to a \n// boolean.\n{\n  path: ...,\n  canLoad: [CanLoadGuard],\n  loadChildren: ...\n}\n"
  },
  {
    "path": "frontend/angularjs.js",
    "content": "/* *******************************************************************************************\n * ANGULARJS CHEATSHEET\n * API DOCUMENTATION: https://docs.angularjs.org/api\n * DEVELOPER GUIDE: https://docs.angularjs.org/guide\n * ERROR REFERENCE: https://docs.angularjs.org/error\n * ******************************************************************************************* */\n\n\n/* *******************************************************************************************\n * TIPS & TRICKS\n * ******************************************************************************************* */\n\n\n// You can retrieve a scope for any DOM element by using:\nangular.element(aDomElement).scope()\n\n// An object that contains information about the current AngularJS version.\n// This object has the following properties: full, major, minor, dot, codeName\nangular.version\n\n\n/* *******************************************************************************************\n * CSS CLASS USED BY ANGULAR\n * ******************************************************************************************* */\n\n\n// AngularJS applies this class to any element for which a new scope is defined.\nng-scope\n\n// AngularJS applies this class to any element for which a new isolate scope is defined.\nng-isolate-scope\n\n// AngularJS applies this class to any element that is attached to a data binding, via ng-bind or {{}} curly braces, for example.\nng-binding\n\n// AngularJS applies this class to a form control widget element if that element's input does not pass validation.\nng-invalid, ng-valid\n\n// AngularJS ngModel directive applies ng-pristine class to a new form control widget which did not have user interaction.\n// Once the user interacts with the form control, the class is changed to ng-dirty.\nng-pristine, ng-dirty\n\n// AngularJS ngModel directive applies ng-untouched class to a new form control widget which has not been blurred.\n// Once the user blurs the form control, the class is changed to ng-touched.\nng-touched, ng-untouched\n\n\n/* *******************************************************************************************\n * NG MODULE > FUNCTIONS\n * ******************************************************************************************* */\n\n\n// Returns a function which calls function fn bound to self (self becomes the this for fn).\n// You can supply optional args that are prebound to the function.\n// This feature is also known as partial application, as distinguished from function currying.\nangular.bind(self, fn, args)\n\n// Use this function to manually start up AngularJS application.\nangular.bootstrap(element, [modules], [config])\n\n// Creates a deep copy of source, which should be an object or an array.\nangular.copy(source, [destination])\n\n// Wraps a raw DOM element or HTML string as a jQuery element.\nangular.element(element)\n\n// Determines if two objects or two values are equivalent.\n// Supports value types, regular expressions, arrays and objects.\nangular.equals(o1, o2)\n\n// Configure several aspects of error handling in AngularJS if used as a setter or return the current configuration if used as a getter.\nangular.errorHandlingConfig([config])\n\n// Extends the destination object dst by copying own enumerable properties from the src object(s) to dst.\n// You can specify multiple src objects.\nangular.extend(dst, src)\n\n// Invokes the iterator function once for each item in obj collection, which can be either an object or an array.\nangular.forEach(obj, iterator, [context])\n\n// Deserializes a JSON string.\nangular.fromJson(json)\n\n// A function that returns its first argument.\n// This function is useful when writing code in the functional style.\nangular.identity(value)\n\n// Creates an injector object that can be used for retrieving services as well as for dependency injection.\nangular.injector(modules, [strictDi])\n\n// Determines if a reference is an Array.\nangular.isArray(value)\n\n// Determines if a value is a date.\nangular.isDate(value)\n\n// Determines if a reference is defined.\nangular.isDefined(value)\n\n// Determines if a reference is a DOM element (or wrapped jQuery element).\nangular.isElement(value)\n\n// Determines if a reference is a Function.\nangular.isFunction(value)\n\n// Determines if a reference is a Number.\nangular.isNumber(value)\n\n// Determines if a reference is an Object. Unlike typeof in JavaScript, nulls are not considered to be objects.\nangular.isObject(value)\n\n// Determines if a reference is a String.\nangular.isString(value)\n\n// Determines if a reference is undefined.\nangular.isUndefined(value)\n\n// The angular.module is a global place for creating, registering and retrieving AngularJS modules.\n// All modules (AngularJS core or 3rd party) that should be available to an application must be registered using this mechanism.\n// Passing one argument retrieves an existing angular.Module, whereas passing more than one argument creates a new angular.Module\nangular.module(name, [requires], [configFn])\n\n// A function that performs no operations.\n// This function can be useful when writing code in the functional style.\nangular.noop()\n\n// Use this function to reload the current application with debug information turned on.\n// This takes precedence over a call to $compileProvider.debugInfoEnabled(false).\nangular.reloadWithDebugInfo()\n\n// Serializes input into a JSON-formatted string.\n// Properties with leading $$ characters will be stripped since AngularJS uses this notation internally.\nangular.toJson(obj, pretty)\n\n\n/* *******************************************************************************************\n * NG MODULE > DIRECTIVES\n * ******************************************************************************************* */\n\n\n// Use this directive to auto-bootstrap an AngularJS application.\n// Only one AngularJS application can be auto-bootstrapped per HTML document.\n// You can specify an AngularJS module to be used as the root module for the application.\n'ng-app'\n\n// The ngBind attribute tells AngularJS to replace the text content of the specified HTML element with\n// the value of a given expression, and to update the text content when the value of that expression changes.\n'ng-bind'\n\n// Evaluates the expression and inserts the resulting HTML into the element in a secure way.\n'ng-bind-html'\n\n// The ngBindTemplate directive specifies that the element text content should be replaced with\n// the interpolation of the template in the ngBindTemplate attribute.\n'ng-bind-template'\n\n// Specify custom behavior on blur event.\n'ng-blur'\n\n// Evaluate the given expression when the user changes the input.\n'ng-change'\n\n// Sets the checked attribute on the element, if the expression inside ngChecked is truthy.\n'ng-checked'\n\n// The ngClass directive allows you to dynamically set CSS classes on an HTML element by databinding\n// an expression that represents all classes to be added.\n'ng-class'\n\n// The ngClassOdd and ngClassEven directives work exactly as ngClass, except they work in\n// conjunction with ngRepeat and take effect only on odd (even) rows.\n'ng-class-even'\n\n// The ngClassOdd and ngClassEven directives work exactly as ngClass, except they work in\n// conjunction with ngRepeat and take effect only on odd (even) rows.\n'ng-class-odd'\n\n// The ngClick directive allows you to specify custom behavior when an element is clicked.\n'ng-click'\n\n// The ngCloak directive is used to prevent the AngularJS html template from being briefly displayed\n// by the browser in its raw (uncompiled) form while your application is loading.\n'ng-cloak'\n\n// The ngController directive attaches a controller class to the view.\n'ng-controller'\n\n// Specify custom behavior on copy event.\n'ng-copy'\n\n// Specify custom behavior on cut event.\n'ng-cut'\n\n// Allows you to specify custom behavior on a dblclick event.\n'ng-dblclick'\n\n// This directive sets the disabled attribute on the element (typically a form control, e.g. input, button, select etc.)\n// if the expression inside ngDisabled evaluates to truthy.\n'ng-disabled'\n\n// Specify custom behavior on focus event.\n'ng-focus'\n\n// Nestable alias of form directive. HTML does not allow nesting of form elements.\n// It is useful to nest forms, for example if the validity of a sub-group of controls needs to be determined.\n'ng-form'\n\n// Shows or hides the given HTML element based on the expression provided to the ngHide attribute.\n'ng-hide'\n\n// Executes the expression and replaces with the right href link\n'ng-href'\n\n// Removes or recreates a portion of the DOM tree based on an {expression}.\n'ng-if'\n\n// Fetches, compiles and includes an external HTML fragment.\n'ng-include'\n\n// Allows you to evaluate an expression in the current scope.\n'ng-init'\n\n// Force the angular.element library.\n// This should be used to force either jqLite by leaving ng-jq blank or setting the name of the jquery variable under window (eg. jQuery).\n'ng-jq'\n\n// Specify custom behavior on keydown event.\n'ng-keydown'\n\n// Specify custom behavior on keypress event.\n'ng-keypress'\n\n// Specify custom behavior on keyup event.\n'ng-keyup'\n\n// Text input that converts between a delimited string and an array of strings.\n'ng-list'\n\n// Adds the maxlength validator to ngModel.\n'ng-maxlength'\n\n// Adds the minlength validator to ngModel.\n'ng-minlength'\n\n// The ngModel directive binds an input,select, textarea (or custom form control) to a property on the scope using NgModelController,\n// which is created and exposed by this directive.\n'ng-model'\n\n// Modify the behaviour of ngModel directives within your application.\n// You can specify an ngModelOptions directive on any element.\n// All ngModel directives will use the options of their nearest ngModelOptions ancestor.\n'ng-model-options'\n\n// Allows you to specify custom behavior on mousedown event.\n'ng-mousedown'\n\n// Specify custom behavior on mouseenter event.\n'ng-mouseenter'\n\n// Specify custom behavior on mouseleave event.\n'ng-mouseleave'\n\n// Specify custom behavior on mousemove event.\n'ng-mousemove'\n\n// Specify custom behavior on mouseover event.\n'ng-mouseover'\n\n// Specify custom behavior on mouseup event.\n'ng-mouseup'\n\n// Tells AngularJS not to compile or bind the contents of the current DOM element,\n// including directives on the element itself that have a lower priority than ngNonBindable.\n'ng-non-bindable'\n\n// Sets the open attribute on the element, if the expression inside ngOpen is truthy.\n'ng-open'\n\n// The ngOptions attribute can be used to dynamically generate a list of <option> elements for the <select>\n// element using the array or object obtained by evaluating the ngOptions comprehension expression.\n'ng-options'\n\n// Specify custom behavior on paste event.\n'ng-paste'\n\n// ngPattern adds the pattern validator to ngModel.\n// It is most often used for text-based input controls, but can also be applied to custom text-based controls.\n'ng-pattern'\n\n// Displays messages according to en-US localization rules.\n'ng-pluralize'\n\n// Sets the readonly attribute on the element, if the expression inside ngReadonly is truthy\n'ng-readonly'\n\n// Instantiates a template once per item from a collection\n// Special properties are exposed on the local scope of each template instance, including:\n// $index, $first, $middle, $last, $even, $odd\n'ng-repeat'\n\n// ngRequired adds the required validator to ngModel.\n// It is most often used for input and select controls, but can also be applied to custom controls.\n'ng-required'\n\n// Sets the selected attribute on the element, if the expression inside ngSelected is truthy.\n'ng-selected'\n\n// Shows or hides the given HTML element based on the expression provided to the ngShow attribute.\n'ng-show'\n\n// Using AngularJS markup like {{hash}} in a src attribute doesn't work right:\n// The browser will fetch from the URL with the literal text {{hash}} until AngularJS\n// replaces the expression inside {{hash}}. The ngSrc directive solves this problem.\n'ng-src'\n\n// Using AngularJS markup like {{hash}} in a srcset attribute doesn't work right:\n// The browser will fetch from the URL with the literal text {{hash}} until AngularJS\n// replaces the expression inside {{hash}}. The ngSrcset directive solves this problem.\n'ng-srcset'\n\n// Allows you to set CSS style on an HTML element conditionally.\n'ng-style'\n\n// Enables binding AngularJS expressions to onsubmit events.\n'ng-submit'\n\n// Used to conditionally swap DOM structure on your template based on a scope expression.\n'ng-switch'\n\n// Marks the insertion point for the transcluded DOM of the nearest parent directive that uses transclusion.\n'ng-transclude'\n\n// Binds the given expression to the value of the element.\n// It is mainly used on input[radio] and option elements, so that when the element is selected,\n// the ngModel of that element (or its select parent element) is set to the bound value.\n'ng-value'\n\n\n/* *******************************************************************************************\n * NG MODULE > TYPE\n * ******************************************************************************************* */\n\n\n// A cache object used to store and retrieve data, primarily used by $templateRequest\n// and the script directive to cache templates and other data.\n$cacheFactory.Cache\n\n// Don't forget the cache\n\n// A shared object between directive compile / linking functions which contains normalized\n// DOM element attributes. The values reflect current binding state {{ }}.\n$compile.directive.Attributes\n\n// Converts an attribute name (e.g. dash/colon/underscore-delimited string, optionally prefixed with x- or data-)\n// to its normalized, camelCase form.\n$compile.directive.Attributes.$normalize(name)\n\n// Adds the CSS class value specified by the classVal parameter to the element.\n// If animations are enabled then an animation will be triggered for the class addition.\n$compile.directive.Attributes.$addClass(classVal)\n\n// Removes the CSS class value specified by the classVal parameter from the element.\n// If animations are enabled then an animation will be triggered for the class removal.\n$compile.directive.Attributes.$removeClass(classVal)\n\n// Adds and removes the appropriate CSS class values to the element based on the difference\n// between the new and old CSS class values (specified as newClasses and oldClasses).\n$compile.directive.Attributes.$updateClass(newClasses, oldClasses)\n\n// Observes an interpolated attribute.\n$compile.directive.Attributes.$observe(key, fn)\n\n// Set DOM element attribute value.\n$compile.directive.Attributes.$set(name, value)\n\n// A map of DOM element attribute names to the normalized name.\n// This is needed to do reverse lookup from normalized name back to actual name.\n$compile.directive.Attributes.$attr\n\n// A root scope can be retrieved using the $rootScope key from the $injector.\n$rootScope.Scope([providers], [instanceCache])\n\n\n/* *******************************************************************************************\n * NG MODULE > FILTERS\n * ******************************************************************************************* */\n\n\n// Formats a number as a currency (ie $1,234.56).\n// When no currency symbol is provided, default symbol for current locale is used.\n{{ currency_expression | currency : symbol : fractionSize}}\n$filter('currency')(amount, symbol, fractionSize)\n\n// Formats date to a string based on the requested format.\n{{ date_expression | date : format : timezone}}\n$filter('date')(date, format, timezone)\n\n// Selects a subset of items from array and returns it as a new array.\n{{ filter_expression | filter : expression : comparator : anyPropertyKey}}\n$filter('filter')(array, expression, comparator, anyPropertyKey)\n\n// Allows you to convert a JavaScript object into JSON string.\n// This filter is mostly useful for debugging.\n// When using the double curly notation the binding is automatically converted to JSON.\n{{ json_expression | json : spacing}}\n$filter('json')(object, spacing)\n\n// Creates a new array or string containing only a specified number of elements.\n// The elements are taken from either the beginning or the end of the source array,\n// string or number, as specified by the value and sign (positive or negative) of limit.\n// Other array-like objects are also supported (e.g. array subclasses, NodeLists, jqLite/jQuery collections etc).\n// If a number is used as input, it is converted to a string.\n{{ limitTo_expression | limitTo : limit : begin}}\n$filter('limitTo')(input, limit, begin)\n\n// Converts string to lowercase.\n{{ lowercase_expression | lowercase}}\n$filter('lowercase')()\n\n// Formats a number as text.\n// If the input is null or undefined, it will just be returned.\n// If the input is infinite (Infinity or -Infinity), the Infinity symbol '∞' or '-∞' is returned, respectively.\n// If the input is not a number an empty string is returned.\n{{ number_expression | number : fractionSize}}\n$filter('number')(number, fractionSize)\n\n// Returns an array containing the items from the specified collection,\n// ordered by a comparator function based on the values computed using the expression predicate.\n{{ orderBy_expression | orderBy : expression : reverse : comparator}}\n$filter('orderBy')(collection, expression, reverse, comparator)\n\n// Converts string to uppercase.\n{{ uppercase_expression | uppercase}}\n$filter('uppercase')()\n"
  },
  {
    "path": "frontend/css3.css",
    "content": "/****************************\n * CSS3 CHEATSHEET - Beginner Friendly\n * Learn more: https://web.dev/learn/css/\n * Documentation: https://developer.mozilla.org/en-US/docs/Web/CSS\n * PDF for Better Readability: https://github.com/LeCoupa/awesome-cheatsheets/files/8880372/CSS_Cheatsheet.pdf\n * Brief overview about CSS: http://jonkinney.com/assets/21/advanced_css.pdf\n * (Advance) Know more about each topic in-depth: https://www.ciwcertified.com/resources/documents/sample-chapter/CCT02CDHTCSCK1405.PDF\n *\n *\n *\n *  Table of contents\n *  -------------------\n *  01 | Font\n *  02 | Text\n *  03 | Background\n *  04 | Border\n *  05 | Box Model\n *  06 | Colors\n *  07 | Template Layout\n *  08 | Table\n *  09 | Columns\n *  10 | List & Markers\n *  11 | Animations\n *  12 | Transitions\n *  13 | CSS Flexbox (Important)\n *        - Parent Properties (flex container)\n *        - Child Properties (flex items)\n *  14 | CSS Grid (Useful in Complex Web Designs)\n *        - Parent Properties (Grid container)\n *        - Child Properties (Grid items)\n *  15 | Media Queries\n *\n *\n *\n *****************************/\n\n/***************************\n\n------------ 01: Font -----------\n\nThere are many properties related to the font, such as the face, weight, style, etc. These\nproperties allow you to change the style or complete look of your text. \n\n*******************************/\n\n/** Body Selector which applies properties to whole body <body></body> */\nbody {\n  /* Font-Family */\n  font-family: \"Segoe UI\", Tahoma, sans-serif; /* You can declare multiple fonts. */\n  /*if first font doesn't exists other ones will be declared serial wise */\n\n  /* Font-Style */\n  font-style: italic;\n\n  /* Font-Variant */\n  font-variant: small-caps;\n\n  /* Font-Weight */\n  font-weight: bold;\n\n  /* Font-Size */\n  font-size: larger;\n\n  /* Font */\n  font: style variant weight size family;\n}\n\n/***************************\n\n------------ 02: Text -----------\n\nText properties allow one to manipulate alignment, spacing, decoration, indentation, etc., in the\ndocument.\n\n*******************************/\n\n/* Applies to all tags with class 'container' ex: <div class=\"container\"></div> */\n.container {\n  /* Text-Align */\n  text-align: justify;\n\n  /* Letter-Spacing */\n  letter-spacing: 0.15em;\n\n  /* Text-Decoration */\n  text-decoration: underline;\n\n  /* Word-Spacing */\n  word-spacing: 0.25em;\n\n  /* Text-Transform */\n  text-transform: uppercase;\n\n  /* Text-Indent */\n  text-indent: 0.5cm;\n\n  /* Line-Height */\n  line-height: normal;\n}\n\n/***************************\n\n------------ 03: Background -----------\n\nAs the name suggests, these properties are related to background, i.e., you can change the color,\nimage, position, size, etc., of the document.\n\n*******************************/\n\n/* Applies to all tags with id 'wrapper' ex: <div id=\"wrapper\"></div> */\n#wrapper {\n  /* Background-Image */\n  background-image: url(\"Path\");\n\n  /* Background-Position */\n  background-position: right top;\n\n  /* Background-Size */\n  background-size: cover;\n\n  /* Background-Repeat */\n  background-repeat: no-repeat;\n\n  /* Background-Attachment */\n  background-attachment: scroll;\n\n  /* Background-Color */\n  background-color: fuchsia;\n\n  /* Background */\n  background: color image repeat attachment position;\n}\n\n/***************************\n\n------------ 04: Border -----------\n\nBorder properties are used to change the style, radius, color, etc., of buttons or other items of\nthe document.\n\n*******************************/\n\n/* You can also select multiple items */\ndiv,\n.container {\n  /* Border-Width */\n  border-width: 5px;\n\n  /* Border-Style */\n  border-style: solid;\n\n  /* Border-Color */\n  border-color: aqua;\n\n  /* Border-Radius */\n  border-radius: 15px;\n\n  /* Border */\n  border: width style color;\n}\n\n/***************************\n\n------------ 05: Box Model -----------\n\nIn laymen's terms, the CSS box model is a container that wraps around every HTML element. It\nconsists of margins, borders, padding, and the actual content.\nIt is used to create the design and layout of web pages.\n\n*******************************/\n\n.wrapper {\n  /* Float */\n  float: none;\n  /* Clear */\n  clear: both;\n  /* Display */\n  display: block;\n  /* Height */\n  height: fit-content;\n  /* Width */\n  width: auto;\n  /* Margin */\n  margin: top right bottom left;\n  /* Padding */\n  padding: top right bottom left;\n  /* Overflow */\n  overflow: hidden;\n  /* Visibility */\n  visibility: visible;\n  /* z-index */\n  z-index: 1;\n  /* position */\n  position: static | relative | fixed | absolute | sticky;\n\n}\n\n/***************************\n\n------------ 06: Colors -----------\n\nWith the help of the color property, one can give color to text, shape, or any other object.\n\n*******************************/\n\np,\nspan,\n.text {\n  /* Color - 1 */\n  color: cornsilk;\n  /* Color - 2 */\n  color: #fff8dc;\n  /* Color - 3 */\n  color: rgba(255, 248, 220, 1);\n  /* Color - 4 */\n  color: hsl(48, 100%, 93%);\n  /* Opacity */\n  opacity: 1;\n}\n\n/***************************\n\n------------ 07: Template Layout -----------\n\nSpecifies the visual look of the content inside a template\n\n*******************************/\n\n/* '*' selects all elements on a page */\n* {\n  /* Box-Align */\n  box-align: start;\n\n  /* Box-Direction */\n  box-direction: normal;\n\n  /* Box-Flex */\n  box-flex: normal;\n\n  /* Box-Flex-Group */\n  box-flex-group: 2;\n\n  /* Box-Orient */\n  box-orient: inline;\n\n  /* Box-Pack */\n  box-pack: justify;\n\n  /* Box-Sizing */\n  box-sizing: margin-box;\n\n  /* max-width */\n  max-width: 800px;\n\n  /* min-width */\n  min-width: 500px;\n\n  /* max-height */\n  max-height: 100px;\n\n  /* min-height */\n  min-height: 80px;\n}\n\n/***************************\n\n------------ 08: Table -----------\n\nTable properties are used to give style to the tables in the document. You can change many\nthings like border spacing, table layout, caption, etc.\n\n*******************************/\n\ntable {\n  /* Border-Collapse */\n  border-collapse: separate;\n\n  /* Empty-Cells */\n  empty-cells: show;\n\n  /* Border-Spacing */\n  border-spacing: 2px;\n\n  /* Table-Layout */\n  table-layout: auto;\n\n  /* Caption-Side */\n  caption-side: bottom;\n}\n\n/***************************\n\n------------ 09: Columns -----------\n\nThese properties are used explicitly with columns of the tables, and they are used to give the\ntable an incredible look.\n\n*******************************/\n\n/* Applies to <table class=\"nice-table\"></table> */\n/* Not <table></table> */\ntable.nice-table {\n  /* Column-Count */\n  column-count: 10;\n\n  /* Column-Gap */\n  column-gap: 5px;\n\n  /* Column-rule-width */\n  column-rule-width: medium;\n\n  /* Column-rule-style */\n  column-rule-style: dotted;\n\n  /* Column-rule-color */\n  column-rule-color: black;\n\n  /* Column-width */\n  column-width: 10px;\n\n  /* Column-span */\n  column-span: all;\n}\n\n/***************************\n\n------ 10: List & Markers -------\n\nList and marker properties are used to customize lists in the document.\n\n*******************************/\n\nli,\nul,\nol {\n  /* List-style-type */\n  list-style-type: square;\n\n  /* List-style-position */\n  list-style-position: 20px;\n\n  /* List-style-image */\n  list-style-image: url(\"image.gif\");\n\n  /* Marker-offset */\n  marker-offset: auto;\n}\n\n/***************************\n\n------------ 11: Animations -----------\n\nCSS animations allow one to animate transitions or other media files on the web page.\n\n*******************************/\n\nsvg,\n.loader {\n  /* Animation-name */\n  animation-name: myanimation;\n\n  /* Animation-duration */\n  animation-duration: 10s;\n\n  /* Animation-timing-function */\n  animation-timing-function: ease;\n\n  /* Animation-delay */\n  animation-delay: 5ms;\n\n  /* Animation-iteration-count */\n  animation-iteration-count: 3;\n\n  /* Animation-direction */\n  animation-direction: normal;\n\n  /* Animation-play-state */\n  animation-play-state: running;\n\n  /* Animation-fill-mode */\n  animation-fill-mode: both;\n}\n\n/***************************\n\n------------ 12: Transitions -----------\n\nTransitions let you define the transition between two states of an element.\n\n*******************************/\n\na,\nbutton {\n  /* Transition-property */\n  transition-property: none;\n\n  /* Transition-duration */\n  transition-duration: 2s;\n\n  /* Transition-timing-function */\n  transition-timing-function: ease-in-out;\n\n  /* Transition-delay */\n  transition-delay: 20ms;\n}\n\n/***************************\n\n------------ 13: CSS Flexbox (Important) -----------\n\nFlexbox is a layout of CSS that lets you format HTML easily. Flexbox makes it simple to align\nitems vertically and horizontally using rows and columns. Items will \"flex\" to different sizes to fill\nthe space. And overall, it makes the responsive design more manageable.\n\n*******************************/\n\n/* ---------------------- Parent Properties (flex container) ------------ */\n\nsection,\ndiv#wrapper {\n  /* display */\n  display: flex;\n\n  /* flex-direction */\n  flex-direction: row | row-reverse | column | column-reverse;\n\n  /* flex-wrap */\n  flex-wrap: nowrap | wrap | wrap-reverse;\n\n  /* flex-flow */\n  flex-flow: column wrap;\n\n  /* justify-content */\n  justify-content: flex-start | flex-end | center | space-between | space-around;\n\n  /* align-items */\n  align-items: stretch | flex-start | flex-end | center | baseline;\n\n  /* align-content */\n  align-content: flex-start | flex-end | center | space-between | space-around;\n}\n\n\n/* ---------------------- Child Properties (flex items) ------------ */\n\np,\nspan,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\na {\n    /* order */\n    order: 5; /* default is 0 */\n\n    /* flex-grow */\n    flex-grow: 4; /* default 0 */\n\n    /* flex-shrink */\n    flex-shrink: 3; /* default 1 */\n\n    /* flex-basis */\n    flex-basis: | auto; /* default auto */\n\n    /* flex shorthand */\n    flex: none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]\n\n    /* align-self */\n    align-self: auto | flex-start | flex-end | center | baseline | stretch;\n}\n\n/***************************\n\n------------ 14: CSS Grid (Useful in Complex Web Designs) -----------\n\nGrid layout is a 2-Dimensional grid system to CSS that creates complex responsive web design\nlayouts more easily and consistently across browsers.\n\n*******************************/\n\n\n/* ---------------------- Parent Properties (Grid container) ------------ */\n\nsection,\ndiv#wrapper {\n    /* display */\n    display: grid | inline-grid;\n\n    /* grid-template-columns */\n    grid-template-columns: 12px 12px 12px;\n\n    /* grid-template-rows */\n    grid-template-rows: 8px auto 12px;\n\n    /* grid-template */\n    grid-template: none | <grid-template-rows> / <grid-template-columns>;\n\n    /* column-gap */\n    column-gap: <line-size>;\n\n    /* row-gap */\n    row-gap: <line-size>;\n\n    /* grid-column-gap */\n    grid-column-gap: <line-size>;\n\n    /* grid-row-gap */\n    grid-row-gap: <line-size>;\n\n    /* gap shorthand */\n    gap: <grid-row-gap> <grid-column-gap>;\n\n    /* grid-gap shorthand */\n    grid-gap: <grid-row-gap> <grid-column-gap>;\n\n    /* justify-items */\n    justify-items: start | end | center | stretch;\n\n    /* align-items */\n    align-items: start | end | center | stretch;\n\n    /* place-items */\n    place-items: center;\n\n    /* justify-content */\n    justify-content: start | end | center | stretch | space-around | space-between;\n\n    /* align-content */\n    align-content: start | end | center | stretch | space-around | space-between;\n\n    /* place-content */\n    place-content: <align-content> / <justify-content>;\n\n    /* grid-auto-columns */\n    grid-auto-columns: <track-size> ...;\n\n    /* grid-auto-rows */\n    grid-auto-rows: <track-size> ...;\n\n    /* grid-auto-flow */\n    grid-auto-flow: row | column | row dense | column dense;\n\n}\n\n\n/* ---------------------- Child Properties (Grid items) ------------ */\n\np,\nspan,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\na {\n    /* grid-column-start */\n    grid-column-start: <number> | <name> | span <number> | span <name> | auto;\n\n    /* grid-column-end */\n    grid-column-end: <number> | <name> | span <number> | span <name> | auto;\n\n    /* grid-row-start */\n    grid-row-start: <number> | <name> | span <number> | span <name> | auto;\n\n    /* grid-row-end */\n    grid-row-end: <number> | <name> | span <number> | span <name> | auto;\n\n    /* grid-column shorthand */\n    grid-column: <start-line> / <end-line> | <start-line> / span <value>;\n\n    /* grid-row shorthand */\n    grid-row: <start-line> / <end-line> | <start-line> / span <value>;\n\n    /* grid-area */\n    grid-area: <name> | <row-start> / <column-start> / <row-end> / <column-end>;\n\n    /* justify-self */\n    justify-self: start | end | center | stretch;\n\n    /* align-self */\n    align-self: start | end | center | stretch;\n\n    /* place-self */\n    place-self: center;\n}\n\n\n/***************************\n\n------------ 15: MEDIA QUERIES -----------\n\nUsing media queries are a popular technique for delivering a tailored style sheet to\ndesktops, laptops, tablets, and mobile phones (such as iPhone and Android phones).\n\n|----------------------------------------------------------|\n|  Responsive Grid Media Queries - 1280, 1024, 768, 480    |\n|   1280-1024   - desktop (default grid)                   |\n|   1024-768    - tablet landscape                         |\n|   768-480     - tablet                                   |\n|   480-less    - phone landscape & smaller                |\n|----------------------------------------------------------|\n\n*******************************/\n\n\n@media all and (min-width: 1024px) and (max-width: 1280px) { }\n \n@media all and (min-width: 768px) and (max-width: 1024px) { }\n \n@media all and (min-width: 480px) and (max-width: 768px) { }\n \n@media all and (max-width: 480px) { }\n \n/* Small screens - MOBILE */\n@media only screen { } /* Define mobile styles - Mobile First */\n \n@media only screen and (max-width: 40em) { } /* max-width 640px, mobile-only styles, use when QAing mobile issues */\n \n/* Medium screens - TABLET */\n@media only screen and (min-width: 40.063em) { } /* min-width 641px, medium screens */\n \n@media only screen and (min-width: 40.063em) and (max-width: 64em) { } /* min-width 641px and max-width 1024px, use when QAing tablet-only issues */\n \n/* Large screens - DESKTOP */\n@media only screen and (min-width: 64.063em) { } /* min-width 1025px, large screens */\n \n@media only screen and (min-width: 64.063em) and (max-width: 90em) { } /* min-width 1024px and max-width 1440px, use when QAing large screen-only issues */\n \n/* XLarge screens */\n@media only screen and (min-width: 90.063em) { } /* min-width 1441px, xlarge screens */\n \n@media only screen and (min-width: 90.063em) and (max-width: 120em) { } /* min-width 1441px and max-width 1920px, use when QAing xlarge screen-only issues */\n \n/* XXLarge screens */\n@media only screen and (min-width: 120.063em) { } /* min-width 1921px, xlarge screens */\n \n/*------------------------------------------*/\n \n \n \n/* Portrait */\n@media screen and (orientation:portrait) { /* Portrait styles here */ }\n/* Landscape */\n@media screen and (orientation:landscape) { /* Landscape styles here */ }\n \n \n/* CSS for iPhone, iPad, and Retina Displays */\n \n/* Non-Retina */\n@media screen and (-webkit-max-device-pixel-ratio: 1) {\n}\n \n/* Retina */\n@media only screen and (-webkit-min-device-pixel-ratio: 1.5),\nonly screen and (-o-min-device-pixel-ratio: 3/2),\nonly screen and (min--moz-device-pixel-ratio: 1.5),\nonly screen and (min-device-pixel-ratio: 1.5) {\n}\n \n/* iPhone Portrait */\n@media screen and (max-device-width: 480px) and (orientation:portrait) {\n} \n \n/* iPhone Landscape */\n@media screen and (max-device-width: 480px) and (orientation:landscape) {\n}\n \n/* iPad Portrait */\n@media screen and (min-device-width: 481px) and (orientation:portrait) {\n}\n \n/* iPad Landscape */\n@media screen and (min-device-width: 481px) and (orientation:landscape) {\n}\n\n/* Make Sure you don't forgot to add */\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no\" /> /* within <head> tag  */\n\n\n\n"
  },
  {
    "path": "frontend/ember.js",
    "content": "/*\n *  -----------------------\n *    Ember.js Cheatsheet\n *  -----------------------\n *\n *  Docs: https://guides.emberjs.com/\n *  Quick start: https://guides.emberjs.com/current/getting-started/quick-start/\n *\n *  Table of contents\n *  -------------------\n *  01 | Installation\n *  02 | Ember CLI\n *  03 | Directory layout\n *  04 | Routes\n *  05 | Templates\n *  06 | Components\n *  07 | Models\n *  08 | Services\n *  09 | Testing\n *  10 | Addons\n *  11 | Configuration\n *  12 | Community\n *\n */\n\n/*\n *  01 | Installation\n *  --------------------------------------------------------------\n *  Getting started with Ember is easy. Ember projects are created\n *  and managed through our command line build tool Ember CLI.\n */\n\n```\nnpm install -g ember-cli\nember new <application-name>\nember serve\n```\n\n\n\n/*\n *  02 | Ember CLI\n *  --------------------------------------------------------------\n *  Ember CLI is the Ember.js command line utility that provides a\n *  fast Broccoli-powered asset pipeline, a strong conventional\n *  project structure, and a powerful addon system for extension.\n *\n *  Among the principal features of Ember CLI are:\n    - Project/Addon creation: create new projects quickly without having to worry about project structure;\n    - Build pipeline: asset compilation, finger-printing and more out of the box;\n    - Generators: use the built-in generators and get files that follow the latest practices, and matching tests;\n    - Ember Addons: extend both your application and Ember CLI itself with community solutions. Also an excellent\n                    way to easily integrate 3rd party libraries into your Ember app.\n */\n\nBasic commands\n\nCommand         | Aliases       | Description\n--------------------------------------------------\n```\nember new       |               | Create new project with the provided name (ex. ember new <app-name>)\nember server    | ember s       | Starts development server (default port is 4200)\nember test      | ember t       | Run tests in CI mode\nember generate  | ember g       | Run generator\nember destroy   | ember d       | Remove code created by generator\nember help      | ember h       | Get more info on available cli command\nember install   | ember i       | Install given addon into project and save to package.json\nember           |               | List available cli commands\n```\n\nUseful commands\n```\nember s --proxy <proxy-url>\nember s --port <port>\n```\n\n\n\n/*\n *  03 | Directory Layout\n *  --------------------------------------------------------------\n *\n *  Layout of the root folder */\n\napp/\n  ` This is where folders and files for models, components, routes, templates and styles are stored. The majority of your coding on an Ember project happens in this folder. `\nconfig/\n  ` The config directory contains the environment.js where you can configure settings for your app. `\nnode_modules/\n  ` This directory is from npm. npm is the package manager for Node.js. Ember is built with Node and uses a variety of Node.js modules for operation. The package.json file maintains the list of current npm dependencies for the app. Any Ember CLI addons you install will also show up here. `\npublic/\n  ` This directory contains assets such as images and fonts. `\nvendor/\n  ` This directory is where front-end dependencies (such as JavaScript or CSS) that are not managed by NPM go. `\ntests/testem.js\n  ` Automated tests for our app go in the tests folder, and Ember CLI's test runner testem is configured in testem.js. `\nember-cli-build.js\n  ` This file describes how Ember CLI should build our app. `\npackage.json\n  ` Packages listed in package.json are installed in the node_modules directory. `\n\n/*\n *  Layout of the app directory */\nadapters/\n  ` Adapters with the convention adapter-name.js. `\ncomponents/\n  ` Components with the convention component-name.js. Components must have a dash in their name. So blog-post is an acceptable name, but post is not. `\ncontrollers/\n  ` Controllers behave like a specialized type of Component that is rendered by the router when entering a Route. `\nhelpers/\n  ` Helpers with the convention helper-name.js. Helpers must have a dash in their name. Remember that you must register your helpers by exporting makeBoundHelper or calling registerBoundHelper explicitly. `\nmodels/\n  ` Models with the convention model-name.js. `\nroutes/\n  ` Routes with the convention route-name.js. Child routes are defined in sub-directories, parent/child.js. To provide a custom implementation for generated routes (equivalent to App.Route when using globals), use app/routes/basic.js. `\nstyles/\n  ` Contains your stylesheets, whether SASS, LESS, Stylus, Compass, or plain CSS (though only one type is allowed, see Asset Compilation). These are all compiled into <app-name>.css. `\ntemplates/\n  ` Your HTMLBars templates. These are compiled to /dist/assets/<app-name>.js. The templates are named the same as their filename, minus the extension (i.e. templates/foo/bar.hbs -> foo/bar). `\nserializers/\n  ` Serializers for your models or adapter, where model-name.js or adapter-name.js. `\nutils/\n  ` Utility modules with the convention utility-name.js. `\nrouter.js\n  ` Your route configuration. The routes defined here correspond to routes in app/routes/. `\n\n\n/*\n *  03 | Routes\n *  --------------------------------------------------------------\n *\n *    When your application starts, the router matches the current URL to the routes that you've defined.\n *    The routes, in turn, are responsible for displaying templates, loading data, and setting up application state.\n *\n *    > ember g route <route-name>\n */\n\n  import Route from '@ember/routing/route';\n\n  export default Route.extend({\n    model() {\n      // Typically, the model hook should return an Ember Data record,\n      //  but it can also return any promise object (Ember Data records are\n      //  promises), or a plain JavaScript object or array. Ember will wait\n      //  until the data finishes loading (until the promise is resolved)\n      //  before rendering the template.\n    }\n  });\n\n\n\n/*\n *  04 | Templates\n *  --------------------------------------------------------------\n *\n *    Ember uses the Handlebars templating library to power your app's user\n *    interface. Handlebars templates contain static HTML and dynamic\n *    content inside Handlebars expressions, which are invoked with\n *    double curly braces: {{}}.\n *\n *    Templates are backed with a context. A context is an object from\n *    which Handlebars expressions read their properties. In Ember this\n *    is often a component. For templates rendered by a route (like application.hbs),\n *    the context is a controller.\n *\n *    > ember g template <template-name>\n */\n\n\n  // Here's an basic exmpale of a template\n  ```hbs\n  Hello, <strong>{{firstName}} {{lastName}}</strong>!\n  ```\n\n\n\n/*\n *  05 | Components\n *  --------------------------------------------------------------\n *\n *    Ember components are used to encapsulate markup and style into\n *    reusable content. Components consist of two parts: a JavaScript\n *    component file that defines behavior, and its accompanying Handlebars\n *    template that defines the markup for the component's UI.\n *\n *    > ember g component <component-name>\n */\n\n  // app/components/<component-name>.js\n  import Component from '@ember/component';\n\n  export default Component.extend({\n  });\n\n  // app/templates/components/<component-name>.hbs\n  ```hbs\n  {{yield}}\n  ```\n\n/*\n *  Actions\n *\n *    Provide a means to communicate events and changes\n */\n\n  // app/components/rental-listing.js\n  import Component from '@ember/component';\n\n  export default Component.extend({\n\n    isWide: false,\n\n    actions: {\n      toggleImageSize() {\n        this.toggleProperty('isWide');\n      }\n    }\n\n  });\n\n  // Actions can be attached to DOM elements inside templates using the {{action}} helper\n  ``` app/templates/components/rental-listing.hbs\n  <article class=\"listing\">\n    <a {{action 'toggleImageSize'}} class=\"image {{if isWide \"wide\"}}\">\n      <img src=\"http://www.fillmurray.com/200/300\" alt=\"\">\n    </a>\n  </article>\n  ```\n\n/*\n *  Component lifecycle\n *\n *    As components are rendered, re-rendered and finally removed, Ember provides\n *    lifecycle hooks that allow you to run code at specific times in a component's life.\n */\n\nOn Initial Render\n  1 init\n  2 didReceiveAttrs\n  3 willRender\n  4 didInsertElement // Good place to integrate with 3rd party libraries\n  5 didRender\n\nOn Re-Render\n  1 didUpdateAttrs\n  2 didReceiveAttrs\n  3 willUpdate\n  4 willRender\n  5 didUpdate\n  6 didRender\n\nOn Component Destroy\n  1 willDestroyElement\n  2 willClearRender\n  2 didDestroyElement\n\n\n/*\n *  Block params\n *\n *    Components can have properties passed in, but they can also return\n *    output to be used in a block expression.\n */\n\n  //   Here an entire blog post model is being passed to the component as a\n  //   single component property. In turn the component is returning values using yield.\n\n  ``` app/templates/index.hbs\n  {{blog-post post=model}}\n  ```\n\n  ``` app/templates/components/blog-post.hbs\n  {{yield post.title post.body post.author}}\n  ```\n\n  //  The block expression can then use block params to bind names to any yielded\n  //  values for use in the block. This allows for template customization when using\n  //  a component, where the markup is provided by the consuming template, but any\n  //  event handling behavior implemented in the component is retained such as click() handlers.\n\n  ``` app/templates/index.hbs\n  {{#blog-post post=model as |title body author|}}\n    <h2>{{title}}</h2>\n    <p class=\"author\">by {{author}}</p>\n    <p class=\"post-body\">{{body}}</p>\n  {{/blog-post}}\n  ```\n  //  The names are bound in the order that they are passed to yield in the component template.\n\n\n\n/*\n *  06 | Models\n *  --------------------------------------------------------------\n *\n *    Models are objects that represent the underlying data that your application\n *    presents to the user. Different apps will have very different models,\n *    depending on what problems they're trying to solve.\n *\n *    Ember Data, included by default when you create a new application,\n *    is a library that integrates tightly with Ember to make it easy to\n *    retrieve models from your server as JSON, save updates back to the server,\n *    and create new models in the browser.\n *\n *    > ember g model <model-name>\n */\n\n  import DS from 'ember-data';\n  import { computed } from '@ember/object';\n\n  const { attr, Model } = DS;\n\n  export default Model.extend({\n\n    firstName: attr('string'),\n    lastName: attr('string'),\n    birthday:  attr('date'),\n\n\n    //  Computed properties\n    //    These are effectively fuctions declared as properties. The function's result\n    //    will recompute every time one of the provided 'dependent keys' changes.\n\n    fullName: computed('firstName', 'lastName', function() {\n      let firstName = this.get('firstName');\n      let lastName = this.get('lastName');\n\n      return `${firstName} ${lastName}`;\n    })\n\n  });\n\n\n\n/*\n *  07 | Services\n *  --------------------------------------------------------------\n *\n *    A Service is an Ember object that lives for the duration of the application, and can\n *    be made available in different parts of your application. Services are useful for\n *    features that require shared state or persistent connections.\n *\n *    Example uses of services might include:\n *\n *      - User/session authentication.\n *      - Geolocation.\n *      - WebSockets.\n *      - Server-sent events or notifications.\n *      - Server-backed API calls that may not fit Ember Data.\n *      - Third-party APIs.\n *      - Logging.\n *\n *    > ember g service <service-name>\n */\n\n\n/*\n *  Defining services\n *\n *    Like any Ember object, a service is initialized and can have properties and\n *    methods of its own. Below, the shopping cart service manages an items array\n *    that represents the items currently in the shopping cart.\n */\n\n  // app/services/shopping-cart.js\n  import Service from '@ember/service';\n\n  export default Service.extend({\n    items: null,\n\n    init() {\n      this._super(...arguments);\n      this.set('items', []);\n    },\n\n    remove(item) {\n      this.get('items').removeObject(item);\n    }\n  });\n\n/*\n *  Accessing services\n *\n *    To access a service, you can inject it in any object such as a component or another\n *    service using the `inject` function from the `@ember/service` module.\n */\n\n  // app/components/cart-contents.js\n  import Component from '@ember/component';\n  import { inject } from '@ember/service';\n\n  export default Component.extend({\n\n    shoppingCart: inject() // will load the service in file /app/services/shopping-cart.js\n\n    actions: {\n      remove(item) {\n        this.get('shoppingCart').remove(item);\n      }\n    }\n  });\n\n  //  Once injected into a component, a service can also be used in the template.\n  //    Note cart being used below to get data from the cart.\n  ```hbs app/templates/components/cart-contents.hbs\n  <ul>\n    {{#each cart.items as |item|}}\n      <li>\n        {{item.name}}\n        <button {{action \"remove\" item}}>Remove</button>\n      </li>\n    {{/each}}\n  </ul>\n  ```\n\n\n\n/*\n *  08 | Testing\n *  --------------------------------------------------------------\n *\n *  Testing is a core part of the Ember framework and its development cycle.\n *\n *    > ember g acceptance-test <test-name>\n *    > ember g integration-test <test-name>\n *    > ember g unit-test <test-name>\n *    > ember t --server\n *    > ember s && visit localhost:4200/tests\n */\n\n  /*\n   *  Acceptance & application tests\n   *\n   *    In these kinds of tests, we interact with the application in the same ways that a\n   *    user would, such as filling out form fields and clicking buttons. Application\n   *    tests ensure that the interactions within a project are basically functional, the\n   *    core features of a project have not regressed, and the project's goals are being met.\n   *\n   *    Some useful helpers from '@ember/test-helpers':\n   *    - `click(selector)`\n   *        Clicks an element and triggers any actions triggered by the element's click event and\n   *        returns a promise that fulfills when all resulting async behavior is complete.\n   *\n   *    - `fillIn(selector, value)`\n   *        Fills in the selected input with the given value and returns a promise that\n   *        fulfills when all resulting async behavior is complete. Works with <select> elements\n   *        as well as <input> elements. Keep in mind that with <select> elements, value must be set\n   *        to the value of the <option> tag, rather than its content (for example, true rather than \"Yes\").\n   *\n   *    - `triggerKeyEvent(selector, type, keyCode)`\n   *        Simulates a key event type, e.g. keypress, keydown, keyup with the desired keyCode on element found by the selector.\n   *\n   *    - `triggerEvent(selector, type, options)`\n   *        Triggers the given event, e.g. blur, dblclick on the element identified by the provided selector.\n   *\n   *    - `visit(url)`\n   *        Visits the given route and returns a promise that fulfills when all resulting async behavior is complete.\n   *\n   *    - `currentURL()`\n   *        Returns the current URL.\n   *\n   *    - `find(selector, context)`\n   *        Finds an element within the app's root element and within the context (optional). Scoping to the\n   *        root element is especially useful to avoid conflicts with the test framework's reporter, and this\n   *        is done by default if the context is not specified.\n   *\n   *    - `findAll(selector)`\n   *        Find all elements matched by the given selector. Equivalent to calling querySelectorAll() on the\n   *        test root element. Returns an array of matched elements.\n   *\n   */\n\n  import { module, test } from 'qunit';\n  import { setupApplicationTest } from 'ember-qunit';\n  import { visit, fillIn, click } from '@ember/test-helpers';\n\n  module('Acceptance | posts', function(hooks) {\n\n    // `setupApplicationTest` deals with application setup and teardown.\n    setupApplicationTest(hooks);\n\n    test('should add new post', async function(assert) {\n      await visit('/posts/new');\n      await fillIn('input.title', 'My new post');\n      await click('button.submit');\n\n      const title = this.element.querySelector('ul.posts li:first').textContent;\n      assert.equal(title, 'My new post');\n    });\n  });\n\n  /*\n   *  Integration & rendering tests\n   *\n   *    Rendering Tests are, as the name suggests, rendering components and helpers\n   *    by verifying the correct behaviour when the component or helper interacts\n   *    with the system in the same way that it will within the context of the application,\n   *    including being rendered from a template and receiving Ember's lifecycle hooks.\n   *\n   *    If we need to test the interactions between various parts of the application,\n   *    such as behaviour between UI controls we can utilize Rendering Tests.\n   */\n\n  // app/components/pretty-color.js\n  import Component from '@ember/component';\n  import { computed } from '@ember/object';\n\n  export default Component.extend({\n    attributeBindings: ['style'],\n\n    style: computed('name', function() {\n      const name = this.get('name');\n      return `color: ${name}`;\n    })\n  });\n\n  // tests/integration/components/pretty-color-test.js\n  import { module, test } from 'qunit';\n  import { setupRenderingTest } from 'ember-qunit';\n  import { render } from '@ember/test-helpers';\n  import hbs from 'htmlbars-inline-precompile';\n\n  module('Integration | Component | pretty color', function(hooks) {\n\n    // Make sure to call the setupRenderingTest function together with the hooks\n    //  parameter first in your new module. This will do the necessary setup for\n    //  testing your component for you, including setting up a way to access the\n    //  rendered DOM of your component later on in the test, and cleaning up\n    //  once your tests in this module are finished.\n    setupRenderingTest(hooks);\n\n    test('it renders', async function(assert) {\n      assert.expect(2);\n\n      // set the outer context to red\n      this.set('colorValue', 'red');\n\n      await render(hbs`{{pretty-color name=colorValue}}`);\n\n      assert.equal(this.element.querySelector('div').getAttribute('style'), 'color: red', 'starts as red');\n\n      this.set('colorValue', 'blue');\n\n      assert.equal(this.element.querySelector('div').getAttribute('style'), 'color: blue', 'updates to blue');  });\n  });\n\n\n  //  Stubbing services\n  //\n  //    In cases where components have dependencies on Ember services, it is\n  //    possible to stub these dependencies for rendering tests. You stub Ember\n  //    services by using the built-in register() function to register your\n  //    stub service in place of the default.\n\n  import { module, test } from 'qunit';\n  import { setupRenderingTest } from 'ember-qunit';\n  import { render } from '@ember/test-helpers';\n  import hbs from 'htmlbars-inline-precompile';\n  import Service from '@ember/service';\n\n  //Stub location service\n  const locationStub = Service.extend({\n    city: 'New York',\n    country: 'USA',\n    currentLocation: {\n      x: 1234,\n      y: 5678\n    },\n\n    getCurrentCity() {\n      return this.get('city');\n    },\n    getCurrentCountry() {\n      return this.get('country');\n    }\n  });\n\n  module('Integration | Component | location indicator', function(hooks) {\n    setupRenderingTest(hooks);\n\n    hooks.beforeEach(function(assert) {\n      this.owner.register('service:location-service', locationStub);\n    });\n\n    test('should reveal current location', async function(assert) {\n      await render(hbs`{{location-indicator}}`);\n      assert.equal(this.element.textContent.trim(),\n       'You currently are located in New York, USA');\n    });\n  });\n\n\n  /*\n   *  Unit & container tests\n   *\n   *    Unit tests (as well as container tests) are generally used to test a\n   *    small piece of code and ensure that it is doing what was intended.\n   */\n\n  // app/services/some-thing.js\n  import Service from '@ember/service';\n\n  export default Service.extend({\n    foo: 'bar',\n\n    testMethod() {\n      this.set('foo', 'baz');\n    }\n  });\n\n  // tests/unit/services/some-thing-test.js\n  import { module, test } from 'qunit';\n  import { setupTest } from 'ember-qunit';\n\n  module('Unit | Service | some thing', function(hooks) {\n\n    // The `setupTest` helper provides us with some conveniences, such as the `this.owner` object,\n    //  that helps us to create or lookup objects which are needed to setup our test.\n    //  In this example, we use the `this.owner` object to lookup the service instance that\n    //  becomes our test subject: `someThing`. Note that in a unit test you can customize any\n    //  object under test by setting its properties accordingly. We can use the `set` method\n    //  of the test object to achieve this.\n    setupTest(hooks);\n\n    test('should update foo on testMethod', function(assert) {\n      const someThing = this.owner.lookup('service:some-thing');\n\n      someThing.testMethod();\n\n      assert.equal(someThing.get('foo'), 'baz');\n    });\n  });\n\n\n/*\n *  Running tests\n *\n *    Run your tests with `ember test` on the command-line. You can re-run your tests on\n *    every file-change with `ember test --server`.\n *\n *    Tests can also be executed when you are running a local development server\n *    (started by running `ember server`), at the `/tests` URI which renders the `tests/index.html` template.\n */\n\n ```\n ember test\n ember test --server\n ember test --filter=\"dashboard\"\n run ember server then visit http://localhost:4200/tests\n ```\n\n\n\n/*\n *  09 | Addons\n *  --------------------------------------------------------------\n *\n *  Ember has a rich ecosystem of addons that can be easily added to projects.\n *  Addons provide a wide range of functionality to projects, often saving time and\n *  letting you focus on your project.\n *\n *  To browse addons, visit the [EmberObserver](https://emberobserver.com/) website. It catalogs and categorizes Ember\n *  addons that have been published to NPM and assigns them a score based on a variety of criteria.\n *\n *    > ember install <addont-name>\n */\n\n\n\n/*\n *  10 | Configuration\n *  --------------------------------------------------------------\n *\n *  Ember CLI ships with support for managing your application's environment. Ember CLI\n *  will setup a default environment config file at config/environment. Here, you can define\n *  an ENV object for each environment, which are currently limited to three: development,\n *  test, and production.\n */\n\n  //   The ENV object has three important keys:\n  //   - `EmberENV` can be used to define Ember feature flags (see the Feature Flags guide).\n  //   - `APP` can be used to pass flags/options to your application instance.\n  //   - `environment` contains the name of the current environment (development,production or test).\n\n  // You can access these environment variables in your application code by importing from `your-application-name/config/environment`.\n  import ENV from 'your-application-name/config/environment';\n\n  if (ENV.environment === 'development') {\n    // ...\n  }\n\n\n\n/*\n *  11 | Community\n *  --------------------------------------------------------------\n *\n *  Ember's secret sauce\n *\n *    more at [Ember Community Page](https://emberjs.com/community/)\n *\n */\n\n//  Ember Discussion Forum\n//\n//    url: http://discuss.emberjs.com/\n//\n//    A great venue for discussing things like features, architecture, and best practices\n//    and a great place to ask questions (and get great answers from Ember Core Team members\n//    and other members of the community)\n\n//  Ember Community Slack\n//\n//    url: https://embercommunity.slack.com/\n//\n//    Use the Slackin app to receive an invitation.\n\n//  Ember Times\n//\n//    url: https://the-emberjs-times.ongoodbits.com/\n//\n//    Follow the progress of new features in the Ember ecosystem, requests for community\n//    input (RFCs), and calls for contributors\n\n//  Ember Weekly\n//\n//    url: http://www.emberweekly.com/\n//\n//    A curated list of Ember learning resources (podcasts, videos, blog posts, books, and more)\n\n//  Official Ember Blog\n//\n//    url: https://emberjs.com/blog/\n//\n//    Big announcements like new Ember.js version release notes or State of the Union information\n\n//  Ember Github\n//\n//    url: https://github.com/emberjs/\n\n//  Ember Meetups\n//\n//    url: https://emberjs.com/community/meetups/\n"
  },
  {
    "path": "frontend/html5.html",
    "content": "<!-- * *******************************************************************************************\n * HTML5 Cheat sheet by Hackr.io\n * Source: https://websitesetup.org/wp-content/uploads/2014/02/HTML-CHEAT-SHEET-768x8555.png\n * ******************************************************************************************* * -->\n\n\n<!-- Document Summary -->\n\n<!DOCTYPE html>                                   <!-- Tells the browser that HTML5 version of HTML to be recognized by the browser -->\n<html lang=\"en\"></html>                           <!-- The HTML lang attribute is used to identify the language of text content on the web. This information helps search engines return language specific results, -->\n<head></head>                                     <!-- Contains Information specific to the page like title, styles and scripts -->\n<title></title>                                   <!-- Title for the page that shows up in the browser title bar -->\n<body></body>                                     <!-- Content that the user will see -->\n\n\n<!-- Document Information -->\n\n\n<base/>                                           <!-- Usefull for specifying relative links in a document -->\n<style></style>                                   <!-- Contains styles for the html document -->\n<meta/>                                           <!-- Contains additional information about the page, author, page description and other hidden page info -->\n<script></script>                                 <!-- Contains all scripts internal or external -->\n<link/>                                           <!-- Used to create relationships with external pages and stylesheets -->\n\n\n<!-- Document Structure -->\n\n\n<h1></h1> ... <h6></h6>                           <!-- All six levels of heading with 1 being the most promiment and 6 being the least prominent -->\n<p></p>                                           <!-- Used to organize paragraph text -->\n<div></div>                                       <!-- A generic container used to denote a page section -->\n<span></span>                                     <!-- Inline section or block container used for creating inline style elements -->\n<br/>                                             <!-- Creates a line-break -->\n<hr>                                              <!-- Creates a sectional break into HTML -->\n\n\n<!-- Text Formatting -->\n\n\n<strong></strong> and <b></b>                     <!-- Makes text contained in the tag as bold -->\n<em></em> and <i></i>                             <!-- Alternative way to make the text contained in the tag as italic -->\n<del></del>                                 <!-- Creates a strike through the text element -->\n<pre></pre>                                       <!-- Preformatted monospace text block with some spacing intact -->\n<blockquote></blockquote>                         <!-- Contains long paragraphs of quotations often cited -->\n<abbr></abbr>                                     <!-- Contains abbreviations while also making the full form avaialable -->\n<address></address>                               <!-- Used to display contact information -->\n<code></code>                                     <!-- Used to display inline code snippets -->\n<q></q>                                           <!-- Defines a short inline quotation -->\n<sub></sub>                                       <!-- Defines subscripted text -->\n<sup></sup>                                       <!-- Defines superscripted text -->\n<kbd></kbd>                                       <!-- Specifies text as keyboard input -->\n<small></small>                                   <!-- Specifies small text -->  \n<ins></ins>                                       <!-- Defines a text that has been inserted into the document -->\n\n\n<!-- Links Formatting -->\n\n\n<a href=\"url\"></a>                                <!-- Used to link to external or internal pages of a wbesite -->\n<a href=\"mailto:email@example.com\"></a>           <!-- Used to link to an email address -->\n<a href=\"name\"></a>                               <!-- Used to link to a document element -->\n<a href=\"#name\"></a>                              <!-- Used to link to specific div element -->\n<a href=\"tel://####-####-##\"></a>                 <!-- Used to display phone numbers and make them clickable -->\n\n\n<!-- Image Formatting -->\n\n\n<img src=\"url\" alt=\"text\">                        <!-- Used to display images in a webpage where src=\"url\" contains the link to the image source and alt=\"\" contains an alternative text to display when the image is not displayed -->\n\n\n<!-- List Formatting -->\n\n\n<ol></ol>                                         <!-- Used to create ordered lists with numbers in the items -->\n<ul></ul>                                         <!-- Used to display unordered lists with numbers in the items -->\n<li></li>                                         <!-- Contains list items inside ordered and unordered lists -->\n<dl></dl>                                         <!-- Contains list item definitions -->\n<dt></dt>                                         <!-- Definition of single term inline with body content -->\n<dd></dd>                                         <!-- The descrpition of the defined term -->\n\n\n<!-- Forms Formatting and Attributes -->\n\n\n<form action=\"url\"></form>                        <!-- Form element creates a form and action=\"\" specifies where the data is to be sent to when the visitor submits the form -->\n\n<!-- Supported attributes -->\nmethod=\"somefunction()\"                           <!-- Contains the type of request (GET, POST... etc) which dictates how to send the data of the form -->\nenctype=\"\"                                        <!-- Dictates how the data is to be encoded when the data is sent to the web server. -->\nautocomplete=\"\"                                   <!-- Specifies if the autocomplete functionality is enabled or not -->\nnovalidate                                        <!-- Dictates if the form will be validated or not -->\naccept-charset=\"\"                                 <!-- Identifies the character encoding upon form submission -->\ntarget=\"\"                                         <!-- Tell where to display the information upon form submission. Possible values: '_blank', '_self', '_parent', '_top' -->\n                            \n<fieldset disabled=\"disabled\"></fieldset>         <!-- Identifies the group of all fields in the form -->\n<label for=\"\"></label>                            <!-- A simple field label telling the user what to type in the field -->\n<legend></legend>                                 <!-- The form legend acts as a caption for the fieldset element -->\n\n<input type=\"text/email/number/color/date\">       <!-- Input is the input field where the user can input various types of data -->\n\n<!-- Supported attributes -->\nname=\"\"                                           <!-- Describes the name of the form -->\nwidth=\"\"                                          <!-- Specifies the width of an input field -->\nvalue=\"\"                                          <!-- Describes the value of the input information field -->\nsize=\"\"                                           <!-- Specifies the input element width in characters -->\nmaxlength=\"\"                                      <!-- Specifies the maximum input character numbers -->\nrequired=\"\"                                       <!-- Specifies if the input field is required to fill in before submitting the form -->\nstep=\"\"                                           <!-- Identifies the legal number intervals of the input field -->\n\n<textarea name=\"\" id=\"\" cols=\"30\" rows=\"10\">      <!-- Specifies a large input text field for longer messages -->\n</textarea>\n\n<select name=\"\"></select>                         <!-- Describes a dropdown box for users to select from variety of choices -->\n\n<!-- Supported attributes -->\nname=\"\"                                           <!-- The name for a dropdown combination box -->\nsize=\"\"                                           <!-- Specifies the number of available options -->\nmultiple                                          <!-- Allows for multiple option selections -->\nrequired                                          <!-- Requires that a value is selected before submitting the form -->\nautofocus                                         <!-- Specifies that the dropdown automatically comes to focus once the page loads -->\n<optgroup></optgroup>                             <!-- Specifies the entire grouping of available options -->\n<option value=\"\"></option>                        <!-- Defines one of the avaialble option from the dropdown list -->\n<button></button>                                 <!-- A clickable button to submit the form -->\n\n\n<!-- Tables Formatting -->\n\n\n<table></table>                                   <!-- Defines and contains all table related content -->\n<caption></caption>                               <!-- A description of what table is and what it contains -->\n<thead></thead>                                   <!-- The table headers contain the type of information defined in each column underneath -->\n<tbody></tbody>                                   <!-- Contains the tables data or information -->\n<tfoot></tfoot>                                   <!-- Defines table footer -->\n<tr></tr>                                         <!-- Contains the information to be included in a table row -->\n<th></th>                                         <!-- Contains the information to be included in a single table header -->\n<td></td>                                         <!-- Contains actual information in a table cell -->\n<colgroup></colgroup>                             <!-- Groups a single or multiple columns for formatting purposes -->\n<col>                                             <!-- Defines a single column of information inside a table -->\n\n\n<!-- Objects and iFrames -->\n\n\n<object data=\"\"></object>                         <!-- Describes and embed file type including audio, video, PDF's, images -->\n\n<!-- Supported attributes -->\ntype=\"\"                                           <!-- Describes the type of media embedded -->\nheight=\"\"                                         <!-- Describes the height of the object in pixels -->\nwidth=\"\"                                          <!-- Describes the width of the object in pixels -->\nusemap=\"\"                                         <!-- This is the name of the client-side image map in the object -->\n\n<iframe src=\"\" frameborder=\"0\"></iframe>          <!-- Contains an inline frame that allows to embed external information -->                    \n<embed src=\"\" type=\"\">                            <!-- Acts as a container for external application or plug-in -->\nsrc=\"\"                                            <!-- The source of the external file you're embedding -->\nwidth=\"\"                                          <!-- Describes the width of the iframe in pixels -->\n\n\n<!-- HTML5 New Tags -->\n\n\n<header></header>                                 <!-- Defines the header block for a document or a section -->\n<footer></footer>                                 <!-- Defines the footer block for a document or a section -->\n<main></main>                                     <!-- Describes the main content of a document --> \n<article></article>                               <!-- Identifies an article inside a document -->\n<aside></aside>                                   <!-- Specifies content contained in a document sidebar -->\n<section></section>                               <!-- Defines a section of a document -->\n<details></details>                               <!-- Describes additonal information that user can view or hide -->\n<dialog></dialog>                                 <!-- A dialog box or a window -->\n<figure></figure>                                 <!-- An independent content block featuring images, diagrams or illustrations -->\n<figcaption></figcaption>                         <!-- Caption that describe a figure -->\n<mark></mark>                                     <!-- Displays a portion of highlighted text with in a page content -->\n<nav></nav>                                       <!-- Navigation links for the user in a document -->\n<menuitem></menuitem>                             <!-- The specific menu item that a user can raise from a pop up menu -->\n<meter></meter>                                   <!-- Describes the scalar measurement with in a known array -->\n<progress></progress>                             <!-- Displays the progress of a task usually a progress bar -->\n<rp></rp>                                         <!-- Describes text within the browsers that do not support ruby notations -->\n<rt></rt>                                         <!-- Displays east asian typography character details -->\n<ruby></ruby>                                     <!-- Describes annotations for east asian typography -->\n<summary></summary>                               <!-- Contains a visible heading for details element -->\n<bdi></bdi>                                       <!-- Helps you format parts of text in a different direction than other text -->\n<time></time>                                     <!-- Identifies the time and date -->\n<wbr>                                             <!-- A line break within the content -->\n\n<!-- Some other useful tags -->\n\n<canvas></canvas>                                 <!-- Allows to draw 2D shapes on the web page with the help of javascript -->\n<map></map>                                       <!-- Specifies an image map -->\n\n<!-- Collective Character Obejcts -->\n\n\n&#34; &quot; Quotation Marks - \"\n&#38; &amp; Ampersand - &\n&#60; &lt; Less than sign - <\n&#62; &gt; Greater than sign - >\n&#160; &nbsp; Non-breaking space \n&#169; &copy; Copyright Symbol - ©\n&#64; &Uuml; @ symbol - @\n&#149; &ouml; Small bullet - .\n&#153; &ucirc; Trademark Symbol - ™\n"
  },
  {
    "path": "frontend/react.js",
    "content": "/* *******************************************************************************************\n * REACT.JS CHEATSHEET\n * DOCUMENTATION: https://reactjs.org/docs/\n * FILE STRUCTURE: https://reactjs.org/docs/faq-structure.html\n * ******************************************************************************************* */\n\n\n```\nnpm install --save react       // declarative and flexible JavaScript library for building UI\nnpm install --save react-dom   // serves as the entry point of the DOM-related rendering paths\nnpm install --save prop-types  // runtime type checking for React props and similar objects\n```\n\n// notes: don't forget the command lines\n\n\n/* *******************************************************************************************\n * REACT\n * https://reactjs.org/docs/react-api.html\n * ******************************************************************************************* */\n\n\n// Create and return a new React element of the given type.\n// Code written with JSX will be converted to use React.createElement().\n// You will not typically invoke React.createElement() directly if you are using JSX.\nReact.createElement(\n  type,\n  [props],\n  [...children]\n)\n\n// Clone and return a new React element using element as the starting point.\n// The resulting element will have the original element’s props with the new props merged in shallowly.\nReact.cloneElement(\n  element,\n  [props],\n  [...children]\n)\n\n// Verifies the object is a React element. Returns true or false.\nReact.isValidElement(object)\n\nReact.Children  // provides utilities for dealing with the this.props.children opaque data structure.\n\n// Invokes a function on every immediate child contained within children with this set to thisArg.\nReact.Children.map(children, function[(thisArg)])\n\n// Like React.Children.map() but does not return an array.\nReact.Children.forEach(children, function[(thisArg)])\n\n// Returns the total number of components in children,\n// equal to the number of times that a callback passed to map or forEach would be invoked.\nReact.Children.count(children)\n\n// Verifies that children has only one child (a React element) and returns it.\n// Otherwise this method throws an error.\nReact.Children.only(children)\n\n// Returns the children opaque data structure as a flat array with keys assigned to each child.\n// Useful if you want to manipulate collections of children in your render methods,\n// especially if you want to reorder or slice this.props.children before passing it down.\nReact.Children.toArray(children)\n\n// The React.Fragment component lets you return multiple elements in a render() method without creating an additional DOM element\n// You can also use it with the shorthand <></> syntax.\nReact.Fragment\n\n\n/* *******************************************************************************************\n * REACT.COMPONENT\n * React.Component is an abstract base class, so it rarely makes sense to refer to React.Component\n * directly. Instead, you will typically subclass it, and define at least a render() method.\n * https://reactjs.org/docs/react-component.html\n * ******************************************************************************************* */\n\n\nclass Component extends React.Component {\n  // Will be called before it is mounted\n  constructor(props) {\n    // Call this method before any other statement\n    // or this.props will be undefined in the constructor\n    super(props);\n\n    // The constructor is also often used to bind event handlers to the class instance.\n    // Binding makes sure the method has access to component attributes like this.props and this.state\n    this.method = this.method.bind(this);\n\n    // The constructor is the right place to initialize state. \n    this.state = {\n      active: true,\n\n      // In rare cases, it’s okay to initialize state based on props.\n      // This effectively “forks” the props and sets the state with the initial props.\n      // If you “fork” props by using them for state, you might also want to implement componentWillReceiveProps(nextProps)\n      // to keep the state up-to-date with them. But lifting state up is often easier and less bug-prone.\n      color: props.initialColor\n    };\n  }\n\n  // Enqueues changes to the component state and\n  // tells React that this component and its children need to be re-rendered with the updated state.\n  // setState() does not always immediately update the component. It may batch or defer the update until later.\n  // This makes reading this.state right after calling setState() a potential pitfall.\n  // Instead, use componentDidUpdate or a setState callback.\n  // You may optionally pass an object as the first argument to setState() instead of a function.\n  setState(updater[, callback]) { }\n\n  // Invoked just before mounting occurs (before render())\n  // This is the only lifecycle hook called on server rendering.\n  componentWillMount() { }\n\n  // Invoked immediately after a component is mounted.\n  // Initialization that requires DOM nodes should go here.\n  // If you need to load data from a remote endpoint, this is a good place to instantiate the network request.\n  // This method is a good place to set up any subscriptions. If you do that, don’t forget to unsubscribe in componentWillUnmount().\n  componentDidMount() { }\n\n  // Invoked before a mounted component receives new props.\n  // If you need to update the state in response to prop changes (for example, to reset it),\n  // you may compare this.props and nextProps and perform state transitions using this.setState() in this method.\n  componentWillReceiveProps(nextProps) { }\n\n  // Let React know if a component’s output is not affected by the current change in state or props.\n  // The default behavior is to re-render on every state change, and in the vast majority of cases you should rely on the default behavior.\n  // shouldComponentUpdate() is invoked before rendering when new props or state are being received. Defaults to true.\n  // This method is not called for the initial render or when forceUpdate() is used.\n  // Returning false does not prevent child components from re-rendering when their state changes.\n  shouldComponentUpdate(nextProps, nextState) { }\n\n  // Invoked just before rendering when new props or state are being received.\n  // Use this as an opportunity to perform preparation before an update occurs. This method is not called for the initial render.\n  // Note that you cannot call this.setState() here; nor should you do anything else\n  // (e.g. dispatch a Redux action) that would trigger an update to a React component before componentWillUpdate() returns.\n  // If you need to update state in response to props changes, use componentWillReceiveProps() instead.\n  componentWillUpdate(nextProps, nextState) { }\n\n  // Invoked immediately after updating occurs. This method is not called for the initial render.\n  // Use this as an opportunity to operate on the DOM when the component has been updated.\n  // This is also a good place to do network requests as long as you compare the current props to previous props (e.g. a network request may not be necessary if the props have not changed).\n  componentDidUpdate(prevProps, prevState) { }\n\n  // Invoked immediately before a component is unmounted and destroyed.\n  // Perform any necessary cleanup in this method, such as invalidating timers, canceling network requests,\n  // or cleaning up any subscriptions that were created in componentDidMount().\n  componentWillUnmount() { }\n\n  // Error boundaries are React components that catch JavaScript errors anywhere in their child component tree,\n  // log those errors, and display a fallback UI instead of the component tree that crashed.\n  // Error boundaries catch errors during rendering, in lifecycle methods, and in constructors of the whole tree below them.\n  componentDidCatch() { }\n\n  // This method is required.\n  // It should be pure, meaning that it does not modify component state,\n  // it returns the same result each time it’s invoked, and\n  // it does not directly interact with the browser (use lifecycle methods for this)\n  // It must return one of the following types: react elements, string and numbers, portals, null or booleans.\n  render() {\n    // Contains the props that were defined by the caller of this component.\n    console.log(this.props);\n\n    // Contains data specific to this component that may change over time.\n    // The state is user-defined, and it should be a plain JavaScript object.\n    // If you don’t use it in render(), it shouldn’t be in the state.\n    // For example, you can put timer IDs directly on the instance.\n    // Never mutate this.state directly, as calling setState() afterwards may replace the mutation you made.\n    // Treat this.state as if it were immutable.\n    console.log(this.state);\n\n    return (\n      <div>\n        {/* Comment goes here */}\n        Hello, {this.props.name}!\n      </div>\n    );\n  }\n}\n\n// Can be defined as a property on the component class itself, to set the default props for the class.\n// This is used for undefined props, but not for null props.\nComponent.defaultProps = {\n  color: 'blue'\n};\n\ncomponent = new Component();\n\n// By default, when your component’s state or props change, your component will re-render.\n// If your render() method depends on some other data, you can tell React that the component needs re-rendering by calling forceUpdate().\n// Normally you should try to avoid all uses of forceUpdate() and only read from this.props and this.state in render().\ncomponent.forceUpdate(callback)\n\n\n/* *******************************************************************************************\n * REACT.DOM\n * The react-dom package provides DOM-specific methods that can be used at the top level of\n * your app and as an escape hatch to get outside of the React model if you need to.\n * Most of your components should not need to use this module.\n * https://reactjs.org/docs/react-dom.html\n * ******************************************************************************************* */\n\n\n// Render a React element into the DOM in the supplied container and return a reference\n// to the component (or returns null for stateless components).\nReactDOM.render(element, container[, callback])\n\n// Same as render(), but is used to hydrate a container whose HTML contents were rendered\n// by ReactDOMServer. React will attempt to attach event listeners to the existing markup.\nReactDOM.hydrate(element, container[, callback])\n\n// Remove a mounted React component from the DOM and clean up its event handlers and state.\n// If no component was mounted in the container, calling this function does nothing.\n// Returns true if a component was unmounted and false if there was no component to unmount.\nReactDOM.unmountComponentAtNode(container)\n\n// If this component has been mounted into the DOM, this returns the corresponding native browser\n// DOM element. This method is useful for reading values out of the DOM, such as form field values\n// and performing DOM measurements. In most cases, you can attach a ref to the DOM node and avoid\n// using findDOMNode at all.\nReactDOM.findDOMNode(component)\n\n// Creates a portal. Portals provide a way to render children into a DOM node that exists outside\n// the hierarchy of the DOM component.\nReactDOM.createPortal(child, container)\n\n\n/* *******************************************************************************************\n * REACTDOMSERVER\n * The ReactDOMServer object enables you to render components to static markup.\n * https://reactjs.org/docs/react-dom.html\n * ******************************************************************************************* */\n\n\n// Render a React element to its initial HTML. React will return an HTML string.\n// You can use this method to generate HTML on the server and send the markup down on the initial\n// request for faster page loads and to allow search engines to crawl your pages for SEO purposes.\nReactDOMServer.renderToString(element)\n\n// Similar to renderToString, except this doesn’t create extra DOM attributes that React uses\n// internally, such as data-reactroot. This is useful if you want to use React as a simple static\n// page generator, as stripping away the extra attributes can save some bytes.\nReactDOMServer.renderToStaticMarkup(element)\n\n// Render a React element to its initial HTML. Returns a Readable stream that outputs an HTML string.\n// The HTML output by this stream is exactly equal to what ReactDOMServer.renderToString would return.\n// You can use this method to generate HTML on the server and send the markup down on the initial\n// request for faster page loads and to allow search engines to crawl your pages for SEO purposes.\nReactDOMServer.renderToNodeStream(element)\n\n// Similar to renderToNodeStream, except this doesn’t create extra DOM attributes that React uses\n// internally, such as data-reactroot. This is useful if you want to use React as a simple static\n// page generator, as stripping away the extra attributes can save some bytes.\nReactDOMServer.renderToStaticNodeStream(element)\n\n\n/* *******************************************************************************************\n * TYPECHECKING WITH PROPTYPES\n * https://reactjs.org/docs/typechecking-with-proptypes.html\n * ******************************************************************************************* */\n\n\nimport PropTypes from 'prop-types';\n\nMyComponent.propTypes = {\n  // You can declare that a prop is a specific JS type. By default, these\n  // are all optional.\n  optionalArray: PropTypes.array,\n  optionalBool: PropTypes.bool,\n  optionalFunc: PropTypes.func,\n  optionalNumber: PropTypes.number,\n  optionalObject: PropTypes.object,\n  optionalString: PropTypes.string,\n  optionalSymbol: PropTypes.symbol,\n\n  // Anything that can be rendered: numbers, strings, elements or an array\n  // (or fragment) containing these types.\n  optionalNode: PropTypes.node,\n\n  // A React element.\n  optionalElement: PropTypes.element,\n\n  // You can also declare that a prop is an instance of a class. This uses\n  // JS's instanceof operator.\n  optionalMessage: PropTypes.instanceOf(Message),\n\n  // You can ensure that your prop is limited to specific values by treating\n  // it as an enum.\n  optionalEnum: PropTypes.oneOf(['News', 'Photos']),\n\n  // An object that could be one of many types\n  optionalUnion: PropTypes.oneOfType([\n    PropTypes.string,\n    PropTypes.number,\n    PropTypes.instanceOf(Message)\n  ]),\n\n  // An array of a certain type\n  optionalArrayOf: PropTypes.arrayOf(PropTypes.number),\n\n  // An object with property values of a certain type\n  optionalObjectOf: PropTypes.objectOf(PropTypes.number),\n\n  // An object taking on a particular shape\n  optionalObjectWithShape: PropTypes.shape({\n    color: PropTypes.string,\n    fontSize: PropTypes.number\n  }),\n\n  // You can chain any of the above with `isRequired` to make sure a warning\n  // is shown if the prop isn't provided.\n  requiredFunc: PropTypes.func.isRequired,\n\n  // A value of any data type\n  requiredAny: PropTypes.any.isRequired,\n\n  // You can also specify a custom validator. It should return an Error\n  // object if the validation fails. Don't `console.warn` or throw, as this\n  // won't work inside `oneOfType`.\n  customProp: function(props, propName, componentName) {\n    if (!/matchme/.test(props[propName])) {\n      return new Error(\n        'Invalid prop `' + propName + '` supplied to' +\n        ' `' + componentName + '`. Validation failed.'\n      );\n    }\n  },\n\n  // You can also supply a custom validator to `arrayOf` and `objectOf`.\n  // It should return an Error object if the validation fails. The validator\n  // will be called for each key in the array or object. The first two\n  // arguments of the validator are the array or object itself, and the\n  // current item's key.\n  customArrayProp: PropTypes.arrayOf(function(propValue, key, componentName, location, propFullName) {\n    if (!/matchme/.test(propValue[key])) {\n      return new Error(\n        'Invalid prop `' + propFullName + '` supplied to' +\n        ' `' + componentName + '`. Validation failed.'\n      );\n    }\n  })\n};\n"
  },
  {
    "path": "frontend/tailwind.css",
    "content": "/* *******************************************************************************************\n * TAILWIND.CSS\n * DOCUMENTATION: https://tailwindcss.com/\n * ******************************************************************************************* */\n\n/*\n * Available breakpoints\n * --------------------\n * sm: min-width: 640px;\n * md: min-width: 768px;\n * lg: min-width: 1024px;\n * xl: min-width: 1280px;\n */\n\n/* *******************************************************************************************\n* LAYOUT\n* ******************************************************************************************* */\n\n/*\n * Container\n * --------------------\n * A component for fixing an element's width to the current breakpoint.\n */\n\n .container\n\n/*\n * Box-sizing\n * --------------------\n * Utilities for controlling how the browser should calculate an element's total size.\n * By default, only responsive variants are generated for box-sizing utilities.\n */\n \n .box-border   /* box-sizing: border-box; */\n .box-content  /* box-sizing: content-box; */\n \n/*\n * Display\n * --------------------\n * Utilities for controlling the display box type of an element.\n * By default, only responsive variants are generated for display utilities.\n */\n \n .hidden              /* display: none; */\n .block               /* display: block; */\n .inline-block        /* display: inline-block; */\n .inline              /* display: inline; */\n .flex                /* display: flex; */\n .inline-flex         /* display: inline-flex; */\n .grid                /* display: grid; */\n .table               /* display: table; */\n .table-caption       /* display: table-caption; */\n .table-cell          /* display: table-cell; */\n .table-column        /* display: table-column; */\n .table-column-group  /* display: table-column-group; */\n .table-footer-group  /* display: table-footer-group; */\n .table-header-group  /* display: table-header-group; */\n .table-row-group     /* display: table-row-group; */\n .table-row           /* display: table-row; */\n \n/*\n * Floats\n * --------------------\n * Utilities for controlling the wrapping of content around an element.\n * By default, only responsive variants are generated for float utilities.\n */\n \n .float-right  /* float: right; */\n .float-left   /* float: left; */\n .float-none   /* float: none; */\n .clearfix     /* &::after { content: \"\"; display: table; clear: both; } */\n \n/*\n * Clear\n * --------------------\n * Utilities for controlling the wrapping of content around an element.\n * By default, only responsive variants are generated for clear utilities.\n */\n \n .clear-left   /* clear: left; */\n .clear-right  /* clear: right; */\n .clear-both   /* clear: both; */\n \n/*\n * Object Fit\n * --------------------\n * Utilities for controlling how a replaced element's content should be resized.\n * By default, only responsive variants are generated for object-fit utilities.\n */\n \n .object-contain     /* object-fit: contain; */\n .object-cover       /* object-fit: cover; */\n .object-fill        /* object-fit: fill; */\n .object-none        /* object-fit: none; */\n .object-scale-down  /* object-fit: scale-down; */\n \n/*\n * Object Position\n * --------------------\n * Utilities for controlling how a replaced element's content should be positioned within its container.\n * By default, only responsive variants are generated for object position utilities.\n */\n \n.object-bottom        /* object-position: bottom; */\n.object-center        /* object-position: center; */\n.object-left          /* object-position: left; */\n.object-left-bottom   /* object-position: left bottom; */\n.object-left-top      /* object-position: left top; */\n.object-right         /* object-position: right; */\n.object-right-bottom  /* object-position: right bottom; */\n.object-right-top     /* object-position: right top; */\n.object-top           /* object-position: top; */\n \n/*\n * Overflow\n * --------------------\n * Utilities for controlling how an element handles content that is too large for the container.\n * By default, only responsive variants are generated for overflow utilities.\n */\n \n.overflow-auto       /* overflow: auto; */\n.overflow-hidden     /* overflow: hidden; */\n.overflow-visible    /* overflow: visible; */\n.overflow-scroll     /* overflow: scroll; */\n.overflow-x-auto     /* overflow-x: auto; */\n.overflow-y-auto     /* overflow-y: auto; */\n.overflow-x-hidden   /* overflow-x: hidden; */\n.overflow-y-hidden   /* overflow-y: hidden; */\n.overflow-x-visible  /* overflow-x: visible; */\n.overflow-y-visible  /* overflow-y: visible; */\n.overflow-x-scroll   /* overflow-x: scroll; */\n.overflow-y-scroll   /* overflow-y: scroll; */\n.scrolling-touch     /* -webkit-overflow-scrolling: touch; */\n.scrolling-auto      /* -webkit-overflow-scrolling: auto; */\n \n/*\n * Position\n * --------------------\n * Utilities for controlling how an element is positioned in the DOM.\n * By default, only responsive variants are generated for position utilities.\n */\n\n.static    /* position: static; */\n.fixed     /* position: fixed; */\n.absolute  /* position: absolute; */\n.relative  /* position: relative; */\n.sticky    /* position: sticky; */\n\n/*\n * Top / Right / Bottom / Left\n * --------------------\n * Utilities for controlling the placement of positioned elements.\n * By default, only responsive variants are generated for top, right, bottom, left, and inset utilities.\n */\n\n.inset-0       /* top: 0; right: 0; bottom: 0; left: 0; */\n.inset-y-0     /* top: 0; bottom: 0; */\n.inset-x-0     /* right: 0; left: 0; */\n.top-0         /* top: 0; */\n.right-0       /* right: 0; */\n.bottom-0      /* bottom: 0; */\n.left-0        /* left: 0; */\n.inset-auto    /* top: auto; right: auto; bottom: auto; left: auto; */\n.inset-y-auto  /* top: auto; bottom: auto; */\n.inset-x-auto  /* left: auto; right: auto; */\n.top-auto      /* top: auto; */\n.bottom-auto   /* bottom: auto; */\n.left-auto     /* left: auto; */\n.right-auto    /* right: auto; */\n\n/*\n * Visibility\n * --------------------\n * Utilities for controlling the visibility of an element.\n * By default, only responsive variants are generated for visibility utilities.\n */\n\n.visible    /* visibility: visible; */\n.invisible  /* visibility: hidden; */\n\n/*\n * Z-Index\n * --------------------\n * Utilities for controlling the stack order of an element.\n * By default, only responsive variants are generated for z-index utilities.\n */\n\n.z-0     /* z-index: 0; */\n.z-10    /* z-index: 10; */\n.z-20    /* z-index: 20; */\n.z-30    /* z-index: 30; */\n.z-40    /* z-index: 40; */\n.z-50    /* z-index: 50; */\n.z-auto  /* z-index: auto; */\n\n/* *******************************************************************************************\n * FLEXBOX\n * ******************************************************************************************* */\n\n.flex                /* display: flex; */\n.inline-flex         /* display: inline-flex; */\n\n/*\n * Flex Direction\n * --------------------\n * Utilities for controlling the direction of flex items.\n * By default, only responsive variants are generated for flex-direction utilities.\n */\n\n.flex-row          /* flex-direction: row; */\n.flex-row-reverse  /* flex-direction: row-reverse; */\n.flex-col          /* flex-direction: column; */\n.flex-col-reverse  /* flex-direction: column-reverse; */\n\n/*\n * Flex Wrap\n * --------------------\n * Utilities for controlling how flex items wrap.\n * By default, only responsive variants are generated for flex-wrap utilities.\n */\n\n.flex-no-wrap       /* flex-wrap: nowrap; */\n.flex-wrap          /* flex-wrap: wrap; */\n.flex-wrap-reverse  /* flex-wrap: wrap-reverse; */\n\n/*\n * Align Items\n * --------------------\n * Utilities for controlling how flex items are positioned along a container's cross axis.\n * By default, only responsive variants are generated for align-items utilities.\n */\n\n.items-stretch   /* align-items: stretch; */\n.items-start     /* align-items: flex-start; */\n.items-center    /* align-items: center; */\n.items-end       /* align-items: flex-end; */\n.items-baseline  /* align-items: baseline; */\n\n/*\n * Align Content\n * --------------------\n * Utilities for controlling how lines are positioned in multi-line flex containers.\n * By default, only responsive variants are generated for align-content utilities.\n */\n\n.content-start    /* align-content: flex-start; */\n.content-center   /* align-content: center; */\n.content-end      /* align-content: flex-end; */\n.content-between  /* align-content: space-between; */\n.content-around   /* align-content: space-around; */\n\n/*\n * Align Self\n * --------------------\n * Utilities for controlling how an individual flex item is positioned along its container's cross axis.\n * By default, only responsive variants are generated for align-self utilities.\n */\n\n.self-auto     /* align-self: auto; */\n.self-start    /* align-self: flex-start; */\n.self-center   /* align-self: center; */\n.self-end      /* align-self: flex-end; */\n.self-stretch  /* align-self: stretch; */\n\n/*\n * Justify Content\n * --------------------\n * Utilities for controlling how flex items are positioned along a container's main axis.\n * By default, only responsive variants are generated for justify-content utilities.\n */\n\n.justify-start    /* justify-content: flex-start; */\n.justify-center   /* justify-content: center; */\n.justify-end      /* justify-content: flex-end; */\n.justify-between  /* justify-content: space-between; */\n.justify-around   /* justify-content: space-around; */\n\n/*\n * Flex\n * --------------------\n * Utilities for controlling how flex items both grow and shrink.\n * By default, only responsive variants are generated for flex utilities.\n */\n\n.flex-initial  /* flex: 0 1 auto; */\n.flex-1        /* flex: 1 1 0%; */\n.flex-auto     /* flex: 1 1 auto; */\n.flex-none     /* flex: none; */\n\n/*\n * Flex Grow\n * --------------------\n * Utilities for controlling how flex items grow.\n * By default, only responsive variants are generated for flex grow utilities.\n */\n\n.flex-grow    /* flex-grow: 1; */\n.flex-grow-0  /* flex-grow: 0; */\n\n/*\n * Flex Shrink\n * --------------------\n * Utilities for controlling how flex items shrink.\n * By default, only responsive variants are generated for flex shrink utilities.\n */\n\n.flex-shrink    /* flex-shrink: 1; */\n.flex-shrink-0  /* flex-shrink: 0; */\n\n/*\n * Order\n * --------------------\n * Utilities for controlling the order of flex items.\n * By default, only responsive variants are generated for order utilities.\n */\n\n.order-first  /* order: -9999; */\n.order-last   /* order: 9999; */\n.order-none   /* order: 0; */\n.order-1      /* order: 1; */\n.order-2      /* order: 2; */\n.order-3      /* order: 3; */\n.order-4      /* order: 4; */\n.order-5      /* order: 5; */\n.order-6      /* order: 6; */\n.order-7      /* order: 7; */\n.order-8      /* order: 8; */\n.order-9      /* order: 9; */\n.order-10     /* order: 10; */\n.order-11     /* order: 11; */\n.order-12     /* order: 12; */\n\n/* *******************************************************************************************\n * GRID\n * ******************************************************************************************* */\n\n.grid  /* display: grid; */\n\n/*\n * Grid Template Columns\n * --------------------\n * Utilities for specifying the columns in a grid layout.\n * By default, only responsive variants are generated for grid-template-columns utilities.\n */\n\n.grid-cols-1     /* grid-template-columns: repeat(1, minmax(0, 1fr)); */\n.grid-cols-2     /* grid-template-columns: repeat(2, minmax(0, 1fr)); */\n.grid-cols-3     /* grid-template-columns: repeat(3, minmax(0, 1fr)); */\n.grid-cols-4     /* grid-template-columns: repeat(4, minmax(0, 1fr)); */\n.grid-cols-5     /* grid-template-columns: repeat(5, minmax(0, 1fr)); */\n.grid-cols-6     /* grid-template-columns: repeat(6, minmax(0, 1fr)); */\n.grid-cols-7     /* grid-template-columns: repeat(7, minmax(0, 1fr)); */\n.grid-cols-8     /* grid-template-columns: repeat(8, minmax(0, 1fr)); */\n.grid-cols-9     /* grid-template-columns: repeat(9, minmax(0, 1fr)); */\n.grid-cols-10    /* grid-template-columns: repeat(10, minmax(0, 1fr)); */\n.grid-cols-11    /* grid-template-columns: repeat(11, minmax(0, 1fr)); */\n.grid-cols-12    /* grid-template-columns: repeat(12, minmax(0, 1fr)); */\n.grid-cols-none  /* grid-template-columns: none; */\n\n/*\n * Grid Column Start / End\n * --------------------\n * Utilities for controlling how elements are sized and placed across grid columns.\n * By default, only responsive variants are generated for grid-column utilities.\n */\n\n.col-auto        /* grid-column: auto; */\n.col-span-1      /* grid-column: span 1 / span 1; */\n.col-span-2      /* grid-column: span 2 / span 2; */\n.col-span-3      /* grid-column: span 3 / span 3; */\n.col-span-4      /* grid-column: span 4 / span 4; */\n.col-span-5      /* grid-column: span 5 / span 5; */\n.col-span-6      /* grid-column: span 6 / span 6; */\n.col-span-7      /* grid-column: span 7 / span 7; */\n.col-span-8      /* grid-column: span 8 / span 8; */\n.col-span-9      /* grid-column: span 9 / span 9; */\n.col-span-10     /* grid-column: span 10 / span 10; */\n.col-span-11     /* grid-column: span 11 / span 11; */\n.col-span-12     /* grid-column: span 12 / span 12; */\n.col-start-1     /* grid-column-start: 1; */\n.col-start-2     /* grid-column-start: 2; */\n.col-start-3     /* grid-column-start: 3; */\n.col-start-4     /* grid-column-start: 4; */\n.col-start-5     /* grid-column-start: 5; */\n.col-start-6     /* grid-column-start: 6; */\n.col-start-7     /* grid-column-start: 7; */\n.col-start-8     /* grid-column-start: 8; */\n.col-start-9     /* grid-column-start: 9; */\n.col-start-10    /* grid-column-start: 10; */\n.col-start-11    /* grid-column-start: 11; */\n.col-start-12    /* grid-column-start: 12; */\n.col-start-13    /* grid-column-start: 13; */\n.col-start-auto  /* grid-column-start: auto; */\n.col-end-1       /* grid-column-end: 1; */\n.col-end-2       /* grid-column-end: 2; */\n.col-end-3       /* grid-column-end: 3; */\n.col-end-4       /* grid-column-end: 4; */\n.col-end-5       /* grid-column-end: 5; */\n.col-end-6       /* grid-column-end: 6; */\n.col-end-7       /* grid-column-end: 7; */\n.col-end-8       /* grid-column-end: 8; */\n.col-end-9       /* grid-column-end: 9; */\n.col-end-10      /* grid-column-end: 10; */\n.col-end-11      /* grid-column-end: 11; */\n.col-end-12      /* grid-column-end: 12; */\n.col-end-13      /* grid-column-end: 13; */\n.col-end-auto    /* grid-column-end: auto; */\n\n/*\n * Grid Template Rows\n * --------------------\n * Utilities for specifying the rows in a grid layout.\n * By default, only responsive variants are generated for grid-template-rows utilities.\n */\n\n.grid-rows-1     /* grid-template-rows: repeat(1, minmax(0, 1fr)); */\n.grid-rows-2     /* grid-template-rows: repeat(2, minmax(0, 1fr)); */\n.grid-rows-3     /* grid-template-rows: repeat(3, minmax(0, 1fr)); */\n.grid-rows-4     /* grid-template-rows: repeat(4, minmax(0, 1fr)); */\n.grid-rows-5     /* grid-template-rows: repeat(5, minmax(0, 1fr)); */\n.grid-rows-6     /* grid-template-rows: repeat(6, minmax(0, 1fr)); */\n.grid-rows-none  /* grid-template-rows: none; */\n\n/*\n * Grid Row Start / End\n * --------------------\n * Utilities for controlling how elements are sized and placed across grid rows.\n * By default, only responsive variants are generated for grid-row utilities.\n */\n\n.row-auto        /* grid-row: auto; */\n.row-span-1      /* grid-row: span 1 / span 1; */\n.row-span-2      /* grid-row: span 2 / span 2; */\n.row-span-3      /* grid-row: span 3 / span 3; */\n.row-span-4      /* grid-row: span 4 / span 4; */\n.row-span-5      /* grid-row: span 5 / span 5; */\n.row-span-6      /* grid-row: span 6 / span 6; */\n.row-start-1     /* grid-row-start: 1; */\n.row-start-2     /* grid-row-start: 2; */\n.row-start-3     /* grid-row-start: 3; */\n.row-start-4     /* grid-row-start: 4; */\n.row-start-5     /* grid-row-start: 5; */\n.row-start-6     /* grid-row-start: 6; */\n.row-start-7     /* grid-row-start: 7; */\n.row-start-auto  /* grid-row-start: auto; */\n.row-end-1       /* grid-row-end: 1; */\n.row-end-2       /* grid-row-end: 2; */\n.row-end-3       /* grid-row-end: 3; */\n.row-end-4       /* grid-row-end: 4; */\n.row-end-5       /* grid-row-end: 5; */\n.row-end-6       /* grid-row-end: 6; */\n.row-end-7       /* grid-row-end: 7; */\n.row-end-auto    /* grid-row-end: auto; */\n\n/*\n * Gap\n * --------------------\n * Utilities for controlling gutters between grid rows and columns.\n * By default, no responsive, hover, focus, active, or group-hover variants are generated for gap utilities.\n */\n\n.gap-0       /* gap: 0; */\n.gap-1       /* gap: 0.25rem; */\n.gap-2       /* gap: 0.5rem; */\n.gap-3       /* gap: 0.75rem; */\n.gap-4       /* gap: 1rem; */\n.gap-5       /* gap: 1.25rem; */\n.gap-6       /* gap: 1.5rem; */\n.gap-8       /* gap: 2rem; */\n.gap-10      /* gap: 2.5rem; */\n.gap-12      /* gap: 3rem; */\n.gap-16      /* gap: 4rem; */\n.gap-20      /* gap: 5rem; */\n.gap-24      /* gap: 6rem; */\n.gap-32      /* gap: 8rem; */\n.gap-40      /* gap: 10rem; */\n.gap-48      /* gap: 12rem; */\n.gap-56      /* gap: 14rem; */\n.gap-64      /* gap: 16rem; */\n.gap-px      /* gap: 1px; */\n.row-gap-0   /* row-gap: 0; */\n.row-gap-1   /* row-gap: 0.25rem; */\n.row-gap-2   /* row-gap: 0.5rem; */\n.row-gap-3   /* row-gap: 0.75rem; */\n.row-gap-4   /* row-gap: 1rem; */\n.row-gap-5   /* row-gap: 1.25rem; */\n.row-gap-6   /* row-gap: 1.5rem; */\n.row-gap-8   /* row-gap: 2rem; */\n.row-gap-10  /* row-gap: 2.5rem; */\n.row-gap-12  /* row-gap: 3rem; */\n.row-gap-16  /* row-gap: 4rem; */\n.row-gap-20  /* row-gap: 5rem; */\n.row-gap-24  /* row-gap: 6rem; */\n.row-gap-32  /* row-gap: 8rem; */\n.row-gap-40  /* row-gap: 10rem; */\n.row-gap-48  /* row-gap: 12rem; */\n.row-gap-56  /* row-gap: 14rem; */\n.row-gap-64  /* row-gap: 16rem; */\n.row-gap-px  /* row-gap: 1px; */\n.col-gap-0   /* column-gap: 0; */\n.col-gap-1   /* column-gap: 0.25rem; */\n.col-gap-2   /* column-gap: 0.5rem; */\n.col-gap-3   /* column-gap: 0.75rem; */\n.col-gap-4   /* column-gap: 1rem; */\n.col-gap-5   /* column-gap: 1.25rem; */\n.col-gap-6   /* column-gap: 1.5rem; */\n.col-gap-8   /* column-gap: 2rem; */\n.col-gap-10  /* column-gap: 2.5rem; */\n.col-gap-12  /* column-gap: 3rem; */\n.col-gap-16  /* column-gap: 4rem; */\n.col-gap-20  /* column-gap: 5rem; */\n.col-gap-24  /* column-gap: 6rem; */\n.col-gap-32  /* column-gap: 8rem; */\n.col-gap-40  /* column-gap: 10rem; */\n.col-gap-48  /* column-gap: 12rem; */\n.col-gap-56  /* column-gap: 14rem; */\n.col-gap-64  /* column-gap: 16rem; */\n.col-gap-px  /* column-gap: 1px; */\n\n/*\n * Grid Auto Flow\n * --------------------\n * Utilities for controlling how elements in a grid are auto-placed.\n * By default, only responsive variants are generated for grid-auto-flow utilities.\n */\n\n.grid-flow-row        /* grid-auto-flow: row; */\n.grid-flow-col        /* grid-auto-flow: column; */\n.grid-flow-row-dense  /* grid-auto-flow: row dense; */\n.grid-flow-col-dense  /* grid-auto-flow: column dense; */\n\n/* *******************************************************************************************\n * SPACING\n * ******************************************************************************************* */\n \n/*\n * Padding\n * --------------------\n * Utilities for controlling an element's padding.\n * By default, only responsive variants are generated for padding utilities.\n */\n\n.p-0    /* padding: 0; */\n.p-1    /* padding: 0.25rem; */\n.p-2    /* padding: 0.5rem; */\n.p-3    /* padding: 0.75rem; */\n.p-4    /* padding: 1rem; */\n.p-5    /* padding: 1.25rem; */\n.p-6    /* padding: 1.5rem; */\n.p-8    /* padding: 2rem; */\n.p-10   /* padding: 2.5rem; */\n.p-12   /* padding: 3rem; */\n.p-16   /* padding: 4rem; */\n.p-20   /* padding: 5rem; */\n.p-24   /* padding: 6rem; */\n.p-32   /* padding: 8rem; */\n.p-40   /* padding: 10rem; */\n.p-48   /* padding: 12rem; */\n.p-56   /* padding: 14rem; */\n.p-64   /* padding: 16rem; */\n.p-px   /* padding: 1px; */\n.py-0   /* padding-top: 0; padding-bottom: 0; */\n.py-1   /* padding-top: 0.25rem; padding-bottom: 0.25rem; */\n.py-2   /* padding-top: 0.5rem; padding-bottom: 0.5rem; */\n.py-3   /* padding-top: 0.75rem; padding-bottom: 0.75rem; */\n.py-4   /* padding-top: 1rem; padding-bottom: 1rem; */\n.py-5   /* padding-top: 1.25rem; padding-bottom: 1.25rem; */\n.py-6   /* padding-top: 1.5rem; padding-bottom: 1.5rem; */\n.py-8   /* padding-top: 2rem; padding-bottom: 2rem; */\n.py-10  /* padding-top: 2.5rem; padding-bottom: 2.5rem; */\n.py-12  /* padding-top: 3rem; padding-bottom: 3rem; */\n.py-16  /* padding-top: 4rem; padding-bottom: 4rem; */\n.py-20  /* padding-top: 5rem; padding-bottom: 5rem; */\n.py-24  /* padding-top: 6rem; padding-bottom: 6rem; */\n.py-32  /* padding-top: 8rem; padding-bottom: 8rem; */\n.py-40  /* padding-top: 10rem; padding-bottom: 10rem; */\n.py-48  /* padding-top: 12rem; padding-bottom: 12rem; */\n.py-56  /* padding-top: 14rem; padding-bottom: 14rem; */\n.py-64  /* padding-top: 16rem; padding-bottom: 16rem; */\n.py-px  /* padding-top: 1px; padding-bottom: 1px; */\n.px-0   /* padding-right: 0; padding-left: 0; */\n.px-1   /* padding-right: 0.25rem; padding-left: 0.25rem; */\n.px-2   /* padding-right: 0.5rem; padding-left: 0.5rem; */\n.px-3   /* padding-right: 0.75rem; padding-left: 0.75rem; */\n.px-4   /* padding-right: 1rem; padding-left: 1rem; */\n.px-5   /* padding-right: 1.25rem; padding-left: 1.25rem; */\n.px-6   /* padding-right: 1.5rem; padding-left: 1.5rem; */\n.px-8   /* padding-right: 2rem; padding-left: 2rem; */\n.px-10  /* padding-right: 2.5rem; padding-left: 2.5rem; */\n.px-12  /* padding-right: 3rem; padding-left: 3rem; */\n.px-16  /* padding-right: 4rem; padding-left: 4rem; */\n.px-20  /* padding-right: 5rem; padding-left: 5rem; */\n.px-24  /* padding-right: 6rem; padding-left: 6rem; */\n.px-32  /* padding-right: 8rem; padding-left: 8rem; */\n.px-40  /* padding-right: 10rem; padding-left: 10rem; */\n.px-48  /* padding-right: 12rem; padding-left: 12rem; */\n.px-56  /* padding-right: 14rem; padding-left: 14rem; */\n.px-64  /* padding-right: 16rem; padding-left: 16rem; */\n.px-px  /* padding-right: 1px; padding-left: 1px; */\n.pt-0   /* padding-top: 0; */\n.pt-1   /* padding-top: 0.25rem; */\n.pt-2   /* padding-top: 0.5rem; */\n.pt-3   /* padding-top: 0.75rem; */\n.pt-4   /* padding-top: 1rem; */\n.pt-5   /* padding-top: 1.25rem; */\n.pt-6   /* padding-top: 1.5rem; */\n.pt-8   /* padding-top: 2rem; */\n.pt-10  /* padding-top: 2.5rem; */\n.pt-12  /* padding-top: 3rem; */\n.pt-16  /* padding-top: 4rem; */\n.pt-20  /* padding-top: 5rem; */\n.pt-24  /* padding-top: 6rem; */\n.pt-32  /* padding-top: 8rem; */\n.pt-40  /* padding-top: 10rem; */\n.pt-48  /* padding-top: 12rem; */\n.pt-56  /* padding-top: 14rem; */\n.pt-64  /* padding-top: 16rem; */\n.pt-px  /* padding-top: 1px; */\n.pr-0   /* padding-right: 0; */\n.pr-1   /* padding-right: 0.25rem; */\n.pr-2   /* padding-right: 0.5rem; */\n.pr-3   /* padding-right: 0.75rem; */\n.pr-4   /* padding-right: 1rem; */\n.pr-5   /* padding-right: 1.25rem; */\n.pr-6   /* padding-right: 1.5rem; */\n.pr-8   /* padding-right: 2rem; */\n.pr-10  /* padding-right: 2.5rem; */\n.pr-12  /* padding-right: 3rem; */\n.pr-16  /* padding-right: 4rem; */\n.pr-20  /* padding-right: 5rem; */\n.pr-24  /* padding-right: 6rem; */\n.pr-32  /* padding-right: 8rem; */\n.pr-40  /* padding-right: 10rem; */\n.pr-48  /* padding-right: 12rem; */\n.pr-56  /* padding-right: 14rem; */\n.pr-64  /* padding-right: 16rem; */\n.pr-px  /* padding-right: 1px; */\n.pb-0   /* padding-bottom: 0; */\n.pb-1   /* padding-bottom: 0.25rem; */\n.pb-2   /* padding-bottom: 0.5rem; */\n.pb-3   /* padding-bottom: 0.75rem; */\n.pb-4   /* padding-bottom: 1rem; */\n.pb-5   /* padding-bottom: 1.25rem; */\n.pb-6   /* padding-bottom: 1.5rem; */\n.pb-8   /* padding-bottom: 2rem; */\n.pb-10  /* padding-bottom: 2.5rem; */\n.pb-12  /* padding-bottom: 3rem; */\n.pb-16  /* padding-bottom: 4rem; */\n.pb-20  /* padding-bottom: 5rem; */\n.pb-24  /* padding-bottom: 6rem; */\n.pb-32  /* padding-bottom: 8rem; */\n.pb-40  /* padding-bottom: 10rem; */\n.pb-48  /* padding-bottom: 12rem; */\n.pb-56  /* padding-bottom: 14rem; */\n.pb-64  /* padding-bottom: 16rem; */\n.pb-px  /* padding-bottom: 1px; */\n.pl-0   /* padding-left: 0; */\n.pl-1   /* padding-left: 0.25rem; */\n.pl-2   /* padding-left: 0.5rem; */\n.pl-3   /* padding-left: 0.75rem; */\n.pl-4   /* padding-left: 1rem; */\n.pl-5   /* padding-left: 1.25rem; */\n.pl-6   /* padding-left: 1.5rem; */\n.pl-8   /* padding-left: 2rem; */\n.pl-10  /* padding-left: 2.5rem; */\n.pl-12  /* padding-left: 3rem; */\n.pl-16  /* padding-left: 4rem; */\n.pl-20  /* padding-left: 5rem; */\n.pl-24  /* padding-left: 6rem; */\n.pl-32  /* padding-left: 8rem; */\n.pl-40  /* padding-left: 10rem; */\n.pl-48  /* padding-left: 12rem; */\n.pl-56  /* padding-left: 14rem; */\n.pl-64  /* padding-left: 16rem; */\n.pl-px  /* padding-left: 1px; */\n\n/*\n * Margin\n * --------------------\n * Utilities for controlling an element's margin.\n * By default, only responsive variants are generated for margin utilities.\n */\n\n.m-0      /* margin: 0; */\n.m-1      /* margin: 0.25rem; */\n.m-2      /* margin: 0.5rem; */\n.m-3      /* margin: 0.75rem; */\n.m-4      /* margin: 1rem; */\n.m-5      /* margin: 1.25rem; */\n.m-6      /* margin: 1.5rem; */\n.m-8      /* margin: 2rem; */\n.m-10     /* margin: 2.5rem; */\n.m-12     /* margin: 3rem; */\n.m-16     /* margin: 4rem; */\n.m-20     /* margin: 5rem; */\n.m-24     /* margin: 6rem; */\n.m-32     /* margin: 8rem; */\n.m-40     /* margin: 10rem; */\n.m-48     /* margin: 12rem; */\n.m-56     /* margin: 14rem; */\n.m-64     /* margin: 16rem; */\n.m-auto   /* margin: auto; */\n.m-px     /* margin: 1px; */\n.-m-1     /* margin: -0.25rem; */\n.-m-2     /* margin: -0.5rem; */\n.-m-3     /* margin: -0.75rem; */\n.-m-4     /* margin: -1rem; */\n.-m-5     /* margin: -1.25rem; */\n.-m-6     /* margin: -1.5rem; */\n.-m-8     /* margin: -2rem; */\n.-m-10    /* margin: -2.5rem; */\n.-m-12    /* margin: -3rem; */\n.-m-16    /* margin: -4rem; */\n.-m-20    /* margin: -5rem; */\n.-m-24    /* margin: -6rem; */\n.-m-32    /* margin: -8rem; */\n.-m-40    /* margin: -10rem; */\n.-m-48    /* margin: -12rem; */\n.-m-56    /* margin: -14rem; */\n.-m-64    /* margin: -16rem; */\n.-m-px    /* margin: -1px; */\n.my-0     /* margin-top: 0; margin-bottom: 0; */\n.my-1     /* margin-top: 0.25rem; margin-bottom: 0.25rem; */\n.my-2     /* margin-top: 0.5rem; margin-bottom: 0.5rem; */\n.my-3     /* margin-top: 0.75rem; margin-bottom: 0.75rem; */\n.my-4     /* margin-top: 1rem; margin-bottom: 1rem; */\n.my-5     /* margin-top: 1.25rem; margin-bottom: 1.25rem; */\n.my-6     /* margin-top: 1.5rem; margin-bottom: 1.5rem; */\n.my-8     /* margin-top: 2rem; margin-bottom: 2rem; */\n.my-10    /* margin-top: 2.5rem; margin-bottom: 2.5rem; */\n.my-12    /* margin-top: 3rem; margin-bottom: 3rem; */\n.my-16    /* margin-top: 4rem; margin-bottom: 4rem; */\n.my-20    /* margin-top: 5rem; margin-bottom: 5rem; */\n.my-24    /* margin-top: 6rem; margin-bottom: 6rem; */\n.my-32    /* margin-top: 8rem; margin-bottom: 8rem; */\n.my-40    /* margin-top: 10rem; margin-bottom: 10rem; */\n.my-48    /* margin-top: 12rem; margin-bottom: 12rem; */\n.my-56    /* margin-top: 14rem; margin-bottom: 14rem; */\n.my-64    /* margin-top: 16rem; margin-bottom: 16rem; */\n.my-auto  /* margin-top: auto; margin-bottom: auto; */\n.my-px    /* margin-top: 1px; margin-bottom: 1px; */\n.-my-1    /* margin-top: -0.25rem; margin-bottom: -0.25rem; */\n.-my-2    /* margin-top: -0.5rem; margin-bottom: -0.5rem; */\n.-my-3    /* margin-top: -0.75rem; margin-bottom: -0.75rem; */\n.-my-4    /* margin-top: -1rem; margin-bottom: -1rem; */\n.-my-5    /* margin-top: -1.25rem; margin-bottom: -1.25rem; */\n.-my-6    /* margin-top: -1.5rem; margin-bottom: -1.5rem; */\n.-my-8    /* margin-top: -2rem; margin-bottom: -2rem; */\n.-my-10   /* margin-top: -2.5rem; margin-bottom: -2.5rem; */\n.-my-12   /* margin-top: -3rem; margin-bottom: -3rem; */\n.-my-16   /* margin-top: -4rem; margin-bottom: -4rem; */\n.-my-20   /* margin-top: -5rem; margin-bottom: -5rem; */\n.-my-24   /* margin-top: -6rem; margin-bottom: -6rem; */\n.-my-32   /* margin-top: -8rem; margin-bottom: -8rem; */\n.-my-40   /* margin-top: -10rem; margin-bottom: -10rem; */\n.-my-48   /* margin-top: -12rem; margin-bottom: -12rem; */\n.-my-56   /* margin-top: -14rem; margin-bottom: -14rem; */\n.-my-64   /* margin-top: -16rem; margin-bottom: -16rem; */\n.-my-px   /* margin-top: -1px; margin-bottom: -1px; */\n.mx-0     /* margin-right: 0; margin-left: 0; */\n.mx-1     /* margin-right: 0.25rem; margin-left: 0.25rem; */\n.mx-2     /* margin-right: 0.5rem; margin-left: 0.5rem; */\n.mx-3     /* margin-right: 0.75rem; margin-left: 0.75rem; */\n.mx-4     /* margin-right: 1rem; margin-left: 1rem; */\n.mx-5     /* margin-right: 1.25rem; margin-left: 1.25rem; */\n.mx-6     /* margin-right: 1.5rem; margin-left: 1.5rem; */\n.mx-8     /* margin-right: 2rem; margin-left: 2rem; */\n.mx-10    /* margin-right: 2.5rem; margin-left: 2.5rem; */\n.mx-12    /* margin-right: 3rem; margin-left: 3rem; */\n.mx-16    /* margin-right: 4rem; margin-left: 4rem; */\n.mx-20    /* margin-right: 5rem; margin-left: 5rem; */\n.mx-24    /* margin-right: 6rem; margin-left: 6rem; */\n.mx-32    /* margin-right: 8rem; margin-left: 8rem; */\n.mx-40    /* margin-right: 10rem; margin-left: 10rem; */\n.mx-48    /* margin-right: 12rem; margin-left: 12rem; */\n.mx-56    /* margin-right: 14rem; margin-left: 14rem; */\n.mx-64    /* margin-right: 16rem; margin-left: 16rem; */\n.mx-auto  /* margin-right: auto; margin-left: auto; */\n.mx-px    /* margin-right: 1px; margin-left: 1px; */\n.-mx-1    /* margin-right: -0.25rem; margin-left: -0.25rem; */\n.-mx-2    /* margin-right: -0.5rem; margin-left: -0.5rem; */\n.-mx-3    /* margin-right: -0.75rem; margin-left: -0.75rem; */\n.-mx-4    /* margin-right: -1rem; margin-left: -1rem; */\n.-mx-5    /* margin-right: -1.25rem; margin-left: -1.25rem; */\n.-mx-6    /* margin-right: -1.5rem; margin-left: -1.5rem; */\n.-mx-8    /* margin-right: -2rem; margin-left: -2rem; */\n.-mx-10   /* margin-right: -2.5rem; margin-left: -2.5rem; */\n.-mx-12   /* margin-right: -3rem; margin-left: -3rem; */\n.-mx-16   /* margin-right: -4rem; margin-left: -4rem; */\n.-mx-20   /* margin-right: -5rem; margin-left: -5rem; */\n.-mx-24   /* margin-right: -6rem; margin-left: -6rem; */\n.-mx-32   /* margin-right: -8rem; margin-left: -8rem; */\n.-mx-40   /* margin-right: -10rem; margin-left: -10rem; */\n.-mx-48   /* margin-right: -12rem; margin-left: -12rem; */\n.-mx-56   /* margin-right: -14rem; margin-left: -14rem; */\n.-mx-64   /* margin-right: -16rem; margin-left: -16rem; */\n.-mx-px   /* margin-right: -1px; margin-left: -1px; */\n.mt-0     /* margin-top: 0; */\n.mt-1     /* margin-top: 0.25rem; */\n.mt-2     /* margin-top: 0.5rem; */\n.mt-3     /* margin-top: 0.75rem; */\n.mt-4     /* margin-top: 1rem; */\n.mt-5     /* margin-top: 1.25rem; */\n.mt-6     /* margin-top: 1.5rem; */\n.mt-8     /* margin-top: 2rem; */\n.mt-10    /* margin-top: 2.5rem; */\n.mt-12    /* margin-top: 3rem; */\n.mt-16    /* margin-top: 4rem; */\n.mt-20    /* margin-top: 5rem; */\n.mt-24    /* margin-top: 6rem; */\n.mt-32    /* margin-top: 8rem; */\n.mt-40    /* margin-top: 10rem; */\n.mt-48    /* margin-top: 12rem; */\n.mt-56    /* margin-top: 14rem; */\n.mt-64    /* margin-top: 16rem; */\n.mt-auto  /* margin-top: auto; */\n.mt-px    /* margin-top: 1px; */\n.-mt-1    /* margin-top: -0.25rem; */\n.-mt-2    /* margin-top: -0.5rem; */\n.-mt-3    /* margin-top: -0.75rem; */\n.-mt-4    /* margin-top: -1rem; */\n.-mt-5    /* margin-top: -1.25rem; */\n.-mt-6    /* margin-top: -1.5rem; */\n.-mt-8    /* margin-top: -2rem; */\n.-mt-10   /* margin-top: -2.5rem; */\n.-mt-12   /* margin-top: -3rem; */\n.-mt-16   /* margin-top: -4rem; */\n.-mt-20   /* margin-top: -5rem; */\n.-mt-24   /* margin-top: -6rem; */\n.-mt-32   /* margin-top: -8rem; */\n.-mt-40   /* margin-top: -10rem; */\n.-mt-48   /* margin-top: -12rem; */\n.-mt-56   /* margin-top: -14rem; */\n.-mt-64   /* margin-top: -16rem; */\n.-mt-px   /* margin-top: -1px; */\n.mr-0     /* margin-right: 0; */\n.mr-1     /* margin-right: 0.25rem; */\n.mr-2     /* margin-right: 0.5rem; */\n.mr-3     /* margin-right: 0.75rem; */\n.mr-4     /* margin-right: 1rem; */\n.mr-5     /* margin-right: 1.25rem; */\n.mr-6     /* margin-right: 1.5rem; */\n.mr-8     /* margin-right: 2rem; */\n.mr-10    /* margin-right: 2.5rem; */\n.mr-12    /* margin-right: 3rem; */\n.mr-16    /* margin-right: 4rem; */\n.mr-20    /* margin-right: 5rem; */\n.mr-24    /* margin-right: 6rem; */\n.mr-32    /* margin-right: 8rem; */\n.mr-40    /* margin-right: 10rem; */\n.mr-48    /* margin-right: 12rem; */\n.mr-56    /* margin-right: 14rem; */\n.mr-64    /* margin-right: 16rem; */\n.mr-auto  /* margin-right: auto; */\n.mr-px    /* margin-right: 1px; */\n.-mr-1    /* margin-right: -0.25rem; */\n.-mr-2    /* margin-right: -0.5rem; */\n.-mr-3    /* margin-right: -0.75rem; */\n.-mr-4    /* margin-right: -1rem; */\n.-mr-5    /* margin-right: -1.25rem; */\n.-mr-6    /* margin-right: -1.5rem; */\n.-mr-8    /* margin-right: -2rem; */\n.-mr-10   /* margin-right: -2.5rem; */\n.-mr-12   /* margin-right: -3rem; */\n.-mr-16   /* margin-right: -4rem; */\n.-mr-20   /* margin-right: -5rem; */\n.-mr-24   /* margin-right: -6rem; */\n.-mr-32   /* margin-right: -8rem; */\n.-mr-40   /* margin-right: -10rem; */\n.-mr-48   /* margin-right: -12rem; */\n.-mr-56   /* margin-right: -14rem; */\n.-mr-64   /* margin-right: -16rem; */\n.-mr-px   /* margin-right: -1px; */\n.mb-0     /* margin-bottom: 0; */\n.mb-1     /* margin-bottom: 0.25rem; */\n.mb-2     /* margin-bottom: 0.5rem; */\n.mb-3     /* margin-bottom: 0.75rem; */\n.mb-4     /* margin-bottom: 1rem; */\n.mb-5     /* margin-bottom: 1.25rem; */\n.mb-6     /* margin-bottom: 1.5rem; */\n.mb-8     /* margin-bottom: 2rem; */\n.mb-10    /* margin-bottom: 2.5rem; */\n.mb-12    /* margin-bottom: 3rem; */\n.mb-16    /* margin-bottom: 4rem; */\n.mb-20    /* margin-bottom: 5rem; */\n.mb-24    /* margin-bottom: 6rem; */\n.mb-32    /* margin-bottom: 8rem; */\n.mb-40    /* margin-bottom: 10rem; */\n.mb-48    /* margin-bottom: 12rem; */\n.mb-56    /* margin-bottom: 14rem; */\n.mb-64    /* margin-bottom: 16rem; */\n.mb-auto  /* margin-bottom: auto; */\n.mb-px    /* margin-bottom: 1px; */\n.-mb-1    /* margin-bottom: -0.25rem; */\n.-mb-2    /* margin-bottom: -0.5rem; */\n.-mb-3    /* margin-bottom: -0.75rem; */\n.-mb-4    /* margin-bottom: -1rem; */\n.-mb-5    /* margin-bottom: -1.25rem; */\n.-mb-6    /* margin-bottom: -1.5rem; */\n.-mb-8    /* margin-bottom: -2rem; */\n.-mb-10   /* margin-bottom: -2.5rem; */\n.-mb-12   /* margin-bottom: -3rem; */\n.-mb-16   /* margin-bottom: -4rem; */\n.-mb-20   /* margin-bottom: -5rem; */\n.-mb-24   /* margin-bottom: -6rem; */\n.-mb-32   /* margin-bottom: -8rem; */\n.-mb-40   /* margin-bottom: -10rem; */\n.-mb-48   /* margin-bottom: -12rem; */\n.-mb-56   /* margin-bottom: -14rem; */\n.-mb-64   /* margin-bottom: -16rem; */\n.-mb-px   /* margin-bottom: -1px; */\n.ml-0     /* margin-left: 0; */\n.ml-1     /* margin-left: 0.25rem; */\n.ml-2     /* margin-left: 0.5rem; */\n.ml-3     /* margin-left: 0.75rem; */\n.ml-4     /* margin-left: 1rem; */\n.ml-5     /* margin-left: 1.25rem; */\n.ml-6     /* margin-left: 1.5rem; */\n.ml-8     /* margin-left: 2rem; */\n.ml-10    /* margin-left: 2.5rem; */\n.ml-12    /* margin-left: 3rem; */\n.ml-16    /* margin-left: 4rem; */\n.ml-20    /* margin-left: 5rem; */\n.ml-24    /* margin-left: 6rem; */\n.ml-32    /* margin-left: 8rem; */\n.ml-40    /* margin-left: 10rem; */\n.ml-48    /* margin-left: 12rem; */\n.ml-56    /* margin-left: 14rem; */\n.ml-64    /* margin-left: 16rem; */\n.ml-auto  /* margin-left: auto; */\n.ml-px    /* margin-left: 1px; */\n.-ml-1    /* margin-left: -0.25rem; */\n.-ml-2    /* margin-left: -0.5rem; */\n.-ml-3    /* margin-left: -0.75rem; */\n.-ml-4    /* margin-left: -1rem; */\n.-ml-5    /* margin-left: -1.25rem; */\n.-ml-6    /* margin-left: -1.5rem; */\n.-ml-8    /* margin-left: -2rem; */\n.-ml-10   /* margin-left: -2.5rem; */\n.-ml-12   /* margin-left: -3rem; */\n.-ml-16   /* margin-left: -4rem; */\n.-ml-20   /* margin-left: -5rem; */\n.-ml-24   /* margin-left: -6rem; */\n.-ml-32   /* margin-left: -8rem; */\n.-ml-40   /* margin-left: -10rem; */\n.-ml-48   /* margin-left: -12rem; */\n.-ml-56   /* margin-left: -14rem; */\n.-ml-64   /* margin-left: -16rem; */\n.-ml-px   /* margin-left: -1px; */\n\n/* *******************************************************************************************\n * SIZING\n * ******************************************************************************************* */\n \n/*\n * Width\n * --------------------\n * Utilities for setting the width of an element\n * By default, only responsive variants are generated for width utilities.\n */\n\n.w-0       /* width: 0; */\n.w-1       /* width: 0.25rem; */\n.w-2       /* width: 0.5rem; */\n.w-3       /* width: 0.75rem; */\n.w-4       /* width: 1rem; */\n.w-5       /* width: 1.25rem; */\n.w-6       /* width: 1.5rem; */\n.w-8       /* width: 2rem; */\n.w-10      /* width: 2.5rem; */\n.w-12      /* width: 3rem; */\n.w-16      /* width: 4rem; */\n.w-20      /* width: 5rem; */\n.w-24      /* width: 6rem; */\n.w-32      /* width: 8rem; */\n.w-40      /* width: 10rem; */\n.w-48      /* width: 12rem; */\n.w-56      /* width: 14rem; */\n.w-64      /* width: 16rem; */\n.w-auto    /* width: auto; */\n.w-px      /* width: 1px; */\n.w-1/2     /* width: 50%; */\n.w-1/3     /* width: 33.333333%; */\n.w-2/3     /* width: 66.666667%; */\n.w-1/4     /* width: 25%; */\n.w-2/4     /* width: 50%; */\n.w-3/4     /* width: 75%; */\n.w-1/5     /* width: 20%; */\n.w-2/5     /* width: 40%; */\n.w-3/5     /* width: 60%; */\n.w-4/5     /* width: 80%; */\n.w-1/6     /* width: 16.666667%; */\n.w-2/6     /* width: 33.333333%; */\n.w-3/6     /* width: 50%; */\n.w-4/6     /* width: 66.666667%; */\n.w-5/6     /* width: 83.333333%; */\n.w-1/12    /* width: 8.333333%; */\n.w-2/12    /* width: 16.666667%; */\n.w-3/12    /* width: 25%; */\n.w-4/12    /* width: 33.333333%; */\n.w-5/12    /* width: 41.666667%; */\n.w-6/12    /* width: 50%; */\n.w-7/12    /* width: 58.333333%; */\n.w-8/12    /* width: 66.666667%; */\n.w-9/12    /* width: 75%; */\n.w-10/12   /* width: 83.333333%; */\n.w-11/12   /* width: 91.666667%; */\n.w-full    /* width: 100%; */\n.w-screen  /* width: 100vw; */\n\n/*\n * Min-Width\n * --------------------\n * Utilities for setting the minimum width of an element\n * By default, only responsive variants are generated for min-width utilities.\n */\n\n.min-w-0     /* min-width: 0; */\n.min-w-full  /* min-width: 100%; */\n\n/*\n * Max-Width\n * --------------------\n * Utilities for setting the maximum width of an element\n * By default, only responsive variants are generated for max-width utilities.\n */\n\n.max-w-xs         /* max-width: 20rem; */\n.max-w-sm         /* max-width: 24rem; */\n.max-w-md         /* max-width: 28rem; */\n.max-w-lg         /* max-width: 32rem; */\n.max-w-xl         /* max-width: 36rem; */\n.max-w-2xl        /* max-width: 42rem; */\n.max-w-3xl        /* max-width: 48rem; */\n.max-w-4xl        /* max-width: 56rem; */\n.max-w-5xl        /* max-width: 64rem; */\n.max-w-6xl        /* max-width: 72rem; */\n.max-w-full       /* max-width: 100%; */\n.max-w-screen-sm  /* max-width: 640px; */\n.max-w-screen-md  /* max-width: 768px; */\n.max-w-screen-lg  /* max-width: 1024px; */\n.max-w-screen-xl  /* max-width: 1280px; */\n.max-w-none       /* max-width: none; */\n\n/*\n * Height\n * --------------------\n * Utilities for setting the height of an element\n * By default, only responsive variants are generated for height utilities.\n */\n\n.h-0       /* height: 0; */\n.h-1       /* height: 0.25rem; */\n.h-2       /* height: 0.5rem; */\n.h-3       /* height: 0.75rem; */\n.h-4       /* height: 1rem; */\n.h-5       /* height: 1.25rem; */\n.h-6       /* height: 1.5rem; */\n.h-8       /* height: 2rem; */\n.h-10      /* height: 2.5rem; */\n.h-12      /* height: 3rem; */\n.h-16      /* height: 4rem; */\n.h-20      /* height: 5rem; */\n.h-24      /* height: 6rem; */\n.h-32      /* height: 8rem; */\n.h-40      /* height: 10rem; */\n.h-48      /* height: 12rem; */\n.h-56      /* height: 14rem; */\n.h-64      /* height: 16rem; */\n.h-auto    /* height: auto; */\n.h-px      /* height: 1px; */\n.h-full    /* height: 100%; */\n.h-screen  /* height: 100vh; */\n\n/*\n * Min-Height\n * --------------------\n * Utilities for setting the minimum height of an element\n * By default, only responsive variants are generated for min-height utilities.\n */\n\n.min-h-0       /* min-height: 0; */\n.min-h-full    /* min-height: 100%; */\n.min-h-screen  /* min-height: 100vh; */\n\n/*\n * Max-Height\n * --------------------\n * Utilities for setting the maximum height of an element\n * By default, only responsive variants are generated for max-height utilities.\n */\n\n.max-h-full    /* max-height: 100%; */\n.max-h-screen  /* max-height: 100vh; */\n\n/* *******************************************************************************************\n * TYPOGRAPHY\n * ******************************************************************************************* */\n \n/*\n * Font Family\n * --------------------\n * Utilities for controlling the font family of an element.\n * By default, only responsive variants are generated for font family utilities.\n */\n\n.font-sans   /* font-family: system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"; */\n.font-serif  /* font-family: Georgia, Cambria, \"Times New Roman\", Times, serif; */\n.font-mono   /* font-family: Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace; */\n\n/*\n * Font Size\n * --------------------\n * Utilities for controlling the font size of an element.\n * By default, only responsive variants are generated for text sizing utilities.\n */\n\n.text-xs    /* font-size: .75rem; */\n.text-sm    /* font-size: .875rem; */\n.text-base  /* font-size: 1rem; */\n.text-lg    /* font-size: 1.125rem; */\n.text-xl    /* font-size: 1.25rem; */\n.text-2xl   /* font-size: 1.5rem; */\n.text-3xl   /* font-size: 1.875rem; */\n.text-4xl   /* font-size: 2.25rem; */\n.text-5xl   /* font-size: 3rem; */\n.text-6xl   /* font-size: 4rem; */\n\n/*\n * Font Smoothing\n * --------------------\n * Utilities for controlling the font smoothing of an element.\n * By default, only responsive variants are generated for font smoothing utilities.\n */\n\n.antialiased           /* -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; */\n.subpixel-antialiased  /* -webkit-font-smoothing: auto; -moz-osx-font-smoothing: auto; */\n\n/*\n * Font Style\n * --------------------\n * Utilities for controlling the style of text.\n * By default, only responsive variants are generated for font style utilities.\n */\n\n.italic      /* font-style: italic; */\n.not-italic  /* font-style: normal; */\n\n/*\n * Font Weight\n * --------------------\n * Utilities for controlling the font weight of an element.\n * By default, only responsive, hover and focus variants are generated for font weight utilities.\n */\n\n.font-hairline   /* font-weight: 100; */\n.font-thin       /* font-weight: 200; */\n.font-light      /* font-weight: 300; */\n.font-normal     /* font-weight: 400; */\n.font-medium     /* font-weight: 500; */\n.font-semibold   /* font-weight: 600; */\n.font-bold       /* font-weight: 700; */\n.font-extrabold  /* font-weight: 800; */\n.font-black      /* font-weight: 900; */\n\n/*\n * Letter Spacing\n * --------------------\n * Utilities for controlling the tracking (letter spacing) of an element.\n * By default, only responsive variants are generated for tracking utilities.\n */\n\n.tracking-tighter  /* letter-spacing: -0.05em; */\n.tracking-tight    /* letter-spacing: -0.025em; */\n.tracking-normal   /* letter-spacing: 0; */\n.tracking-wide     /* letter-spacing: 0.025em; */\n.tracking-wider    /* letter-spacing: 0.05em; */\n.tracking-widest   /* letter-spacing: 0.1em; */\n\n/*\n * Line Height\n * --------------------\n * Utilities for controlling the leading (line height) of an element.\n * By default, only responsive variants are generated for line height utilities.\n */\n\n.leading-none     /* line-height: 1; */\n.leading-tight    /* line-height: 1.25; */\n.leading-snug     /* line-height: 1.375; */\n.leading-normal   /* line-height: 1.5; */\n.leading-relaxed  /* line-height: 1.625; */\n.leading-loose    /* line-height: 2; */\n.leading-3        /* line-height: .75rem; */\n.leading-4        /* line-height: 1rem; */\n.leading-5        /* line-height: 1.25rem; */\n.leading-6        /* line-height: 1.5rem; */\n.leading-7        /* line-height: 1.75rem; */\n.leading-8        /* line-height: 2rem; */\n.leading-9        /* line-height: 2.25rem; */\n.leading-10       /* line-height: 2.5rem; */\n\n/*\n * List Style Type\n * --------------------\n * Utilities for controlling the bullet/number style of a list.\n * By default, only responsive variants are generated for list style type utilities.\n */\n\n.list-none     /* list-style-type: none; */\n.list-disc     /* list-style-type: disc; */\n.list-decimal  /* list-style-type: decimal; */\n\n/*\n * List Style Position\n * --------------------\n * Utilities for controlling the position of bullets/numbers in lists.\n * By default, only responsive variants are generated for list style position utilities.\n */\n\n.list-inside   /* list-style-position: inside; */\n.list-outside  /* list-style-position: outside; */\n\n/*\n * Placeholder Color\n * --------------------\n * Utilities for controlling the color of placeholder text.\n * By default, only responsive and focus variants are generated for placeholder color utilities.\n */\n\n .placeholder-transparent  /* ::placeholder { color: transparent; } */\n .placeholder-black        /* ::placeholder { color: #000; } */\n .placeholder-white        /* ::placeholder { color: #fff; } */\n .placeholder-gray-100     /* ::placeholder { color: #f7fafc; } */\n .placeholder-gray-200     /* ::placeholder { color: #edf2f7; } */\n .placeholder-gray-300     /* ::placeholder { color: #e2e8f0; } */\n .placeholder-gray-400     /* ::placeholder { color: #cbd5e0; } */\n .placeholder-gray-500     /* ::placeholder { color: #a0aec0; } */\n .placeholder-gray-600     /* ::placeholder { color: #718096; } */\n .placeholder-gray-700     /* ::placeholder { color: #4a5568; } */\n .placeholder-gray-800     /* ::placeholder { color: #2d3748; } */\n .placeholder-gray-900     /* ::placeholder { color: #1a202c; } */\n .placeholder-red-100      /* ::placeholder { color: #fff5f5; } */\n .placeholder-red-200      /* ::placeholder { color: #fed7d7; } */\n .placeholder-red-300      /* ::placeholder { color: #feb2b2; } */\n .placeholder-red-400      /* ::placeholder { color: #fc8181; } */\n .placeholder-red-500      /* ::placeholder { color: #f56565; } */\n .placeholder-red-600      /* ::placeholder { color: #e53e3e; } */\n .placeholder-red-700      /* ::placeholder { color: #c53030; } */\n .placeholder-red-800      /* ::placeholder { color: #9b2c2c; } */\n .placeholder-red-900      /* ::placeholder { color: #742a2a; } */\n .placeholder-orange-100   /* ::placeholder { color: #fffaf0; } */\n .placeholder-orange-200   /* ::placeholder { color: #feebc8; } */\n .placeholder-orange-300   /* ::placeholder { color: #fbd38d; } */\n .placeholder-orange-400   /* ::placeholder { color: #f6ad55; } */\n .placeholder-orange-500   /* ::placeholder { color: #ed8936; } */\n .placeholder-orange-600   /* ::placeholder { color: #dd6b20; } */\n .placeholder-orange-700   /* ::placeholder { color: #c05621; } */\n .placeholder-orange-800   /* ::placeholder { color: #9c4221; } */\n .placeholder-orange-900   /* ::placeholder { color: #7b341e; } */\n .placeholder-yellow-100   /* ::placeholder { color: #fffff0; } */\n .placeholder-yellow-200   /* ::placeholder { color: #fefcbf; } */\n .placeholder-yellow-300   /* ::placeholder { color: #faf089; } */\n .placeholder-yellow-400   /* ::placeholder { color: #f6e05e; } */\n .placeholder-yellow-500   /* ::placeholder { color: #ecc94b; } */\n .placeholder-yellow-600   /* ::placeholder { color: #d69e2e; } */\n .placeholder-yellow-700   /* ::placeholder { color: #b7791f; } */\n .placeholder-yellow-800   /* ::placeholder { color: #975a16; } */\n .placeholder-yellow-900   /* ::placeholder { color: #744210; } */\n .placeholder-green-100    /* ::placeholder { color: #f0fff4; } */\n .placeholder-green-200    /* ::placeholder { color: #c6f6d5; } */\n .placeholder-green-300    /* ::placeholder { color: #9ae6b4; } */\n .placeholder-green-400    /* ::placeholder { color: #68d391; } */\n .placeholder-green-500    /* ::placeholder { color: #48bb78; } */\n .placeholder-green-600    /* ::placeholder { color: #38a169; } */\n .placeholder-green-700    /* ::placeholder { color: #2f855a; } */\n .placeholder-green-800    /* ::placeholder { color: #276749; } */\n .placeholder-green-900    /* ::placeholder { color: #22543d; } */\n .placeholder-teal-100     /* ::placeholder { color: #e6fffa; } */\n .placeholder-teal-200     /* ::placeholder { color: #b2f5ea; } */\n .placeholder-teal-300     /* ::placeholder { color: #81e6d9; } */\n .placeholder-teal-400     /* ::placeholder { color: #4fd1c5; } */\n .placeholder-teal-500     /* ::placeholder { color: #38b2ac; } */\n .placeholder-teal-600     /* ::placeholder { color: #319795; } */\n .placeholder-teal-700     /* ::placeholder { color: #2c7a7b; } */\n .placeholder-teal-800     /* ::placeholder { color: #285e61; } */\n .placeholder-teal-900     /* ::placeholder { color: #234e52; } */\n .placeholder-blue-100     /* ::placeholder { color: #ebf8ff; } */\n .placeholder-blue-200     /* ::placeholder { color: #bee3f8; } */\n .placeholder-blue-300     /* ::placeholder { color: #90cdf4; } */\n .placeholder-blue-400     /* ::placeholder { color: #63b3ed; } */\n .placeholder-blue-500     /* ::placeholder { color: #4299e1; } */\n .placeholder-blue-600     /* ::placeholder { color: #3182ce; } */\n .placeholder-blue-700     /* ::placeholder { color: #2b6cb0; } */\n .placeholder-blue-800     /* ::placeholder { color: #2c5282; } */\n .placeholder-blue-900     /* ::placeholder { color: #2a4365; } */\n .placeholder-indigo-100   /* ::placeholder { color: #ebf4ff; } */\n .placeholder-indigo-200   /* ::placeholder { color: #c3dafe; } */\n .placeholder-indigo-300   /* ::placeholder { color: #a3bffa; } */\n .placeholder-indigo-400   /* ::placeholder { color: #7f9cf5; } */\n .placeholder-indigo-500   /* ::placeholder { color: #667eea; } */\n .placeholder-indigo-600   /* ::placeholder { color: #5a67d8; } */\n .placeholder-indigo-700   /* ::placeholder { color: #4c51bf; } */\n .placeholder-indigo-800   /* ::placeholder { color: #434190; } */\n .placeholder-indigo-900   /* ::placeholder { color: #3c366b; } */\n .placeholder-purple-100   /* ::placeholder { color: #faf5ff; } */\n .placeholder-purple-200   /* ::placeholder { color: #e9d8fd; } */\n .placeholder-purple-300   /* ::placeholder { color: #d6bcfa; } */\n .placeholder-purple-400   /* ::placeholder { color: #b794f4; } */\n .placeholder-purple-500   /* ::placeholder { color: #9f7aea; } */\n .placeholder-purple-600   /* ::placeholder { color: #805ad5; } */\n .placeholder-purple-700   /* ::placeholder { color: #6b46c1; } */\n .placeholder-purple-800   /* ::placeholder { color: #553c9a; } */\n .placeholder-purple-900   /* ::placeholder { color: #44337a; } */\n .placeholder-pink-100     /* ::placeholder { color: #fff5f7; } */\n .placeholder-pink-200     /* ::placeholder { color: #fed7e2; } */\n .placeholder-pink-300     /* ::placeholder { color: #fbb6ce; } */\n .placeholder-pink-400     /* ::placeholder { color: #f687b3; } */\n .placeholder-pink-500     /* ::placeholder { color: #ed64a6; } */\n .placeholder-pink-600     /* ::placeholder { color: #d53f8c; } */\n .placeholder-pink-700     /* ::placeholder { color: #b83280; } */\n .placeholder-pink-800     /* ::placeholder { color: #97266d; } */\n .placeholder-pink-900     /* ::placeholder { color: #702459; } */\n\n/*\n * Text Align\n * --------------------\n * Utilities for controlling the alignment of text.\n * By default, only responsive variants are generated for text alignment utilities.\n */\n\n.text-left     /* text-align: left; */\n.text-center   /* text-align: center; */\n.text-right    /* text-align: right; */\n.text-justify  /* text-align: justify; */\n\n/*\n * Text Color\n * --------------------\n * Utilities for controlling the text color of an element.\n * By default, only responsive, hover and focus variants are generated for text color utilities.\n */\n\n .text-transparent  /* color: transparent; */\n .text-black        /* color: #000; */\n .text-white        /* color: #fff; */\n .text-gray-100     /* color: #f7fafc; */\n .text-gray-200     /* color: #edf2f7; */\n .text-gray-300     /* color: #e2e8f0; */\n .text-gray-400     /* color: #cbd5e0; */\n .text-gray-500     /* color: #a0aec0; */\n .text-gray-600     /* color: #718096; */\n .text-gray-700     /* color: #4a5568; */\n .text-gray-800     /* color: #2d3748; */\n .text-gray-900     /* color: #1a202c; */\n .text-red-100      /* color: #fff5f5; */\n .text-red-200      /* color: #fed7d7; */\n .text-red-300      /* color: #feb2b2; */\n .text-red-400      /* color: #fc8181; */\n .text-red-500      /* color: #f56565; */\n .text-red-600      /* color: #e53e3e; */\n .text-red-700      /* color: #c53030; */\n .text-red-800      /* color: #9b2c2c; */\n .text-red-900      /* color: #742a2a; */\n .text-orange-100   /* color: #fffaf0; */\n .text-orange-200   /* color: #feebc8; */\n .text-orange-300   /* color: #fbd38d; */\n .text-orange-400   /* color: #f6ad55; */\n .text-orange-500   /* color: #ed8936; */\n .text-orange-600   /* color: #dd6b20; */\n .text-orange-700   /* color: #c05621; */\n .text-orange-800   /* color: #9c4221; */\n .text-orange-900   /* color: #7b341e; */\n .text-yellow-100   /* color: #fffff0; */\n .text-yellow-200   /* color: #fefcbf; */\n .text-yellow-300   /* color: #faf089; */\n .text-yellow-400   /* color: #f6e05e; */\n .text-yellow-500   /* color: #ecc94b; */\n .text-yellow-600   /* color: #d69e2e; */\n .text-yellow-700   /* color: #b7791f; */\n .text-yellow-800   /* color: #975a16; */\n .text-yellow-900   /* color: #744210; */\n .text-green-100    /* color: #f0fff4; */\n .text-green-200    /* color: #c6f6d5; */\n .text-green-300    /* color: #9ae6b4; */\n .text-green-400    /* color: #68d391; */\n .text-green-500    /* color: #48bb78; */\n .text-green-600    /* color: #38a169; */\n .text-green-700    /* color: #2f855a; */\n .text-green-800    /* color: #276749; */\n .text-green-900    /* color: #22543d; */\n .text-teal-100     /* color: #e6fffa; */\n .text-teal-200     /* color: #b2f5ea; */\n .text-teal-300     /* color: #81e6d9; */\n .text-teal-400     /* color: #4fd1c5; */\n .text-teal-500     /* color: #38b2ac; */\n .text-teal-600     /* color: #319795; */\n .text-teal-700     /* color: #2c7a7b; */\n .text-teal-800     /* color: #285e61; */\n .text-teal-900     /* color: #234e52; */\n .text-blue-100     /* color: #ebf8ff; */\n .text-blue-200     /* color: #bee3f8; */\n .text-blue-300     /* color: #90cdf4; */\n .text-blue-400     /* color: #63b3ed; */\n .text-blue-500     /* color: #4299e1; */\n .text-blue-600     /* color: #3182ce; */\n .text-blue-700     /* color: #2b6cb0; */\n .text-blue-800     /* color: #2c5282; */\n .text-blue-900     /* color: #2a4365; */\n .text-indigo-100   /* color: #ebf4ff; */\n .text-indigo-200   /* color: #c3dafe; */\n .text-indigo-300   /* color: #a3bffa; */\n .text-indigo-400   /* color: #7f9cf5; */\n .text-indigo-500   /* color: #667eea; */\n .text-indigo-600   /* color: #5a67d8; */\n .text-indigo-700   /* color: #4c51bf; */\n .text-indigo-800   /* color: #434190; */\n .text-indigo-900   /* color: #3c366b; */\n .text-purple-100   /* color: #faf5ff; */\n .text-purple-200   /* color: #e9d8fd; */\n .text-purple-300   /* color: #d6bcfa; */\n .text-purple-400   /* color: #b794f4; */\n .text-purple-500   /* color: #9f7aea; */\n .text-purple-600   /* color: #805ad5; */\n .text-purple-700   /* color: #6b46c1; */\n .text-purple-800   /* color: #553c9a; */\n .text-purple-900   /* color: #44337a; */\n .text-pink-100     /* color: #fff5f7; */\n .text-pink-200     /* color: #fed7e2; */\n .text-pink-300     /* color: #fbb6ce; */\n .text-pink-400     /* color: #f687b3; */\n .text-pink-500     /* color: #ed64a6; */\n .text-pink-600     /* color: #d53f8c; */\n .text-pink-700     /* color: #b83280; */\n .text-pink-800     /* color: #97266d; */\n .text-pink-900     /* color: #702459; */\n\n/*\n * Text Decoration\n * --------------------\n * Utilities for controlling the decoration of text.\n * By default, only responsive, hover and focus variants are generated for text decoration utilities.\n */\n\n.underline     /* text-decoration: underline; */\n.line-through  /* text-decoration: line-through; */\n.no-underline  /* text-decoration: none; */\n\n/*\n * Text Transform\n * --------------------\n * Utilities for controlling the transformation of text.\n * By default, only responsive variants are generated for text transformation utilities.\n */\n\n.uppercase    /* text-transform: uppercase; */\n.lowercase    /* text-transform: lowercase; */\n.capitalize   /* text-transform: capitalize; */\n.normal-case  /* text-transform: none; */\n\n/*\n * Vertical Align\n * --------------------\n * Utilities for controlling the vertical alignment of an inline or table-cell box.\n * By default, only responsive variants are generated for vertical alignment utilities.\n */\n\n.align-baseline     /* vertical-align: baseline; */\n.align-top          /* vertical-align: top; */\n.align-middle       /* vertical-align: middle; */\n.align-bottom       /* vertical-align: bottom; */\n.align-text-top     /* vertical-align: text-top; */\n.align-text-bottom  /* vertical-align: text-bottom; */\n\n/*\n * Whitespace\n * --------------------\n * Utilities for controlling an element's white-space property.\n * By default, only responsive variants are generated for whitespace utilities.\n */\n\n.whitespace-normal    /* white-space: normal; */\n.whitespace-no-wrap   /* white-space: nowrap; */\n.whitespace-pre       /* white-space: pre; */\n.whitespace-pre-line  /* white-space: pre-line; */\n.whitespace-pre-wrap  /* white-space: pre-wrap; */\n\n/*\n * Word Break\n * --------------------\n * Utilities for controlling word breaks in an element.\n * By default, only responsive variants are generated for word break utilities.\n */\n\n.break-normal  /* word-break: normal; overflow-wrap: normal */\n.break-words   /* overflow-wrap: break-word; */\n.break-all     /* word-break: break-all; */\n.truncate      /* overflow: hidden; text-overflow: ellipsis; white-space: nowrap */\n\n/* *******************************************************************************************\n * BACKGROUNDS\n * ******************************************************************************************* */\n \n/*\n * BACKGROUND ATTACHMENT\n * --------------------\n * Utilities for controlling how a background image behaves when scrolling.\n * By default, only responsive variants are generated for background attachment utilities.\n */\n\n.bg-fixed   /* background-attachment: fixed; */\n.bg-local   /* background-attachment: local; */\n.bg-scroll  /* background-attachment: scroll; */\n\n/*\n * BACKGROUND COLOR\n * --------------------\n * Utilities for controlling how a background image behaves when scrolling.\n * By default, only responsive, hover and focus variants are generated for background color utilities.\n */\n\n.bg-transparent  /* background-color: transparent; */\n.bg-black        /* background-color: #000; */\n.bg-white        /* background-color: #fff; */\n.bg-gray-100     /* background-color: #f7fafc; */\n.bg-gray-200     /* background-color: #edf2f7; */\n.bg-gray-300     /* background-color: #e2e8f0; */\n.bg-gray-400     /* background-color: #cbd5e0; */\n.bg-gray-500     /* background-color: #a0aec0; */\n.bg-gray-600     /* background-color: #718096; */\n.bg-gray-700     /* background-color: #4a5568; */\n.bg-gray-800     /* background-color: #2d3748; */\n.bg-gray-900     /* background-color: #1a202c; */\n.bg-red-100      /* background-color: #fff5f5; */\n.bg-red-200      /* background-color: #fed7d7; */\n.bg-red-300      /* background-color: #feb2b2; */\n.bg-red-400      /* background-color: #fc8181; */\n.bg-red-500      /* background-color: #f56565; */\n.bg-red-600      /* background-color: #e53e3e; */\n.bg-red-700      /* background-color: #c53030; */\n.bg-red-800      /* background-color: #9b2c2c; */\n.bg-red-900      /* background-color: #742a2a; */\n.bg-orange-100   /* background-color: #fffaf0; */\n.bg-orange-200   /* background-color: #feebc8; */\n.bg-orange-300   /* background-color: #fbd38d; */\n.bg-orange-400   /* background-color: #f6ad55; */\n.bg-orange-500   /* background-color: #ed8936; */\n.bg-orange-600   /* background-color: #dd6b20; */\n.bg-orange-700   /* background-color: #c05621; */\n.bg-orange-800   /* background-color: #9c4221; */\n.bg-orange-900   /* background-color: #7b341e; */\n.bg-yellow-100   /* background-color: #fffff0; */\n.bg-yellow-200   /* background-color: #fefcbf; */\n.bg-yellow-300   /* background-color: #faf089; */\n.bg-yellow-400   /* background-color: #f6e05e; */\n.bg-yellow-500   /* background-color: #ecc94b; */\n.bg-yellow-600   /* background-color: #d69e2e; */\n.bg-yellow-700   /* background-color: #b7791f; */\n.bg-yellow-800   /* background-color: #975a16; */\n.bg-yellow-900   /* background-color: #744210; */\n.bg-green-100    /* background-color: #f0fff4; */\n.bg-green-200    /* background-color: #c6f6d5; */\n.bg-green-300    /* background-color: #9ae6b4; */\n.bg-green-400    /* background-color: #68d391; */\n.bg-green-500    /* background-color: #48bb78; */\n.bg-green-600    /* background-color: #38a169; */\n.bg-green-700    /* background-color: #2f855a; */\n.bg-green-800    /* background-color: #276749; */\n.bg-green-900    /* background-color: #22543d; */\n.bg-teal-100     /* background-color: #e6fffa; */\n.bg-teal-200     /* background-color: #b2f5ea; */\n.bg-teal-300     /* background-color: #81e6d9; */\n.bg-teal-400     /* background-color: #4fd1c5; */\n.bg-teal-500     /* background-color: #38b2ac; */\n.bg-teal-600     /* background-color: #319795; */\n.bg-teal-700     /* background-color: #2c7a7b; */\n.bg-teal-800     /* background-color: #285e61; */\n.bg-teal-900     /* background-color: #234e52; */\n.bg-blue-100     /* background-color: #ebf8ff; */\n.bg-blue-200     /* background-color: #bee3f8; */\n.bg-blue-300     /* background-color: #90cdf4; */\n.bg-blue-400     /* background-color: #63b3ed; */\n.bg-blue-500     /* background-color: #4299e1; */\n.bg-blue-600     /* background-color: #3182ce; */\n.bg-blue-700     /* background-color: #2b6cb0; */\n.bg-blue-800     /* background-color: #2c5282; */\n.bg-blue-900     /* background-color: #2a4365; */\n.bg-indigo-100   /* background-color: #ebf4ff; */\n.bg-indigo-200   /* background-color: #c3dafe; */\n.bg-indigo-300   /* background-color: #a3bffa; */\n.bg-indigo-400   /* background-color: #7f9cf5; */\n.bg-indigo-500   /* background-color: #667eea; */\n.bg-indigo-600   /* background-color: #5a67d8; */\n.bg-indigo-700   /* background-color: #4c51bf; */\n.bg-indigo-800   /* background-color: #434190; */\n.bg-indigo-900   /* background-color: #3c366b; */\n.bg-purple-100   /* background-color: #faf5ff; */\n.bg-purple-200   /* background-color: #e9d8fd; */\n.bg-purple-300   /* background-color: #d6bcfa; */\n.bg-purple-400   /* background-color: #b794f4; */\n.bg-purple-500   /* background-color: #9f7aea; */\n.bg-purple-600   /* background-color: #805ad5; */\n.bg-purple-700   /* background-color: #6b46c1; */\n.bg-purple-800   /* background-color: #553c9a; */\n.bg-purple-900   /* background-color: #44337a; */\n.bg-pink-100     /* background-color: #fff5f7; */\n.bg-pink-200     /* background-color: #fed7e2; */\n.bg-pink-300     /* background-color: #fbb6ce; */\n.bg-pink-400     /* background-color: #f687b3; */\n.bg-pink-500     /* background-color: #ed64a6; */\n.bg-pink-600     /* background-color: #d53f8c; */\n.bg-pink-700     /* background-color: #b83280; */\n.bg-pink-800     /* background-color: #97266d; */\n.bg-pink-900     /* background-color: #702459; */\n\n/*\n * BACKGROUND POSITION\n * --------------------\n * Utilities for controlling how a background image behaves when scrolling.\n * By default, only responsive variants are generated for background position utilities.\n */\n\n.bg-bottom        /* background-position: bottom; */\n.bg-center        /* background-position: center; */\n.bg-left          /* background-position: left; */\n.bg-left-bottom   /* background-position: left bottom; */\n.bg-left-top      /* background-position: left top; */\n.bg-right         /* background-position: right; */\n.bg-right-bottom  /* background-position: right bottom; */\n.bg-right-top     /* background-position: right top; */\n.bg-top           /* background-position: top; */\n\n/*\n * BACKGROUND REPEAT\n * --------------------\n * Utilities for controlling the repetition of an element's background image.\n * By default, only responsive variants are generated for background repeat utilities.\n */\n\n.bg-repeat        /* background-repeat: repeat; */\n.bg-no-repeat     /* background-repeat: no-repeat; */\n.bg-repeat-x      /* background-repeat: repeat-x; */\n.bg-repeat-y      /* background-repeat: repeat-y; */\n.bg-repeat-round  /* background-repeat: round; */\n.bg-repeat-space  /* background-repeat: space; */\n\n/*\n * BACKGROUND SIZE\n * --------------------\n * Utilities for controlling the background size of an element's background image.\n * By default, only responsive variants are generated for background size utilities.\n */\n\n .bg-auto     /* background-size: auto; */\n .bg-cover    /* background-size: cover; */\n .bg-contain  /* background-size: contain; */\n\n/* *******************************************************************************************\n * BORDERS\n * ******************************************************************************************* */\n \n/*\n * BORDER COLOR\n * --------------------\n * Utilities for controlling the color of an element's borders.\n * By default, only responsive, hover and focus variants are generated for border color utilities.\n */\n\n.border-transparent  /* border-color: transparent; */\n.border-black        /* border-color: #000; */\n.border-white        /* border-color: #fff; */\n.border-gray-100     /* border-color: #f7fafc; */\n.border-gray-200     /* border-color: #edf2f7; */\n.border-gray-300     /* border-color: #e2e8f0; */\n.border-gray-400     /* border-color: #cbd5e0; */\n.border-gray-500     /* border-color: #a0aec0; */\n.border-gray-600     /* border-color: #718096; */\n.border-gray-700     /* border-color: #4a5568; */\n.border-gray-800     /* border-color: #2d3748; */\n.border-gray-900     /* border-color: #1a202c; */\n.border-red-100      /* border-color: #fff5f5; */\n.border-red-200      /* border-color: #fed7d7; */\n.border-red-300      /* border-color: #feb2b2; */\n.border-red-400      /* border-color: #fc8181; */\n.border-red-500      /* border-color: #f56565; */\n.border-red-600      /* border-color: #e53e3e; */\n.border-red-700      /* border-color: #c53030; */\n.border-red-800      /* border-color: #9b2c2c; */\n.border-red-900      /* border-color: #742a2a; */\n.border-orange-100   /* border-color: #fffaf0; */\n.border-orange-200   /* border-color: #feebc8; */\n.border-orange-300   /* border-color: #fbd38d; */\n.border-orange-400   /* border-color: #f6ad55; */\n.border-orange-500   /* border-color: #ed8936; */\n.border-orange-600   /* border-color: #dd6b20; */\n.border-orange-700   /* border-color: #c05621; */\n.border-orange-800   /* border-color: #9c4221; */\n.border-orange-900   /* border-color: #7b341e; */\n.border-yellow-100   /* border-color: #fffff0; */\n.border-yellow-200   /* border-color: #fefcbf; */\n.border-yellow-300   /* border-color: #faf089; */\n.border-yellow-400   /* border-color: #f6e05e; */\n.border-yellow-500   /* border-color: #ecc94b; */\n.border-yellow-600   /* border-color: #d69e2e; */\n.border-yellow-700   /* border-color: #b7791f; */\n.border-yellow-800   /* border-color: #975a16; */\n.border-yellow-900   /* border-color: #744210; */\n.border-green-100    /* border-color: #f0fff4; */\n.border-green-200    /* border-color: #c6f6d5; */\n.border-green-300    /* border-color: #9ae6b4; */\n.border-green-400    /* border-color: #68d391; */\n.border-green-500    /* border-color: #48bb78; */\n.border-green-600    /* border-color: #38a169; */\n.border-green-700    /* border-color: #2f855a; */\n.border-green-800    /* border-color: #276749; */\n.border-green-900    /* border-color: #22543d; */\n.border-teal-100     /* border-color: #e6fffa; */\n.border-teal-200     /* border-color: #b2f5ea; */\n.border-teal-300     /* border-color: #81e6d9; */\n.border-teal-400     /* border-color: #4fd1c5; */\n.border-teal-500     /* border-color: #38b2ac; */\n.border-teal-600     /* border-color: #319795; */\n.border-teal-700     /* border-color: #2c7a7b; */\n.border-teal-800     /* border-color: #285e61; */\n.border-teal-900     /* border-color: #234e52; */\n.border-blue-100     /* border-color: #ebf8ff; */\n.border-blue-200     /* border-color: #bee3f8; */\n.border-blue-300     /* border-color: #90cdf4; */\n.border-blue-400     /* border-color: #63b3ed; */\n.border-blue-500     /* border-color: #4299e1; */\n.border-blue-600     /* border-color: #3182ce; */\n.border-blue-700     /* border-color: #2b6cb0; */\n.border-blue-800     /* border-color: #2c5282; */\n.border-blue-900     /* border-color: #2a4365; */\n.border-indigo-100   /* border-color: #ebf4ff; */\n.border-indigo-200   /* border-color: #c3dafe; */\n.border-indigo-300   /* border-color: #a3bffa; */\n.border-indigo-400   /* border-color: #7f9cf5; */\n.border-indigo-500   /* border-color: #667eea; */\n.border-indigo-600   /* border-color: #5a67d8; */\n.border-indigo-700   /* border-color: #4c51bf; */\n.border-indigo-800   /* border-color: #434190; */\n.border-indigo-900   /* border-color: #3c366b; */\n.border-purple-100   /* border-color: #faf5ff; */\n.border-purple-200   /* border-color: #e9d8fd; */\n.border-purple-300   /* border-color: #d6bcfa; */\n.border-purple-400   /* border-color: #b794f4; */\n.border-purple-500   /* border-color: #9f7aea; */\n.border-purple-600   /* border-color: #805ad5; */\n.border-purple-700   /* border-color: #6b46c1; */\n.border-purple-800   /* border-color: #553c9a; */\n.border-purple-900   /* border-color: #44337a; */\n.border-pink-100     /* border-color: #fff5f7; */\n.border-pink-200     /* border-color: #fed7e2; */\n.border-pink-300     /* border-color: #fbb6ce; */\n.border-pink-400     /* border-color: #f687b3; */\n.border-pink-500     /* border-color: #ed64a6; */\n.border-pink-600     /* border-color: #d53f8c; */\n.border-pink-700     /* border-color: #b83280; */\n.border-pink-800     /* border-color: #97266d; */\n.border-pink-900     /* border-color: #702459; */\n\n/*\n * BORDER STYLE\n * --------------------\n * Utilities for controlling the style of an element's borders.\n * By default, only responsive variants are generated for border style utilities.\n */\n\n.border-solid   /* border-style: solid; */\n.border-dashed  /* border-style: dashed; */\n.border-dotted  /* border-style: dotted; */\n.border-double  /* border-style: double; */\n.border-none    /* border-style: none; */\n\n/*\n * BORDER WIDTH\n * --------------------\n * Utilities for controlling the width of an element's borders.\n * By default, only responsive variants are generated for border width utilities.\n */\n\n.border      /* border-width: 1px; */\n.border-0    /* border-width: 0; */\n.border-2    /* border-width: 2px; */\n.border-4    /* border-width: 4px; */\n.border-8    /* border-width: 8px; */\n.border-t    /* border-top-width: 1px; */\n.border-r    /* border-right-width: 1px; */\n.border-b    /* border-bottom-width: 1px; */\n.border-l    /* border-left-width: 1px; */\n.border-t-0  /* border-top-width: 0; */\n.border-r-0  /* border-right-width: 0; */\n.border-b-0  /* border-bottom-width: 0; */\n.border-l-0  /* border-left-width: 0; */\n.border-t-2  /* border-top-width: 2px; */\n.border-r-2  /* border-right-width: 2px; */\n.border-b-2  /* border-bottom-width: 2px; */\n.border-l-2  /* border-left-width: 2px; */\n.border-t-4  /* border-top-width: 4px; */\n.border-r-4  /* border-right-width: 4px; */\n.border-b-4  /* border-bottom-width: 4px; */\n.border-l-4  /* border-left-width: 4px; */\n.border-t-8  /* border-top-width: 8px; */\n.border-r-8  /* border-right-width: 8px; */\n.border-b-8  /* border-bottom-width: 8px; */\n.border-l-8  /* border-left-width: 8px; */\n\n/*\n * BORDER RADIUS\n * --------------------\n * Utilities for controlling the border radius of an element.\n * By default, only responsive variants are generated for border radius utilities.\n */\n\n.rounded-none     /* border-radius: 0; */\n.rounded-sm       /* border-radius: 0.125rem; */\n.rounded          /* border-radius: 0.25rem; */\n.rounded-md       /* border-radius: 0.375rem; */\n.rounded-lg       /* border-radius: 0.5rem; */\n.rounded-full     /* border-radius: 9999px; */\n.rounded-t-none   /* border-top-left-radius: 0; border-top-right-radius: 0; */\n.rounded-r-none   /* border-top-right-radius: 0; border-bottom-right-radius: 0; */\n.rounded-b-none   /* border-bottom-right-radius: 0; border-bottom-left-radius: 0; */\n.rounded-l-none   /* border-top-left-radius: 0; border-bottom-left-radius: 0; */\n.rounded-t-sm     /* border-top-left-radius: 0.125rem; border-top-right-radius: 0.125rem; */\n.rounded-r-sm     /* border-top-right-radius: 0.125rem; border-bottom-right-radius: 0.125rem; */\n.rounded-b-sm     /* border-bottom-right-radius: 0.125rem; border-bottom-left-radius: 0.125rem; */\n.rounded-l-sm     /* border-top-left-radius: 0.125rem; border-bottom-left-radius: 0.125rem; */\n.rounded-t        /* border-top-left-radius: 0.25rem; border-top-right-radius: 0.25rem; */\n.rounded-r        /* border-top-right-radius: 0.25rem; border-bottom-right-radius: 0.25rem; */\n.rounded-b        /* border-bottom-right-radius: 0.25rem; border-bottom-left-radius: 0.25rem; */\n.rounded-l        /* border-top-left-radius: 0.25rem; border-bottom-left-radius: 0.25rem; */\n.rounded-t-md     /* border-top-left-radius: 0.375rem; border-top-right-radius: 0.375rem; */\n.rounded-r-md     /* border-top-right-radius: 0.375rem; border-bottom-right-radius: 0.375rem; */\n.rounded-b-md     /* border-bottom-right-radius: 0.375rem; border-bottom-left-radius: 0.375rem; */\n.rounded-l-md     /* border-top-left-radius: 0.375rem; border-bottom-left-radius: 0.375rem; */\n.rounded-t-lg     /* border-top-left-radius: 0.5rem; border-top-right-radius: 0.5rem; */\n.rounded-r-lg     /* border-top-right-radius: 0.5rem; border-bottom-right-radius: 0.5rem; */\n.rounded-b-lg     /* border-bottom-right-radius: 0.5rem; border-bottom-left-radius: 0.5rem; */\n.rounded-l-lg     /* border-top-left-radius: 0.5rem; border-bottom-left-radius: 0.5rem; */\n.rounded-t-full   /* border-top-left-radius: 9999px; border-top-right-radius: 9999px; */\n.rounded-r-full   /* border-top-right-radius: 9999px; border-bottom-right-radius: 9999px; */\n.rounded-b-full   /* border-bottom-right-radius: 9999px; border-bottom-left-radius: 9999px; */\n.rounded-l-full   /* border-top-left-radius: 9999px; border-bottom-left-radius: 9999px; */\n.rounded-tl-none  /* border-top-left-radius: 0; */\n.rounded-tr-none  /* border-top-right-radius: 0; */\n.rounded-br-none  /* border-bottom-right-radius: 0; */\n.rounded-bl-none  /* border-bottom-left-radius: 0; */\n.rounded-tl-sm    /* border-top-left-radius: 0.125rem; */\n.rounded-tr-sm    /* border-top-right-radius: 0.125rem; */\n.rounded-br-sm    /* border-bottom-right-radius: 0.125rem; */\n.rounded-bl-sm    /* border-bottom-left-radius: 0.125rem; */\n.rounded-tl       /* border-top-left-radius: 0.25rem; */\n.rounded-tr       /* border-top-right-radius: 0.25rem; */\n.rounded-br       /* border-bottom-right-radius: 0.25rem; */\n.rounded-bl       /* border-bottom-left-radius: 0.25rem; */\n.rounded-tl-md    /* border-top-left-radius: 0.375rem; */\n.rounded-tr-md    /* border-top-right-radius: 0.375rem; */\n.rounded-br-md    /* border-bottom-right-radius: 0.375rem; */\n.rounded-bl-md    /* border-bottom-left-radius: 0.375rem; */\n.rounded-tl-lg    /* border-top-left-radius: 0.5rem; */\n.rounded-tr-lg    /* border-top-right-radius: 0.5rem; */\n.rounded-br-lg    /* border-bottom-right-radius: 0.5rem; */\n.rounded-bl-lg    /* border-bottom-left-radius: 0.5rem; */\n.rounded-tl-full  /* border-top-left-radius: 9999px; */\n.rounded-tr-full  /* border-top-right-radius: 9999px; */\n.rounded-br-full  /* border-bottom-right-radius: 9999px; */\n.rounded-bl-full  /* border-bottom-left-radius: 9999px; */\n\n/* *******************************************************************************************\n * TABLES\n * ******************************************************************************************* */\n\n/*\n * TABLE LAYOUT\n * --------------------\n * Utilities for controlling the table layout algorithm.\n * By default, only responsive variants are generated for table layout utilities.\n */\n\n.table-auto   /* table-layout: auto; */\n.table-fixed  /* table-layout: fixed; */\n\n/*\n * BORDER COLLAPSE\n * --------------------\n * Utilities for controlling whether table borders should collapse or be separated.\n * By default, only responsive variants are generated for border collapse utilities.\n */\n\n.border-collapse  /* border-collapse: collapse; */\n.border-separate  /* border-collapse: separate; */\n \n/* *******************************************************************************************\n * EFFECTS\n * ******************************************************************************************* */\n \n/*\n * BOX SHADOW\n * --------------------\n * Utilities for controlling the box shadow of an element.\n * By default, only responsive, hover and focus variants are generated for box shadow utilities.\n */\n\n.shadow-xs       /* box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05); */\n.shadow-sm       /* box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); */\n.shadow          /* box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); */\n.shadow-md       /* box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); */\n.shadow-lg       /* box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); */\n.shadow-xl       /* box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); */\n.shadow-2xl      /* box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); */\n.shadow-inner    /* box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06); */\n.shadow-outline  /* box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5); */\n.shadow-none     /* box-shadow: none; */\n\n/*\n * OPACITY\n * --------------------\n * Utilities for controlling the opacity of an element.\n * By default, only responsive, hover and focus variants are generated for opacity utilities.\n */\n\n.opacity-100  /* opacity: 1; */\n.opacity-75   /* opacity: .75; */\n.opacity-50   /* opacity: .5; */\n.opacity-25   /* opacity: .25; */\n.opacity-0    /* opacity: 0; */\n\n/* *******************************************************************************************\n * TRANSITIONS\n * ******************************************************************************************* */\n \n/*\n * TRANSITION PROPERTY\n * --------------------\n * Utilities for controlling which CSS properties transition.\n * By default, only responsive variants are generated for transition-property utilities.\n */\n\n.transition-none       /* transition-property: none; */\n.transition-all        /* transition-property: all; */\n.transition            /* transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform; */\n.transition-colors     /* transition-property: background-color, border-color, color, fill, stroke; */\n.transition-opacity    /* transition-property: opacity; */\n.transition-shadow     /* transition-property: box-shadow; */\n.transition-transform  /* transition-property: transform; */\n\n/*\n * TRANSITION DURATION\n * --------------------\n * Utilities for controlling the duration of CSS transitions.\n * By default, only responsive variants are generated for transition-duration utilities.\n */\n\n.duration-75    /* transition-duration: 75ms; */\n.duration-100   /* transition-duration: 100ms; */\n.duration-150   /* transition-duration: 150ms; */\n.duration-200   /* transition-duration: 200ms; */\n.duration-300   /* transition-duration: 300ms; */\n.duration-500   /* transition-duration: 500ms; */\n.duration-700   /* transition-duration: 700ms; */\n.duration-1000  /* transition-duration: 1000ms; */\n\n/*\n * TRANSITION TIMING FUNCTION\n * --------------------\n * Utilities for controlling the easing of CSS transitions.\n * By default, only responsive variants are generated for transition-timing-function utilities.\n */\n\n.ease-linear  /* transition-timing-function: linear; */\n.ease-in      /* transition-timing-function: cubic-bezier(0.4, 0, 1, 1); */\n.ease-out     /* transition-timing-function: cubic-bezier(0, 0, 0.2, 1); */\n.ease-in-out  /* transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); */\n\n/* *******************************************************************************************\n * TRANSFORMS\n * ******************************************************************************************* */\n\n/*\n * SCALE\n * --------------------\n * Utilities for scaling elements with transform.\n * By default, only responsive, hover and focus variants are generated for scale utilities.\n */\n\n.scale-0      /* --transform-scale-x: 0; --transform-scale-y: 0; */\n.scale-50     /* --transform-scale-x: .5; --transform-scale-y: .5; */\n.scale-75     /* --transform-scale-x: .75; --transform-scale-y: .75; */\n.scale-90     /* --transform-scale-x: .9; --transform-scale-y: .9; */\n.scale-95     /* --transform-scale-x: .95; --transform-scale-y: .95; */\n.scale-100    /* --transform-scale-x: 1; --transform-scale-y: 1; */\n.scale-105    /* --transform-scale-x: 1.05; --transform-scale-y: 1.05; */\n.scale-110    /* --transform-scale-x: 1.1; --transform-scale-y: 1.1; */\n.scale-125    /* --transform-scale-x: 1.25; --transform-scale-y: 1.25; */\n.scale-150    /* --transform-scale-x: 1.5; --transform-scale-y: 1.5; */\n.scale-x-0    /* --transform-scale-x: 0; */\n.scale-x-50   /* --transform-scale-x: .5; */\n.scale-x-75   /* --transform-scale-x: .75; */\n.scale-x-90   /* --transform-scale-x: .9; */\n.scale-x-95   /* --transform-scale-x: .95; */\n.scale-x-100  /* --transform-scale-x: 1; */\n.scale-x-105  /* --transform-scale-x: 1.05; */\n.scale-x-110  /* --transform-scale-x: 1.1; */\n.scale-x-125  /* --transform-scale-x: 1.25; */\n.scale-x-150  /* --transform-scale-x: 1.5; */\n.scale-y-0    /* --transform-scale-y: 0; */\n.scale-y-50   /* --transform-scale-y: .5; */\n.scale-y-75   /* --transform-scale-y: .75; */\n.scale-y-90   /* --transform-scale-y: .9; */\n.scale-y-95   /* --transform-scale-y: .95; */\n.scale-y-100  /* --transform-scale-y: 1; */\n.scale-y-105  /* --transform-scale-y: 1.05; */\n.scale-y-110  /* --transform-scale-y: 1.1; */\n.scale-y-125  /* --transform-scale-y: 1.25; */\n.scale-y-150  /* --transform-scale-y: 1.5; */\n\n/*\n * ROTATE\n * --------------------\n * Utilities for rotating elements with transform.\n * By default, only responsive, hover and focus variants are generated for rotate utilities.\n */\n\n.rotate-0     /* --transform-rotate: 0; */\n.rotate-45    /* --transform-rotate: 45deg; */\n.rotate-90    /* --transform-rotate: 90deg; */\n.rotate-180   /* --transform-rotate: 180deg; */\n.-rotate-180  /* --transform-rotate: -180deg; */\n.-rotate-90   /* --transform-rotate: -90deg; */\n.-rotate-45   /* --transform-rotate: -45deg; */\n\n/*\n * TRANSLATE\n * --------------------\n * Utilities for translating elements with transform.\n * By default, only responsive, hover and focus variants are generated for translate utilities.\n */\n\n.translate-x-0      /* --transform-translate-x: 0; */\n.translate-x-1      /* --transform-translate-x: 0.25rem; */\n.translate-x-2      /* --transform-translate-x: 0.5rem; */\n.translate-x-3      /* --transform-translate-x: 0.75rem; */\n.translate-x-4      /* --transform-translate-x: 1rem; */\n.translate-x-5      /* --transform-translate-x: 1.25rem; */\n.translate-x-6      /* --transform-translate-x: 1.5rem; */\n.translate-x-8      /* --transform-translate-x: 2rem; */\n.translate-x-10     /* --transform-translate-x: 2.5rem; */\n.translate-x-12     /* --transform-translate-x: 3rem; */\n.translate-x-16     /* --transform-translate-x: 4rem; */\n.translate-x-20     /* --transform-translate-x: 5rem; */\n.translate-x-24     /* --transform-translate-x: 6rem; */\n.translate-x-32     /* --transform-translate-x: 8rem; */\n.translate-x-40     /* --transform-translate-x: 10rem; */\n.translate-x-48     /* --transform-translate-x: 12rem; */\n.translate-x-56     /* --transform-translate-x: 14rem; */\n.translate-x-64     /* --transform-translate-x: 16rem; */\n.translate-x-px     /* --transform-translate-x: 1px; */\n.-translate-x-1     /* --transform-translate-x: -0.25rem; */\n.-translate-x-2     /* --transform-translate-x: -0.5rem; */\n.-translate-x-3     /* --transform-translate-x: -0.75rem; */\n.-translate-x-4     /* --transform-translate-x: -1rem; */\n.-translate-x-5     /* --transform-translate-x: -1.25rem; */\n.-translate-x-6     /* --transform-translate-x: -1.5rem; */\n.-translate-x-8     /* --transform-translate-x: -2rem; */\n.-translate-x-10    /* --transform-translate-x: -2.5rem; */\n.-translate-x-12    /* --transform-translate-x: -3rem; */\n.-translate-x-16    /* --transform-translate-x: -4rem; */\n.-translate-x-20    /* --transform-translate-x: -5rem; */\n.-translate-x-24    /* --transform-translate-x: -6rem; */\n.-translate-x-32    /* --transform-translate-x: -8rem; */\n.-translate-x-40    /* --transform-translate-x: -10rem; */\n.-translate-x-48    /* --transform-translate-x: -12rem; */\n.-translate-x-56    /* --transform-translate-x: -14rem; */\n.-translate-x-64    /* --transform-translate-x: -16rem; */\n.-translate-x-px    /* --transform-translate-x: -1px; */\n.-translate-x-full  /* --transform-translate-x: -100%; */\n.-translate-x-1/2   /* --transform-translate-x: -50%; */\n.translate-x-1/2    /* --transform-translate-x: 50%; */\n.translate-x-full   /* --transform-translate-x: 100%; */\n.translate-y-0      /* --transform-translate-y: 0; */\n.translate-y-1      /* --transform-translate-y: 0.25rem; */\n.translate-y-2      /* --transform-translate-y: 0.5rem; */\n.translate-y-3      /* --transform-translate-y: 0.75rem; */\n.translate-y-4      /* --transform-translate-y: 1rem; */\n.translate-y-5      /* --transform-translate-y: 1.25rem; */\n.translate-y-6      /* --transform-translate-y: 1.5rem; */\n.translate-y-8      /* --transform-translate-y: 2rem; */\n.translate-y-10     /* --transform-translate-y: 2.5rem; */\n.translate-y-12     /* --transform-translate-y: 3rem; */\n.translate-y-16     /* --transform-translate-y: 4rem; */\n.translate-y-20     /* --transform-translate-y: 5rem; */\n.translate-y-24     /* --transform-translate-y: 6rem; */\n.translate-y-32     /* --transform-translate-y: 8rem; */\n.translate-y-40     /* --transform-translate-y: 10rem; */\n.translate-y-48     /* --transform-translate-y: 12rem; */\n.translate-y-56     /* --transform-translate-y: 14rem; */\n.translate-y-64     /* --transform-translate-y: 16rem; */\n.translate-y-px     /* --transform-translate-y: 1px; */\n.-translate-y-1     /* --transform-translate-y: -0.25rem; */\n.-translate-y-2     /* --transform-translate-y: -0.5rem; */\n.-translate-y-3     /* --transform-translate-y: -0.75rem; */\n.-translate-y-4     /* --transform-translate-y: -1rem; */\n.-translate-y-5     /* --transform-translate-y: -1.25rem; */\n.-translate-y-6     /* --transform-translate-y: -1.5rem; */\n.-translate-y-8     /* --transform-translate-y: -2rem; */\n.-translate-y-10    /* --transform-translate-y: -2.5rem; */\n.-translate-y-12    /* --transform-translate-y: -3rem; */\n.-translate-y-16    /* --transform-translate-y: -4rem; */\n.-translate-y-20    /* --transform-translate-y: -5rem; */\n.-translate-y-24    /* --transform-translate-y: -6rem; */\n.-translate-y-32    /* --transform-translate-y: -8rem; */\n.-translate-y-40    /* --transform-translate-y: -10rem; */\n.-translate-y-48    /* --transform-translate-y: -12rem; */\n.-translate-y-56    /* --transform-translate-y: -14rem; */\n.-translate-y-64    /* --transform-translate-y: -16rem; */\n.-translate-y-px    /* --transform-translate-y: -1px; */\n.-translate-y-full  /* --transform-translate-y: -100%; */\n.-translate-y-1/2   /* --transform-translate-y: -50%; */\n.translate-y-1/2    /* --transform-translate-y: 50%; */\n.translate-y-full   /* --transform-translate-y: 100%; */\n\n/*\n * SKEW\n * --------------------\n * Utilities for translating elements with transform.\n * By default, only responsive, hover and focus variants are generated for skew utilities.\n */\n\n.skew-x-0    /* --transform-skew-x: 0; */\n.skew-x-3    /* --transform-skew-x: 3deg; */\n.skew-x-6    /* --transform-skew-x: 6deg; */\n.skew-x-12   /* --transform-skew-x: 12deg; */\n.-skew-x-12  /* --transform-skew-x: -12deg; */\n.-skew-x-6   /* --transform-skew-x: -6deg; */\n.-skew-x-3   /* --transform-skew-x: -3deg; */\n.skew-y-0    /* --transform-skew-y: 0; */\n.skew-y-3    /* --transform-skew-y: 3deg; */\n.skew-y-6    /* --transform-skew-y: 6deg; */\n.skew-y-12   /* --transform-skew-y: 12deg; */\n.-skew-y-12  /* --transform-skew-y: -12deg; */\n.-skew-y-6   /* --transform-skew-y: -6deg; */\n.-skew-y-3   /* --transform-skew-y: -3deg; */\n\n/*\n * TRANSFORM ORIGIN\n * --------------------\n * Utilities for specifying the origin for an element's transformations.\n * By default, only responsive variants are generated for transform-origin utilities.\n */\n\n.origin-center        /* transform-origin: center; */\n.origin-top           /* transform-origin: top; */\n.origin-top-right     /* transform-origin: top right; */\n.origin-right         /* transform-origin: right; */\n.origin-bottom-right  /* transform-origin: bottom right; */\n.origin-bottom        /* transform-origin: bottom; */\n.origin-bottom-left   /* transform-origin: bottom left; */\n.origin-left          /* transform-origin: left; */\n.origin-top-left      /* transform-origin: top left; */\n\n/* *******************************************************************************************\n * INTERACTIVITY\n * ******************************************************************************************* */\n \n/*\n * APPEARANCE\n * --------------------\n * Utilities for suppressing native form control styling.\n * By default, only responsive variants are generated for appearance utilities.\n */\n\n.appearance-none  /* appearance: none; */\n\n/*\n * CURSOR\n * --------------------\n * Utilities for controlling the cursor style when hovering over an element.\n * By default, only responsive variants are generated for cursor utilities.\n */\n\n.cursor-auto         /* cursor: auto; */\n.cursor-default      /* cursor: default; */\n.cursor-pointer      /* cursor: pointer; */\n.cursor-wait         /* cursor: wait; */\n.cursor-text         /* cursor: text; */\n.cursor-move         /* cursor: move; */\n.cursor-not-allowed  /* cursor: not-allowed; */\n\n/*\n * OUTLINE\n * --------------------\n * Utilities for controlling an element's outline.\n * By default, only focus variants are generated for outline utilities.\n */\n\n.outline-none  /* outline: 0; */\n\n/*\n * POINTER EVENTS\n * --------------------\n * Utilities for controlling whether an element responds to pointer events.\n * By default, only responsive variants are generated for pointer event utilities.\n */\n\n.pointer-events-none  /* pointer-events: none; */\n.pointer-events-auto  /* pointer-events: auto; */\n\n/*\n * RESIZE\n * --------------------\n * Utilities for controlling how an element can be resized.\n * By default, only responsive variants are generated for resizing utilities.\n */\n\n.resize-none  /* resize: none; */\n.resize       /* resize: both; */\n.resize-y     /* resize: vertical; */\n.resize-x     /* resize: horizontal; */\n\n/*\n * USER SELECT\n * --------------------\n * Utilities for controlling whether the user can select text in an element.\n * By default, only responsive variants are generated for user-select utilities.\n */\n\n.select-none  /* user-select: none; */\n.select-text  /* user-select: text; */\n.select-all   /* user-select: all; */\n.select-auto  /* user-select: auto; */\n\n/* *******************************************************************************************\n * SVG\n * ******************************************************************************************* */\n \n/*\n * FILL\n * --------------------\n * Utilities for styling the fill of SVG elements.\n * By default, only responsive variants are generated for fill utilities.\n */\n\n.fill-current  /* fill: currentColor; */\n\n/*\n * STROKE\n * --------------------\n * Utilities for styling the stroke of SVG elements.\n * By default, only responsive variants are generated for stroke utilities.\n */\n\n.stroke-current  /* stroke: currentColor; */\n\n/*\n * STROKE WIDTH\n * --------------------\n * Utilities for styling the stroke width of SVG elements.\n * By default, only responsive variants are generated for stroke-width utilities.\n */\n\n.stroke-0  /* stroke-width: 0; */\n.stroke-1  /* stroke-width: 1; */\n.stroke-2  /* stroke-width: 2; */\n\n/* *******************************************************************************************\n * ACCESSIBILITY\n * ******************************************************************************************* */\n \n/*\n * SCREEN READERS\n * --------------------\n * Utilities for improving accessibility with screen readers.\n * By default, only responsive, hover, focus and active variants are generated for accessibility utilities.\n */\n\n.sr-only      /* position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; */\n.not-sr-only  /* position: static; width: auto; height: auto; padding: 0; margin: 0; overflow: visible; clip: auto; white-space: normal; */\n"
  },
  {
    "path": "frontend/vue.js",
    "content": "/* *******************************************************************************************\n * GLOBAL CONFIG\n * Vue.config is an object containing Vue’s global configurations.\n * You can modify its properties listed below before bootstrapping your application.\n * https://vuejs.org/v2/api/#Global-Config\n * ******************************************************************************************* */\n\n\n// Configure whether to allow vue-devtools inspection\nVue.config.devtools = true\n\n// Enable component init, compile, render and patch performance tracing in the browser devtool timeline.\nVue.config.performance = true\n\n// Prevent the production tip on Vue startup.\nVue.config.productionTip = false\n\n// Suppress all Vue logs and warnings\nVue.config.silent = false\n\n// Make Vue ignore custom elements defined outside of Vue\nVue.config.ignoredElements = [\n  'my-custom-web-component',\n  'another-web-component',\n  /^ion-/\n]\n\n// Define custom key alias(es) for v-on.\nVue.config.keyCodes = {\n  v: 86,\n  f1: 112,\n  // camelCase won`t work\n  mediaPlayPause: 179,\n  // instead you can use kebab-case with double quotation marks\n  \"media-play-pause\": 179,\n  up: [38, 87]\n}\n\n// Assign a handler for uncaught errors during component render function and watchers. \nVue.config.errorHandler = function (err, vm, info) {\n  // handle error\n  // `info` is a Vue-specific error info, e.g. which lifecycle hook\n  // the error was found in. Only available in 2.2.0+\n}\n\n// Define custom merging strategies for options\nVue.config.optionMergeStrategies._my_option = function (parent, child, vm) {\n  return child + 1\n}\n\n// Assign a custom handler for runtime Vue warnings.\n// Note this only works during development and is ignored in production.\nVue.config.warnHandler = function (msg, vm, trace) {\n  // `trace` is the component hierarchy trace\n}\n\n\n/* *******************************************************************************************\n * GLOBAL API\n * https://vuejs.org/v2/api/#Global-API\n * ******************************************************************************************* */\n\n\nVue.version                        // Provides the installed version of Vue as a string.\n\nVue.extend(options)                // Create a “subclass” of the base Vue constructor.\nVue.mixin( mixin )                 // Apply a mixin globally, which affects every Vue instance created afterwards.\nVue.nextTick([callback, context])  // Defer the callback to be executed after the next DOM update cycle.\nVue.use(plugin)                    // Install a Vue.js plugin. If the plugin is an Object, it must expose an install method.\n\nVue.set(target, key, value)        // Set a property on an object. If the object is reactive, ensure the property is created as a reactive property and trigger view updates.\nVue.delete(target, key)            // Delete a property on an object. If the object is reactive, ensure the deletion triggers view updates.\n\n// Register or retrieve a global directive.\nVue.directive('my-directive', {\n  bind: function () {},\n  inserted: function () {},\n  update: function () {},\n  componentUpdated: function () {},\n  unbind: function () {}\n})\n\n// Register (function directive)\nVue.directive('my-directive', function () {\n  // This will be called as `bind` and `update`\n})\n\n// Getter, return the directive definition if registered\nvar myDirective = Vue.directive('my-directive')\n\n// Register a global filter\nVue.filter('my-filter', function (value) { })\n\n// Getter, return the filter if registered\nvar myFilter = Vue.filter('my-filter')\n\n// Register an extended constructor\nVue.component('my-component', Vue.extend({ }))\n\n// Register an options object (automatically call Vue.extend)\nVue.component('my-component', { })\n\n// Retrieve a registered component (always return constructor)\nvar MyComponent = Vue.component('my-component')\n\nVue.compile(template)  // Compiles a template string into a render function\n\n\n/* *******************************************************************************************\n * OPTIONS > DATA\n * https://vuejs.org/v2/api/#Options-Data\n * ******************************************************************************************* */\n\n\nnew Vue({\n  // A list/hash of attributes that are exposed to accept data from the parent component.\n  // It has an Array-based simple syntax and an alternative Object-based syntax that allows\n  // advanced configurations such as type checking, custom validation and default values.\n  props: {\n    height: Number,\n    age: {\n      type: Number,\n      default: 0,\n      required: true,\n      validator: function (value) {\n        return value >= 0\n      }\n    }\n  },\n\n  // Primarily intended to make unit testing easier\n  propsData: {\n    age: 12\n  },\n\n  // The data object for the Vue instance.\n  // Vue will recursively convert its properties into getter/setters to make it “reactive”. \n  // Note: you should not use an arrow function with the data property\n  data () {\n    return {\n      a: 1,\n      b: 2\n    }\n  },\n\n  // Computed properties to be mixed into the Vue instance.\n  // All getters and setters have their this context automatically bound to the Vue instance.\n  // Computed properties are cached, and only re-computed on reactive dependency changes.\n  // Note that if a certain dependency is out of the instance’s scope (i.e. not reactive),\n  // the computed property will not be updated.\n  computed: {\n    // Note: you should not use an arrow function to define a computed property.\n    aDouble: function () {\n      return this.a * 2\n    },\n    aPlus: {\n      get: function () {\n        return this.a + 1\n      },\n      set: function (v) {\n        this.a = v - 1\n      }\n    }\n  },\n\n  // An object where keys are expressions to watch and values are the corresponding callbacks.\n  // The value can also be a string of a method name, or an Object that contains additional options.\n  // The Vue instance will call $watch() for each entry in the object at instantiation.\n  watch: {\n    // Note: you should not use an arrow function to define a watcher.\n    a: function (val, oldVal) {\n      console.log('new: %s, old: %s', val, oldVal)\n    },\n    // String method name\n    b: 'someMethod',\n    // Deep watcher\n    c: {\n      handler: function (val, oldVal) { /* ... */ },\n      deep: true\n    },\n    // The callback will be called immediately after the start of the observation\n    d: {\n      handler: function (val, oldVal) { /* ... */ },\n      immediate: true\n    }\n  },\n\n  // Methods to be mixed into the Vue instance. You can access these methods directly on the VM instance,\n  // or use them in directive expressions. All methods will have their this context automatically bound to\n  // the Vue instance.\n  methods: {\n    // Note: you should not use an arrow function to define a method.\n    plus () {\n      this.a++\n    }\n  }\n})\n\n\n/* *******************************************************************************************\n * OPTIONS > DOM\n * https://vuejs.org/v2/api/#Options-DOM\n * ******************************************************************************************* */\n\n\nnew Vue({\n  // Provide the Vue instance an existing DOM element to mount on.\n  // It can be a CSS selector string or an actual HTMLElement.\n  // After the instance is mounted, the resolved element will be accessible as vm.$el.\n  el: '#example',\n\n  // A string template to be used as the markup for the Vue instance.\n  // The template will replace the mounted element.\n  // Any existing markup inside the mounted element will be ignored,\n  // unless content distribution slots are present in the template.\n  // If the string starts with # it will be used as a querySelector and\n  // use the selected element’s innerHTML as the template string. This\n  // allows the use of the common <script type=\"x-template\"> trick to include templates.\n  template: `\n    <div class=\"checkbox-wrapper\" @click=\"check\">\n      <div :class=\"{ checkbox: true, checked: checked }\"></div>\n      <div class=\"title\">{{ title }}</div>\n    </div>\n  `,\n\n  // An alternative to string templates allowing you to leverage the full programmatic power of JavaScript.\n  // The render function receives a createElement method as it’s first argument used to create VNodes.\n  // If the component is a functional component, the render function also receives an extra argument context,\n  // which provides access to contextual data since functional components are instance-less.\n  render (createElement) {\n    // create kebabCase id\n    var headingId = getChildrenTextContent(this.$slots.default)\n    .toLowerCase()\n    .replace(/\\W+/g, '-')\n    .replace(/(^\\-|\\-$)/g, '')\n\n    return createElement(\n      'h' + this.level,\n      [\n        createElement('a', {\n          attrs: {\n            name: headingId,\n            href: '#' + headingId\n          }\n        }, this.$slots.default)\n      ]\n    )\n  },\n\n  // Provide an alternative render output when the default render function encounters an error.\n  // The error will be passed to renderError as the second argument.\n  // This is particularly useful when used together with hot-reload.\n  renderError (createElement, err) {\n    return createElement('pre', { style: { color: 'red' }}, err.stack)\n  }\n})\n\n\n/* *******************************************************************************************\n * OPTIONS > LIFECYCLE HOOKS\n * https://vuejs.org/v2/api/#Options-Lifecycle-Hooks\n * ******************************************************************************************* */\n\n\n// All lifecycle hooks automatically have their this context bound to the instance,\n// so that you can access data, computed properties, and methods. This means you should not\n// use an arrow function to define a lifecycle method (e.g. created: () => this.fetchTodos()).\n// The reason is arrow functions bind the parent context, so this will not be the Vue instance as\n// you expect and this.fetchTodos will be undefined.\n\nnew Vue({\n  // Called synchronously immediately after the instance has been initialized,\n  // before data observation and event/watcher setup.\n  beforeCreate () {\n    console.log('The instance has been initialized')\n  },\n\n  // Called synchronously after the instance is created. At this stage, the instance has\n  // finished processing the options which means the following have been set up: data observation,\n  // computed properties, methods, watch/event callbacks. However, the mounting phase has not been\n  // started, and the $el property will not be available yet.\n  created () {\n    console.log('The instance has been created')\n  },\n\n  // Called right before the mounting begins: the render function\n  // is about to be called for the first time.\n  beforeMount () {\n    console.log('The instance is about to be mounted')\n  },\n\n  // Called after the instance has been mounted, where el is replaced by the newly created vm.$el.\n  // If the root instance is mounted to an in-document element, vm.$el will also be in-document when\n  // mounted is called.\n  mounted () {\n    console.log('The instance has been mounted')\n\n    // Note that mounted does not guarantee that all child components have also been mounted.\n    // If you want to wait until the entire view has been rendered, you can use vm.$nextTick\n    // inside of mounted:\n    this.$nextTick(function () {\n      // Code that will run only after the\n      // entire view has been rendered\n    })\n  },\n\n  // Called when the data changes, before the virtual DOM is re-rendered and patched.\n  // You can perform further state changes in this hook and they will not trigger additional re-renders.\n  // This hook is not called during server-side rendering.  \n  beforeUpdate () {\n    console.log('The instance is about to be re-rendered and patched')\n  },\n\n  // The component’s DOM will have been updated when this hook is called, so you can perform DOM-dependent\n  // operations here. However, in most cases you should avoid changing state inside the hook. To react\n  // to state changes, it’s usually better to use a computed property or watcher instead.\n  updated () {\n    console.log('The instance has been re-rendered and patched')\n\n    // Note that updated does not guarantee that all child components have also been re-rendered.\n    // If you want to wait until the entire view has been re-rendered, you can use vm.$nextTick\n    // inside of updated:\n    this.$nextTick(function () {\n      // Code that will run only after the\n      // entire view has been re-rendered\n    })\n  },\n\n  // Called when a kept-alive component is activated.\n  activated () {\n    console.log('Component activated')\n  },\n\n  // Called when a kept-alive component is deactivated.  \n  deactivated () {\n    console.log('Component deactivated')\n  },\n\n  // Called right before a Vue instance is destroyed.\n  // At this stage the instance is still fully functional.\n  beforeDestroy () {\n    console.log('The instance is about to be destroyed')\n  },\n\n  // Called after a Vue instance has been destroyed.\n  // When this hook is called, all directives of the Vue instance have been unbound,\n  // all event listeners have been removed, and all child Vue instances have also been destroyed.  \n  destroyed () {\n    console.log('The instance has been destroyed')\n  },\n\n  // Called when an error from any descendent component is captured.\n  // The hook receives three arguments: the error, the component instance that triggered the error,\n  // and a string containing information on where the error was captured.\n  // The hook can return false to stop the error from propagating further.\n  errorCaptured (error, vm, info) {\n    console.log(`The error (${error}) has been captured for ${vm}: ${info}`)\n\n    // An errorCaptured hook can return false to prevent the error from propagating further.\n    // This is essentially saying “this error has been handled and should be ignored.”\n    // It will prevent any additional errorCaptured hooks or the global config.errorHandler\n    // from being invoked for this error.\n    return false\n  },\n})\n\n\n/* *******************************************************************************************\n * OPTIONS > ASSETS\n * https://vuejs.org/v2/api/#Options-Assets\n * ******************************************************************************************* */\n\n\nnew Vue({\n  // A hash of directives to be made available to the Vue instance.\n  directives: {\n    myDirective: {\n      // Called only once, when the directive is first bound to the element.\n      // This is where you can do one-time setup work.\n      bind: function (el, binding, vnode, oldVnode) {\n        console.log('The directive is first bound to the element.')\n      },\n\n      // Called when the bound element has been inserted into its parent node\n      // (this only guarantees parent node presence, not necessarily in-document).\n      inserted: function (el, binding, vnode, oldVnode) {\n        console.log('The bound element has been inserted into its parent node.')\n      },\n\n      // Called after the containing component’s VNode has updated, but possibly before its\n      // children have updated. The directive’s value may or may not have changed, but you can\n      // skip unnecessary updates by comparing the binding’s current and old values (see below\n      // on hook arguments).\n      update: function (el, binding, vnode, oldVnode) {\n        console.log('The component VNode has updated.')\n      },\n\n      // Called after the containing component’s VNode and the VNodes of its children have updated.\n      componentUpdated: function (el, binding, vnode, oldVnode) {\n        console.log('The component’s VNode and the VNodes of its children have updated.')\n      },\n      \n      // Called only once, when the directive is unbound from the element.\n      unbind: function (el, binding, vnode, oldVnode) {\n        console.log('The directive is unbound from the element.')\n      },\n    }\n  },\n\n  // A hash of filters to be made available to the Vue instance.\n  filters: {\n    myFilter: function (value) {\n      console.log('Do your computations and return something to display.')\n    }\n  }\n})\n\n\n/* *******************************************************************************************\n * OPTIONS > COMPOSITION\n * https://vuejs.org/v2/api/#Options-Composition\n * ******************************************************************************************* */\n\n\nnew Vue({\n  // Specify the parent instance for the instance to be created. Establishes a parent-child\n  // relationship between the two. The parent will be accessible as this.$parent for the child,\n  // and the child will be pushed into the parent’s $children array.\n  parent: vueInstance,\n\n  // The mixins option accepts an array of mixin objects. These mixin objects can contain instance\n  // options like normal instance objects, and they will be merged against the eventual options\n  // using the same option merging logic in Vue.extend(). e.g. If your mixin contains a created\n  // hook and the component itself also has one, both functions will be called.\n  // Mixin hooks are called in the order they are provided, and called before the component’s own hooks.\n  mixins: [mixin],\n\n  // Allows declaratively extending another component (could be either a plain options object or a\n  // constructor) without having to use Vue.extend. This is primarily intended to make it easier to\n  // extend between single file components. This is similar to mixins, the difference being that\n  // the component’s own options takes higher priority than the source component being extended.\n  extends: ObjectOrFunction,\n})\n\n\n/* *******************************************************************************************\n * OPTIONS > MISC\n * https://vuejs.org/v2/api/#Options-Lifecycle-Hooks\n * ******************************************************************************************* */\n\n\nnew Vue({\n  // Allow the component to recursively invoke itself in its template.\n  // Note that when a component is registered globally with Vue.component(), the global ID is\n  // automatically set as its name.\n  // Another benefit of specifying a name option is debugging. Named components result in more\n  // helpful warning messages. Also, when inspecting an app in the vue-devtools, unnamed components\n  // will show up as <AnonymousComponent>, which isn’t very informative. By providing the name\n  // option, you will get a much more informative component tree.\n  name: 'myComponent',\n\n  // Change the plain text interpolation delimiters.\n  delimiters: ['${', '}'],\n\n  // Causes a component to be stateless (no data) and instanceless (no this context). They are\n  // only a render function that returns virtual nodes making them much cheaper to render.\n  functional: true,\n\n  // By default, parent scope attribute bindings that are not recognized as props will\n  // “fallthrough” and be applied to the root element of the child component as normal HTML\n  // attributes. When authoring a component that wraps a target element or another component,\n  // this may not always be the desired behavior. By setting inheritAttrs to false, this default\n  // behavior can be disabled. The attributes are available via the $attrs instance property\n  // (also new in 2.4) and can be explicitly bound to a non-root element using v-bind.\n  // Note: this option does not affect class and style bindings.  \n  inheritAttrs: true,\n\n  // When set to true, will preserve and render HTML comments found in templates. The default\n  // behavior is discarding them.\n  comments: true,\n})\n\n\n/* *******************************************************************************************\n * INSTANCE PROPERTIES\n * https://vuejs.org/v2/api/#Instance-Properties\n * ******************************************************************************************* */\n\n\n// The data object that the Vue instance is observing.\n// The Vue instance proxies access to the properties on its data object.\nvm.$data\n\n// An object representing the current props a component has received.\n// The Vue instance proxies access to the properties on its props object.\nvm.$props\n\n// The root DOM element that the Vue instance is managing.\nvm.$el\n\n// The instantiation options used for the current Vue instance.\n// This is useful when you want to include custom properties in the options:\nvm.$options\n\n// The parent instance, if the current instance has one.\nvm.$parent\n\n// The root Vue instance of the current component tree.\n// If the current instance has no parents this value will be itself.\nvm.$root\n\n// The direct child components of the current instance.\n// Note there’s no order guarantee for $children, and it is not reactive.\n// If you find yourself trying to use $children for data binding,\n// consider using an Array and v-for to generate child components,\n// and use the Array as the source of truth.\nvm.$children\n\n// Used to programmatically access content distributed by slots.\n// Each named slot has its own corresponding property (e.g. the contents of slot=\"foo\" will\n// be found at vm.$slots.foo). The default property contains any nodes not included in a named slot.\n// Accessing vm.$slots is most useful when writing a component with a render function.\nvm.$slots\n\n// Used to programmatically access scoped slots. For each slot, including the default one, the\n// object contains a corresponding function that returns VNodes.\n// Accessing vm.$scopedSlots is most useful when writing a component with a render function.\nvm.$scopedSlots\n\n// An object that holds child components that have ref registered.\nvm.$refs\n\n// Whether the current Vue instance is running on the server.\nvm.$isServer\n\n// Contains parent-scope attribute bindings (except for class and style) that are not recognized\n// (and extracted) as props. When a component doesn’t have any declared props, this essentially\n// contains all parent-scope bindings (except for class and style), and can be passed down to an\n// inner component via v-bind=\"$attrs\" - useful when creating higher-order components.\nvm.$attrs\n\n// Contains parent-scope v-on event listeners (without .native modifiers).\n// This can be passed down to an inner component via v-on=\"$listeners\" - useful when creating\n// higher-order components.\nvm.$listeners\n\n\n/* *******************************************************************************************\n * INSTANCE METHODS > DATA\n * https://vuejs.org/v2/api/#Instance-Methods-Data\n * ******************************************************************************************* */\n\n\n// Watch an expression or a computed function on the Vue instance for changes.\n// The callback gets called with the new value and the old value.\n// The expression only accepts dot-delimited paths.\n// For more complex expressions, use a function instead.\nvar unwatch = vm.$watch('a.b.c', function (newVal, oldVal) {\n  // do something\n}, {\n  // To also detect nested value changes inside Objects, you need to pass in deep: true\n  // in the options argument. Note that you don’t need to do so to listen for Array mutations.\n  deep: true,\n\n  // Passing in immediate: true in the option will trigger the callback immediately with the\n  // current value of the expression:\n  immediate: true\n})\n\n// later, teardown the watcher\nunwatch()\n\n// This is the alias of the global Vue.set.\nvm.$set(target,key, value)\n\n// This is the alias of the global Vue.delete.\nvm.$delete(target, key)\n\n\n/* *******************************************************************************************\n * INSTANCE METHODS > EVENTS\n * https://vuejs.org/v2/api/#Instance-Methods-Events\n * ******************************************************************************************* */\n\n\n// Listen for a custom event on the current vm. Events can be triggered by vm.$emit.\n// The callback will receive all the additional arguments passed into these event-triggering methods.\nvm.$on(event, callback)\n\n// Listen for a custom event, but only once.\n// The listener will be removed once it triggers for the first time.\nvm.$once(event, callback)\n\n// Remove custom event listener(s).\n// If no arguments are provided, remove all event listeners;\n// If only the event is provided, remove all listeners for that event;\n// If both event and callback are given, remove the listener for that specific callback only.\nvm.$off([event, callback])\n\n// Trigger an event on the current instance.\n// Any additional arguments will be passed into the listener’s callback function.\nvm.$emit(event, […args])\n\n\n/* *******************************************************************************************\n * INSTANCE METHODS > LIFECYCLE\n * https://vuejs.org/v2/api/#Instance-Methods-Lifecycle\n * ******************************************************************************************* */\n\n\n// If a Vue instance didn’t receive the el option at instantiation, it will be in “unmounted”\n// state, without an associated DOM element. vm.$mount() can be used to manually start the mounting\n// of an unmounted Vue instance.\nvm.$mount([elementOrSelector])\n\n// Force the Vue instance to re-render. Note it does not affect all child components,\n// only the instance itself and child components with inserted slot content.\nvm.$forceUpdate()\n\n// Defer the callback to be executed after the next DOM update cycle.\n// Use it immediately after you’ve changed some data to wait for the DOM update.\n// This is the same as the global Vue.nextTick, except that the callback’s this context is\n// automatically bound to the instance calling this method.\nvm.$nextTick([callback])\n\n// Completely destroy a vm. Clean up its connections with other existing vms, unbind all its\n// directives, turn off all event listeners.\n// Triggers the beforeDestroy and destroyed hooks.\nvm.$destroy()\n\n\n/* *******************************************************************************************\n * DIRECTIVES\n * https://vuejs.org/v2/api/#Directives\n * ******************************************************************************************* */\n\n\n// <!-- Updates the element’s textContent. -->\n// <!-- If you need to update the part of textContent, you should use {{ Mustache }} interpolations. -->\n\n// <span v-text=\"msg\"></span>\n\n\n// <!-- Updates the element’s innerHTML. Note that the contents are inserted as plain HTML -->\n// <!-- they will not be compiled as Vue templates. If you find yourself trying to compose templates -->\n// <!-- using v-html, try to rethink the solution by using components instead. -->\n\n// <div v-html=\"html\"></div>\n\n\n// <!-- Toggle’s the element’s display CSS property based on the truthy-ness of the expression value. -->\n// <!-- This directive triggers transitions when its condition changes. -->\n\n// <div v-show=\"condition\"></div>\n\n\n// <!-- Conditionally render the element based on the truthy-ness of the expression value. -->\n// <!-- The element and its contained directives / components are destroyed and re-constructed -->\n// <!-- during toggles. If the element is a <template> element, its content will be extracted as -->\n// <!-- the conditional block. This directive triggers transitions when its condition changes. -->\n\n// <div v-if=\"condition\"></div>\n// <div v-else-if=\"anotherCondition\"></div>\n// <div v-else></div>\n\n\n// <!-- Render the element or template block multiple times based on the source data. -->\n// <!-- The directive’s value must use the special syntax alias in expression to provide an alias -->\n// <!-- for the current element being iterated on: -->\n\n// <div v-for=\"item in items\">{{ item.text }}</div>\n\n\n// <!-- Alternatively, you can also specify an alias for the index (or the key if used on an Object): -->\n\n// <div v-for=\"(item, index) in items\"></div>\n// <div v-for=\"(val, key) in object\"></div>\n// <div v-for=\"(val, key, index) in object\"></div>\n\n\n// <!-- Attaches an event listener to the element. The event type is denoted by the argument. -->\n// <!-- The expression can be a method name, an inline statement, or omitted if there are modifiers present. -->\n\n// .stop:                                           Call event.stopPropagation().\n// .prevent:                                        Call event.preventDefault().\n// .capture:                                        Add event listener in capture mode.\n// .self:                                           Only trigger handler if event was dispatched from this element.\n// .{keyCode | keyAlias}:                           Only trigger handler on certain keys.\n// .native:                                         Listen for a native event on the root element of component.\n// .once:                                           Trigger handler at most once.\n// .left:                                           (2.2.0+) only trigger handler for left button mouse events.\n// .right:                                          (2.2.0+) only trigger handler for right button mouse events.\n// .middle:                                         (2.2.0+) only trigger handler for middle button mouse events.\n// .passive:                                        (2.3.0+) attaches a DOM event with { passive: true }.\n\n// Method handler:                                  <button v-on:click=\"doThis\"></button>\n// Object syntax (2.4.0+):                          <button v-on=\"{ mousedown: onMouseDown, mouseup: onMouseUp }\"></button>\n// Inline statement:                                <button v-on:click=\"doThat('hello', $event)\"></button>\n// Shorthand:                                       <button @click=\"doThis\"></button>\n// Stop propagation:                                <button @click.stop=\"doThis\"></button>\n// Prevent default:                                 <button @click.prevent=\"doThis\"></button>\n// Prevent default without expression:              <form @submit.prevent></form>\n// Chain modifiers:                                 <button @click.stop.prevent=\"doThis\"></button>\n// Key modifier using keyAlias:                     <input @keyup.enter=\"onEnter\">\n// Key modifier using keyCode:                      <input @keyup.13=\"onEnter\">\n// The click event will be triggered at most once:  <button v-on:click.once=\"doThis\"></button>\n\n\n// <!-- Dynamically bind one or more attributes, or a component prop to an expression. -->\n// <!-- When used to bind the class or style attribute, it supports additional value types such as -->\n// <!-- Array or Objects. See linked guide section below for more details. -->\n\n// .prop:                                                    Bind as a DOM property instead of an attribute.\n// .camel:                                                   (2.1.0+) transform the kebab-case attribute name into camelCase.\n// .sync:                                                    (2.3.0+) a syntax sugar that expands into a v-on handler for updating the bound value.\n\n// Bind an attribute:                                        <img v-bind:src=\"imageSrc\">\n// Shorthand:                                                <img :src=\"imageSrc\">\n// With inline string concatenation:                         <img :src=\"'/path/to/images/' + fileName\">\n// Class binding:                                            <div :class=\"{ red: isRed }\"></div>\n// Style binding:                                            <div :style=\"{ fontSize: size + 'px' }\"></div>\n// Binding an object of attributes                           <div v-bind=\"{ id: someProp, 'other-attr': otherProp }\"></div>\n// DOM attribute binding with prop modifier:                 <div v-bind:text-content.prop=\"text\"></div>\n// Prop binding. \"prop\" must be declared in my-component:    <my-component :prop=\"someThing\"></my-component>\n// Pass down parent props in common with a child component:  <child-component v-bind=\"$props\"></child-component>\n// XLink:                                                    <svg><a :xlink:special=\"foo\"></a></svg>\n\n\n// <!-- Create a two-way binding on a form input element or a component. -->\n// <!-- For detailed usage and other notes, see the Guide section linked below. -->\n\n// .lazy:    Listen to change events instead of input\n// .number:  Cast input string to numbers\n// .trim:    Trim input\n\n// <input v-model=\"message\" placeholder=\"edit me\">\n// <textarea v-model=\"message\" placeholder=\"add multiple lines\"></textarea>\n// <input type=\"checkbox\" id=\"checkbox\" v-model=\"checked\">\n\n\n// <!-- Skip compilation for this element and all its children. -->\n// <!-- You can use this for displaying raw mustache tags. -->\n// <!-- Skipping large numbers of nodes with no directives on them can also speed up compilation. -->\n\n// <span v-pre>{{ this will not be compiled }}</span>\n\n\n// <!-- This directive will remain on the element until the associated Vue instance finishes -->\n// <!-- compilation. Combined with CSS rules such as [v-cloak] { display: none }, this directive -->\n// <!-- can be used to hide un-compiled mustache bindings until the Vue instance is ready. -->\n\n// <div v-cloak>{{ message }}</div>\n// [v-cloak] { display: none; }\n\n\n// <!-- Render the element and component once only. On subsequent re-renders, the element/component -->\n// <!-- and all its children will be treated as static content and skipped. This can be used to -->\n// <!-- optimize update performance. -->\n\n// <span v-once>This will never change: {{msg}}</span>\n// <my-component v-once :comment=\"msg\"></my-component>\n\n\n/* *******************************************************************************************\n * SPECIAL ATTRIBUTES\n * https://vuejs.org/v2/api/#Special-Attributes\n * ******************************************************************************************* */\n\n\n// <!-- The key special attribute is primarily used as a hint for Vue’s virtual DOM algorithm to -->\n// <!-- identify VNodes when diffing the new list of nodes against the old list. Without keys, Vue uses -->\n// <!-- an algorithm that minimizes element movement and tries to patch/reuse elements of the same type -->\n// <!-- in-place as much as possible. With keys, it will reorder elements based on the order change of -->\n// <!-- keys, and elements with keys that are no longer present will always be removed/destroyed. -->\n\n// <ul><li v-for=\"item in items\" :key=\"item.id\">...</li></ul>\n// <transition><span :key=\"text\">{{ text }}</span></transition>\n\n\n// <!-- ref is used to register a reference to an element or a child component. The reference will be -->\n// <!-- registered under the parent component’s $refs object. If used on a plain DOM element, the -->\n// <!-- reference will be that element; if used on a child component, the reference will be component instance: -->\n\n// <!-- vm.$refs.p will be the DOM node -->\n// <p ref=\"p\">hello</p>\n\n// <!-- vm.$refs.child will be the child comp instance -->\n// <child-comp ref=\"child\"></child-comp>\n\n\n// <!-- Used on content inserted into child components to indicate which named slot the content belongs to. -->\n// <!-- Child markup: -->\n// <header><slot name=\"header\"></slot></header>\n// <!-- Parent markup: -->\n// <app-layout><h1 slot=\"header\">Here might be a page title</h1></app-layout>\n\n\n// <!-- Used for dynamic components and to work around limitations of in-DOM templates. -->\n// <component :is=\"currentView\"></component>\n"
  },
  {
    "path": "languages/C#.txt",
    "content": "CHEATSHEET C#\n\n1. Data Types\n\n    Primitive   Size            Example\n\n    String      2 bytes/char    s = \"reference\";\n    bool                        b = true;\n    char        2 bytes         ch = 'a';\n    byte        1 byte          b = 0x78;\n    short       2 bytes         val = 70;\n    int         4 bytes         val = 700;\n    long        8 bytes         val = 70;\n    float       4 bytes         val = 70.0F;\n    double      8 bytes         val = 70.0D;\n    decimal     16 bytes        val = 70.0M;\n\n2. Arrays\n\n    2.1 Declaration\n\n    //Initiliazed using a list defined with curly braces\n    int[] nameArray = {100, 101, 102};\n\n    //Define an empty array\n    int[] nameArray = new int[3]; // 3 rows and 2 columns\n\n    //To access a specific item in the array\n    int[] nameArray = new int[10];\n    int firstNumber = nameArray[0];\n    nameArray[1] = 20;\n\n    //Multidimensional arrays\n    int [,] matrix = new int [2,2]\n    matrix[0,0] = 1;\n    matrix[0,1] = 2;\n    matrix[1,0] = 3;\n    matrix[1,1] = 4;\n\n    int[,] predefinedMatrix = new int[2,2] { { 1, 2 }, { 3, 4 } };\n\n    2.2 Array Operations\n\n    //Sort ascending\n    Array.Sort(nameArray);\n\n    //Sort begins at element 6 and sorts 20 elements\n    Array.Sort(nameArray,6,20);\n\n    //Use 1 array as a key & sort 2 arrays\n    string[] values = {\"Juan\", \"Victor\", \"Elena\"};\n    string[] keys = {\"Jimenez\", \"Martin\", \"Ortiz\"};\n    Array.Sort(keys, values);\n\n    //Clear elements in array (array, first element, # elements)\n    Array.Clear(nameArray, 0, nameArray.Length);\n\n    //Copy elements from one array to another\n    Array.Copy(scr, target, numOfElements);\n\n3. String Operations\n\n    //To concatenate between strings, use the plus operator:\n    string firstName = \"Erin\";\n    string lastName = \"Roger\";\n    string fullName = firstName + \" \" + lastName;\n\n    //To add one string to another, use the += operator:\n    string secondLastName = \"Green\";\n    string fullName += secondLastName;\n\n    //ToString function\n    //It converts an object to its string representation so that it is suitable for display\n    Object.ToString();\n\n    //String formatting\n    //Each additional argument to the function can be referred to in the string using the brackets operator with the index number.\n    String.Format(String format, Object arg0);\n     format - A composite format string that includes one or more format items\n     arg0 - The first or only object to format\n\n    //Substring\n    //Returns a part of the string, beginning from the index specified as the argument. Substring also accepts a maximum length for the substring\n    String.Substring(beginAt);\n    String.Substring(beginAt, maximum);\n\n    //Replace\n    string newStr = oldStr.Replace(\"old\",\"new\");\n\n    //IndexOf\n    //Finds the first occurrence of a string in a larger string\n    //Returns -1 if the string is not found\n    String.IndexOf(val, start, num)\n    val - string to search for\n    start - where to begin in string\n\n    //LastIndexOf\n    //Search from end of string\n\n    //Split\n    //Split is used to break delimited string into substrings\n    String.Split(Char[]);\n\n    //ToCharArray\n    //Places selected characters in a string in a char array\n    String str = \"AaBbCcDd\";\n    //create array of 8 vowels\n    var chars = str.ToCharArray();\n    //create array of 'B' and 'C'\n    var chars = str.ToCharArray(2,2);\n\n4. System.Text.StringBuilder\n\n    4.1 Constructor\n\n    StringBuilder sb = new StringBuilder();\n    StringBuilder sb = new StringBuilder(myString);\n    StringBuilder sb = new StringBuilder(myString, capacity);\n\n    myString - Initial value of StringBuilder object\n    capacity - Initial size of buffer\n\n5. DateTime\n\n    5.1 DateTime Constructor\n\n    DateTime(year, month, day)\n    DateTime(year, month, day, hour, minute, second)\n\n    DateTime newYear = DateTime.Parse(\"1/1/2018\"):\n    DateTime currentDate = DateTime.Now;\n    DateTime nextYear = DateTime.AddYears(1);\n\n6. TimeSpan\n\n    6.1 TimeSpan Constructor\n\n    TimeSpan(hour, minute, sec)\n\n    TimeSpan timeS = new TimeSpan(10, 14, 50);\n    TimeSpan timeS_Hours = TimeSpan.FromDays(3640);\n\n7. Formatting Values\n\n    Format item syntax: {index[,alignment][:format string]}\n    index - Specifies element in list of values to which format is applied\n    alignment - Indicates minimum width (in characters) to display value\n    format string - Contains the code which specifies the format of the displayed value\n\n    7.1 Numeric\n\n    Format   Name           Pattern             Value       Result\n    C or c   Currency       {0:C2}, 1000.1      $ 1000.1    A currency value\n    D or d   Decimal        {0:D5}, 30          00030       Integer digits with optional negative sign\n    E or e   Exponential    {0,9:E2}, 120.2     1.20+E002   Exponential notation\n    F or f   Fixed-point    {0,9:F2}, 120.2     120.2       Integral and decimal digits with optional negative sign\n    G or g   General        {0,9:G2}, 120.2     120.2       The more compact of either fixed-point or scientific notation\n    N or n   Number         {0,9:N1}, 1300.5    1,300,5    Integral and decimal digits, group separators, and a decimal separator with optional negative sign\n    P or p   Percent        {0,9:P3}, .0903     9.03%       Number multiplied by 100 and displayed with a percent symbol\n    R or r   Round-trip     {0,9:R}, 3.1416     3.1316      A string that can round-trip to an identical number\n    X or x   Hexadecimal    {0,9:X4}, 31        001f        A hexadecimal string\n\n8. C# compiler at the Command Line\n\n    csc File.cs -> Compiles File.cs producing File.exe\n    csc -target:library File.cs -> Compiles File.cs producing File.dll\n    csc -out:My.exe File.cs -> Compiles File.cs and creates My.exe\n    csc -define:DEBUG -optimize -out:File2.exe *.cs -> Compiles all the C# files in the current directory with optimizations enabled and defines the DEBUG symbol. The output is File2.exe\n    csc -target:library -out:File2.dll -warn:0 -nologo -debug *.cs -> Compiles all the C# files in the current directory producing a debug version of File2.dll. No logo and no warnings are displayed\n    csc -target:library -out:Something.xyz *.cs -> Compiles all the C# files in the current directory to Something.xyz (a DLL)\n\n    8.1 Compiler Options Listed\n\n    Option\t                    Purpose\n    @\t                        Reads a response file for more options.\n    -?\t                        Displays a usage message to stdout.\n    -additionalfile\t            Names additional files that don't directly affect code generation but may be used by analyzers for producing errors or warnings.\n    -addmodule\t                Links the specified modules into this assembly\n    -analyzer\t                Run the analyzers from this assembly (Short form: -a)\n    -appconfig\t                Specifies the location of app.config at assembly binding time.\n    -baseaddress\t            Specifies the base address for the library to be built.\n    -bugreport\t                Creates a 'Bug Report' file. This file will be sent together with any crash information if it is used with -errorreport:prompt or -errorreport:send.\n    -checked\t                Causes the compiler to generate overflow checks.\n    -checksumalgorithm:<alg>\tSpecifies the algorithm for calculating the source file checksum stored in PDB. Supported values are: SHA1 (default) or SHA256.\n    -codepage\t                Specifies the codepage to use when opening source files.\n    -debug\t                    Emits debugging information.\n    -define\t                    Defines conditional compilation symbols.\n    -delaysign\t                Delay-signs the assembly by using only the public part of the strong name key.\n    -deterministic\t            Causes the compiler to output an assembly whose binary content is identical across compilations if inputs are identical.\n    -doc\t                    Specifies an XML Documentation file to generate.\n    -errorreport\t            Specifies how to handle internal compiler errors: prompt, send, or none. The default is none.\n    -filealign\t                Specifies the alignment used for output file sections.\n    -fullpaths\t                Causes the compiler to generate fully qualified paths.\n    -help\t                    Displays a usage message to stdout.\n    -highentropyva\t            Specifies that high entropy ASLR is supported.\n    -incremental\t            Enables incremental compilation [obsolete].\n    -keycontainer\t            Specifies a strong name key container.\n    -keyfile\t                Specifies a strong name key file.\n    -langversion:<string>\t    Specify language version: Default, ISO-1, ISO-2, 3, 4, 5, 6, 7, 7.1, 7.2, 7.3, or Latest\n    -lib\t                    Specifies additional directories in which to search for references.\n    -link\t                    Makes COM type information in specified assemblies available to the project.\n    -linkresource\t            Links the specified resource to this assembly.\n    -main\t                    Specifies the type that contains the entry point (ignore all other possible entry points).\n    -moduleassemblyname\t        Specifies an assembly whose non-public types a .netmodule can access.\n    -modulename:<string>\t    Specify the name of the source module.\n    -noconfig\t                Instructs the compiler not to auto include CSC.RSP file.\n    -nologo\t                    Suppresses compiler copyright message.\n    -nostdlib\t                Instructs the compiler not to reference standard library (mscorlib.dll).\n    -nowarn\t                    Disables specific warning messages\n    -nowin32manifest\t        Instructs the compiler not to embed an application manifest in the executable file.\n    -optimize\t                Enables/disables optimizations.\n    -out\t                    Specifies the output file name (default: base name of file with main class or first file).\n    -parallel[+|-]\t            Specifies whether to use concurrent build (+).\n    -pathmap\t                Specifies a mapping for source path names output by the compiler.\n    -pdb\t                    Specifies the file name and location of the .pdb file.\n    -platform\t                Limits which platforms this code can run on: x86, Itanium, x64, anycpu, or anycpu32bitpreferred. The default is anycpu.\n    -preferreduilang\t        Specifies the language to be used for compiler output.\n    -publicsign             \tApply a public key without signing the assembly, but set the bit in the assembly indicating the assembly is signed.\n    -recurse\t                Includes all files in the current directory and subdirectories according to the wildcard specifications.\n    -reference              \tReferences metadata from the specified assembly files.\n    -refout                 \tGenerate a reference assembly in addition to the primary assembly.\n    -refonly                \tGenerate a reference assembly instead of a primary assembly.\n    -resource               \tEmbeds the specified resource.\n    -ruleset:<file>         \tSpecify a ruleset file that disables specific diagnostics.\n    -subsystemversion\t        Specifies the minimum version of the subsystem that the executable file can use.\n    -target                 \tSpecifies the format of the output file by using one of four options: -target:appcontainerexe, -target:exe, -target:library, -target:module, -target:winexe, -target:winmdobj.\n    -unsafe                 \tAllows unsafe code.\n    -utf8output\t                Outputs compiler messages in UTF-8 encoding.\n    -warn\t                    Sets the warning level (0-4).\n    -warnaserror\t            Reports specific warnings as errors.\n    -win32icon              \tUses this icon for the output.\n    -win32manifest          \tSpecifies a custom win32 manifest file.\n    -win32res               \tSpecifies the win32 resource file (.res).\n\n\n9. Control flow statements\n\n    9.1 Switch\n\n    switch (expression) {\n    //expression may be integer, string or enum\n    case expression:\n        //statements\n        break/ goto / return()\n\n    case ..\n    default\n        //statements\n        break/ goto / return()\n    }\n\n    9.2 If\n\n    if (condition) {\n        //statements\n    } else {\n        //statements\n    }\n\n10. Loop\n\n    10.1 While\n\n    while (condition) {body}\n\n    10.2 Do while\n\n    do {body} while condition;\n\n    10.3 For\n\n    for (initializer; termination condition; iteration;) {\n            //statements\n    }\n\n    10.4 For each\n\n    foreach (type identifier in collection)  {\n        //statements\n    }\n\n11. Class Definition\n\n    11.1 Class\n\n    public | protected | internal | private\n    abstract | sealed | static\n\n    class className [:class/interfaces inherited from]\n\n    11.2 Constructor\n\n    [access modifier] className (parameters) [:initializer]\n\n    initializer -base calls constructor in base class.\n                 this calls constructor within class.\n\n    public class nameClass : Initializer {\n        public className(dataType param1 , dataType param2, ...) : base(param1, param2)\n        { constructor body }\n    }\n\n    11.3 Method\n\n    [access modifier]\n    static | virtual | override | new | sealed | abstract\n    methodName (parameter list) { body }\n\n    virtual – method can be overridden in subclass\n    override – overrides virtual method in base class\n    new – hides non-virtual method in base class\n    sealed – prevents derived class from inheriting\n    abstract – must be implemented by subclass\n\n    Passing parameters:\n        1. By default, parameters are passed by value\n        2. Passing by reference: ref, in and out modifiers\n\n    To pass a parameter by reference with the intent of changing the value, use the ref, or out keyword. To pass by reference with the intent of avoiding copying but not changing the value, use the in modifier\n\n    11.4 Property\n\n    [modifier] <dataType> property name{\n        public string BrandName\n        {\n            get { return brandName; }\n            set { brandName = value; }\n        }\n    }\n\n12. Struct\n\n    12.1 Defining a structure\n\n    [attribute][modifier] struct name [:interfaces] { struct-body }\n\n    12.2 Class vs Structure\n\n       -> Classes are reference types and structs are value types\n       -> Structures do not support inheritance\n       -> Structures cannot have default constructor\n\n13. Enum\n\n    13.1 Declaring enum variable\n\n    enum <enumName> {\n        enumeration list\n    };\n\n    enumName - Specifies the enumeration type name\n    enumeration list is a comma-separated list of identifiers\n\n    //Each of the symbols in the enumeration list stands for an integer value, one greater than the symbol that precedes it.\n\n14. Delegates\n\n    //A delegate is a reference type variable that holds the reference to a method. The reference can be changed at runtime.\n\n    14.1 Declaring delegates\n\n    //Delegate declaration determines the methods that can be referenced by the delegate.\n\n    delegate <return type> <delegate-name> <parameter list>\n\n    14.2 Instantiating delegates\n\n    //When creating a delegate, the argument passed to the new expression is written similar to a method call, but without the arguments to the method\n\n    public delegate void printString(string s);\n    printString ps1 = new printString(WriteToScreen);\n    printString ps2 = new printString(WriteToFile);\n\n15. Events\n\n    15.1 Declaring events\n\n    //To declare an event inside a class, first a delegate type for the event must be declared.\n\n    public delegate string MyDelegate(string str);\n\n    //The event itself is declared by using the event keyword\n\n    event MyDelegate MyEvent;\n\n    15.2 Commonly used Control Events\n\n    Event                                           Delegate\n\n    Click, MouseEnter, DoubleClick, MouseLeave      EventHandler( object sender, EventArgs e)\n    MouseDown, Mouseup, MouseMove                   MouseEventHandler(object sender, MouseEventArgs e)\n                                                        e.X, e.Y – x and y coordinates\n                                                        e.Button – MouseButton.Left, Middle, Right\n    KeyUp, KeyDown                                  KeyEventHandler(object sndr, KeyEventArgs e)\n                                                        e.Handled – Indicates whether event is handled.\n                                                        e.KeyCode – Keys enumeration, e.g., Keys.V\n                                                        e.Modifiers – Indicates if Alt, Ctrl, or Shift key.\n    KeyPress                                        KeyPressEventHandler(object sender, KeyPressEventArgs e)\n\n\n"
  },
  {
    "path": "languages/C.txt",
    "content": "\n\nmain() Function\n\n* The main() function is the starting point of the program: \tint main (int argc, char *argv[]) \n* The return type of the main() function is an integer (type int) and it is known as the return value of the program.\n* As a rule of thumb, value 0 means success while non-zero means an error conditions.\n\nInclude Files\n\n* The purpose of these files is to tell the compiler about the existence of external functions which the source code will make use of.\n\nPreprocessor directives:\n  #include \"mine.h\"\tsearch current working directory first\n  #include <stdio.h>\tsearch command line directory then system\n  #define TRUE 1\tmacro substitution, usually use capitals\n  #define min(a,b) (a<b)?(a):(b)\tmacro substitution with parameters\n  #define abs(a) (a<0)?(-(a)):(a)\tmacro substitution\n  #define note /* comment */\tthis comment gets inserted every time note appears */\n  backslash \\ at end of a line means continue\n  #undef TRUE\tundefines a previously defined macroname\n  #error\tstop compiling at this point\n  #if expression\tconditional compilation, start if structure\n  #elif expression\telse if expression != 0 compile following code\n  #else\telse compile following code\n  #endif\tend of conditional compiling\n  #ifdef macroname\tlike #if, compiles if macroname defined\n  #ifndef\tlike #if, compiles if macroname undefined\n  #line number [filename]\tset origin for __LINE__ and __FILE__\n  #pragma\tgives the compiler commands\n\nCreate and execute a program\n\nIn Linux systems:\n    1. Open up a terminal\n    2. Create the program: nano nameProgram.c\n    3. Write the program and save it\n    4. gcc -o nameExecutable nameProgram.c\n\n32 Reserved words\n\nTerm\t    Description\nauto\t    optional local declaration\nbreak \t  used to exit loop and used to exit switch\ncase\t    choice in a switch\nchar\t     basic declaration of a type character\nconst\t     prefix declaration meaning variable can not be changed\ncontinue \tgo to bottom of loop in for, while and do loops\ndefault\t   optional last case of a switch\ndo\t       executable statement, do-while loop\ndouble     basic declaration double precision floating point\nelse\t    executable statement, part of \"if\" structure\nenum\t    basic declaration of enumeration type\nextern\t  prefix declaration meaning variable is defined externally\nfloat\t    basic declaration of floating point\nfor\t      executable statement, for loop\ngoto\t    jump within function to a label\nif\t      executable statement\nint\t      basic declaration of integer\nlong\t    prefix declaration applying to many types\nregister\tprefix declaration meaning keep variable in register\nreturn\t  executable statement with or without a value\nshort\t    prefix declaration applying to many types\nsigned\t  prefix declaration applying to some types\nsizeof\t  operator applying to variables and types, gives size in bytes\nstatic\t  prefix declaration to make local variable static\nstruct\t  declaration of a structure, like a record\nswitch\t  executable statement for cases\ntypedef\t  creates a new type name for an existing type\nunion\t    declaration of variables that are in the same memory locations\nunsigned\tprefix declaration applying to some types\nvoid\t    declaration of a typeless variable\nvolatile\tprefix declaration meaning the variable can be changed at any time\nwhile\t    executable statement, while loop or do-while loop\n\nBasic types\n\nType\t    Description\nchar\t    character type, usually one byte ( a string is array of char )\nint\t      integer type, usually 2 or 4 bytes ( default )\nfloat\t    floating point type, usually 4 bytes\ndouble\t  floating point type, usually 8 bytes\nvoid\t    no type, typeless\nenum\t    enumeration type ( user defines the type name )\n\nType modifiers, prefix for basic types\n\nModifiers\t  Description\nsigned\t    has a sign ( default )\nunsigned\t  no sign bit in variable\nlong\t      longer version of type (short or long alone means short int or\nshort\t      shorter version of type long int because int is the default)\nconst\t       variable can not be stored into\n\n\nStorage Types\n\nPrefix\t   Description\nauto\t     local variable ( default )\nstatic\t   permanent when function exits, not auto\nvolatile   can change from outside influence\nextern\t   variables are defined elsewhere, externally\nregister   assign variable to register\n\nOperators\n\n  ( )\t  grouping parenthesis, function call\n  [ ]\t  array indexing, also  [ ][ ]  etc.\n  ->   \tselector, structure pointer\n  .\t    select structure element\n  !\t    relational not, complement, ! a  yields true or false\n  ~    \tbitwise not, ones complement, ~ a\n  ++  \tincrement, pre or post to a variable\n  --   \tdecrement, pre or post to a variable\n  -   \tunary minus, - a\n  +    \tunary plus,  + a\n  *    \tindirect, the value of a pointer,  * p is value at pointer p address\n  &    \tthe memory address, & b is the memory address of variable b\n  sizeof size in bytes,   sizeof a     or  sizeof (int)\n\t(type) a cast, explicit type conversion,  (float) i, (*fun)(a,b), (int*)x\n  *   \tmultiply, a * b\n  /   \tdivide, a / b\n  %    \tmodulo, a % b\n  +    \tadd, a + b\n  -    \tsubtract, a - b\n  <<   \tshift left,  left operand is shifted left by right operand bits\n  >>   \tshift right, left operand is shifted right by right operand bits\n  <    \tless than, result is true or false,  a %lt; b\n  <=   \tless than or equal, result is true or false,  a <= b\n  >    \tgreater than, result is true or false,  a > b\n  >=   \tgreater than or equal, result is true or false, a >= b\n  ==   \tequal, result is true or false,  a == b\n  !=   \tnot equal, result is true or false,  a != b\n  &    \tbitwise and,  a & b\n  ^   \tbitwise exclusive or,  a ^ b\n  |    \tbitwise or,  a | b\n  &&  \trelational and, result is true or false,  a < b && c >= d\n  ||\t  relational or, result is true or false,  a < b || c >= d\n  ?    \texp1 ? exp2 : exp3  result is exp2 if exp1 != 0, else result is exp3\n  =    \tstore\n  +=   \tadd and store\n  -=   \tsubtract and store\n  *=   \tmultiply and store\n  /=  \tdivide and store\n  %= \t  modulo and store\n  <<=  \tshift left and store\n  >>=  \tshift right and store\n  &=   \tbitwise and and store\n  ^=   \tbitwise exclusive or and store\n  |=   \tbitwise or and store\n  ,    \tseparator as in   ( y=x,z=++x )\n  ;     statement terminator.\n\n\nOperator precedence\n\nMore precedence\n\nLR\t( ) [ ] -> . x++ x--\nRL\t! ~ - + ++x --x * & sizeof (type)\nLR\t* / %\nLR\t+ -\nLR\t<< >>\nLR\t< <= > >=\nLR\t== !=\nLR\t&\nLR\t^\nLR\t|\nLR\t&&\nLR\t||\nRL\t? :\nRL\t= += -= *= /= %= >>= <<= &= ^= |=\nLR\t,\n\nLess precedence\n\nConditional branching\n\n if ( condition ) statement ;\n  else statement_2 ;            /* optional  else  clause */\n\nSwitch statement\n\nswitch ( expression )      /* constants must be unique              */\n  {\n      case constant_1:       /* do nothing for this case              */\n         break;\n      case constant_2:       /* drop through and do same as constant_3*/\n      case constant_3:\n         statement_sequence  /* can have but does not need  { }       */\n         break;\n      case constant_4:\n         statement_sequence  /* does this and next */\n                            \t\t /* statement_sequence also*/\n      case constant_5:\n         statement_sequence\n         break;\n      default:               /* default executes if no constant equals*/\n         statement_sequence  /* the expression. This is optional      */\n }\n\nFunction definition\n\ntype function_name(int a, float b, const char * ch,...) { function_body }\n\n/* only parameters passed by address can are modified*/\n\n/* in the calling function, local copy can be modified*/\n\nchar * strcpy( char * s1, const char * s2 ) { statements }\n\nDeclarations forms\n\nbasic_type variable;\n\ntype variable[val][val]...[val]={data,data,...};  /*multidimensional array*/\n\nstruct struct_name {     /* struct_name is optional */\n     type variable_1;    /* any declaration */\n     …                   /* all variable names must be unique*/\n} variable_1, ... ;      /* variables are optional */\n\nstruct struct_name {          /* struct_name is optional */\n     type variable_1: length; /* any declaration : length in bits */\n         ...\t\t\t\t\t        /* type is int, unsigned or signed */\n} variable_1, ... ;           /* variables are optional, they can also be arrays and pointers */\n\n\nunion union_name {            /* union_name is optional */\n    type variable_1;          /* variable_1 overlays variable_2 */\n    type variable_2;\n        ...\n} variable_a, ...;            /* variables are optional */\n\nenum enum_type                /* enum_name is optional */\n  { enumeration_name_1,       /* establishes enumeration literals */\n    enumeration_name_2=number,/* optional number, */\n      ...                     /* default is 0, 1, 2, ... */\n  } variable, ...;            /* variables are optional */\n\n /* use dot notation to select a component of a struct or union */\n\n"
  },
  {
    "path": "languages/XML.md",
    "content": "> announcement: this doc is a quiz-, interview-oriented cheatsheet, which desigend for those who want to have an overview of XML, when preparing for interviews.\n\n# What is XML\nXML stands for eXtensible Markup Language, XML was designed to store and transport data. XML is often used for distributing data over the Internet(especial in web development).\n\n# Then how can XML store data\nXML uses a DTD to describe the data.\n\n# The relation with HTML\n* XML: is used to store or transport data.\n   So the XML is a **Complement** to HTML.\n* HTML: is used to format and display the same data.\n\n\nXML does not carry any information about how to be displayed. The same XML data can be used in many different presentation scenarios.\nBecause of this, with XML, there is a full separation between data and presentation.\n\n# What is XML Schema/DTD\nThe purpose of a DTD is to define the structure of an XML document. It defines the structure with a list of legal elements:\n\n\n# When Not to Use a XML DTD/Sschema\nXML does not require a DTD/Schema.\n\nWhen you are experimenting with XML, or when you are working with small XML files, creating DTDs may be a waste of time.\n\nIf you develop applications, wait until the specification is stable before you add a document definition. Otherwise, your software might stop working because of validation errors.\n\n\n# XML Syntax\nThe XML language has no predefined tags, but the syntax is rather logic and easy to learn. XML documents must contain one root element that is the parent of all other elements.\n\n```\n<bookstore>\n  <book category=\"children\">\n    <title>Harry Potter</title>\n    <author>J K. Rowling</author>\n    <year>2005</year>\n    <price>29.99</price>\n  </book>\n  <book category=\"web\">\n    <title>Learning XML</title>\n    <author>Erik T. Ray</author>\n    <year>2003</year>\n    <price>39.95</price>\n  </book>\n</bookstore>\n```\n\n1. XML Tags are Case Sensitive\n2. All XML Elements Must Have a Closeing Tag\n\n```\n<p>This is a paragraph.</p>\n<br />  <!-- This is a self closing -->\n```\n3. XML Attribute Values Must Always be Quoted\n4. Pay attention to the name rules.\n\n# Reference\n1. (W3School) [https://www.w3schools.com/xml/]\n2. [cheat sheet in German](https://www.i-d-e.de/wp-content/uploads/2015/02/ide-xml-kurzreferenz.pdf)\n"
  },
  {
    "path": "languages/bash.sh",
    "content": "#!/bin/bash\n##############################################################################\n# SHORTCUTS and HISTORY\n##############################################################################\n\nCTRL+A  # move to beginning of line\nCTRL+B  # moves backward one character\nCTRL+C  # halts the current command\nCTRL+D  # deletes one character backward or logs out of current session, similar to exit\nCTRL+E  # moves to end of line\nCTRL+F  # moves forward one character\nCTRL+G  # aborts the current editing command and ring the terminal bell\nCTRL+H  # deletes one character under cursor (same as DELETE)\nCTRL+J  # same as RETURN\nCTRL+K  # deletes (kill) forward to end of line\nCTRL+L  # clears screen and redisplay the line\nCTRL+M  # same as RETURN\nCTRL+N  # next line in command history\nCTRL+O  # same as RETURN, then displays next line in history file\nCTRL+P  # previous line in command history\nCTRL+Q  # resumes suspended shell output\nCTRL+R  # searches backward\nCTRL+S  # searches forward or suspends shell output\nCTRL+T  # transposes two characters\nCTRL+U  # kills backward from point to the beginning of line\nCTRL+V  # makes the next character typed verbatim\nCTRL+W  # kills the word behind the cursor\nCTRL+X  # lists the possible filename completions of the current word\nCTRL+Y  # retrieves (yank) last item killed\nCTRL+Z  # stops the current command, resume with fg in the foreground or bg in the background\n\nALT+B   # moves backward one word\nALT+D   # deletes next word\nALT+F   # moves forward one word\nALT+H   # deletes one character backward\nALT+T   # transposes two words\nALT+.   # pastes last word from the last command. Pressing it repeatedly traverses through command history.\nALT+U   # capitalizes every character from the current cursor position to the end of the word\nALT+L   # uncapitalizes every character from the current cursor position to the end of the word\nALT+C   # capitalizes the letter under the cursor. The cursor then moves to the end of the word.\nALT+R   # reverts any changes to a command you’ve pulled from your history if you’ve edited it.\nALT+?   # list possible completions to what is typed\nALT+^   # expand line to most recent match from history\n\nCTRL+X then (   # start recording a keyboard macro\nCTRL+X then )   # finish recording keyboard macro\nCTRL+X then E   # recall last recorded keyboard macro\nCTRL+X then CTRL+E   # invoke text editor (specified by $EDITOR) on current command line then execute resultes as shell commands\nCTRL+A then D  # logout from screen but don't kill it, if any command exist, it will continue\n\nBACKSPACE  # deletes one character backward\nDELETE     # deletes one character under cursor\n\nhistory   # shows command line history\n!!        # repeats the last command\n!<n>      # refers to command line 'n'\n!<string> # refers to command starting with 'string'\nesc :wq   # exits and saves script\n\nexit      # logs out of current session\n\n\n##############################################################################\n# BASH BASICS\n##############################################################################\n\nenv                 # displays all environment variables\n\necho $SHELL         # displays the shell you're using\necho $BASH_VERSION  # displays bash version\n\nbash                # if you want to use bash (type exit to go back to your previously opened shell)\nwhereis bash        # locates the binary, source and manual-page for a command\nwhich bash          # finds out which program is executed as 'bash' (default: /bin/bash, can change across environments)\n\nclear               # clears content on window (hide displayed lines)\n\n\n##############################################################################\n# FILE COMMANDS\n##############################################################################\n\n\nls                            # lists your files in current directory, ls <dir> to print files in a specific directory\nls -l                         # lists your files in 'long format', which contains the exact size of the file, who owns the file and who has the right to look at it, and when it was last modified\nls -a                         # lists all files in 'long format', including hidden files (name beginning with '.')\nln -s <filename> <link>       # creates symbolic link to file\nreadlink <filename>           # shows where a symbolic links points to\ntree                          # show directories and subdirectories in easilly readable file tree\nmc                            # terminal file explorer (alternative to ncdu)\ntouch <filename>              # creates or updates (edit) your file\nmktemp -t <filename>          # make a temp file in /tmp/ which is deleted at next boot (-d to make directory)\ncat <filename>                # displays file raw content (will not be interpreted)\ncat -n <filename>             # shows number of lines\nnl <file.sh>                  # shows number of lines in file\ncat filename1 > filename2     # Copy filename1 to filename2\ncat filename1 >> filename2    # merge two files texts together\nany_command > <filename>      # '>' is used to perform redirections, it will set any_command's stdout to file instead of \"real stdout\" (generally /dev/stdout)\nmore <filename>               # shows the first part of a file (move with space and type q to quit)\nhead <filename>               # outputs the first lines of file (default: 10 lines)\ntail <filename>               # outputs the last lines of file (useful with -f option) (default: 10 lines)\nvim <filename>                # opens a file in VIM (VI iMproved) text editor, will create it if it doesn't exist\nmv <filename1> <dest>         # moves a file to destination, behavior will change based on 'dest' type (dir: file is placed into dir; file: file will replace dest (tip: useful for renaming))\ncp <filename1> <dest>         # copies a file\nrm <filename>                 # removes a file\nfind . -name <name> <type>    # searches for a file or a directory in the current directory and all its sub-directories by its name\ndiff <filename1> <filename2>  # compares files, and shows where they differ\nwc <filename>                 # tells you how many lines, words and characters there are in a file. Use -lwc (lines, word, character) to ouput only 1 of those informations\nsort <filename>               # sorts the contents of a text file line by line in alphabetical order, use -n for numeric sort and -r for reversing order.\nsort -t -k <filename>         # sorts the contents on specific sort key field starting from 1, using the field separator t.\nrev                           # reverse string characters (hello becomes olleh)\nchmod -options <filename>     # lets you change the read, write, and execute permissions on your files (more infos: SUID, GUID)\ngzip <filename>               # compresses files using gzip algorithm\ngunzip <filename>             # uncompresses files compressed by gzip\ngzcat <filename>              # lets you look at gzipped file without actually having to gunzip it\nlpr <filename>                # prints the file\nlpq                           # checks out the printer queue\nlprm <jobnumber>              # removes something from the printer queue\ngenscript                     # converts plain text files into postscript for printing and gives you some options for formatting\ndvips <filename>              # prints .dvi files (i.e. files produced by LaTeX)\ngrep <pattern> <filenames>    # looks for the string in the files\ngrep -r <pattern> <dir>       # search recursively for pattern in directory\nhead -n file_name | tail +n   # Print nth line from file.\nhead -y lines.txt | tail +x   # want to display all the lines from x to y. This includes the xth and yth lines.\n\nsed 's/<pattern>/<replacement>/g' <filename> # replace pattern in file with replacement value to std output the character after s (/) is the delimeter \nsed -i 's/<pattern>/<replacement>/g' <filename> # replace pattern in file with replacement value in place\necho \"this\" | sed 's/is/at/g' # replace pattern from input stream with replacement value\n\n##############################################################################\n# DIRECTORY COMMANDS\n##############################################################################\n\n\nmkdir <dirname>               # makes a new directory\nrmdir <dirname>               # remove an empty directory\nrmdir -rf <dirname>           # remove a non-empty directory\nmv <dir1> <dir2>              # rename a directory from <dir1> to <dir2>\ncd                            # changes to home\ncd ..                         # changes to the parent directory\ncd <dirname>                  # changes directory\ncp -r <dir1> <dir2>           # copy <dir1> into <dir2> including sub-directories\npwd                           # tells you where you currently are\ncd ~                          # changes to home.\ncd -                          # changes to previous working directory\n\n##############################################################################\n# SSH, SYSTEM INFO & NETWORK COMMANDS\n##############################################################################\n\n\nssh user@host            # connects to host as user\nssh -p <port> user@host  # connects to host on specified port as user\nssh-copy-id user@host    # adds your ssh key to host for user to enable a keyed or passwordless login\n\nwhoami                   # returns your username\nsu <user>                # switch to a different user\nsu -                     # switch to root, likely needs to be sudo su -\nsudo <command>           # execute command as the root user\npasswd                   # lets you change your password\nquota -v                 # shows what your disk quota is\ndate                     # shows the current date and time\ncal                      # shows the month's calendar\nuptime                   # shows current uptime\nw                        # displays whois online\nfinger <user>            # displays information about user\nuname -a                 # shows kernel information\nman <command>            # shows the manual for specified command\ninfo <command>           # shows another documentation system for the specific command\nhelp                     # shows documentation about built-in commands and functions\ndf                       # shows disk usage\ndu <filename>            # shows the disk usage of the files and directories in filename (du -s give only a total)\nresize2fs                # ext2/ext3/ext4 file system resizer\nlast <yourUsername>      # lists your last logins\nps -u yourusername       # lists your processes\nkill <PID>               # kills the processes with the ID you gave\nkillall <processname>    # kill all processes with the name\ntop                      # displays your currently active processes\nlsof                     # lists open files\nbg                       # lists stopped or background jobs ; resume a stopped job in the background\nfg                       # brings the most recent job in the foreground\nfg <job>                 # brings job to the foreground\n\nping <host>              # pings host and outputs results\nwhois <domain>           # gets whois information for domain\ndig <domain>             # gets DNS information for domain\ndig -x <host>            # reverses lookup host\nwget <file>              # downloads file\nnetstat                  # Print network connections, routing tables, interface statistics, masquerade connections, and multicast memberships\n\ntime <command>           # report time consumed by command execution\n\n\n##############################################################################\n# VARIABLES\n##############################################################################\n\n\nvarname=value                # defines a variable\nvarname=value command        # defines a variable to be in the environment of a particular subprocess\necho $varname                # checks a variable's value\necho $$                      # prints process ID of the current shell\necho $!                      # prints process ID of the most recently invoked background job\necho $?                      # displays the exit status of the last command\nread <varname>               # reads a string from the input and assigns it to a variable\nread -p \"prompt\" <varname>   # same as above but outputs a prompt to ask user for value\ncolumn -t <filename>         # display info in pretty columns (often used with pipe)\nlet <varname> = <equation>   # performs mathematical calculation using operators like +, -, *, /, %\nexport VARNAME=value         # defines an environment variable (will be available in subprocesses)\nexport -f  <funcname>        # Exports function 'funcname'\nexport var1=\"var1 value\"     # Export and assign in the same statement\nexport <varname>             # Copy Bash variable\ndeclare -x <varname>         # Copy Bash variable\n\narray[0]=valA                # how to define an array\narray[1]=valB\narray[2]=valC\narray=([2]=valC [0]=valA [1]=valB)  # another way\narray=(valA valB valC)              # and another\n\n${array[i]}                  # displays array's value for this index. If no index is supplied, array element 0 is assumed\n${#array[i]}                 # to find out the length of any element in the array\n${#array[@]}                 # to find out how many values there are in the array\n\ndeclare -a                   # the variables are treated as arrays\ndeclare -f                   # uses function names only\ndeclare -F                   # displays function names without definitions\ndeclare -i                   # the variables are treated as integers\ndeclare -r                   # makes the variables read-only\ndeclare -x                   # marks the variables for export via the environment\ndeclare -l                   # uppercase values in the variable are converted to lowercase\ndeclare -A                   # makes it an associative array\n\n${varname:-word}             # if varname exists and isn't null, return its value; otherwise return word\n${varname:word}              # if varname exists and isn't null, return its value; otherwise return word\n${varname:=word}             # if varname exists and isn't null, return its value; otherwise set it word and then return its value\n${varname:?message}          # if varname exists and isn't null, return its value; otherwise print varname, followed by message and abort the current command or script\n${varname:+word}             # if varname exists and isn't null, return word; otherwise return null\n${varname:offset:length}     # performs substring expansion. It returns the substring of $varname starting at offset and up to length characters\n\n${variable#pattern}          # if the pattern matches the beginning of the variable's value, delete the shortest part that matches and return the rest\n${variable##pattern}         # if the pattern matches the beginning of the variable's value, delete the longest part that matches and return the rest\n${variable%pattern}          # if the pattern matches the end of the variable's value, delete the shortest part that matches and return the rest\n${variable%%pattern}         # if the pattern matches the end of the variable's value, delete the longest part that matches and return the rest\n${variable/pattern/string}   # the longest match to pattern in variable is replaced by string. Only the first match is replaced\n${variable//pattern/string}  # the longest match to pattern in variable is replaced by string. All matches are replaced\n\n${#varname}                  # returns the length of the value of the variable as a character string\n\n*(patternlist)               # matches zero or more occurrences of the given patterns\n+(patternlist)               # matches one or more occurrences of the given patterns\n?(patternlist)               # matches zero or one occurrence of the given patterns\n@(patternlist)               # matches exactly one of the given patterns\n!(patternlist)               # matches anything except one of the given patterns\n\n$(UNIX command)              # command substitution: runs the command and returns standard output\n\ntypeset -l <x>                 # makes variable local - <x> must be an interger\n\n##############################################################################\n# FUNCTIONS\n##############################################################################\n\n\n# The function refers to passed arguments by position (as if they were positional parameters), that is, $1, $2, and so forth.\n# $@ is equal to \"$1\" \"$2\"... \"$N\", where N is the number of positional parameters. $# holds the number of positional parameters.\n\n\nfunction functname() {\n  shell commands\n}\n\nunset -f functname  # deletes a function definition\ndeclare -f          # displays all defined functions in your login session\n\n\n##############################################################################\n# FLOW CONTROLS\n##############################################################################\n\n\nstatement1 && statement2  # and operator\nstatement1 || statement2  # or operator\n\n-a                        # and operator inside a test conditional expression\n-o                        # or operator inside a test conditional expression\n\n# STRINGS\n\nstr1 == str2               # str1 matches str2\nstr1 != str2               # str1 does not match str2\nstr1 < str2                # str1 is less than str2 (alphabetically)\nstr1 > str2                # str1 is greater than str2 (alphabetically)\nstr1 \\> str2               # str1 is sorted after str2\nstr1 \\< str2               # str1 is sorted before str2\n-n str1                    # str1 is not null (has length greater than 0)\n-z str1                    # str1 is null (has length 0)\n\n# FILES\n\n-a file                   # file exists or its compilation is successful\n-d file                   # file exists and is a directory\n-e file                   # file exists; same -a\n-f file                   # file exists and is a regular file (i.e., not a directory or other special type of file)\n-r file                   # you have read permission\n-s file                   # file exists and is not empty\n-w file                   # your have write permission\n-x file                   # you have execute permission on file, or directory search permission if it is a directory\n-N file                   # file was modified since it was last read\n-O file                   # you own file\n-G file                   # file's group ID matches yours (or one of yours, if you are in multiple groups)\nfile1 -nt file2           # file1 is newer than file2\nfile1 -ot file2           # file1 is older than file2\n\n# NUMBERS\n\n-lt                       # less than\n-le                       # less than or equal\n-eq                       # equal\n-ge                       # greater than or equal\n-gt                       # greater than\n-ne                       # not equal\n\nif condition\nthen\n  statements\n[elif condition\n  then statements...]\n[else\n  statements]\nfi\n\nfor x in {1..10}\ndo\n  statements\ndone\n\nfor name [in list]\ndo\n  statements that can use $name\ndone\n\nfor (( initialisation ; ending condition ; update ))\ndo\n  statements...\ndone\n\ncase expression in\n  pattern1 )\n    statements ;;\n  pattern2 )\n    statements ;;\nesac\n\nselect name [in list]\ndo\n  statements that can use $name\ndone\n\nwhile condition; do\n  statements\ndone\n\nuntil condition; do\n  statements\ndone\n\n##############################################################################\n# COMMAND-LINE PROCESSING CYCLE\n##############################################################################\n\n\n# The default order for command lookup is functions, followed by built-ins, with scripts and executables last.\n# There are three built-ins that you can use to override this order: `command`, `builtin` and `enable`.\n\ncommand  # removes alias and function lookup. Only built-ins and commands found in the search path are executed\nbuiltin  # looks up only built-in commands, ignoring functions and commands found in PATH\nenable   # enables and disables shell built-ins\n\neval     # takes arguments and run them through the command-line processing steps all over again\n\n\n##############################################################################\n# INPUT/OUTPUT REDIRECTORS\n##############################################################################\n\n\ncmd1|cmd2  # pipe; takes standard output of cmd1 as standard input to cmd2\n< file     # takes standard input from file\n> file     # directs standard output to file\n>> file    # directs standard output to file; append to file if it already exists\n>|file     # forces standard output to file even if noclobber is set\nn>|file    # forces output to file from file descriptor n even if noclobber is set\n<> file    # uses file as both standard input and standard output\nn<>file    # uses file as both input and output for file descriptor n\nn>file     # directs file descriptor n to file\nn<file     # takes file descriptor n from file\nn>>file    # directs file description n to file; append to file if it already exists\nn>&        # duplicates standard output to file descriptor n\nn<&        # duplicates standard input from file descriptor n\nn>&m       # file descriptor n is made to be a copy of the output file descriptor\nn<&m       # file descriptor n is made to be a copy of the input file descriptor\n&>file     # directs standard output and standard error to file\n<&-        # closes the standard input\n>&-        # closes the standard output\nn>&-       # closes the ouput from file descriptor n\nn<&-       # closes the input from file descriptor n\n\n|tee <file># output command to both terminal and a file (-a to append to file)\n\n\n##############################################################################\n# PROCESS HANDLING\n##############################################################################\n\n\n# To suspend a job, type CTRL+Z while it is running. You can also suspend a job with CTRL+Y.\n# This is slightly different from CTRL+Z in that the process is only stopped when it attempts to read input from terminal.\n# Of course, to interrupt a job, type CTRL+C.\n\nmyCommand &  # runs job in the background and prompts back the shell\n\njobs         # lists all jobs (use with -l to see associated PID)\n\nfg           # brings a background job into the foreground\nfg %+        # brings most recently invoked background job\nfg %-        # brings second most recently invoked background job\nfg %N        # brings job number N\nfg %string   # brings job whose command begins with string\nfg %?string  # brings job whose command contains string\n\nkill -l               # returns a list of all signals on the system, by name and number\nkill PID              # terminates process with specified PID\nkill -s SIGKILL 4500  # sends a signal to force or terminate the process\nkill -15 913          # Ending PID 913 process with signal 15 (TERM)\nkill %1               # Where %1 is the number of job as read from 'jobs' command.\n\nps           # prints a line of information about the current running login shell and any processes running under it\nps -a        # selects all processes with a tty except session leaders\n\ntrap cmd sig1 sig2  # executes a command when a signal is received by the script\ntrap \"\" sig1 sig2   # ignores that signals\ntrap - sig1 sig2    # resets the action taken when the signal is received to the default\n\ndisown <PID|JID>    # removes the process from the list of jobs\n\nwait                # waits until all background jobs have finished\nsleep <number>      # wait # of seconds before continuing\n\npv                  # display progress bar for data handling commands. often used with pipe like |pv\nyes                 # give yes response everytime an input is requested from script/process\n\n\n##############################################################################\n# TIPS & TRICKS\n##############################################################################\n\n\n# set an alias\ncd; nano .bash_profile\n> alias gentlenode='ssh admin@gentlenode.com -p 3404'  # add your alias in .bash_profile\n\n# to quickly go to a specific directory\ncd; nano .bashrc\n> shopt -s cdable_vars\n> export websites=\"/Users/mac/Documents/websites\"\n\nsource .bashrc\ncd $websites\n\n\n##############################################################################\n# DEBUGGING SHELL PROGRAMS\n##############################################################################\n\n\nbash -n scriptname  # don't run commands; check for syntax errors only\nset -o noexec       # alternative (set option in script)\n\nbash -v scriptname  # echo commands before running them\nset -o verbose      # alternative (set option in script)\n\nbash -x scriptname  # echo commands after command-line processing\nset -o xtrace       # alternative (set option in script)\n\ntrap 'echo $varname' EXIT  # useful when you want to print out the values of variables at the point that your script exits\n\nfunction errtrap {\n  es=$?\n  echo \"ERROR line $1: Command exited with status $es.\"\n}\n\ntrap 'errtrap $LINENO' ERR  # is run whenever a command in the surrounding script or function exits with non-zero status\n\nfunction dbgtrap {\n  echo \"badvar is $badvar\"\n}\n\ntrap dbgtrap DEBUG  # causes the trap code to be executed before every statement in a function or script\n# ...section of code in which the problem occurs...\ntrap - DEBUG  # turn off the DEBUG trap\n\nfunction returntrap {\n  echo \"A return occurred\"\n}\n\ntrap returntrap RETURN  # is executed each time a shell function or a script executed with the . or source commands finishes executing\n\n##############################################################################\n# COLORS AND BACKGROUNDS\n##############################################################################\n# note: \\e or \\x1B also work instead of \\033\n# Reset\nColor_Off='\\033[0m' # Text Reset\n\n# Regular Colors\nBlack='\\033[0;30m'  # Black\nRed='\\033[0;31m'    # Red\nGreen='\\033[0;32m'  # Green\nYellow='\\033[0;33m' # Yellow\nBlue='\\033[0;34m'   # Blue\nPurple='\\033[0;35m' # Purple\nCyan='\\033[0;36m'   # Cyan\nWhite='\\033[0;97m'  # White\n\n# Additional colors\nLGrey='\\033[0;37m'  # Light Gray\nDGrey='\\033[0;90m'  # Dark Gray\nLRed='\\033[0;91m'   # Light Red\nLGreen='\\033[0;92m' # Light Green\nLYellow='\\033[0;93m'# Light Yellow\nLBlue='\\033[0;94m'  # Light Blue\nLPurple='\\033[0;95m'# Light Purple\nLCyan='\\033[0;96m'  # Light Cyan\n\n\n# Bold\nBBlack='\\033[1;30m' # Black\nBRed='\\033[1;31m'   # Red\nBGreen='\\033[1;32m' # Green\nBYellow='\\033[1;33m'# Yellow\nBBlue='\\033[1;34m'  # Blue\nBPurple='\\033[1;35m'# Purple\nBCyan='\\033[1;36m'  # Cyan\nBWhite='\\033[1;37m' # White\n\n# Underline\nUBlack='\\033[4;30m' # Black\nURed='\\033[4;31m'   # Red\nUGreen='\\033[4;32m' # Green\nUYellow='\\033[4;33m'# Yellow\nUBlue='\\033[4;34m'  # Blue\nUPurple='\\033[4;35m'# Purple\nUCyan='\\033[4;36m'  # Cyan\nUWhite='\\033[4;37m' # White\n\n# Background\nOn_Black='\\033[40m' # Black\nOn_Red='\\033[41m'   # Red\nOn_Green='\\033[42m' # Green\nOn_Yellow='\\033[43m'# Yellow\nOn_Blue='\\033[44m'  # Blue\nOn_Purple='\\033[45m'# Purple\nOn_Cyan='\\033[46m'  # Cyan\nOn_White='\\033[47m' # White\n\n# Example of usage\necho -e \"${Green}This is GREEN text${Color_Off} and normal text\"\necho -e \"${Red}${On_White}This is Red test on White background${Color_Off}\"\n# option -e is mandatory, it enable interpretation of backslash escapes\nprintf \"${Red} This is red \\n\"\n"
  },
  {
    "path": "languages/golang.md",
    "content": "# Golang\n\n## Summary\n\n-   Introduction\n    -   [Hello World](#hello-world)\n    -   [Go CLI Commands](#go-cli-commands)\n    -   [Go Modules](#go-modules)\n-   Basic\n    -   [Basic Types](#basic-types)\n    -   [Variables](#variables)\n    -   [Operators](#operators)\n    -   [Conditional Statements](#conditional-statements)\n    -   [Loops](#loops)\n    -   [Arrays](#arrays)\n    -   [Functions](#functions)\n-   Advanced\n    -   [Structs](#structs)\n    -   [Maps](#maps)\n    -   [Pointers](#pointers)\n    -   [Methods and Interfaces](#methods-and-interfaces)\n    -   [Errors](#errors)\n    -   [Testing](#testing)\n    -   [Concurrency](#concurrency)\n-   Standard Libs\n    -   [Package fmt](#package-fmt)\n\n## Hello World\n\n```go\npackage main\n\nimport \"fmt\"\n\nfunc main() {\n    fmt.Println(\"Hello Gophers!\")\n}\n```\n\n[Return to Summary](#summary)\n\n<hr/>\n\n## Go CLI Commands\n\n```bash\n# Compile & Run code\n$ go run [file.go]\n\n# Compile\n$ go build [file.go]\n# Running compiled file\n$ ./hello\n\n# Test packages\n$ go test [folder]\n\n# Install packages/modules\n$ go install [package]\n\n# List installed packages/modules\n$ go list\n\n# Update packages/modules\n$ go fix\n\n# Format package sources\n$ go fmt\n\n# See package documentation\n$ go doc [package]\n\n# Add dependencies and install\n$ go get [module]\n\n# See Go environment variables\n$ go env\n\n# See version\n$ go version\n```\n\n[Return to Summary](#summary)\n\n<hr/>\n\n## Go Modules\n\n-   Go projects are called **modules**\n-   Each module has multiple **packages**\n-   Each package should has a scoped functionality. Packages talk to each other to compose the code\n-   A module needs at least one package, the **main**\n-   The package main needs a entry function called **main**\n\n```bash\n# Create Module\n$ go mod init [name]\n```\n\nTip: By convention, modules names has the follow structure:\n\ndomain.com/user/module/package\n\nExample: github.com/spf13/cobra\n\n<hr/>\n\n[Return to Summary](#summary)\n\n## Basic Types\n\n|    Type    |               Set of Values                |                    Values                     |\n| :--------: | :----------------------------------------: | :-------------------------------------------: |\n|    bool    |                  boolean                   |                  true/false                   |\n|   string   |            array of characters             |             needs to be inside \"\"             |\n|    int     |                  integers                  |             32 or 64 bit integer              |\n|    int8    |               8-bit integers               |                 [ -128, 128 ]                 |\n|   int16    |              16-bit integers               |               [ -32768, 32767]                |\n|   int32    |              32-bit integers               |          [ -2147483648, 2147483647]           |\n|   int64    |              64-bit integers               | [ -9223372036854775808, 9223372036854775807 ] |\n|   uint8    |          8-bit unsigned integers           |                  [ 0, 255 ]                   |\n|   uint16   |          16-bit unsigned integers          |                 [ 0, 65535 ]                  |\n|   uint32   |          32-bit unsigned integers          |               [ 0, 4294967295 ]               |\n|   uint64   |          64-bit unsigned integers          |          [ 0, 18446744073709551615 ]          |\n|  float32   |                32-bit float                |                                               |\n|  float64   |                64-bit float                |                                               |\n| complex64  | 32-bit float with real and imaginary parts |                                               |\n| complex128 | 64-bit float with real and imaginary parts |                                               |\n|    byte    |                sets of bits                |                alias for uint8                |\n|    rune    |             Unicode characters             |                alias for int32                |\n\n[Return to Summary](#summary)\n\n<hr/>\n\n## Variables\n\n```go\n// Declaration\nvar value int\n\n// Initialization\nvalue = 10\n\n// Declaration + Initialization + Type inference\nvar isActive = true\n\n// Short declaration (only inside functions)\ntext := \"Hello\"\n\n// Multi declaration\nvar i, j, k = 1, 2, 3\n\n// Variable not initialized = Zero values\n// Numeric: 0\n// Boolean: false\n// String: \"\"\n// Special value: nil (same as null)\n\nvar number int // 0\nvar text string // \"\"\nvar boolean bool // false\n\n// Type conversions\n// T(v) converts v to type T\n\ni := 1.234 // float\nint(i) // 1\n\n// Constants\nconst pi = 3.1415\n```\n\n<hr/>\n\n## Operators\n\n[Return to Summary](#summary)\n\nArithmetic Operators\n| Symbol | Operation | Valid Types |\n|:---------:|:-------------:|:-------------:|\n| `+` | Sum | integers, floats, complex values, strings |\n| `-` | Difference | integers, floats, complex values |\n| `*` | Product | integers, floats, complex values |\n| `/` | Quotient | integers, floats, complex values |\n| `%` | Remainder | integers |\n| `&` | Bitwise AND | integers |\n| `|` | Bitwise OR | integers |\n| `^` | Bitwise XOR | integers |\n| `&^` | Bit clear (AND NOT) | integers |\n| `<<` | Left shift | integer << unsigned integer |\n| `>>` | Right shift | integer >> unsigned integer |\n\nComparison Operators\n| Symbol | Operation |\n|:---------:|:-------------:|\n| `==` | Equal |\n| `!=` | Not equal |\n| `<` | Less |\n| `<=` | Less or equal |\n| `>` | Greater |\n| `>=` | Greater or equal |\n\nLogical Operators\n| Symbol | Operation |\n|:---------:|:-------------:|\n| `&&` | Conditional AND |\n| `||` | Conditional OR |\n| `!` | NOT |\n\n[Return to Summary](#summary)\n\n<hr/>\n\n## Conditional Statements\n\n```go\n// If / Else\ni := 1\n\nif i > 0 {\n    // Condition is True! i is greater than zero\n} else {\n    // Condition is False! i is lower or equal to zero\n}\n\n// Else if\ni := 1\n\nif i > 0 {\n    // Condition is True! i is greater than zero\n} else if i > 0 && i < 2 {\n    // Condition is True! i greater than zero and lower than two\n} else if i > 1 && i < 4 {\n    // Condition is True! i greater than one and lower than four\n} else {\n    // None of the above conditions is True, so it falls here\n}\n\n// If with short statements\ni := 2.567\n\nif j := int(i); j == 2 {\n    // Condition is True! j, the integer value of i, is equal to two\n} else {\n    // Condition is False! j, the integer value of i, is not equal to two\n}\n\n// Switch\ntext := 'hey'\n\nswitch text {\n    case 'hey':\n        // 'Hello!'\n    case 'bye':\n        // 'Byee'\n    default:\n        // 'Ok'\n}\n\n// Switch without condition\nvalue := 5\n\nswitch {\n    case value < 2:\n        // 'Hello!'\n    case value >= 2 && value < 6:\n        // 'Byee'\n    default:\n        // 'Ok'\n}\n```\n\n[Return to Summary](#summary)\n\n<hr/>\n\n## Loops\n\n```go\n// Golang only has the for loop\nfor i := 0; i < 10; i++ {\n    // i\n}\n\n// The first and third parameters are ommitable\n// For as a while\ni := 0;\n\nfor i < 10 {\n    i++\n}\n\n// Forever loop\nfor {\n\n}\n```\n\n[Return to Summary](#summary)\n\n<hr/>\n\n## Arrays\n\n```go\n// Declaration with specified size\nvar array [3]string\narray[0] = \"Hello\"\narray[1] = \"Golang\"\narray[2] = \"World\"\n\n// Declaration and Initialization\nvalues := [5]int{1, 2, 3, 4, 5}\n\n// Slices: A subarray that acts as a reference of an array\n// Determining min and max\nvalues[1:3] // {2, 3, 4}\n\n// Determining only max will use min = 0\nvalues[:2] // {1, 2, 3}\n\n// Determining only min will use max = last element\nvalues[3:] // {3, 4}\n\n// Length: number of elements that a slice contains\nlen(values) // 5\n\n// Capacity: number of elements that a slice can contain\nvalues = values[:1]\nlen(values) // 2\ncap(values) // 5\n\n// Slice literal\nslice := []bool{true, true, false}\n\n// make function: create a slice with length and capacity\nslice := make([]int, 5, 6) // make(type, len, cap)\n\n// Append new element to slice\nslice := []int{ 1, 2 }\nslice = append(slice, 3)\nslice // { 1, 2, 3 }\nslice = append(slice, 3, 2, 1)\nslice // { 1, 2, 3, 3, 2, 1 }\n\n// For range: iterate over a slice\nslice := string[\"W\", \"o\", \"w\"]\n\nfor i, value := range slice {\n    i // 0, then 1, then 2\n    value // \"W\", then \"o\", then \"w\"\n}\n\n// Skip index or value\n\nfor i := range slice {\n    i // 0, then 1, then 2\n}\n\nfor _, value := range slice {\n   value // \"W\", then \"o\", then \"w\"\n}\n```\n\n[Return to Summary](#summary)\n\n<hr/>\n\n## Functions\n\n```go\n// Functions acts as a scoped block of code\nfunc sayHello() {\n    // Hello World!\n}\nsayHello() // Hello World!\n\n// Functions can take zero or more parameters, as so return zero or more parameters\nfunc sum(x int, y int) int {\n    return x + y\n}\nsum(3, 7) // 10\n\n// Returned values can be named and be used inside the function\nfunc doubleAndTriple(x int) (double, triple int) {\n    double = x * 2\n    triple = x * 3\n    return\n}\nd, t := doubleAndTriple(5)\n// d = 10\n// t = 15\n\n// Skipping one of the returned values\n_, t := doubleAndTriple(3)\n// t = 9\n\n// Functions can defer commands. Deferred commands are\n// ran in a stack order after the execution and\n// returning of a function\nvar aux = 0\n\nfunc switchValuesAndDouble(x, y int) {\n    aux = x\n    defer aux = 0 // cleaning variable to post use\n    x = y * 2\n    y = aux * 2\n}\n\na, b = 2, 5\nswitchValuesAndDouble(2, 5)\n\n// a = 10\n// b = 4\n// aux = 0\n\n// Functions can be handled as values and be anonymous functions\nfunc calc(fn func(int, int) int) int {\n    return fn(2, 6)\n}\n\nfunc sum(x, y int) int {\n    return x + y\n}\n\nfunc mult(x, y int) int {\n    return x * y\n}\n\ncalc(sum) // 8\ncalc(mult) // 12\ncalc(\n    func(x, y int) int {\n\t\treturn x / y\n    }\n) // 3\n\n// Function closures: a function that returns a function\n// that remembers the original context\nfunc calc() func(int) int {\n    value := 0\n    return func(x int) int {\n        value += x\n        return value\n    }\n}\n\ncalculator := calc()\ncalculator(3) // 3\ncalculator(45) // 48\ncalculator(12) // 60\n```\n\n[Return to Summary](#summary)\n\n<hr/>\n\n## Structs\n\nStructs are a way to arrange data in specific formats.\n\n```go\n// Declaring a struct\ntype Person struct {\n    Name string\n    Age int\n}\n\n// Initializing\nperson := Person{\"John\", 34}\nperson.Name // \"John\"\nperson.Age // 34\n\nperson2 := Person{Age: 20}\nperson2.Name // \"\"\nperson2.Age // 20\n\nperson3 := Person{}\nperson3.Name // \"\"\nperson3.Age // 0\n```\n\n[Return to Summary](#summary)\n\n<hr/>\n\n## Maps\n\nMaps are data structures that holds values assigned to a key.\n\n```go\n// Declaring a map\nvar cities map[string]string\n\n// Initializing\ncities = make(map[string]string)\ncities // nil\n\n// Insert\ncities[\"NY\"] = \"EUA\"\n\n// Retrieve\nnewYork = cities[\"NY\"]\nnewYork // \"EUA\"\n\n// Delete\ndelete(cities, \"NY\")\n\n// Check if a key is set\nvalue, ok := cities[\"NY\"]\nok // false\nvalue // \"\"\n```\n\n[Return to Summary](#summary)\n\n<hr/>\n\n## Pointers\n\nPointers are a direct reference to a memory address that some variable or value is being stored.\n\n```go\n// Pointers has *T type\nvar value int\nvar pointer *int\n\n// Point to a variable memory address with &\nvalue = 3\npointer = &value\n\npointer // 3\npointer = 20\npointer // 20\npointer += 5\npointer // 25\n\n// Pointers to structs can access the attributes\ntype Struct struct {\n    X int\n}\n\ns := Struct{3}\npointer := &s\n\ns.X // 3\n```\n\nObs: Unlike C, Go doesn't have pointer arithmetics.\n\n[Return to Summary](#summary)\n\n<hr/>\n\n## Methods and Interfaces\n\nGo doesn't have classes. But you can implement methods, interfaces and almost everything contained in OOP, but in what gophers call \"Go Way\"\n\n```go\ntype Dog struct {\n    Name string\n}\n\nfunc (dog *Dog) bark() string {\n    return dog.Name + \" is barking!\"\n}\n\ndog := Dog{\"Rex\"}\ndog.bark() // Rex is barking!\n```\n\nInterfaces are implicitly implemented. You don't need to inform that your struct are correctly implementing a interface if it already has all methods with the same name of the interface.\nAll structs implement the `interface{}` interface. This empty interface means the same as `any`.\n\n```go\n// Car implements Vehicle interface\ntype Vehicle interface {\n    Accelerate()\n}\n\ntype Car struct {\n\n}\n\nfunc (car *Car) Accelerate() {\n    return \"Car is moving on ground\"\n}\n```\n\n[Return to Summary](#summary)\n\n<hr/>\n\n## Errors\n\nGo doesn't support `throw`, `try`, `catch` and other common error handling structures. Here, we use `error` package to build possible errors as a returning parameter in functions\n\n```go\nimport \"errors\"\n\n// Function that contain a logic that can cause a possible exception flow\nfunc firstLetter(text string) (string, error) {\n    if len(text) < 1 {\n        return nil, errors.New(\"Parameter text is empty\")\n    }\n    return string(text[0]), nil\n}\n\na, errorA := firstLetter(\"Wow\")\na // \"W\"\nerrorA // nil\n\nb, errorB := firstLetter(\"\")\nb // nil\nerrorB // Error(\"Parameter text is empty\")\n```\n\n[Return to Summary](#summary)\n\n<hr/>\n\n## Testing\n\nGo has a built-in library to unit testing. In a separate file you insert tests for functionalities of a file and run `go test package` to run all tests of the actual package or `go test path` to run a specific test file.\n\n```go\n// main.go\nfunc Sum(x, y int) int {\n    return x + y\n}\n\n// main_test.go\nimport (\n    \"testing\"\n    \"reflect\"\n)\n\nfunc TestSum(t *testing.T) {\n    x, y := 2, 4\n    expected := 2 + 4\n\n    if !reflect.DeepEqual(Sum(x, y), expected) {\n        t.Fatalf(\"Function Sum not working as expected\")\n    }\n}\n```\n\n[Return to Summary](#summary)\n\n<hr/>\n\n## Concurrency\n\nOne of the main parts that make Go attractive is its form to handle with concurrency. Different than parallelism, where tasks can be separated in many cores that the machine processor have, in concurrency we have routines that are more lightweight than threads and can run asynchronously, with memory sharing and in a single core.\n\n```go\n// Consider a common function, but that function can delay itself because some processing\nfunc show(from string) {\n\tfor i := 0; i < 3; i++ {\n\t\tfmt.Printf(\"%s : %d\\n\", from, i)\n\t}\n}\n\n// In a blocking way...\nfunc main() {\n\tshow(\"blocking1\")\n\tshow(\"blocking2\")\n\n\tfmt.Println(\"done\")\n}\n/*  blocking1: 0\n    blocking1: 1\n    blocking1: 2\n    blocking2: 0\n    blocking2: 1\n    blocking2: 2\n    done\n*/\n\n// Go routines are a function (either declared previously or anonymous) called with the keyword go\nfunc main() {\n\tgo show(\"routine1\")\n\tgo show(\"routine2\")\n\n\tgo func() {\n\t\tfmt.Println(\"going\")\n\t}()\n\n\ttime.Sleep(time.Second)\n\n\tfmt.Println(\"done\")\n}\n\n/*  Obs: The result will depends of what processes first\n    routine2: 0\n    routine2: 1\n    routine2: 2\n    going\n    routine1: 0\n    routine1: 1\n    routine1: 2\n    done\n*/\n\n// Routines can share data with channels\n// Channels are queues that store data between multiple routines\nmsgs := make(chan string)\n\ngo func(channel chan string) {\n    channel <- \"ping\"\n}(msgs)\n\ngo func(channel chan string) {\n    channel <- \"pong\"\n}(msgs)\n\nfmt.Println(<-msgs) // pong\nfmt.Println(<-msgs) // ping\n\n// Channels can be bufferized. Buffered channels will accept a limited number of values and when someone try to put belong their limit, it will throw and error\nnumbers := make(chan int, 2)\n\nmsgs<-0\nmsgs<-1\nmsgs<-2\n\n// fatal error: all goroutines are asleep - deadlock!\n\n// Channels can be passed as parameter where the routine can only send or receive\nnumbers := make(chan int)\n\ngo func(sender chan<- int) {\n    sender <- 10\n}(numbers)\n\ngo func(receiver <-chan int) {\n    fmt.Println(<-receiver) // 10\n}(numbers)\n\ntime.Sleep(time.Second)\n\n// When working with multiple channels, the select can provide a control to execute code accordingly of what channel has bring a message\nc1 := make(chan string)\nc2 := make(chan string)\n\nselect {\ncase msg1 := <-c1:\n    fmt.Println(\"received\", msg1)\ncase msg2 := <-c2:\n    fmt.Println(\"received\", msg2)\ndefault:\n    fmt.Println(\"no messages\")\n}\n\ngo func() {\n    time.Sleep(1 * time.Second)\n    c1 <- \"channel1 : one\"\n}()\ngo func() {\n    time.Sleep(2 * time.Second)\n    c2 <- \"channel2 : one\"\n}()\n\nfor i := 0; i < 2; i++ {\n    select {\n    case msg1 := <-c1:\n        fmt.Println(\"received\", msg1)\n    case msg2 := <-c2:\n        fmt.Println(\"received\", msg2)\n    }\n}\n\n/*\n    no messages\n    received channel1: one\n    received channel2: one\n*/\n\n// Channels can be closed and iterated\nchannel := make(chan int, 5)\n\nfor i := 0; i < 5; i++ {\n    channel <- i\n}\n\nclose(channel)\n\nfor value := range channel {\n    fmt.Println(value)\n}\n\n/*\n    0\n    1\n    2\n    3\n    4\n*/\n```\n\n[Return to Summary](#summary)\n\n<hr/>\n\n## Package `fmt`\n\n```go\nimport \"fmt\"\n\nfmt.Print(\"Hello World\") // Print in console\nfmt.Println(\"Hello World\") // Print and add a new line in end\nfmt.Printf(\"%s is %d years old\", \"John\", 32) // Print with formatting\nfmt.Errorf(\"User %d not found\", 123) // Print a formatted error\n```\n\n[Return to Summary](#summary)\n\n<hr/>\n"
  },
  {
    "path": "languages/java.md",
    "content": "### HELLO WORLD :ghost:\n\n```java\n//Text file name HelloWorld.java\npublic class HelloWorld {\n  // main() is the method\n  public static void main (String[] args)\n    //Prints \"Hello World\" in the terminal window.\n    System.out.println(\"Hello World\");\n}\n```\n\n### COMPILATION & EXECUTING JAVA CODE\n\n* Go to your program directory in terminal (Assumed JAVA Path is set)\n* After for compile your code\n\n> **javac HelloWorld.java (your program file name)**\n\n* For run program\n\n> **java HelloWorld (main class name)**\n\n\n### DATA TYPES\n\n|   Type  |      Set of values      |            Values            | Operators |\n|:-------:|:-----------------------:|:----------------------------:|:---------:|\n|  short  |         integers        | between -2^15 and + (2^15)-1 | + - * / % |\n|   int   |         integers        | between -2^31 and + (2^31)-1 | + - * / % |\n|  long   |         integers        | between -2^63 and + (2^63)-1 | + - * / % |\n|  float  |         integers        |     real numbers 32 bit      |  + - * /  |\n|  double |  floating-point numbers |     real numbers 64 bit      |  + - * /  |\n| boolean |      boolean values     |         true or false        | && \\|\\| ! |\n|   char  |        characters       |         16 bit               |           |\n|  String | sequences of characters |it's not a primitive data type|           |\n\n\n### DECLARATION AND ASSIGNMENT STATEMENTS\n\n```java\n//Declaration statement\nint a,b;\n\n//Assignment statement\na = 13212; //a is the variable name; 13212 is the literal which is assign to the variable a\n\n//Initialization statement\nint c = a + b;\n\n//Compound assignment expressions\na += b; //a is the variable name; b is the variable name; this expression is an equivalent shorthand notation of a = a + b\na -= b; //a is the variable name; b is the variable name; this expression is an equivalent shorthand notation of a = a - b\na *= b; //a is the variable name; b is the variable name; this expression is an equivalent shorthand notation of a = a * b\na /= b; //a is the variable name; b is the variable name; this expression is an equivalent shorthand notation of a = a / b\na %= b; //a is the variable name; b is the variable name; this expression is an equivalent shorthand notation of a = a % b\na ^= b; //a is the variable name; b is the variable name; this expression is an equivalent shorthand notation of a = a ^ b\na &= b; //a is the variable name; b is the variable name; this expression is an equivalent shorthand notation of a = a & b\na \\|= b; //a is the variable name; b is the variable name; this expression is an equivalent shorthand notation of a = a \\| b\n```\n\n### COMPARISON OPERATORS\n\n| Operation |        Meaning        |\n|:---------:|:---------------------:|\n|     ==    |         equal         |\n|     !=    |       not equal       |\n|     <     |       less than       |\n|     >     |      greater than     |\n|     <=    |   less than or equal  |\n|     >=    | greater than or equal |\n\n\n### PRINTING\n```java\n  String s = \"Happy Coding Folks!!\"\n  System.out.print(String s) //print s\n  System.out.println(String s) //print s, followed by a newline\n  System.out.println() //print a newline\n```\n\n### PARSING COMMAND-LINE ARGUMENTS\n```java\n  String s = \"Java is the best!!\"\n  int Integer.parseInt(String s) //convert s to an int value\n  double Double.parseDouble(String) //convert s to a double value\n  long Long.parseLong(String s) // convert s to a long value\n````\n\n### MATH LIBRARY\n```java\n  Public Class Math{\n    double abs(double a)    // absolute value of a\n    double max(double a, double b)  //maximum of a and b\n    double min(double a, dobule a)  //minimum of a and b\n    double sin(double theta) //sine of theta\n    double cos(double theta) //cosine of theta\n    double tan(double theta) //tangent of theta\n    double toRadians(double degrees) // convert angle from degrees to radians\n    double toDegrees(double radians)  // convert angle from radians to degrees\n    double exp(double a)  // exponential (e^a)\n    double pow(double a, double p) //raise a to the bth power (a^b)\n    double random() //random in [0,1)\n    double sqrt(double a)  //square root of a\n    }\n```\n\n### EXAMPLES OF TYPE CONVERSION\n\n  |       Expression      | Expression type | Expression value |\n|:---------------------:|:---------------:|:----------------:|\n| (1 + 2 + 3 + 4) / 4.0 |      double     |        2.5       |\n|      Math.sqrt(4)     |      double     |        2.0       |\n|     \"123343\" + 99     |      String     |    \"12334399\"    |\n|       11 * 0.25       |      double     |       2.75       |\n|    (int) 11 * 0.25    |      double     |       2.75       |\n|    11 * (int) 0.25    |       int       |         0        |\n|   (int) (11 * 0.25)   |       int       |         2        |\n\n### CONDITIONAL & LOOP STATEMENT\n#### ANATOMY OF CONDITIONAL STATEMENT\n> IF Statement\n```java\n  if (x>y) { // x > y is the boolean expression\n   //Sequence of statements\n   x = y;\n  }\n```\n\n> IF-ELSE STATEMENT\n```java\n   if (BOOLEAN EXPRESSION) {\n   //Sequence of statements\n   } else {\n   //Sequence of statements\n   }\n```\n\n> NESTED IF STATEMENT\n```java\n   if (BOOLEAN EXPRESSION) {\n   //Sequence of statements\n   } else if {\n   //Sequence of statements\n   }\n   .\n   .\n   .\n   else {\n   //Sequence of statements\n   }\n```\n\n>SWITCH STATEMENT\n```java\n  switch (VARIABLE TO EVALUATE ITS VALUE) {\n    case value: Statement; break;\n    ...\n    ...\n    ...\n    default: Statement; break;\n  }\n```\n**Example:**\n```java\n  int month = 8;\n        String monthString;\n        switch (month) {\n            case 1:  monthString = \"January\";\n                     break;\n            case 2:  monthString = \"February\";\n                     break;\n            case 3:  monthString = \"March\";\n                     break;\n            case 4:  monthString = \"April\";\n                     break;\n            case 5:  monthString = \"May\";\n                     break;\n            case 6:  monthString = \"June\";\n                     break;\n            case 7:  monthString = \"July\";\n                     break;\n            case 8:  monthString = \"August\";\n                     break;\n            case 9:  monthString = \"September\";\n                     break;\n            case 10: monthString = \"October\";\n                     break;\n            case 11: monthString = \"November\";\n                     break;\n            case 12: monthString = \"December\";\n                     break;\n            default: monthString = \"Invalid month\";\n                     break;\n        }\n```\n\n#### ANATOMY OF A LOOP  STATEMENT\n>FOR LOOP STATEMENT\n```java\n  for (declare and initialize a loop control variable; loop-continuation condition/s; increment or decrement of the variable of control)\n  {\n    //Statement\n  }\n```\n**Example:**\n```java\n  for (int i = 0; i <= n; i++) {\n     System.out.println(i);\n  }\n```\n\n>Enhanced for loop/for-each\n```java\nfor(dataType item : array) {\n    ...\n}\n\n```\n**Example:**\n```java\n    // array of numbers\n    int[] numbers = {100, 200, 300, 400};\n\n    // for each loop\n    for (int number: numbers) {\n      System.out.println(number);\n```\n\n> WHILE LOOP STATEMENT\n```java\n    while(condition){  //till condition will be true.\n    //code to be executed\n    }\n```\n**Example:**\n```java\n  //Initialization is a separate statement\n  int power = 1;\n\n  while ( power <= 10/2 ) // power <= n/2 is an example of the loop-continuation condition\n  {\n    System.out.println(power);\n  }\n```\n\n> DO-WHILE LOOP STATEMENT\n\n```java\n  do{ //always run one time even if condition would be false\n    //Statement\n  } while(loop-continuation condition);\n```\n\n**Example:**\n```java\n    int i=1;\n    do{\n      System.out.println(i);\n      i++;\n    }while(i<=10);\n```\n\n### ARRAY\n> ARRAY DECLARATION\n\n```java\n    int[]           ai;        // array of int\n    short[][]       as;        // array of array of short\n    short           s,         // scalar short\n                    aas[][];   // array of array of short\n    Object[]        ao;        // array of Object\n    Collection<?>[] ca;  // array of Collection of unknown type\n```\n\n> DECLARATION OF ARRAY VARIABLE\n\n```java\n  Exception ae[]  = new Exception[3];\n  Object aao[][]  = new Exception[2][3];\n  int[] factorial = { 1, 1, 2, 6, 24, 120, 720, 5040 };\n  char ac[]       = { 'n', 'o', 't', ' ', 'a', ' ',\n                      'S', 't', 'r', 'i', 'n', 'g' };\n  String[] aas    = { \"array\", \"of\", \"String\", };\n```\n\n### ACCESS MODIFIERS\n\n1. default(No keyword required)\n2. private\n3. public\n4. protected\n\n### NON ACCESS MODIFIERS\n\n1. static\n2. final\n3. transient\n4. abstract\n5. synchronized\n6. volatile\n\n## Object Oriented Programming (OOPs) Concept :clipboard:\n\n### OBJECT\n\n```java\n  //Declare a variable, object name\n  String s;\n\n  //Invoke a constructor to create an object\n  s = new String (\"Hello World\");\n\n  //Invoke an instance method that operates on the object's value\n  char c = s.chartAt(4);\n```\n> INSTANCE VARIABLES\n\n```java\n  public class Charge {\n    //Instance variable declarations\n    private final double rx, ry;\n    private final double q;\n  }\n```\n\n### METHODS\n\n```java\n  public static double sum (int a, int b) { //double is the return type, sum is the method's name, a and b are two arguments of type int;\n    int result; //local variable\n    result = a + b;\n    return result;//return statement;\n  }\n```\n\n### CLASS DECLARATION\n```java\nclass MyClass {\n    // field, constructor, and\n    // method declarations\n}\n```\n**Example:**\n\n```java\n    public class Bicycle {\n        // the Bicycle class has\n        // three fields\n        public int cadence;\n        public int gear;\n        public int speed;\n        // the Bicycle class has\n        // one constructor\n        public Bicycle(int startCadence, int startSpeed, int startGear) {\n            gear = startGear;\n            cadence = startCadence;\n            speed = startSpeed;\n        }\n        // the Bicycle class has\n        // four methods\n        public void setCadence(int newValue) {\n            cadence = newValue;\n        }\n        public void setGear(int newValue) {\n            gear = newValue;\n        }\n        public void applyBrake(int decrement) {\n            speed -= decrement;\n        }\n        public void speedUp(int increment) {\n            speed += increment;\n        }\n}\n```\n>DECLARING CLASSESS IMPLEMENTATING AN INTERFACE AND EXTENDING PARENT CLASS\n```java\nclass MyClass extends MySuperClass implements YourInterface {\n    // field, constructor, and\n    // method declarations\n}\n```\n* MyClass is a subclass of MySuperClass and that it implements the YourInterface interface.\n\n> CONSTRUCTORS\n* A class contains constructors that are invoked to create objects from the class blueprint.\n* Constructor declarations look like method declarations—except that they use the name of the class and have no return type\n* Each and every class has defualt No-args constructor.\n\n\n```java\n  public class Bicycle{\n\n      private int gear;\n      private int cadence;\n      private int speed;\n\n      public Bicycle(int startCadence, int startSpeed, int startGear) { //args-constructor\n        gear = startGear;\n        cadence = startCadence;\n        speed = startSpeed;\n      }\n\n      public Bicycle(){//No-args constructor\n        super();\n      }\n  }\n```\n\n### POLYMORPHISM\n* Polymorphism is the concept where an object behaves differently in different situations.\n*  There are two types of polymorphism\n    1. compile time polymorphism\n    2. runtime polymorphism.\n\n#### 1. Compile Time Polymorphism\n* Compile-time polymorphism is achieved by method overloading.\n* method overloading is creating multiple method with methods name is same and arguments are different.\n```java\n  public class Circle {\n\n    public void draw(){\n      System.out.println(\"Drwaing circle with default color Black and diameter 1 cm.\");\n    }\n\n    public void draw(int diameter){ //method draw() overloaded.\n      System.out.println(\"Drwaing circle with default color Black and diameter\"+diameter+\" cm.\");\n    }\n\n    public void draw(int diameter, String color){ //method draw() overloaded.\n      System.out.println(\"Drwaing circle with color\"+color+\" and diameter\"+diameter+\" cm.\");\n    }\n  }\n```\n#### 2. Run Time Polymorphism\n* Run-time polymorphism is achieved by method overriding.\n* Runtime polymorphism is implemented when we have an **“IS-A”** relationship between objects.\n* method overriding is the subclass has to override the superclass method.\n```java\n    public interface Shape {\n\n\t    public void draw();\n    }\n```\n```java\n    public class Circle implements Shape{\n\n      @Override\n      public void draw(){\n        System.out.println(\"Drwaing circle\");\n      }\n\n    }\n```\n```java\n    public class Square implements Shape {\n\n      @Override\n      public void draw() {\n        System.out.println(\"Drawing Square\");\n      }\n\n    }\n```\n* `Shape` is the superclass and there are two subclasses `Circle` and `Square`\n* Below is an example of runtime polymorphism.\n```java\n    Shape sh = new Circle();\n    sh.draw();\n\n    Shape sh1 = getShape(); //some third party logic to determine shape\n    sh1.draw();\n```\n\n### INHERITANCE\n\n* Inheritance is the mechanism of code reuse.\n* The object that is getting inherited is called the superclass and the object that inherits the superclass is called a subclass.\n* We use `extends` keyword in java to implement inheritance from class.\n* We use `implements` keyword in java to implement inheritance from interface.\n\n```java\n    public class Superclass{\n      // methods and fields\n    }\n```\n```java\n    public interface Superinterface{\n      // methods and fields\n    }\n```\n```java\n    public class Subclass extends Superclass implements Superinterface{\n      // methods and fields\n    }\n```\n\n### Abstraction\n\n* Abstraction is the concept of hiding the internal details and describing things in simple terms.\n* Abstraction can be achieved by two ways.\n  1. Abstract Class\n  2. Interface\n\n#### 1. Abstract Class\n* An abstract class must be declared with an `abstract` keyword.\n* It can have abstract and non-abstract methods.\n* It cannot be instantiated.\n* It can have constructors and static methods also.\n* It can have final methods which will force the subclass not to change the body of the method.\n\n```java\n    abstract class Flower{\n        abstract String Smell(); //abstract method.\n        String Oil(){  // non-abstract method.\n           System.out.println(\"Flower Oil is good.\");\n         }\n    }\n\n    public class Lily extends Flower{\n        private String Smell(){ // implementation of abstarct method.\n          System.out.println(\"Lily smell's lovender.\");\n        }\n    }\n```\n\n#### 2. Interface\n* Interface is a blueprint of a **class**.\n* It can have only abstract methods. [Except Java 8 and next versions.]\n* Since Java 8, we can have **default and static** methods in an interface.\n\n\n```java\n    interface print{\n        void printPaper();\n    }\n    public class A4 implements print{\n        public void printPaper(){\n          System.out.println(\"A4 Page Printed. \");\n        }\n    }\n```\n\n### Encapsulation\n\n* Encapsulation is used for access restriction to class members and methods.\n* Encapsulation is the technique used to implement abstraction in OOP.\n* As in encapsulation, the data in a class is hidden from other classes, so it is also known as **data-hiding**.\n* Encapsulation can be achieved by Declaring all the variables in the class as private and writing public methods in the class to set and get the values of variables.\n* Best example of Encapsulation is POJO (Plain-Java-Object-Class).\n\n ```java\n    public class User {\n        private String username;\n        private String password;\n\n        public String getUsername() {\n          return username;\n        }\n\n        public void setUsername(String username) {\n          this.username = username;\n        }\n\n        public String getPassword() {\n          return password;\n        }\n\n        public void setPassword(String password) {\n          this.password = password;\n        }\n    }\n ```\n\n\n## ADVANCE DATA TYPE\n* **STACK DATA TYPE**\n\n```java\n  public class Stack<Item> implements Iterable <Item>\n\n  Stack()   //create an empty stack\n  boolean isEmpty() //return if the stack empty\n  void push(Item item) // push an item onto the stack\n  Item pop() //return and remove the item that was inserted most recently\n  int size() //number of item on stack\n```\n\n* **QUEUE DATA TYPE**\n\n```java\n  public class Queue<Item> implements Iterable<Item>\n\n  Queue()  //create an empty queue\n  boolean isEmpty()  //return if the queue empty\n  void enqueue(Item item) // insert an item onto queue\n  Item dequeue()  //return and remove the item that was inserted least recently\n  int size() //number of item on queue\n```\n\n* **ITERABLE**\n\n```java\n//import Iterator\nimport java.util.Iterator;\n\npublic class Queue<Item> implements Iterable<Item> {\n\n//FIFO queue\n  private Node first;\n  private Node last;\n  private class Node {\n    Item item;\n    Node next;\n  }\n\n  public void enqueue (Item item)\n  ...\n\n  public Item dequeue()\n  ...\n\n}\n```\n\n* **SYMBOL TABLE DATA TYPE**\n\n```java\n  public class ST<Key extends Comparable<Key>, Value>\n\n  ST()  //create and empty symbol table\n  void put(Key key, Value val)  //associate val with key\n  Value get(Key key)  //value associated with key\n  void remove(Key key) //remove key (and its associated value)\n  boolean contains (Key key)  //return if there is a value associated with key\n  int size()  //number of key-value pairs\n  Iterable<Key> keys()  // all keys in the symbol table\n```\n\n* **SET DATA TYPE**\n\n```java\n  public class Set<Key extends Comparable<Key>> implements Iterable<Key>\n  Set() //create an empty set\n  boolean isEmpty()  //return if the set is empty\n  void add (Key key)  //add key to the set\n  void remove(Key key)  //remove key from set\n  boolean contains(Key key) //return if the key is in the set\n  int size() //number of elements in set\n```\n"
  },
  {
    "path": "languages/javascript.js",
    "content": "/* *******************************************************************************************\n * GLOBAL OBJECTS > OBJECT\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object\n * ******************************************************************************************* */\n\n// Global object: properties\nObject.length                                        // length is a property of a function object, and indicates how many arguments the function expects, i.e. the number of formal parameters. This number does not include the rest parameter. Has a value of 1.\nObject.prototype                                     // Represents the Object prototype object and allows to add new properties and methods to all objects of type Object.\n\n// Methods of the Object constructor\nObject.assign(target, ...sources)                    // Copies the values of all enumerable own properties from one or more source objects to a target object. method is used to copy the values of all enumerable own properties from one or more source objects to a target object. It will return the target object\nObject.create(MyObject)                              // Creates a new object with the specified prototype object and properties. The object which should be the prototype of the newly-created object.\nObject.defineProperty(obj, prop, descriptor)         // Adds the named property described by a given descriptor to an object.\nObject.defineProperties(obj, props)                  // Adds the named properties described by the given descriptors to an object.\nObject.entries(obj)                                  // Returns an array containing all of the [key, value] pairs of a given object's own enumerable string properties.\nObject.freeze(obj)                                   // Freezes an object: other code can't delete or change any properties.\nObject.getOwnPropertyDescriptor(obj, prop)           // Returns a property descriptor for a named property on an object.\nObject.getOwnPropertyDescriptors(obj)                // Returns an object containing all own property descriptors for an object.\nObject.getOwnPropertyNames(obj)                      // Returns an array containing the names of all of the given object's own enumerable and non-enumerable properties.\nObject.getOwnPropertySymbols(obj)                    // Returns an array of all symbol properties found directly upon a given object.\nObject.getPrototypeOf(obj)                           // Returns the prototype of the specified object.\nObject.is(value1, value2);                           // Compares if two values are the same value. Equates all NaN values (which differs from both Abstract Equality Comparison and Strict Equality Comparison).\nObject.isExtensible(obj)                             // Determines if extending of an object is allowed.\nObject.isFrozen(obj)                                 // Determines if an object was frozen.\nObject.isSealed(obj)                                 // Determines if an object is sealed.\nObject.keys(obj)                                     // Returns an array containing the names of all of the given object's own enumerable string properties.\nObject.preventExtensions(obj)                        // Prevents any extensions of an object.\nObject.seal(obj)                                     // Prevents other code from deleting properties of an object.\nObject.setPrototypeOf(obj, prototype)                // Sets the prototype (i.e., the internal [[Prototype]] property).\nObject.values(obj)                                   // Returns an array containing the values that correspond to all of a given object's own enumerable string properties.\n\n// Object instances and Object prototype object (Object.prototype.property or Object.prototype.method())\n// Properties\nobj.constructor                                      // Specifies the function that creates an object's prototype.\nobj.__proto__                                        // Points to the object which was used as prototype when the object was instantiated.\n\n// Methods\nobj.hasOwnProperty(prop)                             // Returns a boolean indicating whether an object contains the specified property as a direct property of that object and not inherited through the prototype chain.\nprototypeObj.isPrototypeOf(object)                   // Returns a boolean indicating whether the object this method is called upon is in the prototype chain of the specified object.\nobj.propertyIsEnumerable(prop)                       // Returns a boolean indicating if the internal ECMAScript [[Enumerable]] attribute is set.\nobj.toLocaleString()                                 // Calls toString().\nobj.toString()                                       // Returns a string representation of the object.\nobject.valueOf()                                     // Returns the primitive value of the specified object.\n\n/* *******************************************************************************************\n * GLOBAL OBJECTS > ARRAY\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array\n * ******************************************************************************************* */\n\n// Global object: properties\nArray.length                                         // Reflects the number of elements in an array.\nArray.prototype                                      // Represents the prototype for the Array constructor and allows to add new properties and methods to all Array objects.\n\n// Global object: methods\nArray.from(arrayLike[, mapFn[, thisArg]])            // Creates a new Array instance from an array-like or iterable object.\nArray.isArray(obj)                                   // Returns true if a variable is an array, if not false.\nArray.of(element0[, element1[, ...[, elementN]]])    // Creates a new Array instance with a variable number of arguments, regardless of number or type of the arguments.\n\n// Instance: properties\narr.length                                           // Reflects the number of elements in an array.\n\n// Instance: mutator methods\narr.copyWithin(target, start, end)                   // Copies a sequence of array elements within the array.\narr.fill(value, start, end)                          // Fills all the elements of an array from a start index to an end index with a static value.\narr.pop()                                            // Removes the last element from an array and returns that element.\narr.flat()                                           // merges nested array into one single array\narr.push([element1[, ...[, elementN]]])              // Adds one or more elements to the end of an array and returns the new length of the array.\narr.reverse()                                        // Reverses the order of the elements of an array in place — the first becomes the last, and the last becomes the first.\narr.shift()                                          // Removes the first element from an array and returns that element.\narr.sort()                                           // Sorts the elements of an array in place and returns the array.\narray.splice(start, deleteCount, item1, item2, ...)  // Adds and/or removes elements from an array.\narr.unshift([element1[, ...[, elementN]]])           // Adds one or more elements to the front of an array and returns the new length of the array.\n\n// Instance: accessor methods\narr.at(index)                                        // Returns the element at the specified index in the array.\narr.concat(value1[, value2[, ...[, valueN]]])        // Returns a new array comprised of this array joined with other array(s) and/or value(s).\narr.includes(searchElement, fromIndex)               // Determines whether an array contains a certain element, returning true or false as appropriate.\narr.indexOf(searchElement[, fromIndex])              // Returns the first (least) index of an element within the array equal to the specified value, or -1 if none is found.\narr.join(separator)                                  // Joins all elements of an array into a string.\narr.lastIndexOf(searchElement, fromIndex)            // Returns the last (greatest) index of an element within the array equal to the specified value, or -1 if none is found.\narr.slice(begin, end)                                // Extracts a section of an array and returns a new array.\narr.toString()                                       // Returns a string representing the array and its elements. Overrides the Object.prototype.toString() method.\narr.toLocaleString(locales, options)                 // Returns a localized string representing the array and its elements. Overrides the Object.prototype.toLocaleString() method.\n\n// Instance: iteration methods\narr.entries()                                        // Returns a new Array Iterator object that contains the key/value pairs for each index in the array.\narr.every(callback[, thisArg])                       // Returns true if every element in this array satisfies the provided testing function.\narr.filter(callback[, thisArg])                      // Creates a new array with all of the elements of this array for which the provided filtering function returns true.\narr.find(callback[, thisArg])                        // Returns the found value in the array, if an element in the array satisfies the provided testing function or undefined if not found.\narr.findIndex(callback[, thisArg])                   // Returns the found index in the array, if an element in the array satisfies the provided testing function or -1 if not found.\narr.forEach(callback[, thisArg])                     // Calls a function for each element in the array.\narr.keys()                                           // Returns a new Array Iterator that contains the keys for each index in the array.\narr.map(callback[, initialValue])                    // Creates a new array with the results of calling a provided function on every element in this array.\narr.reduce(callback[, initialValue])                 // Apply a function against an accumulator and each value of the array (from left-to-right) as to reduce it to a single value.\narr.reduceRight(callback[, initialValue])            // Apply a function against an accumulator and each value of the array (from right-to-left) as to reduce it to a single value.\narr.some(callback[, initialValue])                   // Returns true if at least one element in this array satisfies the provided testing function.\narr.values()                                         // Returns a new Array Iterator object that contains the values for each index in the array.\n\n// String methods\nString.charAt(index)                                 // Returns the character at the specified index in a string.\nString.indexOf(character)                            // Returns the index of the first occurrence of a specified value in a string.\nString.substring(starting_index, ending_index)       // Returns a new string that is a subset of the original string.\nString.substring(starting_index)                     // Returns a substring from starting index to last index of string."
  },
  {
    "path": "languages/php.php",
    "content": "<?php\n\n// Exit the file, string inside get's echo'ed\ndie(\"This file is not meant to be ran. ¯\\_(ツ)_/¯\");\nexit(\"This file is not meant to be ran. ¯\\_(ツ)_/¯\");\n\n/**\n * Printing\n */\necho \"\"; // Print a string or type that can be made into a string(I.E int, float).\nprint_r($arr); // Print anything, with type hints for array's and object's\nvar_dump($arr); // Print anything, with type hints for any value and sizes\n\n/**\n * Usefull string manipulation methods\n */\n$string = 'Awesome cheatsheets';\n\nstr_contains($string, 'cheat'); // Find if the string contains the specified string (PHP >= 8.0)\nstr_replace('Awesome', 'Bonjour', $string); // Replace all occurrence\nstrcmp($string, 'Awesome cheatsheets'); // Compare two strings\nstrpos($string, 'a', 0); // Get position in the string\nstr_split($string, 2); // Split the string\nstrrev($string); // Reverse a string\ntrim($string); // Strip whitespace from the beginning and end of a string\nucfirst($string); // Make a string's first character uppercase\nlcfirst($string); // Make a string's first character lowercase\nsubstr($string, 0, 4); // Return part of a string\n\n/**\n * Declaring an Array\n */\n\n// Indexed Array\n$arr = array(\"John\", \"Doe\", \"Lorem\", \"Ipsum\");\n\n// Associative Array\n$arr = array(\"John\"=>\"10\", \"Doe\"=>\"200\", \"Doe\"=>\"3000\", \"Ipsum\"=>\"40000\");\n\n// Multidimensional Arrays\n$arr = array (\n    array(\"John\",100,180),\n    array(\"Doe\",150,130),\n    array(\"Lorem\",500,200),\n    array(\"Ipsum\",170,150)\n);\n\n// Declaring array with short syntax\n$arr = [\"John\", \"Doe\", \"Lorem\", \"Ipsum\"]; // Indexed Array\n$arr = [\"John\"=>\"10\", \"Doe\"=>\"200\", \"Doe\"=>\"3000\", \"Ipsum\"=>\"40000\"]; // Associative Array\n$arr = [\n    [\"John\",100,180],\n    [\"Doe\",150,130],\n    [\"Lorem\",500,200],\n    [\"Ipsum\",170,150], // You can have a \",\" at the end without throwing syntax errors\n];\n\n/**\n * Sorting an Array\n */\nsort($arr); // Sort arrays in ascending order.\nrsort($arr); // Sort arrays in descending order.\nasort($arr); // Sort associative arrays in ascending order, according to the value.\nksort($arr); // Sort associative arrays in ascending order, according to the key.\narsort($arr); // Sort associative arrays in descending order, according to the value.\nkrsort($arr); // Sort associative arrays in descending order, according to the key.\n\n/**\n * Conditions\n */\n\n // If/Elseif/Else\nif($i > 10) {\n\n} elseif( $i > 100) {\n\n} else {\n\n}\n\n// Ternary\n$string = $state == 'Running' ? 'He is running' : 'I don\\'t know';\n\n// Null coalescing\n$string = $startDate ?? '';\n\n/**\n * Ways of looping\n */\ncontinue; // Skip current iter\nbreak; // Exit loop\n\n// Foreach\nforeach($arr as $key => $value) {\n    $key = $key;\n    $value = $value;\n}\n\n// For\nfor($i = 0; $i < count($arr); $i++) {\n    $key = $i;\n    $value = $arr[$i];\n}\n\n// While\n$i = 0;\nwhile($i < count($arr) - 1) {\n    $key = $i;\n    $value = $arr[$i];\n}\n\n// Do while\n$i = 0;\ndo {\n    $key = $i;\n    $value = $arr[$i];\n} while($i < count($arr));\n\n// Switch\nswitch($arr) {\n    case 1:\n        break;\n    case 2:\n        break;\n    case 3:\n        break;\n    default:\n}\n\n/**\n * Match (PHP >= 8.0)\n * https://www.php.net/manual/fr/control-structures.match.php\n */\n$food = 'apple';\n$return_value = match($food) {\n    'apple', 'appel' => 'An apple',\n    'banana' => 'A banana',\n    'applepie' => 'An applepie',\n    default => 'A fruit'\n};\n\n//You can also use it as a conditionnal and throw exceptions\n$str = 'Welcome to awesome cheatsheets';\n$return_value = match(true) {\n    str_contains($str, 'Welcome') && str_contains($str ,'to') => 'en-EN',\n    str_contains($str, 'Bonjour') && str_contains($str, 'sur') => 'fr-FR',\n    default => throw new Exception('Not a recognized language')\n};\n\n/**\n * Global variables\n * http://php.net/manual/en/language.variables.superglobals.php\n */\n$_SERVER; // SERVER variables\n$_GET; // Query params\n$_POST; // Post fields\n$_REQUEST; // GET and POST together\n$GLOBALS; // Array of global variables\n$_SESSION; // Browser session\n$_FILES; // Array of files that are sent in request\n$_COOKIE; // Array of cookies sent in request\n$_ENV; // php.ini options\n$argv; // Array of terminal arguments (filename included)\n$argc; // Number of arguments passed into terminal\n\n/**\n * Functions\n */\n\n // Simple function\n function name($parameter);\n\n // Function with return type (void, int, float, string, array, object, mixed)\n function name($parameter) : void;\n\n // Function with optionnal parameter\n function name($parameter = '') : string;\n\n // Function with typed parameter (? means \"can be null\")\n function name(?string $parameter) : ?string;\n\n // Function with union types (PHP >= 8.0)\n function name(int|string $parameter1, array $parameter2) : int|string;\n\n // Function call\n name('my_parameter');\n\n // Null safe operator (PHP >= 8.0)\n $myObject?->getName()?->startWith('A');\n\n/**\n * Class\n * http://php.net/manual/en/language.oop5.basic.php\n */\nclass NormalClass extends AbstractClassName implements InterfaceName\n{\n\n    use TraitName;\n\n    // --> PROPERTY TYPES <--\n\n    /**\n     * Public property, everyone can access this property.\n     * @var Type\n     */\n    public $property;\n\n    /**\n     * Private property, only this instance can access this property.\n     * @var Type\n     */\n    private $property;\n\n    /**\n     * Protected property, this instance and childs can access this property.\n     * @var Type\n     */\n    protected $property;\n\n    /**\n     * Static property, is the same for all instances of this class.\n     * @var Type\n     */\n    static $property;\n\n    // --> FUNCTION TYPES <--\n\n    /**\n     * Public function, everyone can access this function.\n     * @param Type\n     * @return Type\n     */\n    public function publicFunction(Type $var = null): Type\n    {\n    }\n\n    /**\n     * Private function, only this instance can access this function.\n     * @param Type\n     * @return Type\n     */\n    private function privateFunction(Type $var = null): Type\n    {\n    }\n\n    /**\n     * Protected function, this instance and childs can access this function.\n     * @param Type\n     * @return Type\n     */\n    protected function protectedFunction(Type $var = null): Type\n    {\n    }\n\n    /**\n     * Static function, doesn't need an instance to be executed.\n     * @param Type\n     * @return Type\n     */\n    public static function staticFunction(Type $var = null): Type\n    {\n    }\n\n    // --> MAGIC METHODS <--\n\n    /**\n     * Gets triggered on creating a new class instance\n     * http://php.net/manual/en/language.oop5.decon.php\n     * @param Type\n     * @return void\n     */\n    public function __construct(Type $var = null)\n    {\n    }\n\n    /**\n     * Gets triggered on destruction of a class instance\n     * http://php.net/manual/en/language.oop5.decon.php\n     * @return void\n     */\n    public function __destruct()\n    {\n    }\n\n    /**\n     * __set() is run when writing data to inaccessible properties.\n     * http://php.net/manual/en/language.oop5.overloading.php\n     * @param string name\n     * @param mixed value\n     * @return void\n     */\n    public function __set(string $name , mixed $value)\n    {\n    }\n\n    /**\n     * __get() is utilized for reading data from inaccessible properties.\n     * http://php.net/manual/en/language.oop5.overloading.php\n     * @param string name\n     * @return mixed\n     */\n    public function __get(string $name)\n    {\n    }\n\n    /**\n     * __isset() is triggered by calling isset() or empty() on inaccessible properties.\n     * http://php.net/manual/en/language.oop5.overloading.php\n     * @param string name\n     * @return bool\n     */\n    public function __isset(string $name)\n    {\n    }\n\n    /**\n     * __unset() is invoked when unset() is used on inaccessible properties.\n     * http://php.net/manual/en/language.oop5.overloading.php\n     * @param string name\n     * @return void\n     */\n    public function __unset(string $name)\n    {\n    }\n\n    /**\n     * __call is triggered when invoking inaccessible methods in an object context.\n     * http://php.net/manual/en/language.oop5.overloading.php\n     * @param string name\n     * @param array arguments\n     * @return mixed\n     */\n    public function __call(string $name, array $arguments)\n    {\n    }\n\n    /**\n     * __callStatic() is triggered when invoking inaccessible methods in a static context.\n     * http://php.net/manual/en/language.oop5.overloading.php\n     * @param string name\n     * @param array arguments\n     * @return mixed\n     */\n    public static function __callStatic(string $name, array $arguments)\n    {\n    }\n\n    /**\n     * http://php.net/manual/en/language.oop5.magic.php\n     * @return array\n     */\n    public function __sleep()\n    {\n    }\n\n    /**\n     * http://php.net/manual/en/language.oop5.magic.php\n     * @return void\n     */\n    public function __wakeup()\n    {\n    }\n\n    /**\n     * http://php.net/manual/en/language.oop5.magic.php\n     * @return string\n     */\n    public function __toString()\n    {\n    }\n\n    /**\n     * http://php.net/manual/en/language.oop5.magic.php\n     * @param Type\n     * @return mixed\n     */\n    public function __invoke(Type $var = null)\n    {\n    }\n\n    /**\n     * http://php.net/manual/en/language.oop5.magic.php\n     * @param array properties\n     * @return object\n     */\n    public static function __set_state(array $properties)\n    {\n    }\n\n    /**\n     * http://php.net/manual/en/language.oop5.magic.php\n     * @return array\n     */\n    public function __debugInfo()\n    {\n    }\n\n}\n\n/**\n * Every class that has implemented this interface need to have the same functions.\n */\ninterface InterfaceName\n{\n\n    public function FunctionName(Type $var = null): Type;\n\n}\n\n/**\n * Combination of class and interface.\n */\nabstract class AbstractClassName\n{\n\n    /**\n     * Classes extending this abstract class need to have this function.\n     * @param Type\n     * @return Type\n     */\n    abstract function abstractFunction(Type $var = null): Type;\n\n}\n\n\n/**\n * Basic Implementation of LoggerAwareInterface.\n * @see https://github.com/php-fig/log/blob/master/Psr/Log/LoggerAwareTrait.php\n */\ntrait LoggerAwareTrait\n{\n    /**\n     * The logger instance.\n     *\n     * @var LoggerInterface\n     */\n    protected $logger;\n    /**\n     * Sets a logger.\n     *\n     * @param LoggerInterface $logger\n     */\n    public function setLogger(LoggerInterface $logger)\n    {\n        $this->logger = $logger;\n    }\n}\n\n\n/**\n * Example with use of LoggerAwareTrait.\n */\nclass ClassWithLogger\n{\n    /**\n     * Use the LoggerAwareTrait in this class.\n     */\n    use LoggerAwareTrait;\n}\n\n\n/**\n * Enums (PHP >=8.1)\n * https://www.php.net/manual/fr/language.types.enumerations.php\n */\n\n interface StateCode {\n    public function stateCode() : int;\n }\n\n enum States implements StateCode {\n     case Running;\n     case Stopped;\n\n     public function stateCode() : int {\n         return match($this) {\n             State::Running => '444',\n             State::Stopped => '666'\n         };\n     }\n }\n\n /**\n  * You can also declare backed Enums\n  */\n  enum States : int implements StateCode {\n    case Running = 1;\n    case Stopped = 0;\n\n    public function stateCode() : int {\n        return match($this) {\n            State::Running => '444',\n            State::Stopped => '666'\n        };\n    }\n}\n\n /** Enums can be use as a type */\n function notify(State $state) {\n     // ...\n }\n notify(State::Running);\n\n/**\n * PHP Regex.\n */\n\n// Meta Characters.\n\n^   Start of subject (or line in multiline mode)\n$   End of subject (or line in multiline mode)\n[   Start character class definition\n]   End character class definition\n|   Alternates, eg (a|b) matches a or b\n(   Start subpattern\n)   End subpattern\n\\   Escape character\n\n// Pattern Modifiers.\n\ni   Caseless - ignore case\nm   Multiline mode - ^ and $ match start and end of lines\ns   Dotall - . class includes newline\nx   Extended- comments & whitespace\ne   preg_replace only - enables evaluation of replacement as PHP code\nS   Extra analysis of pattern\nU   Pattern is ungreedy\nu   Pattern is treated as UTF-8\n\n// Subpattern Modifiers & Assertions.\n(?:)    Non capturing subpattern    ((?:foo|fu)bar) matches foobar or fubar without foo or fu appearing as a captured subpattern\n(?=)    Positive look ahead assertion   foo(?=bar) matches foo when followed by bar\n(?!)    Negative look ahead assertion   foo(?!bar) matches foo when not followed by bar\n(?<=)   Positive look behind assertion  (?<=foo)bar matches bar when preceded by foo\n(?<!)   Negative look behind assertion  (?<!foo)bar matches bar when not preceded by foo\n(?>)    Once-only subpatterns   (?>\\d+)bar Performance enhancing when bar not present\n(?(x))  Conditional subpatterns (?(3)foo|fu)bar Matches foo if 3rd subpattern has matched, fu if not\n(?#)    Comment (?# Pattern does x y or z)\n\n// Base Character Classes\n\\w  Any \"word\" character (a-z 0-9 _)\n\\W  Any non \"word\" character\n\\s  Whitespace (space, tab CRLF)\n\\S  Any non whitespace character\n\\d  Digits (0-9)\n\\D  Any non digit character\n.   (Period) - Any character except newline\n\n// Multiplicity.\nn*  Zero or more of n\nn+  One or more of n\nn?  Zero or one occurrences of n\n{n} n occurrences exactly\n{n,}    At least n occurrences\n{,m}    At most m occurrences\n{n,m}   Between n and m occurrences (inclusive)\n\n\n// PHP Regular Expression Functions.\n\nFunction    Description\npreg_match()    The preg_match() function searches string for pattern, returning true if pattern exists, and false otherwise.\npreg_match_all()    The preg_match_all() function matches all occurrences of pattern in string. Useful for search and replace.\npreg_replace()  The preg_replace() function operates just like ereg_replace(), except that regular expressions can be used in the pattern and replacement input parameters.\npreg_split()    Preg Split (preg_split()) operates exactly like the split() function, except that regular expressions are accepted as input parameters.\npreg_grep() The preg_grep() function searches all elements of input_array, returning all elements matching the regex pattern within a string.\npreg_ quote()   Quote regular expression characters\n\n// Code Snippets.\n\n//A better solution for validate email syntax is using filter_var.\nif (filter_var('test+email@fexample.com', FILTER_VALIDATE_EMAIL)) {\n    echo \"Your email is ok.\";\n} else {\n    echo \"Wrong email address format.\";\n}\n\n//Validate username, consist of alpha-numeric (a-z, A-Z, 0-9), underscores, and has minimum 5 character and maximum 20 character.\n//You could change the minimum character and maximum character to any number you like.\n$username = \"user_name12\";\nif (preg_match('/^[a-z\\d_]{5,20}$/i', $username)) {\n    echo \"Your username is ok.\";\n} else {\n    echo \"Wrong username format.\";\n}\n\n//Validate domain\n$url = \"http://domain-name.com/\";\nif (preg_match('/^(http|https|ftp):\\/\\/([A-Z0-9][A-Z0-9_-]*(?:\\.[A-Z0-9][A-Z0-9_-]*)+):?(\\d+)?\\/?/i', $url)) {\n    echo \"Your url is ok.\";\n} else {\n    echo \"Wrong url.\";\n}\n\n//Extract domain name from certain URL\n$url = \"http://domain-name.com/index.html\";\npreg_match('@^(?:http://)?([^/]+)@i', $url, $matches);\n$host = $matches[1];\necho $host; // domain-name.com\n\n//Highlight a word in the content\n$text = \"A regular expression (shortened as regex) is a sequence of characters that define a search pattern. Usually such patterns are used by string-searching algorithms for 'find' or 'find and replace' operations on strings, or for input validation.\";\n$text = preg_replace(\"/\\b(regex)\\b/i\", 'replaced content', $text);\necho $text; /*A regular expression (shortened as replaced content) is a sequence of characters that define a search pattern. Usually such patterns are used by string-searching algorithms for 'find' or 'find and replace' operations on strings, or for input validation.*/\n"
  },
  {
    "path": "languages/python.md",
    "content": "# Python\n\n* Python is an interpreted, high-level and general-purpose, dynamically typed programming language\n\n* It is also Object oriented, modular oriented and a scripting language.\n\n* In Python, everything is considered as an Object.\n\n* A python file has an extension of .py\n\n* Python follows Indentation to separate code blocks instead of flower brackets({}).\n\n* We can run a python file by the following command in cmd(Windows) or shell(mac/linux).\n\n    `$ python <filename.py>` or `$ python3 <filename.py>`\n\n#### By default, python doesn't require any imports to run a python file.\n\n## Create and execute a program\n\n1. Open up a terminal/cmd\n1. Create the program: nano/cat > nameProgram.py\n1. Write the program and save it\n1. python nameProgram.py\n\n<br>\n\n### Basic Datatypes\n\n| Data Type | Description |\n| --------- | ----------- |\n| int | Integer values [0, 1, -2, 3] |\n| float | Floating point values [0.1, 4.532, -5.092] |\n| char | Characters [a, b, @, !, `] |\n| str | Strings [abc, AbC, A@B, sd!, `asa] |\n| bool | Boolean Values [True, False] |\n| complex | Complex numbers [2+3j, 4-1j] |\n\n<br>\n\n## Keywords\n<br>\n\n- As of python3.8 there are 35 keywords\n\n| Keyword | Description  | Category |\n|---------- | ---------- | --------- |\n| True      | Boolean value for not False or 1 | Value Keyword|\n| False     | Boolean Value for not True or 0 | Value Keyword |\n| None      | No Value | Value keyword |\n| and       | returns true if both (oprand) are true (other language && ) | Operator keyword |\n| or        | returns true of either operands is true (other language || ) | Operator keyword |\n| in        | returns true if word is in iterator | Operator keyword |\n| is        | returns true if id of variables are same | Operator keyword |\n| not       | returns opposite Boolean value | Operator Keyword |\n| if | get into block if expression is true | conditional |\n| elif | for more than 1 if checks | conditional |\n| else | this block will be executed if condition is false | conditional |\n| for | used for looping | iteration |\n| while | used for looping | iteration |\n| break | get out of loop | iteration |\n| continue | skip for specific condition | iteration |\n| def | make user defined function | structure |\n| class | make user defined classes | structure |\n| lambda | make anonymous function | structure |\n| with | execute code within context manager's scope | structure |\n| as | alias for something | structure |\n| pass | used for making empty structures(declaration) | structure |\n| return | get value(s) from function, get out of function | returning keyword |\n| yield | yields values instead of returning (are called generators) | returning keyword |\n| import | import libraries/modules/packages | import |\n| from | import specific function/classes from modules/packages | import |\n| try | this block will be tried to get executed | exception handling |\n| except | is any exception/error has occurred it'll be executed | exception handling |\n| finally | It'll be executed no matter exception occurs or not | exception handling |\n| raise | throws any specific error/exception | exception handling |\n| assert | throws an AssertionError if condition is false | exception handling |\n| async | used to define asynchronous functions/co-routines | asynchronous programming |\n| await | used to specify a point when control is taken back | asynchronous programming |\n| del | deletes/unsets any user defined data |  variable handling |\n| global | used to access variables defined outside of function | variable handling |\n| nonlocal | modify variables from different scopes | variable handling |\n<br>\n\n## Operators\n\n<br>\n\n| Operator | Description |\n|-|-|\n|  ( )\t|  grouping parenthesis, function call, tuple declaration |\n|  [ ]\t|  array indexing, also declaring lists etc.|\n|  !\t|    relational not, complement, ! a  yields true or false |\n|  ~   | \tbitwise not, ones complement, ~a |\n| \\-   |\tunary minus, - a |\n|  \\+   | \tunary plus,  + a |\n|  \\*   |\tmultiply, a * b |\n|  /   \t| divide, a / b |\n|  %    |\tmodulo, a % b |\n|  \\+   | \tadd, a + b |\n| \\-   | \tsubtract, a - b |\n| <<   | shift left,  left operand is shifted left by right operand bits (multiply by 2) |\n| \\>>   |\tshift right, left operand is shifted right by right operand bits (divide by 2) |\n | <    |\tless than, result is true or false,  a %lt; b\n| <=   |\tless than or equal, result is true or false,  a <= b\n| \\>    |\tgreater than, result is true or false,  a > b\n| \\>=   |\tgreater than or equal, result is true or false, a >= b\n|  ==   |\tequal, result is true or false,  a == b\n| !=  | \tnot equal, result is true or false,  a != b\n|  & | bitwise and,  a & b\n| ^ | bitwise exclusive or XOR,  a ^ b\n| \\| | bitwise or,  a | b\n|  &&, and | relational and, result is true or false,  a < b && c >= d\n| \\|\\|, or | relational or, result is true or false,  a < b \\|\\| c >= d |\n| =  | store or assignment |\n|  += | add and store |\n|  -=  | subtract and store |\n|  *= | multiply and store |\n|  /= | divide and store|\n|  %= | modulo and store|\n| <<= | shift left and store|\n|  \\>>= | shift right and store|\n|  &= | bitwise and and store|\n|  ^= | bitwise exclusive or and store|\n|  \\|= | bitwise or and store|\n|  , | separator as in   ( y=x,z=++x )|\n\n### Basic Data Structures\n\n### List\n\n- List is a collection which is ordered and changeable. Allows duplicate members.\n\n\n- Lists are created using square brackets:\n\n```python\nthislist = [\"apple\", \"banana\", \"cherry\"]\n```\n\n- List items are ordered, changeable, and allow duplicate values.\n\n- List items are indexed, the first item has index `[0]`, the second item has index `[1]` etc.\n\n- The list is changeable, meaning that we can change, add, and remove items in a list after it has been created.\n\n- To determine how many items a list has, use the `len()` function.\n\n- A list can contain different data types:\n```python\nlist1 = [\"abc\", 34, True, 40, \"male\"]\n```\n- It is also possible to use the list() constructor when creating a new list\n```python\nthislist = list((\"apple\", \"banana\", \"cherry\"))  # note the double round-brackets\n```\n- pop() function removes the last value in the given list by default.\n\n  ```python\n  thislist = [\"apple\", \"banana\", \"cherry\"]\n\n  print(thislist.pop())  # cherry\n  print(thislist.pop(0))  #apple\n\n  ```\n\n\n\n### Tuple\n\n- Tuple is a collection which is ordered and unchangeable. Allows duplicate members.\n- A tuple is a collection which is ordered and unchangeable.\n- Tuples are written with round brackets.\n```python\nthistuple = (\"apple\", \"banana\", \"cherry\")\n```\n- Tuple items are ordered, unchangeable, and allow duplicate values.\n- Tuple items are indexed, the first item has index `[0]`, the second item has index `[1]` etc.\n- When we say that tuples are ordered, it means that the items have a defined order, and that order will not change.\n\n- Tuples are unchangeable, meaning that we cannot change, add or remove items after the tuple has been created.\n- Since tuple are indexed, tuples can have items with the same value:\n- Tuples allow duplicate values:\n```python\nthistuple = (\"apple\", \"banana\", \"cherry\", \"apple\", \"cherry\")\n```\n- To determine how many items a tuple has, use the  `len()`function:\n```python\nthistuple = (\"apple\", \"banana\", \"cherry\")\nprint(len(thistuple))\n```\n- To create a tuple with only one item, you have to add a comma after the item, otherwise Python will not recognize it as a tuple.\n```python\nthistuple = (\"apple\",)\nprint(type(thistuple))\n\n# NOT a tuple\nthistuple = (\"apple\")\nprint(type(thistuple))\n```\n- It is also possible to use the tuple() constructor to make a tuple.\n```python\n\nthistuple = tuple((\"apple\", \"banana\", \"cherry\")) # note the double round-brackets\nprint(thistuple)\n```\n\n### Set\n- Set is a collection which is unordered and unindexed. No duplicate members.\n- A set is a collection which is both unordered and unindexed.\n```python\nthisset = {\"apple\", \"banana\", \"cherry\"}\n```\n- Set items are unordered, unchangeable, and do not allow duplicate values.\n- Unordered means that the items in a set do not have a defined order.\n\n- Set items can appear in a different order every time you use them, and cannot be referred to by index or key.\n\n- Sets are unchangeable, meaning that we cannot change the items after the set has been created.\n- Duplicate values will be ignored.\n- To determine how many items a set has, use the `len()` method.\n```python\nthisset = {\"apple\", \"banana\", \"cherry\"}\n\nprint(len(thisset))\n```\n- Set items can be of any data type:\n```python\nset1 = {\"apple\", \"banana\", \"cherry\"}\nset2 = {1, 5, 7, 9, 3}\nset3 = {True, False, False}\nset4 = {\"abc\", 34, True, 40, \"male\"}\n```\n- It is also possible to use the `set()` constructor to make a set.\n```python\nthisset = set((\"apple\", \"banana\", \"cherry\")) # note the double round-brackets\n```\n- frozenset()  is just an immutable version of Set. While elements of a set can be modified at any time, elements of the frozen set remain the same after creation.\n\n```python\nset1 = {\"apple\", \"banana\", \"cherry\"}\nfrzset=frozenset(set1)\nprint(frzset)\n```\n\n\n\n### Dictionary\n\n- Dictionary is a collection which is unordered and changeable. No duplicate members.\n- Dictionaries are used to store data values in key:value pairs.\n- Dictionaries are written with curly brackets, and have keys and values:\n```python\nthisdict = {\n  \"brand\": \"Ford\",\n  \"model\": \"Mustang\",\n  \"year\": 1964\n}\n```\n- Dictionary items are presented in key:value pairs, and can be referred to by using the key name.\n```python\nthisdict = {\n  \"brand\": \"Ford\",\n  \"model\": \"Mustang\",\n  \"year\": 1964\n}\nprint(thisdict[\"brand\"])\n```\n- Dictionaries are changeable, meaning that we can change, add or remove items after the dictionary has been created.\n- Dictionaries cannot have two items with the same key.\n- Duplicate values will overwrite existing values.\n- To determine how many items a dictionary has, use the `len()` function.\n```python\nprint(len(thisdict))\n```\n- The values in dictionary items can be of any data type\n```python\nthisdict = {\n  \"brand\": \"Ford\",\n  \"electric\": False,\n  \"year\": 1964,\n  \"colors\": [\"red\", \"white\", \"blue\"]\n}\n```\n\n- pop() Function is used to remove a specific value from a dictionary. You can only use key bot the value. Unlike Lists you have to give a value to this function\n\n  ```python\n   car = {\n    \"brand\": \"Ford\",\n    \"model\": \"Mustang\",\n    \"year\": 1964\n  }\n\n  x = car.pop(\"model\")\n\n  print(x)# Mustang\n  print(car)#{'brand': 'Ford', 'year': 1964}\n  ```\n\n\n\n### Conditional branching\n\n```python\n    if condition:\n        pass\n    elif condition2:\n        pass\n    else:\n        pass\n```\n### Loops\n\n Python has two primitive loop commands:\n1. while loops\n2. for loops\n\n#### While loop\n- With the `while` loop we can execute a set of statements as long as a condition is true.\n- Example: Print i as long as i is less than 6\n```python\ni = 1\nwhile i < 6:\n  print(i)\n  i += 1\n```\n- The while loop requires relevant variables to be ready, in this example we need to define an indexing variable, i, which we set to 1.\n- With the `break` statement we can stop the loop even if the while condition is true\n- With the continue statement we can stop the current iteration, and continue with the next.\n\n- With the else statement we can run a block of code once when the condition no longer is true.\n\n#### For loop\n- A for loop is used for iterating over a sequence (that is either a list, a tuple, a dictionary, a set, or a string).\n\n- This is less like the for keyword in other programming languages, and works more like an iterator method as found in other object-orientated programming languages.\n\n- With the for loop we can execute a set of statements, once for each item in a list, tuple, set etc.\n```python\nfruits = [\"apple\", \"banana\", \"cherry\"]\nfor x in fruits:\n  print(x)\n```\n- The for loop does not require an indexing variable to set beforehand.\n- To loop through a set of code a specified number of times, we can use the range() function.\n- The range() function returns a sequence of numbers, starting from 0 by default, and increments by 1 (by default), and ends at a specified number.\n- The range() function defaults to increment the sequence by 1, however it is possible to specify the increment value by adding a third parameter: range(2, 30, 3).\n- The else keyword in a for loop specifies a block of code to be executed when the loop is finished.\nA nested loop is a loop inside a loop.\n\n- The \"inner loop\" will be executed one time for each iteration of the \"outer loop\":\n\n```python\nadj = [\"red\", \"big\", \"tasty\"]\nfruits = [\"apple\", \"banana\", \"cherry\"]\n\nfor x in adj:\n  for y in fruits:\n    print(x, y)\n```\n- for loops cannot be empty, but if you for some reason have a for loop with no content, put in the pass statement to avoid getting an error.\n\n```python\nfor x in [0, 1, 2]:\n  pass\n```\n\n### Function definition\n```python\ndef function_name():\n    return\n```\n### Function call\n\n```python\nfunction_name()\n```\n\n* We need not to specify the return type of the function.\n* Functions by default return `None`\n* We can return any datatype.\n"
  },
  {
    "path": "tools/aws.sh",
    "content": "##############################################################################\n# AWS\n##############################################################################\n\n# General\naws help\naws --version     # Show the current AWS CLI version\naws configure     # Configure your AWS Key ID, AWS Secret, default region and default output format for the AWS CLI\naws configure --profile <profile_name> # Configure using the profile name. By default, the list of profile is stored in ~/.aws.credentials (Linux and MacOS)\n\n# EC2\n## We need to specify a region to use ec2 commands. We can configure a default region with \"aws configure\" or set the AWS_DEFAULT_REGION environment variable before the command line\n## Example: AWS_DEFAULT_REGION=us-east-1 aws ec2 describe-instances\n\naws ec2 describe-instances # Desribe all instances in the current region\naws ec2 describe-instances --instance-ids <instance_id_1> <instance_id_2> # Describe specific instances by their IDs\naws ec2 describe-instances --filters Name=<instance_name> # Filter and describe instances by name\n\naws ec2 start-instances --instance-ids <instance_id_1> <instance_id_2> # Start previously stopped instances by their IDs\naws ec2 stop-instances --instance-ids <instance_id_1> <instance_id_2> # Stop running instances by their IDs\naws ec2 terminate-instances --instance-ids <instance_id_1> <instance_id_2> # Shutdown the specific instances by their IDs\n\n\n# S3\n## To specify the root directory of a S3 bucket, use this syntax: s3://<bucket_name>\n\naws s3 ls     # List S3 objects and common prefixes under a prefix or all S3 buckets\naws s3 ls s3://<bucket_name> # List objects and common prefixes under a specified bucket and prefix\naws s3 mb s3://<bucket_name> # Create a specific S3 bucket\naws s3 rb s3://<bucket_name> # Remove an empty specific S3 bucket by name\n\naws s3 mv <local_file_path> s3://<bucket_name>/<destination_file_path> # Move a file in local_file_path to a specific bucket in destination_file_path\n## Example: aws s3 mv text.txt s3://mybucket/text.txt\naws s3 mv s3://<bucket_name_1> s3://<bucket_name_2> --recursive # Move all objects from bucket_name_1 to bucket_name_2\n\naws s3 sync <source> <target> # Sync all contents from source to a target directory. This will copy and update all missing or outdated files or objects between source and target\n## Examples: aws s3 sync . s3://mybucket\n##           aws s3 sync s3://bucket_1 s3://bucket_2\naws s3 sync <source> <target> --delete # Sync all contents from source to target, but this will remove all missing files and objects from the target that are not present in source\n"
  },
  {
    "path": "tools/curl.sh",
    "content": "#!/bin/bash\n##############################################################################\n# BASICS\n##############################################################################\n\n# help\ncurl -h                 # help\ncurl --help             # same as -h\ncurl --manual           # whole man page\n\n# verbose\ncurl -v                 # verbose\ncurl -vv                # even more verbose\n\n# redirect output to the file\ncurl http://url/file > file\n# write to file instead of stdout\ncurl -o file http://url/file\ncurl --output file http://url/file\n# write output to a file named as the remote file\ncurl -o file http://url/file\ncurl --output file http://url/file\n# execute remote script\nbash <(curl -s http://url/myscript.sh)\n\n# download headers\ncurl -I url             # display header\n\n# basic authentification\ncurl --user username:password http://example.com/\ncurl -u username:password http://example.com/\n\n# SSL\n# -k, --insecure allow insecure server connections when using SSL\ncurl -k https://server_with_self_signed_cert/endpoint\ncurl --insecure https://server_with_self_signed_cert/endpoint\n\n# HTTP request\n# -X, --request <command> specify request command to use\n# example:\ncurl -X GET http://url/endpoint\n\n# HTTP header\n# -H, --header <header/@file> pass custom header(s) to server\n# example:\ncurl -H 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36' http://url/endpoing\n\n# HTTP POST data\n# -d, --data <data>     HTTP POST data\n# -d, --data @data      HTTP POST data from file\n# example:\ncurl -d '{json}' -H 'Content-Type: application/json' http://url/endpoint\n\n# config file\ncurl -K file            #\n#or                     # Read config from a file\ncurl --config file      #\n$HOME/.curlrc           # Default config file in UNIX-like systems\n\n##############################################################################\n# WRITE OUT PARAMETERS\n##############################################################################\n\n# -w, --write-out <format> Use output FORMAT after completion\n# example:\ncurl -w %{size_header} --silent -o /dev/null http://gogle.com # print size of header when you accessing google.com\n\n# FORMAT supported:\n# %{content_type}       # shows the Content-Type of the requested document, if there was any.\n# %{filename_effective} # shows the ultimate filename that curl writes out to.\n                        # This is only meaningful if curl is told to write to a file with\n                        # the --remote-name or --output option. It's most useful in combination\n                        #  with the --remote-header-name option.\n# %{ftp_entry_path}     # shows the initial path curl ended up in when logging on to the remote FTP server.\n# %{response_code}      # shows the numerical response code that was found in the last transfer.\n# %{http_connect}       # shows the numerical code that was found in the last response (from a proxy)\n                        # to a curl CONNECT request.\n# %{local_ip}           # shows the IP address of the local end of the most recently done connection—can\n                        # be either IPv4 or IPv6\n# %{local_port}         # shows the local port number of the most recently made connection\n# %{num_connects}       # shows the number of new connects made in the recent transfer.\n# %{num_redirects}      # shows the number of redirects that were followed in the request.\n# %{redirect_url}       # shows the actual URL a redirect would take you to when an HTTP request\n                        # was made without -L to follow redirects.\n# %{remote_ip}          # shows the remote IP address of the most recently made connection—can be\n                        # either IPv4 or IPv6.\n# %{remote_port}        # shows the remote port number of the most recently made connection.\n# %{size_download}      # shows the total number of bytes that were downloaded.\n# %{size_header}        # shows the total number of bytes of the downloaded headers.\n# %{size_request}       # shows the total number of bytes that were sent in the HTTP request.\n# %{size_upload}        # shows the total number of bytes that were uploaded.\n# %{speed_download}     # shows the average download speed that curl measured for the complete download\n                        # in bytes per second.\n# %{speed_upload}       # shows the average upload speed that curl measured for the complete upload in\n                        # bytes per second.\n# %{ssl_verify_result}  # shows the result of the SSL peer certificate verification that was requested.\n                        # 0 means the verification was successful.\n# %{time_appconnect}    # shows the time, in seconds, it took from the start until the SSL/SSH/etc connect/handshake\n                        # to the remote host was completed.\n# %{time_connect}       # shows the time, in seconds, it took from the start until the TCP connect to the remote\n                        # host (or proxy) was completed.\n# %{time_namelookup}    # shows the time, in seconds, it took from the start until the name resolving was completed.\n# %{time_pretransfer}   # shows the time, in seconds, it took from the start until the file transfer was just about\n                        # to begin. This includes all pre-transfer commands and negotiations that are specific to\n                        # the particular protocol(s) involved.\n# %{time_redirect}      # shows the time, in seconds, it took for all redirection steps including name lookup, connect,\n                        # pre-transfer and transfer before the final transaction was started. time_redirect shows\n                        # the complete execution time for multiple redirections.\n# %{time_starttransfer} # shows the time, in seconds, it took from the start until the first byte was just about to\n                        # be transferred. This includes time_pretransfer and also the time the server needed\n                        # to calculate the result.\n# %{time_total}         # shows the total time, in seconds, that the full operation lasted. The time will be displayed\n                        # with millisecond resolution.\n# %{url_effective}      # shows the URL that was fetched last. This is particularly meaningful if you have told curl\n                        # to follow Location: headers (with -L)"
  },
  {
    "path": "tools/docker.sh",
    "content": "##############################################################################\n# DOCKER\n##############################################################################\n\ndocker init                                 # Creates Docker-related starter files \ndocker build -t friendlyname .              # Create image using this directory's Dockerfile\ndocker run -p 4000:80 friendlyname          # Run \"friendlyname\" mapping port 4000 to 80\ndocker run -d -p 4000:80 friendlyname       # Same thing, but in detached mode\ndocker exec -it [container-id] bash         # Enter a running container\ndocker ps                                   # See a list of all running containers\ndocker stop <hash>                          # Gracefully stop the specified container\ndocker ps -a                                # See a list of all containers, even the ones not running\ndocker kill <hash>                          # Force shutdown of the specified container\ndocker rm <hash>                            # Remove the specified container from this machine\ndocker rm -f <hash>                         # Remove force specified container from this machine\ndocker rm $(docker ps -a -q)                # Remove all containers from this machine\ndocker images -a                            # Show all images on this machine\ndocker rmi <imagename>                      # Remove the specified image from this machine\ndocker rmi $(docker images -q)              # Remove all images from this machine\ndocker logs <container-id> -f               # Live tail a container's logs\ndocker login                                # Log in this CLI session using your Docker credentials\ndocker tag <image> username/repository:tag  # Tag <image> for upload to registry\ndocker push username/repository:tag         # Upload tagged image to registry\ndocker run username/repository:tag          # Run image from a registry\ndocker system prune                         # Remove all unused containers, networks, images (both dangling and unreferenced), and optionally, volumes. (Docker 17.06.1-ce and superior)\ndocker system prune -a                      # Remove all unused containers, networks, images not just dangling ones (Docker 17.06.1-ce and superior)\ndocker volume prune                         # Remove all unused local volumes\ndocker network prune                        # Remove all unused networks\n\n\n##############################################################################\n# DOCKER COMPOSE\n##############################################################################\n\n\ndocker-compose up                               # Create and start containers\ndocker-compose up -d                            # Create and start containers in detached mode\ndocker-compose down                             # Stop and remove containers, networks, images, and volumes\ndocker-compose logs                             # View output from containers\ndocker-compose restart                          # Restart all service\ndocker-compose pull                             # Pull all image service \ndocker-compose build                            # Build all image service\ndocker-compose config                           # Validate and view the Compose file\ndocker-compose scale <service_name>=<replica>   # Scale special service(s)\ndocker-compose top                              # Display the running processes\ndocker-compose run -rm -p 2022:22 web bash      # Start web service and runs bash as its command, remove old container.\n\n##############################################################################\n# DOCKER SERVICES \n##############################################################################\n\n\ndocker service create <options> <image> <command>   # Create new service\ndocker service inspect --pretty <service_name>      # Display detailed information Service(s)\ndocker service ls                                   # List Services\ndocker service ps                                   # List the tasks of Services\ndocker service scale <service_name>=<replica>       # Scale special service(s)\ndocker service update <options> <service_name>      # Update Service options\n\n\n##############################################################################\n# DOCKER STACK \n##############################################################################\n\n\ndocker stack ls                                 # List all running applications on this Docker host\ndocker stack deploy -c <composefile> <appname>  # Run the specified Compose file\ndocker stack services <appname>                 # List the services associated with an app\ndocker stack ps <appname>                       # List the running containers associated with an app\ndocker stack rm <appname>                       # Tear down an application\n\n\n##############################################################################\n# DOCKER MACHINE\n##############################################################################\n\n\ndocker-machine create --driver virtualbox myvm1                           # Create a VM (Mac, Win7, Linux)\ndocker-machine create -d hyperv --hyperv-virtual-switch \"myswitch\" myvm1  # Win10\ndocker-machine env myvm1                                                  # View basic information about your node\ndocker-machine ssh myvm1 \"docker node ls\"                                 # List the nodes in your swarm\ndocker-machine ssh myvm1 \"docker node inspect <node ID>\"                  # Inspect a node\ndocker-machine ssh myvm1 \"docker swarm join-token -q worker\"              # View join token\ndocker-machine ssh myvm1                                                  # Open an SSH session with the VM; type \"exit\" to end\ndocker-machine ssh myvm2 \"docker swarm leave\"                             # Make the worker leave the swarm\ndocker-machine ssh myvm1 \"docker swarm leave -f\"                          # Make master leave, kill swarm\ndocker-machine start myvm1                                                # Start a VM that is currently not running\ndocker-machine stop $(docker-machine ls -q)                               # Stop all running VMs\ndocker-machine rm $(docker-machine ls -q)                                 # Delete all VMs and their disk images\ndocker-machine scp docker-compose.yml myvm1:~                             # Copy file to node's home dir\ndocker-machine ssh myvm1 \"docker stack deploy -c <file> <app>\"            # Deploy an app\n"
  },
  {
    "path": "tools/drush.sh",
    "content": "##############################################################################\n# DRUSH\n# Install: https://www.drush.org/install/\n# Usage: https://www.drush.org/usage/\n##############################################################################\n\n\ncache clear (cc)        # Clear all caches.\n\ncron                    # Run all cron hooks.\n\ndisable (dis)           # Disable one or more modules.\n\ndownload (dl)           # Download core Drupal and projects like CCK, Zen, etc.\n\nenable (en)             # Enable one or more modules.\n\neval                    # Evaluate arbitrary php code after bootstrapping Drupal.\n\nhelp                    # Print this help message. Use --filter to limit command list to one command file (e.g. --filter=pm)\n\ninfo                    # Release information for a project\n\ninstallcore (ic)        # Install Drupal core via the specified install profile. Note that updating core with Drush is not yet available. See http://drupal.org/node/434944.\n\nrefresh (rf)            # Refresh update status information script Runs the given php script(s) after a full Drupal bootstrap. NOTE: you can't supply absolute paths to the script e.g. ~/Desktop/script.php won't work Desktop/script.php will\n\nsql cli (sqlc)          # Open a SQL command-line interface using Drupal?s credentials.\n\nsql conf                # Print database connection details.\n\nsql connect             # A string for connecting to the DB.\n\nsql dump                # Exports the Drupal DB as SQL using mysqldump.\n\nsql load                # Copy source database to target database.\n\nsql query (sqlq)        # Execute a query against the site database.\n\nstatus (st)             # Provides a birds-eye view of the current Drupal installation, if any.\n\nstatusmodules (sm)      # Show module enabled/disabled status\n\nsync                    # Rsync the Drupal tree to/from another server using ssh.\n\ntest clean              # Delete leftover tables and files from prior test runs.\n\ntest mail               # Run all tests and mail the results to your team.\n\nuninstall               # Uninstall one or more modules.\n\nupdate (up)             # Update your project code and apply any database updates required (update.php)\n\nupdatecode (upc)        # Update your project code. Moves existing project files to the backup directory specified in the config.\n\nupdatedb (updb)         # Execute the update.php process from the command line.\n\nvariable delete (vdel)  # Delete a variable.\n\nvariable get (vget)     # Get a list of some or all site variables and values.\n\nvariable set (vset)     # Set a variable.\n\nwatchdog delete (wd)    # Delete all messages or only those of a specified type.\n\nwatchdog show (ws)      # Shows recent watchdog log messages. Optionally filter for a specific type.\n"
  },
  {
    "path": "tools/elasticsearch.js",
    "content": "/* *******************************************************************************************\n * ELASTICSEARCH\n * https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html\n * https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html\n * ******************************************************************************************* */\n\nsudo service elasticsearch status -l  // Check elasticsearch status\nsudo service kibana restart           // Restart kibana\nsudo service elasticsearch restart    // Restart elasticsearch\nbrew services elasticsearch-full restart\n\nsudo /usr/share/elasticsearch/bin/elasticsearch --version // Check ElasticSearch version\nsudo /usr/share/kibana/bin/kibana --version               // Check kibana version\n"
  },
  {
    "path": "tools/emmet.md",
    "content": "# EMMET\n*The essential toolkit for web-developers*\n\n## Introduction\nEmmet is a productivity toolkit for web developers that uses expressions to generate HTML snippets.\n\n## Installation\nNormally, installation for Emmet should be a straight-forward process from the package-manager, as most of the modern text editors support Emmet. If you have difficulty setting up emmet with your editor and wish to check Emmet is supported by your favourite editor or not, you can check it from here. [Emmet Installation instructions](https://emmet.io/download/)\n\n## Usage\nYou can use Emmet in two ways:\n* Tab Expand Way: Type your emmet code and press `Tab` key\n* Interactive Method: Press `alt + ctrl + Enter` and start typing your expressions. This should automatically generate HTML snippets on the fly.\n\n__This cheatsheet will assume that you press `Tab` after each expressions.__\n\n## HTML\n\n### Generating  HTML 5 DOCTYPE\n`html:5`\nWill generate\n\n```HTML\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\">\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n  <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\">\n  <title>Document</title>\n</head>\n<body>\n\n</body>\n</html>\n```\n\n### Child items\nChild items are created using `>`\n\n`ul>li>p`\n\n```html\n<ul>\n  <li>\n    <p></p>\n  </li>\n</ul>\n```\n\n### Sibling Items\nSibling items are created using `+`\n\n`html>head+body`\n\n```html\n<html>\n<head></head>\n<body>\n\n</body>\n</html>\n```\n\n### Multiplication\nItems can be multiplied by `*`\n\n`ul>li*5`\n\n```html\n<ul>\n  <li></li>\n  <li></li>\n  <li></li>\n  <li></li>\n  <li></li>\n</ul>\n```\n\n### Grouping\nItems can be grouped together using `()`\n\n`table>(tr>th*5)+tr>t*5`\n\n```html\n<table>\n  <tr>\n    <th></th>\n    <th></th>\n    <th></th>\n    <th></th>\n    <th></th>\n  </tr>\n  <tr>\n    <t></t>\n    <t></t>\n    <t></t>\n    <t></t>\n    <t></t>\n  </tr>\n</table>\n```\n\n### Class and ID\nClass and Id in Emmet can be done using `.` and `#`\n\n`div.heading`\n\n```html\n<div class=\"heading\"></div>\n```\n\n`div#heading`\n\n```html\n<div id=\"heading\"></div>\n```\n\nID and Class can also be combined together\n\n`div#heading.center`\n\n```html\n<div id=\"heading\" class=\"center\"></div>\n```\n\n### Adding Content inside tags\nContents inside tags can be added using `{}`\n\n`h1{Emmet is awesome}+h2{Every front end developers should use this}+p{This is paragraph}*2`\n\n```HTML\n<h1>Emmet is awesome</h1>\n<h2>Every front end developers should use this</h2>\n<p>This is paragraph</p>\n<p>This is paragraph</p>\n```\n\n### Attributes inside HTML tags\nAttributes can be added using `[]`\n\n`a[href=https://google.com data-toggle=something target=_blank]`\n\n```HTML\n<a href=\"https://google.com\" data-toggle=\"something\" target=\"_blank\"></a>\n```\n\n### Numbering\nNumbering can be done using `$`\nYou can use this inside tag or contents.\n\n`h${This is so awesome $}*6`\n\n```HTML\n<h1>This is so awesome 1</h1>\n<h2>This is so awesome 2</h2>\n<h3>This is so awesome 3</h3>\n<h4>This is so awesome 4</h4>\n<h5>This is so awesome 5</h5>\n<h6>This is so awesome 6</h6>\n```\n\nUse `@-` to reverse the Numbering\n\n`img[src=image$$@-.jpg]*5`\n\n```HTML\n<img src=\"image05.jpg\" alt=\"\">\n<img src=\"image04.jpg\" alt=\"\">\n<img src=\"image03.jpg\" alt=\"\">\n<img src=\"image02.jpg\" alt=\"\">\n<img src=\"image01.jpg\" alt=\"\">\n```\n\nTo start the numbering from specific number, use this way\n\n`img[src=emmet$@100.jpg]*5`\n\n```HTML\n<img src=\"emmet100.jpg\" alt=\"\">\n<img src=\"emmet101.jpg\" alt=\"\">\n<img src=\"emmet102.jpg\" alt=\"\">\n<img src=\"emmet103.jpg\" alt=\"\">\n<img src=\"emmet104.jpg\" alt=\"\">\n```\n\n## Tips\n* Use `:` to expand known abbreviations\n\n`input:date`\n```HTML\n<input type=\"date\" name=\"\" id=\"\">\n```\n\n`form:post`\n```HTML\n<form action=\"\" method=\"post\"></form>\n```\n\n`link:css`\n```html\n<link rel=\"stylesheet\" href=\"style.css\">\n```\n\n* Building Navbar\n\n`.navbar>ul>li*3>a[href=#]{Item $@-}`\n\n```HTML\n<div class=\"navbar\">\n  <ul>\n    <li><a href=\"#\">Item 3</a></li>\n    <li><a href=\"#\">Item 2</a></li>\n    <li><a href=\"#\">Item 1</a></li>\n  </ul>\n</div>\n```\n\n\n## CSS\n\nEmmet works surprisingly well with css as well.\n\n* `f:l`\n\n```css\nfloat: left;\n```\n\nYou can also use any options n/r/l\n\n* `pos:a­`\n\n```css\nposition: absolute;\n```\n\nAlso use any options, pos:a/r/f\n\n* `d:n/b­/f/­i/ib`\n\n`d:ib`\n\n```css\ndisplay: inline-block;\n```\n\n* You can use `m` for margin and `p` for padding followed by direction\n\n`mr` -> `margin-right`\n\n`pr` -> `padding-right`\n\n* `@f` will result in\n\n```css\n@font-face {\n  font-family:;\n  src:url();\n}\n```\n\nYou can also use these shorthands\n\n| Shorthand      | Description |\n| ----------- | ----------- |\n| z      | z-index       |\n| w      | width       |\n| h      | height       |\n| fz   | font-size        |\n| ff   | font-family        |\n| fw   | font-weight        |\n| @lh   | line-height        |\n| maw   | max-width        |\n| mah   | max-height        |\n| miw   | min-width        |\n| mih   | min-width        |\n| !   | !important        |\n| @f   | font-face        |\n| @op   | opacity        |\n| @lh   | line-height        |\n| @op   | opacity        |\n"
  },
  {
    "path": "tools/firebase_cli.md",
    "content": "# Firebase CLI Guide\n\nFirebase CLI (Command Line Interface) is a powerful tool that allows developers to interact with Firebase services and manage their Firebase projects directly from the command line. It provides a convenient and efficient way to deploy projects, manage databases, configure authentication, and more, streamlining the development and deployment processes.\n\n## Installation\n\nTo use the Firebase CLI, you need to have Node.js and npm (Node Package Manager) installed on your system. Follow the steps below to install the Firebase CLI:\n\n1. Install Node.js and npm by downloading the installer from the [official Node.js website](https://nodejs.org/en/download/) and following the installation instructions for your operating system.\n\n2. Once Node.js and npm are installed, open your terminal or command prompt and run the following command to install the Firebase CLI globally:\n\n   ```\n   npm install -g firebase-tools\n   ```\n\n   This command will download and install the Firebase CLI package from the npm registry.\n\n3. After the installation is complete, you can verify that the Firebase CLI is installed correctly by running the following command:\n\n   ```\n   firebase --version\n   ```\n\n   If the installation was successful, you will see the version number of the Firebase CLI printed in the terminal.\n\nCongratulations! You have successfully installed the Firebase CLI.\n\n## Usage\n\nThe Firebase CLI allows you to interact with Firebase services and manage your Firebase projects from the command line. Here are some common tasks you can perform using the Firebase CLI:\n\n- Initialize a new Firebase project in your current directory.\n- Deploy your Firebase project to Firebase hosting.\n- Manage Firebase Authentication, Realtime Database, Cloud Firestore, Cloud Functions, and other Firebase services.\n- Configure Firebase project settings.\n- Interact with Firebase emulators for local development and testing.\n\nTo use the Firebase CLI, open your terminal or command prompt and run the `firebase` command followed by the desired command and options.\n\nHere's an example of the basic usage:\n\n```\nfirebase <command> [options]\n```\n\nReplace `<command>` with the specific Firebase command you want to execute, and `[options]` with any additional options or flags required for that command.\n\nFor more detailed usage information, you can run the following command:\n\n```\nfirebase help\n```\n\nThis command will display the available Firebase commands and provide detailed information about each command.\n\n## Commands\n\nHere are the commonly used Firebase CLI commands along with a brief explanation, syntax, and an example for each command:\n\n- `firebase init`: Initializes a new Firebase project in the current directory.\n\n  - Syntax: `firebase init [options]`\n  - Example: `firebase init hosting` initializes Firebase Hosting for the current project.\n\n- `firebase deploy`: Deploys your Firebase project to Firebase hosting or other Firebase services.\n\n  - Syntax: `firebase deploy [options]`\n  - Example: `firebase deploy --only hosting` deploys only the Firebase Hosting content.\n\n- `firebase serve`: Starts local development servers and Firebase emulators.\n\n  - Syntax: `firebase serve [options]`\n  - Example: `firebase serve --only functions,hosting` starts the Firebase emulators for functions and hosting.\n\n- `firebase login`: Authenticates the Firebase CLI with your Firebase account.\n\n  - Syntax: `firebase login [options]`\n  - Example: `firebase login --no-localhost` initiates an interactive login session without connecting to localhost.\n\n- `firebase logout`: Logs out from the Firebase CLI.\n\n  - Syntax: `firebase logout [options]`\n  - Example: `firebase logout` logs out the currently authenticated user.\n\n- `firebase use`: Sets the active Firebase project for the current directory.\n\n  - Syntax: `firebase use <project_id> [options]`\n  - Example: `firebase use my-project` sets \"my-project\" as the active Firebase project.\n\n- `firebase functions`: Interacts with Firebase Cloud Functions.\n\n  - Syntax: `firebase functions:command [options]`\n  - Example: `firebase functions:delete [function_name]` deletes all functions that match the specified name in all regions.\n\n- `firebase database`: Interacts with Firebase Realtime Database.\n\n  - Syntax: `firebase database:command [options]`\n  - Example: `firebase database:get /users` retrieves data from the Firebase Realtime Database.\n\n- `firebase firestore`: Interacts with Firebase Cloud Firestore.\n\n  - Syntax: `firebase firestore:command [options]`\n  - Example: `firebase firestore:delete collection/document` deletes a document from the Firestore database.\n\n- `firebase auth`: Interacts with Firebase Authentication.\n\n  - Syntax: `firebase auth:command [options]`\n  - Example: `firebase auth:export users.csv` exports user data to a CSV file.\n\n- `firebase hosting`: Interacts with Firebase Hosting.\n\n  - Syntax: `firebase hosting:command [options]`\n  - Example: `firebase hosting:disable` disables Firebase Hosting for the current project.\n\n- `firebase remoteconfig`: Interacts with Firebase Remote Config.\n\n  - Syntax: `firebase remoteconfig:command [options]`\n  - Example: `firebase remoteconfig:get template` retrieves the Remote Config template.\n\n- `firebase ext`: Interacts with Firebase Extensions.\n\n  - Syntax: `firebase ext:command [options]`\n  - Example: `firebase ext:install firebase/delete-user-data` installs the Firebase Extension named \"firebase/delete-user-data\".\n\n- `firebase appdistribution`: Interacts with Firebase App Distribution.\n\n  - Syntax: `firebase appdistribution:command [options]`\n  - Example: `firebase appdistribution:testers:add` Adds testers to the project.\n\n- `firebase use --add`: Adds an existing Firebase project to the current directory\n\n  - Syntax: `firebase use --add`\n  - Example: `firebase use --add` interactively adds an existing Firebase project.\n\n- `firebase projects:create`: Creates a new Firebase project.\n  - Syntax: `firebase projects:create [options]`\n  - Example: `firebase projects:create --display-name \"My Project\"` creates a new Firebase project with the given display name.\n\nThese are just a few examples of the available commands. You can explore more commands and their options by running `firebase help` or visiting the [official Firebase CLI documentation](https://firebase.google.com/docs/cli).\n"
  },
  {
    "path": "tools/gcp.md",
    "content": "# GCLOUD SDK AND TOOLBELT CHEATSHEET\n\n## GCP BASICS\n\n- `Check Version and Settings`: gcloud version, gcloud info, gcloud components list\n\n- `Init Profile`: gcloud init This will ask you to open an OpenID URL\n\n- `List all zones`: gcloud compute zones list\n\n- `Upgrade local SDK`: gcloud components update, gcloud components update --version 219.0.1\n\n\n## BUCKET BASICS\n\n- `List all buckets and files`: gsutil ls, gsutil ls -lh gs://<bucket-name>\n\n- `Download file`: gsutil cp gs://<bucket-name>/<dir-path>/package-1.1.tgz .\n\n- `Upload file`: gsutil cp <filename> gs://<bucket-name>/<directory>/\n\n- `Cat file`: gsutil cat gs://<bucket-name>/<filepath>/\n\n- `Delete file`: gsutil rm gs://<bucket-name>/<filepath>\n\n- `Move file`: gsutil mv <src-filepath> gs://<bucket-name>/<directory>/<dest-filepath>\n\n- `Copy folder`: gsutil cp -r ./conf gs://<bucket-name>/\n\n- `Show disk usage`: gsutil du -h gs://<bucket-name>/<directory>/\n \n- `Create bucket`: gsutil mb gs://<bucket-name>\n\n- `Caculate file sha1sum`: gsha1sum syslog-migration-10.0.2.tgz, shasum syslog-migration-10.0.2.tgz\n\n- `Gsutil help`: gsutil help, gsutil help cp, gsutil help options\n\n\n## GCP PROJECT\n\n- `List projects `: gcloud config list, gcloud config list project\n\n- `Show project info `: gcloud compute project-info describe\n\n- `Switch project `: gcloud config set project <project-id>\n\n\n## GKE\n\n- `Display a list of credentialed accounts `: gcloud auth list\n\n- `Set the active account `: gcloud config set account <ACCOUNT>\n\n- `Set kubectl context `: gcloud container clusters get-credentials <cluster-name>\n\n- `Change region `: gcloud config set compute/region us-west\n\n- `Change zone `: gcloud config set compute/zone us-west1-b\n\n- `List all container clusters `: gcloud container clusters list\n\n\n## IAM\n\n- `Authenticate client `: gcloud auth activate-service-account --key-file <key-file>\n\n- `Display a list of credentialed accounts `: gcloud auth list\n\n- `Set the active account `: gcloud config set account <ACCOUNT>\n\n- `Auth to GCP Container Registry `: gcloud auth configure-docker\n\n- `Print token for active account `: gcloud auth print-access-token, gcloud auth print-refresh-token\n\n- `Revoke previous generated credential `: gcloud auth <application-default> revoke\n\n\n## BUCKET SECURITY\n\n- `Make all files readable `: gsutil -m acl set -R -a public-read gs://<bucket-name>/\n\n- `Config auth `: gsutil config -a\n\n- `Grant bucket access `: gsutil iam ch user:denny@gmail.com:objectCreator,objectViewer gs://<bucket-name>\n\n- `Remove bucket access `: gsutil iam ch -d user:denny@gmail.com:objectCreator,objectViewer gs://<bucket-name>\n\n\n## VM\n\n- `List all instances `: gcloud compute instances list, gcloud compute instance-templates list\n\n- `Show instance info `: gcloud compute instances describe \"<instance-name>\" --project \"<project-name>\" --zone \"us-west2-a\"\n\n- `Stop an instance `: gcloud compute instances stop instance-2\n\n- `Start an instance `: gcloud compute instances start instance-2\n\n- `Create an instance `: gcloud compute instances create vm1 --image image-1 --tags test --zone \"<zone>\" --machine-type f1-micro\n\n- `SSH to instance `: gcloud compute ssh --project \"<project-name>\" --zone \"<zone-name>\" \"<instance-name>\"\n\n- `Download files `: gcloud compute copy-files example-instance:~/REMOTE-DIR ~/LOCAL-DIR --zone us-central1-a\n\n- `Upload files `: gcloud compute copy-files ~/LOCAL-FILE-1 example-instance:~/REMOTE-DIR --zone us-central1-a\n\n\n## DISKS & VOLUMES\n\n- `List all disks `: gcloud compute disks list\n\n- `List all disk types `: gcloud compute disk-types list\n\n- `List all snapshots `: gcloud compute snapshots list\n\n- `Create snapshot `: gcloud compute disks snapshot <diskname> --snapshotname <name1> --zone $zone\n\n\n## NETWORK\n\n- `List all networks `: gcloud compute networks list\n\n- `Detail of one network `: gcloud compute networks describe <network-name> --format json\n\n- `Create network `: gcloud compute networks create <network-name>\n\n- `Create subnet `: gcloud compute networks subnets create subnet1 --network net1 --range 10.5.4.0/24\n\n- `Get a static ip `: gcloud compute addresses create --region us-west2-a vpn-1-static-ip \n\n- `List all ip addresses `: gcloud compute addresses list\n\n- `Describe ip address `: gcloud compute addresses describe <ip-name> --region us-central1\n\n- `List all routes `: gcloud compute routes list\n\n\n## DNS\n\n- `List of all record-sets in my zone `: gcloud dns record-sets list --zone my_zone\n\n- `List first 10 DNS records `: gcloud dns record-sets list --zone my_zone --limit=10\n\n\n## FIREWALL\n\n- `List all firewall rules `: gcloud compute firewall-rules list\n\n- `List all forwarding rules `: gcloud compute forwarding-rules list\n\n- `Describe one firewall rule `: gcloud compute firewall-rules describe <rule-name>\n\n- `Create one firewall rule `: gcloud compute firewall-rules create my-rule --network default --allow tcp:9200 tcp:3306\n\n- `Update one firewall rule `: gcloud compute firewall-rules update default --network default --allow tcp:9200 tcp:9300\n\n\n## IMAGES & CONTAINERS\n\n- `List all images `: gcloud compute images list\n\n- `List all container clusters `: gcloud container clusters list\n\n- `Set kubectl context `: gcloud container clusters get-credentials <cluster-name>\n\n\n## RDS\n\n- `List all sql instances `: gcloud sql instances list\n\n\n## SERVICES\n\n- `List my backend services `: gcloud compute backend-services list\n\n- `List all my health check endpoints `: gcloud compute http-health-checks list\n\n- `List all URL maps `: gcloud compute url-maps list\n"
  },
  {
    "path": "tools/git.sh",
    "content": "git init            # initiates git in the current directory\r\ngit remote add origin https://github.com/repo_name.git        # add remote reposiory\r\ngit clone <address> # creates a git repo from given address (get the address from your git-server)\r\ngit clone <address> -b <branch_name> <path/to/directory>  # clones a git repo from the address into the given directory and checkout's the given branch\r\ngit clone <address> -b <branch_name> --single-branch  # Clones a single branch\r\n\r\ngit add <file_name>   # adds(stages) file.txt to the git\r\ngit add *          # adds(stages) all new modifications, deletions, creations to the git\r\ngit reset file.txt # Removes file.txt from the stage\r\ngit reset --hard   # Throws away all your uncommitted changes, hard reset files to HEAD\r\ngit reset --soft <commit_id> # moves the head pointer\r\ngit reset --mixed <commit_id> # moves the head pointer and then copies the files from the commit it is now pointing to the staging area,\r\n# the default when no argument is provided\r\ngit reset -hard <commit_id> # moves the head pointer and then copies the files from the commit it is now pointing to the staging area \r\n# and working directory thus, throw away all uncommitted changes\r\n\r\n# git reset\r\n# 1. Move HEAD and current branch\r\n# 2. Reset the staging area\r\n# 3. Reset the working area\r\n\r\n# --soft = (1)\r\n# --mixed = (1) & (2) (default)\r\n# --hard = (1) & (2) & (3)\r\n\r\ngit rm file.txt    # removes file.txt both from git and file system\r\ngit rm --cached file.txt # only removes file.txt both from git index\r\ngit status         # shows the modifications and stuff that are not staged yet\r\n\r\ngit branch                         # shows all the branches (current branch is shown with a star)\r\ngit branch -a                     # shows all the branches local and remote\r\n\r\ngit branch my-branch               # creates my-branch\r\ngit branch -d my-branch            # deletes my-branch\r\ngit checkout my-branch         \t   # switches to my-branch\r\ngit merge my-branch                # merges my-branch to current branch\r\ngit push origin --delete my-branch # delete remote branch\r\ngit branch -m <new-branch-name>    # rename the branch\r\ngit checkout --orphan <branch_name> # checkout a branch with no commit history\r\ngit branch -vv                     # list all branches and their upstreams, as well as last commit on branch\r\ngit branch -a                      # List all local and remote branches\r\n\r\ngit cherry-pick <commit_id>                     # merge the specified commit\r\ngit cherry-pick <commit_id_A>^..<commit_id_B>   # pick the entire range of commits where A is older than B ( the ^ is for including A as well )\r\n\r\ngit remote                         # shows the remotes\r\ngit remote -v                      # shows the remote for pull and push\r\ngit remote add my-remote <address> # creates a remote (get the address from your git-server)\r\ngit remote rm my-remote            # Remove a remote\r\n\r\ngit log                      # shows the log of commits\r\n# git log by default uses less command so you can use these: f=next page, b=prev page, search=/<query>, n=next match, p=prev match, q=quit\r\ngit log --no-pager    # shows the log of commits without less command\r\ngit log --oneline            # shows the log of commits, each commit in a single line\r\n\r\ngit log --oneline --graph --decorate    # shows the log of commits, each commit in a single line with graph \r\ngit log --since=<time>                    # shows the log of commits since given time\r\ngit log -- <file_name>\r\ngit log -p <file_name>       # change over time for a specific file\r\ngit log <Branch1> ^<Branch2> # lists commit(s) in branch1 that are not in branch2\r\ngit log -n <x>               # lists the last x commits\r\ngit log -n <x> --oneline     # lists the last x commits, each commit in single line\r\ngit grep --heading --line-number '<string/regex>' # Find lines matching the pattern in tracked files\r\ngit log --grep='<string/regex>'                   # Search Commit log\r\n\r\ngit reflog                       # record when the tips of branches and other references were updated in the local repository.\r\ngit ls-files                     # show information about files in the index and the working tree\r\n\r\ngit commit -m \"msg\"          # commit changes with a msg\r\ngit commit -m \"title\" -m \"description\" # commit changes with a title and description\r\ngit commit --amend           # combine staged changes with the previous commit, or edit the previous commit message without changing its snapshot\r\ngit commit --amend --no-edit # amends a commit without changing its commit message\r\ngit commit --amend --author='Author Name <email@address.com>'    # Amend the author of a commit\r\ngit push my-remote my-branch # pushes the commits to the my-remote in my-branch (does not push the tags)\r\ngit revert <commit-id>       # Undo a commit by creating a new commit\r\n\r\ngit show                    # shows one or more objects (blobs, trees, tags and commits).\r\ngit diff                     # show changes between commits, commit and working tree\r\ngit diff HEAD               #show changes between working directory vs last commit\r\ngit diff --staged HEAD    #show changes between stage area vs last commit\r\n\r\ngit diff --color             # show colored diff\r\ngit diff --staged            # Shows changes staged for commit\r\n\r\ngit tag                           # shows all the tags\r\ngit tag -a v1.0 -m \"msg\"          # creates an annotated tag\r\ngit show v1.0                     # shows the description of version-1.0 tag\r\ngit tag --delete v1.0             # deletes the tag in local directory\r\ngit push --delete my-remote v1.0  # deletes the tag in my-remote (be carefore to not delete a branch)\r\ngit push my-remote my-branch v1.0 # push v1.0 tag to my-remote in my-branch\r\ngit fetch --tags                  # pulls the tags from remote\r\n\r\ngit pull my-remote my-branch   # pulls and tries to merge my-branch from my-remote to the current branch git pull = git fetch && get merge\r\n\r\n\r\ngit stash                            # stashes the staged and unstaged changes (git status will be clean after it)\r\ngit stash -u                         # stash everything including new untracked files (but not .gitignore)\r\ngit stash save \"msg\"                 # stash with a msg\r\ngit stash list                       # list all stashes\r\ngit stash pop                        # delete the recent stash and applies it\r\ngit stash pop stash@{2}              # delete the {2} stash and applies it\r\ngit stash show                       # shows the description of stash\r\ngit stash apply                      # keep the stash and applies it to the git\r\ngit stash branch my-branch stash@{1} # creates a branch from your stash\r\ngit stash drop stash@{1}             # deletes the {1} stash\r\ngit stash clear                      # clears all the stash\r\n\r\ngit rebase -i <commit_id>         # Rebase commits from a commit ID\r\ngit rebase --abort                # Abort a running rebase\r\ngit rebase --continue             # Continue rebasing after fixing all conflicts\r\n\r\ngit clean -f                      # clean untracked files permanently\r\ngit clean -f -d/git clean -fd     # To remove directories permanently\r\ngit clean -f -X/git clean -fX    # To remove ignored files permanently\r\ngit clean -f -x/git clean -fx     # To remove ignored and non-ignored files permanently\r\ngit clean -d --dry-run            # shows what would be deleted\r\n\r\n\r\ngit config --global --list                   # lists the git configuration for all repos\r\ngit config --global --edit                   # opens an editor to edit the git config file\r\ngit config --global alias.<handle> <command> # add git aliases to speed up workflow , eg.\r\n# if  handle is st and command is status then running git st would execute git status \r\ngit config --global core.editor <editor_name>      # config default editor\r\n\r\n\r\ngit archive <branch_name> --format=zip --outpute=./<archive_name>.zip # create an archive of files from a named tree\r\n\r\n\r\n.gitignore\r\n# is a file including names of stuff that you don\"t want to be staged or tracked.\r\n# You usually keep your local files like database, media, etc here.\r\n# You can find good resources online about ignoring specific files in your project files.\r\n# .gitignore is also get ignored \r\n.git\r\n# is a hidden directory in repo directory including git files. It is created after \"git init\".\r\n\r\n\r\n# Some useful notes:\r\n\r\n# Better Commit messages:\r\n#   Key to Effective Debugging\r\n#   For the commit message to help in debugging effectively, ensure that it is short and use an imperative \r\n#   mood (spoken or written as if giving a command or instruction) when constructing them.\r\n#   Also use feature tense for commit messages.\r\n#   The first word in your commit message should be one of these:\r\n#   Add\r\n#   Create\r\n#   Refactor\r\n#   Fix\r\n#   Release\r\n#   Document\r\n#   Modify\r\n#   Update\r\n#   Remove\r\n#   Delete etc...\r\n\r\n# About resetting:\r\n#   Use git revert instead of git reset in shared repositories\r\n#   git revert creates a new commit that introduces the opposite changes from the specified commit.\r\n#   Revert does not change history the original commit stays in the repository\r\n\r\n\r\n# Difference between ~ and ^ in git:\r\n#   > ^ or ^n\r\n#       >no args: == ^1: the first parent commit\r\n#       >n: the nth parent commit\r\n\r\n#   > ~ or ~n\r\n#       >no args: == ~1: the first commit back, following 1st parent\r\n#       >n: number of commits back, following only 1st parent\r\n#   note: ^ and ~ can be combined\r\n\r\n# Some tools to improve git skill by visualizing it:\r\n#   https://git-school.github.io/visualizing-git/\r\n#   https://learngitbranching.js.org/\r\n"
  },
  {
    "path": "tools/heroku.sh",
    "content": "# ##############################################################################\n##### HEROKU TOOLBELT COMPLETE GUIDE ###########################################\n################################################################################\n\n\n\n# Installing Heroku toolbelt using command line\n\n# For MacOS...\nbrew tap heroku/brew && brew install heroku\n\n# For Ubuntu...\nsudo snap install --classic heroku\n\n# Other installation methods are\n\ncurl https://cli-assets.heroku.com/install.sh | sh     # only for unix based systems, windows incompatible as it needs sudo\n\ncurl https://cli-assets.heroku.com/install-ubuntu.sh | sh    # Ubuntu/Debian apt-get\n\nyay -S heroku-cli     # Arch linux, Note: This package is community maintained not by heroku\n\nnpm install -g heroku     # This installation method is required for users on ARM and BSD...\n\n\n############\n\n# Verifying your installation\n\nheroku --version\n\n\n# Let's get started with heroku\n\nheroku login      # To login into the heroku toolbelt with your heroku account, this will open browser for you.\n\nheroku login -i   # If you prefer to stay in the command line environment, then you can execute this command\n\n\n# Now navigate to your desired directory and create a blank heroku application\n\ncd ~/myapp\nheorku create\n\n\n# If you are facing login issues, try to execute the following command\n\nmv ~/.netrc ~/.netrc.backup\nheroku login\n\n\n# Uninstalling the heroku CLI\n\n# For macOS\nrm -rf /usr/local/heroku /usr/local/lib/heroku /usr/local/bin/heroku ~/.local/share/heroku ~/Library/Caches/heroku\n\n# or you can try the below command also on macOS\nbrew uninstall heroku\nrm -rf ~/.local/share/heroku ~/Library/Caches/heroku\n\n# For Linux (Standalone installs)\nrm /usr/local/bin/heroku\nrm -rf /usr/local/lib/heroku /usr/local/heroku\nrm -rf ~/.local/share/heroku ~/.cache/heroku\n\n# For Linux (Debian and Ubuntu installs)\nsudo apt-get remove heroku heroku-toolbelt\nsudo rm /etc/apt/sources.list.d/heroku.list\n\n\n\n\n#####################################################################################################\n### Managing and deploying applications on Heroku (Using Git)     ###################################\n#####################################################################################################\n\n\ncd myapp                           # Changing into the project directory\ngit init                           # Initializing the project into a git repository\ngit add -f example.json            # Adding a perticular content of the project into the repository this will include the content from .gitignore\ngit add .                          # Adding all the contents of the project into the repository excluding .gitignore content\ngit commit -m \"My first commit\"    # Commiting the content to the repository\n\nheroku create appname              # Creating a new application on Heroku here ( appname ) represent the name u give to your app \ngit remote -v                      # verifying that the remote is set to the heroku\n\nheroku git:remote -a thawing-inlet-61413      # For an existing heroku app, you can add remote to the application\ngit remote rename heroku heroku-staging       # renaming remotes\n\ngit push heroku master             # Deploying code to the heroku application\ngit push heroku master --force     # Force Pushing to heroku ( required if the remote contain works that u do not have locally )\ngit push heroku testbranch:master  # Deploying code from a non-master branch to the heroku application\n\nheroku create --ssh-git            # ssh git transport for the application instead of https\ngit config --global url.ssh://git@heroku.com/.insteadOf https://git.heroku.com/     # For using ssh always\ngit config --global --remove-section url.ssh://git@heroku.com/       # To remove this rewrite setting run the command\n\n\n\n\n#####################################################################################################\n### Managing and deploying applications on Heroku (Using Docker)     ###################################\n#####################################################################################################\n\n# Setting stack of your app to a Container\nheroku stack:set container\n\nheroku container:login            # Login to the container resistry\ngit clone https://github.com/heroku/alpinehelloworld.git       # Get sample code by cloning into the following repository\nheroku create appname                   # Creating a heroku application here ( appname ) represent the name u give to your app\n\nheroku container:push web         # Build the image and push to Container Registry\nheroku container:push --recursive     # Pushing from the root directory of the project in recursive manner\nheroku container:push web worker --recursive     # Building the image and pushing to container resistry in recursive manner\nheroku container:release web      # Releasing the image to your application\n\nheroku open                       # Open the application in the browser\n\n"
  },
  {
    "path": "tools/kubernetes.md",
    "content": "# Kubernetes\n\n* PDF: https://sematext.com/kubernetes-cheat-sheet/\n* WEBSITE: https://kubernetes.io/\n* DOCUMENTATION: https://kubernetes.io/docs/home\n\n## Client Configuration\n\n* Setup autocomplete in bash; bash-completion package should be installed first\n```\nsource <(kubectl completion bash)\n```\n\n* View Kubernetes config\n```\nkubectl config view\n```\n\n* View specific config items by json path\n```\nkubectl config view -o jsonpath='{.users[?(@.name == \"k8s\")].user.password}'\n```\n\n* Set credentials for `foo.kuberntes.com`\n```\nkubectl config set-credentials kubeuser/foo.kubernetes.com --username=kubeuser --password=kubepassword\n```\n\n* Set active namespace\n```\nkubectl config set-context --current --namespace=namespace_name\n```\n\n## Viewing, Finding resources\n\n* List all services in the namespace\n```\nkubectl get services\n```\n\n* List all pods in all namespaces in wide format\n```\nkubectl get pods -o wide --all-namespaces\n```\n\n* List all pods in json (or yaml) format\n```\nkubectl get pods -o json\n```\n\n* Describe resource details (node, pod, svc)\n```\nkubectl describe nodes my-node\n```\n\n* List services sorted by name\n```\nkubectl get services --sort-by=.metadata.name\n```\n\n* List pods sorted by restart count\n```\nkubectl get pods --sort-by='.status.containerStatuses[0].restartCount'\n```\n\n* Rolling update pods for frontend-v1\n```\nkubectl rolling-update frontend-v1 -f frontend-v2.json\n```\n\n* Scale a replicaset named 'foo' to 3\n```\nkubectl scale --replicas=3 rs/foo\n```\n\n* Scale a resource specified in \"foo.yaml\" to 3\n```\nkubectl scale --replicas=3 -f foo.yaml\n```\n\n* Execute a command in every pod / replica\n```\nfor i in 0 1; do kubectl exec foo-$i -- sh -c 'echo $(hostname) > /usr/share/nginx/html/index.html'; done\n```\n\n## Manage Resources\n\n* Get documentation for pod or service\n```\nkubectl explain pods,svc\n```\n\n* Create resource(s) like pods, services or daemonsets\n```\nkubectl create -f ./my-manifest.yaml\n```\n\n* Apply a configuration to a resource\n```\nkubectl apply -f ./my-manifest.yaml\n```\n\n* Start a single instance of Nginx\n```\nkubectl run nginx --image=nginx\n```\n\n* Create a secret with several keys\n```\ncat <<EOF | kubectl create -f -\napiVersion: v1\nkind: Secret\nmetadata:\n name: mysecret\ntype: Opaque\ndata:\n password: $(echo \"s33msi4\" | base64)\n username: $(echo \"jane\"| base64)\nEOF\n```\n\n* Delete a resource\n```\nkubectl delete -f ./my-manifest.yaml\n```\n\n## Monitoring & Logging\n\n* Deploy Heapster from Github repository\n```\nkubectl create -f deploy/kube-config/standalone/\n```\n\n* Show metrics for nodes\n```\nkubectl top node\n```\n\n* Show metrics for pods\n```\nkubectl top pod\n```\n\n* Show metrics for a given pod and its containers\n```\nkubectl top pod pod_name --containers\n```\n\n* Dump pod logs (stdout)\n```\nkubectl logs pod_name\n```\n\n* Stream pod container logs (stdout, multi-container case)\n```\nkubectl logs -f pod_name -c my-container\n```\n\n## Interacting with running pods\n\n* Run command in pod\n```\nkubectl exec pod_name -- command_name\n```\n\n* Run command in pod with multiple containers\n```\nkubectl exec pod_name -c container_name -- command_name\n```\n\n* Get terminal of pod\n```\nkubectl exec -it pod_name /bin/sh\n```\n\n* Get terminal of a container running in pod with multiple containers\n```\nkubectl exec -it pod_name -c container_name /bin/sh\n```\n"
  },
  {
    "path": "tools/macos.sh",
    "content": "sudo lsof -i -P | grep LISTEN # List all processes running on a specific port\n"
  },
  {
    "path": "tools/nanobox_boxfile.yml",
    "content": "# *****************************************************************************\n# SECTIONS OF THE BOXFILE\n# *****************************************************************************\n\n\n# Boxfiles consist of a handful of sections or \"nodes\": run.config, deploy.config, web, worker, data.\n# These are covered in detail in the next few docs, but here are some quick descriptions:\n\n# run.config - Defines the build, environment, and configuration for web and worker components.\n# deploy.config - Defines deploy hooks and possible code transformations.\n# web - Defines settings unique to each web component.\n# worker - Defines settings unique to each worker component.\n# data - Defines settings unique to a specific data component.\n\n\n# *****************************************************************************\n# RUN.CONFIG\n# https://docs.nanobox.io/boxfile/run-config/\n# *****************************************************************************\n\n\nrun.config:\n  # Engine\n  engine: engine-name\n\n  # Configuration used by the engine\n  engine.config:\n    runtime: ruby-2.3\n\n  # Contents of these dirs to be cached inside of Nanobox\n  cache_dirs:\n    - vendor\n    - packages\n\n  # Extra Packages (in addition to what the engine installs)\n  extra_packages:\n    - nodejs\n    - newrelic\n\n  # Dev Packages\n  dev_packages:\n    - psutils\n\n  # Build Triggers - Changes to these files automatically\n  # trigger a new build the next time a build is required.\n  build_triggers:\n    - Gemfile\n    - Gemfile.lock\n    - package.json\n\n  # Additions to $PATH\n  extra_path_dirs:\n    - vendor/bin\n\n  # Custom commands to prepare the environment\n  extra_steps:\n    - npm install\n\n  # Enable filesystem watcher\n  fs_watch: true\n\n\n# *****************************************************************************\n# DEPLOY.CONFIG\n# https://docs.nanobox.io/boxfile/deploy-config/\n# *****************************************************************************\n\n\ndeploy.config:\n  # Custom commands to prepare the production environment\n  extra_steps:\n    - mv config-prod.yml config.yml\n\n  # Run after your code has been deployed to your live app,\n  # but before everything is locked down with read-only permissions and distributed into new containers/servers.\n  transform:\n    - 'sed -i /HOST/$DATA_DB_HOST/g config/database.xml'\n    - 'if [ \"$ENV\" = \"prod\" ]; then mv config-prod.yml config.yml; fi'\n\n  # Run command on any one instance of web.main component before activation\n  before_live:\n    web.main:\n      - 'bundle exec rake clear-cache'\n\n  # Run command on all instances of web.main component before activation\n  before_live_all:\n    web.main:\n      - 'bundle exec rake register-nodes'\n\n  # Run command on any one instance of web.main component after activation\n  after_live:\n    worker.mail:\n      - 'bundle exec rake prime-cache'\n\n  # Run command on all instances of web.main component after activation\n  after_live_all:\n    worker.mail:\n      - 'bundle exec rake prime-local-cache'\n  \n  # Set a timeout for your deploy hooks\n  hook_timeout: 300\n\n\n# *****************************************************************************\n# WEB\n# https://docs.nanobox.io/boxfile/web/\n# *****************************************************************************\n\n\nweb.site:\n  # Start Command\n  start: start-command\n\n  # Stop Config\n  stop: stop-command\n  stop_force: false\n  stop_timeout: 60  \n\n  # Current Working Directory\n  cwd: directory\n\n  # Routing\n  routes:\n    - 'sub:/path/'\n    - '/admin/'\n\n  # Port Mapping\n  ports:\n    - tcp:21:3420\n    - udp:53:3000\n\n  # Network Storage\n  network_dirs:\n    data.files:\n      - path/to/directoryA\n      - path/to/directoryB\n    data.unfs:\n      - path/to/directoryC\n\n  # Writable Dirs\n  writable_dirs:\n    - path/to/dirA\n    - path/to/dirB\n\n  # Custom Logs\n  log_watch:\n    app[error]: /app/path/to/error.log\n\n  # Cron\n  cron:\n    - id: flush_cache\n      schedule: '0 0 * * *'\n      command: rm -rf app/cache/*\n    - id: echo_msg\n      schedule: '*/3 */2 1-3 2,6,7 2'\n      command: echo i\\'m a little teapot\n\n  # Only provision component locally\n  local_only: true\n\n\n# *****************************************************************************\n# WORKER\n# https://docs.nanobox.io/boxfile/worker/\n# *****************************************************************************\n\n\nworker.jobs:\n  # Start Command\n  start: ruby worker.rb\n\n  # Stop Config\n  stop: stop-command\n  stop_force: false\n  stop_timeout: 30\n\n  # Current Working Directory\n  cwd: directory\n\n  # Network Storage\n  network_dirs:\n    data.storage1:\n      - path/to/directoryA\n      - path/to/directoryB\n    data.storage2:\n      - path/to/directoryC\n\n  # Writable Dirs\n  writable_dirs:\n    - path/to/dirA\n    - path/to/dirB\n\n  # Custom Logs\n  log_watch:\n    job[error]: /app/path/to/error.log\n\n  # Cron\n  cron:\n    - id: flush_cache\n      schedule: '0 0 * * *'\n      command: rm -rf app/cache/*\n    - id: echo_msg\n      schedule: '*/3 */2 1-3 2,6,7 2'\n      command: echo i\\'m a little teapot\n\n  # Only provision component locally\n  local_only: true\n\n\n# *****************************************************************************\n# DATA\n# https://docs.nanobox.io/boxfile/data/\n# *****************************************************************************\n\n\ndata.db:\n  # Image\n  image: nanobox/mysql:5.6\n\n  # Config Options Exposed by the Image\n  config:\n    plugins:\n      - federated\n      - audit_log\n    event_scheduler: 'Off'\n\n  # Cron\n  cron:\n    - id: backup\n      schedule: '0 0 * * *'\n      command: 'bash /path/to/scripts/backup.sh'\n    - id: echo_msg\n      schedule: '*/3 */2 1-3 2,6,7 2'\n      command: 'echo i\\'m a little teapot'\n\n  # Extra Packages (in addition to what the image installs)\n  extra_packages:\n    - perl\n    - curl\n\n  # Additions to $PATH\n  extra_path_dirs:\n    - /custom/bin\n\n  # Custom commands to prepare the environment\n  extra_steps:\n    - wget -o /path/to/scripts/cron.sh http://example.com/cron.sh\n\n  # Only provision component locally\n  local_only: true\n"
  },
  {
    "path": "tools/nanobox_cli.sh",
    "content": "# *****************************************************************************\n# CLI COMMANDS SUMMARY\n# https://docs.nanobox.io/cli/\n# *****************************************************************************\n\n\n# Update your Nanobox CLI to the most recent version\nnanobox-update\n\n# Starts your local environment, allowing you to run your app\nnanobox run [<command>]\n\n# Builds your app's runtime\nnanobox build\n\n# Compiles your app's code into a deployable package\nnanobox compile\n\n# Manages connections to remote applications\nnanobox remote add <app-name> [<remote-alias>]\nnanobox remote rm <remote-alias>\nnanobox remote ls\n\n# Deploys your app to a live app\nnanobox deploy [<dry-run | {remote-alias}>] [-m <message>]\n\n# Opens an interactive terminal from inside a component in your live app\nnanobox console [<local | dry-run | {remote-alias}>] <component.id>\n\n# Displays information about the app and its components\nnanobox info [<local | dry-run | {remote-alias}>]\n\n# Establishes a secure tunnel from your local machine to a running service\nnanobox tunnel [<remote-alias>] <component.id> [-p <local-port>[:[<remote-port>]]]\n\n# Manages environment variables on your production environment\nnanobox evar add [<local | dry-run | {remote-alias}>] <key1>=<value1> <key2>=<value2>\nnanobox evar load [<local | dry-run | {remote-alias}>] path/to/file\nnanobox evar rm [<local | dry-run | {remote-alias}>] <key1> <key2>\nnanobox evar ls [<local | dry-run | {remote-alias}>]\n\n# Manage DNS aliases for local applications\nnanobox dns add <local | dry-run> <hostname>\nnanobox dns rm <local | dry-run> <hostname>\nnanobox dns ls <local | dry-run>\n\n# View and streams application logs\nnanobox log [<dry-run | {remote-alias}>]\nnanobox log [<dry-run | {remote-alias}>] -f\nnanobox log [<dry-run | {remote-alias}>] -n <number>\n\n# Walks through prompts to configure Nanobox\nnanobox config set <config-key> <config-value>\nnanobox config get <config-key>\nnanobox config ls\n\n# Downloads the most recent versions of Nanobox docker images\nnanobox update-images\n\n# Authenticates your Nanobox client with your nanobox.io account\nnanobox login\n\n# Removes your nanobox.io api token from your local nanobox client\nnanobox logout\n\n# Starts the Nanobox container\nnanobox start\n\n# Stops the Nanobox container\nnanobox stop\n\n# Display the status of Nanobox & apps\nnanobox status\n\n# Destroys the current project and removes it from Nanobox\nnanobox destroy [<local | dry-run>]\n\n# Clean out any environments that no longer exist\nnanobox clean\n\n# Removes all Nanobox-created containers, files, & data\nnanobox implode\n\n# Show the current Nanobox version\nnanobox version\n\n--help                 # Displays help information about the CLI and specific commands\n--debug                # In the event of a failure, drop into a debug context\n-t, --trace            # Increases display output and sets level to 'trace'\n-v, --verbose          # Increases display output and sets level to 'debug'\n-f, --force            # Forces the command to run without any confirmation. Use responsibly!\n\n\n# *****************************************************************************\n# LOCAL ENVIRONMENT\n# https://docs.nanobox.io/workflow/modifying-your-app/\n# *****************************************************************************\n\n\n# Add a convenient way to access your app from the browser\nnanobox dns add local vue.dev\nnanobox dns add local laravel.dev\n\n# Run your app as you would normally, with Nanobox\nnanobox run npm run dev --host 0.0.0.0\nnanobox run python manage.py runserver 0.0.0.0:8000\n\n# View info about the app and its components for a given environment\nnanobox info local\n\n\n# *****************************************************************************\n# DRY RUN ENVIRONMENT\n# https://docs.nanobox.io/workflow/dry-run/\n# *****************************************************************************\n\n\n# Add a DNS Alias to a dry-run app\nnanobox dns add dry-run laravel.preview\n\n# Preview your app locally\nnanobox deploy dry-run\n\n# Add environment variables to dry-run\nnanobox evar add dry-run ENV=staging PROCESS_JOBS=true\n\n# Console into web.site in a dry-run app\nnanobox console dry-run web.site\n\n# Output the connection credentials for your dry-run components\nnanobox info dry-run\n\n\n# *****************************************************************************\n# PRODUCTION ENVIRONMENT\n# https://docs.nanobox.io/workflow/deploy-code/\n# *****************************************************************************\n\n\n# Add your live app as a remote\nnanobox remote add app-name\n\n# Deploy to your remote server(s)\nnanobox deploy\n\n# Drop you into an interactive console inside a component running on production\nnanobox console <component.id>\n\n# View logs from your app\nnanobox log [<dry-run | {remote-alias}>]\nnanobox log [<dry-run | {remote-alias}>] -n 100\n\n# Creates a secure tunnel from your local machine to a production data component\n# Local port can be omitted\nnanobox tunnel <component.id> -p <local_port>\n\n\n# *****************************************************************************\n# ENVIRONMENT VARIABLES\n# https://docs.nanobox.io/cli/evar/\n# *****************************************************************************\n\n\n# Add an environment variable\nnanobox evar add local KEY1=VALUE1 KEY2=VALUE2\n\n# Add environment variables from a file\nnanobox evar load local path/to/evar-file\n\n# Remove an environment variable\nnanobox evar rm local KEY1\n\n# List all variables for a given environment\nnanobox evar ls local\n"
  },
  {
    "path": "tools/nginx.sh",
    "content": "##############################################################################\n# NGINX\n# DOCUMENTATION: https://nginx.org/en/docs/\n##############################################################################\n\nsudo nginx -t # Check syntax\nsudo systemctl status nginx # nginx current status\nsudo systemctl reload nginx # Reload nginx\nsudo systemctl restart nginx  # Restart nginx\nsudo ln -s /etc/nginx/sites-available/example.com /etc/nginx/sites-enabled/ # Link website\nsudo tail -f /var/log/nginx/access.log # Tail logs to inspect requests\n\n# *****************************************************************************\n# General Settings\n# *****************************************************************************\n\n# Ports\n\nserver {\n  # Use HTTP protocol\n  listen 80;\n  \n  # Use HTTPS protocol\n  listen 443 ssl;\n  \n  # Listen on port 80 using IPv6\n  listen [::]:80;\n  \n  # Listen on port 80 using **only** IPv6\n  listen [::]:80 ipv6only=on;\n}\n\n# Domain name (server_name)\n\nserver {\n  # Listen to example.com\n  server_name example.com;\n  \n  # Listen to multiple domains\n  server_name example.com www.example.com;\n  \n  # Listen to all sub-domains\n  server_name *.example.com;\n  \n  # Listen to all top-level domains\n  server_name example.*;\n  \n  # Listen to unspecified hostnames (listens to IP address itself)\n  server_name \"\";\n}\n\n# *****************************************************************************\n# Serving Files \n# *****************************************************************************\n\n# Static assets (traditional web server)\n\nserver {\n    listen 80;\n    server_name example.com;\n\n    root /path/to/website;\n    # root /www/data/ for example\n\n    # If there's no 'root' inside, it will look for /www/data/index.html\n    location / {\n    }\n\n    # If there's no 'root' inside, it will look for /www/data/images/index.html\n    location /images/ {\n    }\n\n    # Since there's 'root' inside, it will look for /www/media/videos/index.html\n    location /videos/ {\n        root /www/media;\n    }\n}\n\n# *****************************************************************************\n# Redirects\n# *****************************************************************************\n\n# 301 Permanent\n\nserver {\n    # Redirect www.example.com to example.com\n    listen 80;\n    server_name www.example.com;\n    return 301 http://example.com$request_uri;\n}\n\nserver {\n    # Redirect http to https\n    listen 80;\n    server_name example.com;\n    return 301 https://example.com$request_uri;\n}\n\n# 302 Temporary\n\nserver {\n  listen 80;\n  server_name yourdomain.com;\n  return 302 http://otherdomain.com;\n}\n\n# *****************************************************************************\n# Reverse proxy\n# *****************************************************************************\n\n# Useful for Node.js, Streamlit, Jupyter, etc\n\n# Basic\n\nserver {\n  listen 80;\n  server_name example.com;\n  \n  location / {\n    proxy_pass http://0.0.0.0:3000;\n    # where 0.0.0.0:3000 is your Node.js Server bound on 0.0.0.0 listing on port 3000\n  }\n}\n\n# Basic + (upstream)\n\nupstream node_js {\n  server 0.0.0.0:3000;\n  # where 0.0.0.0:3000 is your Node.js Server bound on 0.0.0.0 listing on port 3000\n}\n\nserver {\n  listen 80;\n  server_name example.com;\n  \n  location / {\n    proxy_pass http://node_js;\n  }\n}\n\n# Upgraded Connection (useful for applications with support for WebSockets)\n\nupstream node_js {\n  server 0.0.0.0:3000;\n}\n\nserver {\n  listen 80;\n  server_name example.com;\n  \n  location / {\n    proxy_pass http://node_js;\n    proxy_redirect off;\n    proxy_http_version 1.1;\n    proxy_set_header Upgrade $http_upgrade;\n    proxy_set_header Connection \"upgrade\";\n    proxy_set_header Host $host;\n\t\n    }\n}\n\n# *****************************************************************************\n# HTTPS Protocol\n# *****************************************************************************\n\n# The majority of SSL options depend on what your application does or needs\n\nserver {\n    listen 443 ssl http2;\n    server_name example.com;\n\n    ssl on;\n\n    ssl_certificate /path/to/cert.pem;\n    ssl_certificate_key /path/to/privkey.pem;\n\n    ssl_stapling on;\n    ssl_stapling_verify on;\n    ssl_trusted_certificate /path/to/fullchain.pem;\n\n    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;\n    ssl_session_timeout 1d;\n    ssl_session_cache shared:SSL:50m;\n    add_header Strict-Transport-Security max-age=15768000;\n}\n\n# Permanent redirect to HTTPS secured domain\n\nserver {\n  listen 80;\n  server_name yourdomain.com;\n  return 301 https://$host$request_uri;\n}\n\n# You can easily secure you website/app using Let's Encrypt.\n# Go https://certbot.eff.org/lets-encrypt/ubuntuxenial-nginx.html for more information\n\n# *****************************************************************************\n# Load Balancing\n# *****************************************************************************\n\n# Useful for large applications running in multiple instances. Below example is for reverse proxy\nupstream node_js {\n  server 0.0.0.0:3000;\n  server 0.0.0.0:4000;\n  server 127.155.142.421;\n}\n\nserver {\n  listen 80;\n  server_name example.com;\n  \n  location / {\n    proxy_pass http://node_js;\n  }\n}\n"
  },
  {
    "path": "tools/pm2.sh",
    "content": "##############################################################################\n# PM2\n##############################################################################\n\n# Start commands\npm2 start <file>          # Start an application\npm2 start <app_id>        # Start a stopped application\npm2 start <app_id> ecosystem.config.js # Start an app with the configuration in ecosystem file\npm2 start <file> -i <number_of_instances> # Start an app in cluster mode with n duplicated instances\n\n# Management commands\npm2 ls                    # List all processes\npm2 save                  # Save process list to respawn at reboot\npm2 restart <app_id>      # Restart an app by ID\npm2 reload <app_id>       # Reload an app by ID\npm2 stop <app_id>         # Stop an app by ID\npm2 stop all              # Stop all running instances\npm2 delete <app_id>       # Delete an app by ID\npm2 delete all            # Delete all instances\npm2 ecosystem             # Generate a sample ecosystem.config.js file\n\n# Monitoring\npm2 show <app_id>         # Show a specific app's description\npm2 logs <app_id> --lines=<number_of_lines> # Show the last n lines of logs of an app\npm2 env <app_id>          # Show all environment variables of an app\npm2 monit                 # Monitor all applications' logs, metrics,etc\n"
  },
  {
    "path": "tools/puppeteer.js",
    "content": "/* *******************************************************************************************\n * PUPPETEER\n * https://pptr.dev/\n * ******************************************************************************************* */\n\n\n// When you install Puppeteer, it downloads a recent version of Chromium (~170MB Mac, ~282MB Linux, ~280MB Win)\n// that is guaranteed to work with the API. \nnpm install puppeteer\n\n// A lightweight version of Puppeteer for launching an existing browser installation or for connecting to a remote one.\n// Be sure that the version of puppeteer-core you install is compatible with the browser you intend to connect to.\n// More about the difference between puppeteer vs puppeteer-core\n// https://pptr.dev/#?product=Puppeteer&version=v2.1.1&show=api-puppeteer-vs-puppeteer-core\nnpm install puppeteer-core\n\n\n/* *******************************************************************************************\n * ENVIRONMENT VARIABLES\n * ******************************************************************************************* */\n\nHTTP_PROXY  // Defines HTTP proxy settings that are used to download and run Chromium.\nHTTPS_PROXY // Defines HTTP proxy settings that are used to download and run Chromium.\nNO_PROXY    // Defines HTTP proxy settings that are used to download and run Chromium.\n\nPUPPETEER_SKIP_CHROMIUM_DOWNLOAD // Do not download bundled Chromium during installation step.\nPUPPETEER_DOWNLOAD_HOST          // Overwrite URL prefix that is used to download Chromium. Note: this includes protocol and might even include path prefix. Defaults to https://storage.googleapis.com.\nPUPPETEER_CHROMIUM_REVISION      // Specify a certain version of Chromium you'd like Puppeteer to use. See puppeteer.launch([options]) on how executable path is inferred. BEWARE: Puppeteer is only guaranteed to work with the bundled Chromium, use at your own risk.\nPUPPETEER_EXECUTABLE_PATH        // Specify an executable path to be used in puppeteer.launch. See puppeteer.launch([options]) on how the executable path is inferred. BEWARE: Puppeteer is only guaranteed to work with the bundled Chromium, use at your own risk.\nPUPPETEER_PRODUCT                // Specify which browser you'd like Puppeteer to use. Must be one of chrome or firefox. Setting product programmatically in puppeteer.launch([options]) supercedes this environment variable. The product is exposed in puppeteer.product\n\n/* *******************************************************************************************\n * API\n * ******************************************************************************************* */\n\n\n// PUPPETEER\n// -----\n// Puppeteer module provides a method to launch a Chromium instance. \n// https://pptr.dev/#?product=Puppeteer&version=v2.1.1&show=api-class-puppeteer\n\nconst puppeteer = require('puppeteer');\n\npuppeteer.devices; // Returns a list of devices to be used with page.emulate(options)\npuppeteer.errors;  // Returns the specific error classes\npuppeteer.product; // Returns the name of the browser that is under automation (\"chrome\" or \"firefox\")\n\npuppeteer.connect(options);                // Attaches Puppeteer to an existing Chromium instance.\npuppeteer.createBrowserFetcher([options]); // Create a brower fetcher instance\npuppeteer.defaultArgs([options]);          // The default flags that Chromium will be launched with.\npuppeteer.executablePath();                // Returns a path where Puppeteer expects to find bundled Chromium.\npuppeteer.launch([options]);               // Launch a browser instance\n\n// BROWSER FETCHER\n// -----\n// BrowserFetcher can download and manage different versions of Chromium.\n// https://pptr.dev/#?product=Puppeteer&version=v2.1.1&show=api-class-browserfetcher\n\nconst browserFetcher = puppeteer.createBrowserFetcher();\n\nbrowserFetcher.canDownload(revision)                  // Initiates a HEAD request to check if the revision is available.\nbrowserFetcher.download(revision[, progressCallback]) // Initiates a GET request to download the revision from the host.\nbrowserFetcher.localRevisions()                       // Returns a list of all revisions available locally on disk.\nbrowserFetcher.platform()                             // Returns one of mac, linux, win32 or win64.\nbrowserFetcher.remove(revision)                       // Resolves when the revision has been removed.\nbrowserFetcher.revisionInfo(revision)                 // Returns all the information on the revision.\n\n// BROWSER\n// -----\n// A Browser is created when Puppeteer connects to a Chromium instance, either through puppeteer.launch or puppeteer.connect.\n// https://pptr.dev/#?product=Puppeteer&version=v2.1.1&show=api-class-browser\n\nconst browser = await puppeteer.launch();\n\nbrowser.on('disconnected')    // Emitted when Puppeteer gets disconnected from the Chromium instance.\nbrowser.on('targetchanged')   // Emitted when the url of a target changes.\nbrowser.on('targetcreated')   // Emitted when a target is created, for example when a new page is opened by window.open or browser.newPage.\nbrowser.on('targetdestroyed') // Emitted when a target is destroyed, for example when a page is closed.\n\nbrowser.browserContexts()                   // Returns an array of all open browser contexts.\nbrowser.close()                             // Closes Chromium and all of its pages (if any were opened).\nbrowser.createIncognitoBrowserContext()     // Creates a new incognito browser context.\nbrowser.defaultBrowserContext()             // Returns the default browser context.\nbrowser.disconnect()                        // Disconnects Puppeteer from the browser, but leaves the Chromium process running.\nbrowser.isConnected()                       // Indicates that the browser is connected.\nbrowser.newPage()                           // Promise which resolves to a new Page object.\nbrowser.pages()                             // An array of all pages inside the Browser.\nbrowser.process()                           // Returns Spawned browser process.\nbrowser.target()                            // A target associated with the browser.\nbrowser.targets()                           // An array of all active targets inside the Browser.\nbrowser.userAgent()                         // Promise which resolves to the browser's original user agent.\nbrowser.version()                           // Returns the browser version (e.g. Chrome/61.0.3153.0)\nbrowser.waitForTarget(predicate[, options]) // Promise which resolves to the first target found that matches the predicate function.\nbrowser.wsEndpoint()                        // Returns the browser websocket url.\n\n// BROWSER CONTEXT\n// -----\n// BrowserContexts provide a way to operate multiple independent browser sessions\n// https://pptr.dev/#?product=Puppeteer&version=v2.1.1&show=api-class-browsercontext\n\nconst context = await browser.createIncognitoBrowserContext();\n\nbrowserContext.on('targetchanged')   // Emitted when the url of a target inside the browser context changes.\nbrowserContext.on('targetcreated')   // Emitted when a new target is created inside the browser context.\nbrowserContext.on('targetdestroyed') // Emitted when a target inside the browser context is destroyed, for example when a page is closed.\n\nbrowserContext.browser()                                // The browser this browser context belongs to.\nbrowserContext.clearPermissionOverrides()               // Clears all permission overrides for the browser context.\nbrowserContext.close()                                  // Closes the browser context. All the targets that belong to the browser context will be closed.\nbrowserContext.isIncognito()                            // Returns whether BrowserContext is incognito.\nbrowserContext.newPage()                                // Creates a new page in the browser context.\nbrowserContext.overridePermissions(origin, permissions) // Overrides permissions to grant.\nbrowserContext.pages()                                  // An array of all pages inside the browser context.\nbrowserContext.targets()                                // An array of all active targets inside the browser context.\nbrowserContext.waitForTarget(predicate[, options])      // Promise which resolves to the first target found that matches the predicate function.\n\n// PAGE\n// -----\n// Page provides methods to interact with a single tab or extension background page in Chromium.\n// One Browser instance might have multiple Page instances.\n// https://pptr.dev/#?product=Puppeteer&version=v2.1.1&show=api-class-page\n\nconst page = await browser.newPage();\n\npage.on('close')            // Emitted when the page closes.\npage.on('console')          // Emitted when JavaScript within the page calls one of console API methods.\npage.on('dialog')           // Emitted when a JavaScript dialog appears, such as alert, prompt, confirm or beforeunload.\npage.on('domcontentloaded') // Emitted when the JavaScript DOMContentLoaded event is dispatched.\npage.on('error')            // Emitted when the page crashes.\npage.on('frameattached')    // Emitted when a frame is attached.\npage.on('framedetached')    // Emitted when a frame is detached.\npage.on('framenavigated')   // Emitted when a frame is navigated to a new url.\npage.on('load')             // Emitted when the JavaScript load event is dispatched.\npage.on('metrics')          // Emitted when the JavaScript code makes a call to console.timeStamp. \npage.on('pageerror')        // Emitted when an uncaught exception happens within the page.\npage.on('popup')            // Emitted when the page opens a new tab or window.\npage.on('request')          // Emitted when a page issues a request.\npage.on('requestfailed')    // Emitted when a request fails, for example by timing out.\npage.on('requestfinished')  // Emitted when a request finishes successfully.\npage.on('response')         // Emitted when a response is received.\npage.on('workercreated')    // Emitted when a dedicated WebWorker is spawned by the page.\npage.on('workerdestroyed')  // Emitted when a dedicated WebWorker is terminated.\n\npage.accessibility // returns Accessibility\npage.coverage      // returns Coverage\npage.keyboard      // returns Keyboard\npage.mouse         // returns Mouse\npage.touchscreen   // returns Touchscreen\npage.tracing       // returns Tracing\n\npage.$(selector)                                                // The method runs document.querySelector within the page. If no element matches the selector, the return value resolves to null.\npage.$$(selector)                                               // The method runs document.querySelectorAll within the page. If no elements match the selector, the return value resolves to [].\npage.$eval(selector, pageFunction[, ...args])                   // This method runs document.querySelector within the page and passes it as the first argument to pageFunction. If there's no element matching selector, the method throws an error.\npage.$$eval(selector, pageFunction[, ...args])                  // This method runs Array.from(document.querySelectorAll(selector)) within the page and passes it as the first argument to pageFunction.\npage.$x(expression)                                             // The method evaluates the XPath expression.\npage.addScriptTag(options)                                      // Adds a <script> tag into the page with the desired url or content.\npage.addStyleTag(options)                                       // Adds a <link rel=\"stylesheet\"> tag into the page with the desired url or a <style type=\"text/css\"> tag with the content.\npage.authenticate(credentials)                                  // Provide credentials for HTTP authentication.\npage.bringToFront()                                             // Brings page to front (activates tab).\npage.browser()                                                  // Get the browser the page belongs to.\npage.browserContext()                                           // Get the browser context that the page belongs to.\npage.click(selector[, options])                                 // This method fetches an element with selector, scrolls it into view if needed, and then uses page.mouse to click in the center of the element. If there's no element matching selector, the method throws an error.\npage.close([options])                                           // Close the page\npage.content()                                                  // Gets the full HTML contents of the page, including the doctype.\npage.cookies([...urls])                                         // If no URLs are specified, this method returns cookies for the current page URL. If URLs are specified, only cookies for those URLs are returned.\npage.deleteCookie(...cookies)                                   // Delete a cookie\npage.emulate(options)                                           // Emulates given device metrics and user agent.\npage.emulateMediaFeatures(features)                             // Emulates CSS media features on the page.\npage.emulateMediaType(type)                                     // Changes the CSS media type of the page.\npage.emulateTimezone(timezoneId)                                // Changes the timezone of the page.\npage.evaluate(pageFunction[, ...args])                          // Evaluate the page.\npage.evaluateHandle(pageFunction[, ...args])                    // Evaluate the page and return returns in-page object (JSHandle).\npage.evaluateOnNewDocument(pageFunction[, ...args])             // Adds a function which would be invoked whenever the page is navigated or whenever the child frame is attached or navigated.\npage.exposeFunction(name, puppeteerFunction)                    // Adds a function called name on the page's window object.\npage.focus(selector)                                            // Fetches an element with selector and focuses it. If there's no element matching selector, the method throws an error.\npage.frames()                                                   // Returns an array of all frames attached to the page.\npage.goBack([options])                                          // Navigate to the previous page in history.\npage.goForward([options])                                       // Navigate to the next page in history.\npage.goto(url[, options])                                       // Promise which resolves to the main resource response. In case of multiple redirects, the navigation will resolve with the response of the last redirect.\npage.hover(selector)                                            // Fetches an element with selector, scrolls it into view if needed, and then uses page.mouse to hover over the center of the element.\npage.isClosed()                                                 // Indicates that the page has been closed.\npage.mainFrame()                                                // Returns the page's main frame.\npage.metrics()                                                  // Returns an object containing the page metrics.\npage.pdf([options])                                             // Generates a pdf of the page with print css media.\npage.queryObjects(prototypeHandle)                              // Iterates the JavaScript heap and finds all the objects with the given prototype.\npage.reload([options])                                          // Reloads the page.\npage.screenshot([options])                                      // Takes a screenshot.\npage.select(selector, ...values)                                // Triggers a change and input event once all the provided options have been selected. If there's no <select> element matching selector, the method throws an error.\npage.setBypassCSP(enabled)                                      // Toggles bypassing page's Content-Security-Policy.\npage.setCacheEnabled([enabled])                                 // Toggles ignoring cache for each request based on the enabled state. By default, caching is enabled.\npage.setContent(html[, options])                                // Asssigns HTML markup to the page.\npage.setCookie(...cookies)                                      // Sets a cookie.\npage.setDefaultNavigationTimeout(timeout)                       // Changes the default maximum navigation timeout (see docs for the concerned methods).\npage.setDefaultTimeout(timeout)                                 // Changes the default maximum navigation timeout (for all methods).\npage.setExtraHTTPHeaders(headers)                               // Sets extra HTTP headers to be sent with every request the page initiates.\npage.setGeolocation(options)                                    // Sets the page's geolocation.\npage.setJavaScriptEnabled(enabled)                              // Whether or not to enable JavaScript on the page.\npage.setOfflineMode(enabled)                                    // When true, enables offline mode for the page.\npage.setRequestInterception(value)                              // Whether to enable request interception.\npage.setUserAgent(userAgent)                                    // Sets the specific user agent to use in this page.\npage.setViewport(viewport)                                      // Sets the viewport.\npage.tap(selector)                                              // This method fetches an element with selector, scrolls it into view if needed, and then uses page.touchscreen to tap in the center of the element. If there's no element matching selector, the method throws an error.\npage.target()                                                   // Returns a target this page was created from.\npage.title()                                                    // Returns the page title.\npage.type(selector, text[, options])                            // Sends a keydown, keypress/input, and keyup event for each character in the text.\npage.url()                                                      // This is a shortcut for page.mainFrame().url()\npage.viewport()                                                 // Returns the viewport information.\npage.waitFor(selectorOrFunctionOrTimeout[, options[, ...args]]) // Wait for the element to appear.\npage.waitForFileChooser([options])                              // Wait for the file chooser.\npage.waitForFunction(pageFunction[, options[, ...args]])        // Wait for the function.\npage.waitForNavigation([options])                               // Wait for navigation.\npage.waitForRequest(urlOrPredicate[, options])                  // Wait for the request.\npage.waitForResponse(urlOrPredicate[, options])                 // Wait for the response.\npage.waitForSelector(selector[, options])                       // Wait for the selector.\npage.waitForXPath(xpath[, options])                             // Wait for the XPath selector.\npage.workers()                                                  // Returns all of the dedicated WebWorkers associated with the page.\n\n// WORKER\n// -----\n// The Worker class represents a WebWorker.\n// The events workercreated and workerdestroyed are emitted on the page object to signal the worker lifecycle.\n// https://pptr.dev/#?product=Puppeteer&version=v2.1.1&show=api-class-worker\n\nworker.evaluate(pageFunction[, ...args])       // Evaluate a function in the worker context.\nworker.evaluateHandle(pageFunction[, ...args]) // Evaluate a function in the worker context and returns in-page object (JSHandle).\nworker.executionContext()                      // Returns ExecutionContext.\nworker.url()                                   // Returns worker url.\n\n// ACCESSIBILITY\n// -----\n// The Accessibility class provides methods for inspecting Chromium's accessibility tree.\n// The accessibility tree is used by assistive technology such as screen readers or switches.\n// https://pptr.dev/#?product=Puppeteer&version=v2.1.1&show=api-class-accessibility\n\naccessibility.snapshot([options]) // Captures the current state of the accessibility tree. The returned object represents the root accessible node of the page.\n\n// KEYBOARD\n// -----\n// Keyboard provides an api for managing a virtual keyboard. \n// https://pptr.dev/#?product=Puppeteer&version=v2.1.1&show=api-class-keyboard\n\nkeyboard.down(key[, options])  // Dispatches a keydown event.\nkeyboard.press(key[, options]) // Shortcut for keyboard.down and keyboard.up.\nkeyboard.sendCharacter(char)   // Dispatches a keypress and input event. This does not send a keydown or keyup event.\nkeyboard.type(text[, options]) // Sends a keydown, keypress/input, and keyup event for each character in the text.\nkeyboard.up(key)               // Dispatches a keyup event.\n\n// MOUSE\n// -----\n// The Mouse class operates in main-frame CSS pixels relative to the top-left corner of the viewport.\n// https://pptr.dev/#?product=Puppeteer&version=v2.1.1&show=api-class-mouse\n\nmouse.click(x, y[, options]) // Shortcut for mouse.move, mouse.down and mouse.up.\nmouse.down([options])        // Dispatches a mousedown event.\nmouse.move(x, y[, options])  // Dispatches a mousemove event.\nmouse.up([options])          // Dispatches a mouseup event.\n\n// TOUCHSCREEN\n// -----\n// https://pptr.dev/#?product=Puppeteer&version=v2.1.1&show=api-class-touchscreen\n\ntouchscreen.tap(x, y) // Dispatches a touchstart and touchend event.\n\n// TRACING\n// -----\n// https://pptr.dev/#?product=Puppeteer&version=v2.1.1&show=api-class-tracing\n\ntracing.start([options]) // Start trace.\ntracing.stop()           // Stop trace.\n\n// FILE CHOOSER\n// -----\n// FileChooser objects are returned via the 'page.waitForFileChooser' method.\n// File choosers let you react to the page requesting for a file.\n// https://pptr.dev/#?product=Puppeteer&version=v2.1.1&show=api-class-filechooser\n\nfileChooser.accept(filePaths) // Accept the file chooser request with given paths.\nfileChooser.cancel()          // Closes the file chooser without selecting any files.\nfileChooser.isMultiple()      // Returns whether file chooser allow for multiple file selection.\n\n// DIALOG\n// -----\n// Dialog objects are dispatched by page via the 'dialog' event.\n// https://pptr.dev/#?product=Puppeteer&version=v2.1.1&show=api-class-dialog\n\ndialog.accept([promptText]) // Resolves when the dialog has been accepted.\ndialog.defaultValue()       // If dialog is prompt, returns default prompt value. Otherwise, returns empty string.\ndialog.dismiss()            // Resolves when the dialog has been dismissed.\ndialog.message()            // Returns a message displayed in the dialog.\ndialog.type()               // Returns dialog's type, can be one of: alert, beforeunload, confirm or prompt.\n\n// CONSOLE MESSAGE\n// -----\n// ConsoleMessage objects are dispatched by page via the 'console' event.\n// https://pptr.dev/#?product=Puppeteer&version=v2.1.1&show=api-class-consolemessage\n\nconsoleMessage.args()     // Returns JSHandle.\nconsoleMessage.location() // Returns location.\nconsoleMessage.text()     // Returns message text.\nconsoleMessage.type()     // Returns message type.\n\n// FRAME\n// -----\n// At every point of time, page exposes its current frame tree via the page.mainFrame() and frame.childFrames() methods.\n// https://pptr.dev/#?product=Puppeteer&version=v2.1.1&show=api-class-frame\n\nframe.$(selector)                                                // The method queries frame for the selector. If there's no such element within the frame, the method will resolve to null.\nframe.$$(selector)                                               // The method runs document.querySelectorAll within the frame. If no elements match the selector, the return value resolves to [].\nframe.$$eval(selector, pageFunction[, ...args])                  // This method runs Array.from(document.querySelectorAll(selector)) within the frame and passes it as the first argument to pageFunction.\nframe.$eval(selector, pageFunction[, ...args])                   // This method runs document.querySelector within the frame and passes it as the first argument to pageFunction. If there's no element matching selector, the method throws an error.\nframe.$x(expression)                                             // The method evaluates the XPath expression.\nframe.addScriptTag(options)                                      // Adds a <script> tag into the page with the desired url or content.\nframe.addStyleTag(options)                                       // Adds a <link rel=\"stylesheet\"> tag into the page with the desired url or a <style type=\"text/css\"> tag with the content.\nframe.childFrames()                                              // Returns all child frames.\nframe.click(selector[, options])                                 // This method fetches an element with selector, scrolls it into view if needed, and then uses page.mouse to click in the center of the element. If there's no element matching selector, the method throws an error.\nframe.content()                                                  // Gets the full HTML contents of the frame, including the doctype.\nframe.evaluate(pageFunction[, ...args])                          // Evaluates function in the context of the frame.\nframe.evaluateHandle(pageFunction[, ...args])                    // Evaluates function in the context of the frame and returns JSHandle.\nframe.executionContext()                                         // Returns promise that resolves to the frame's default execution context.\nframe.focus(selector)                                            // This method fetches an element with selector and focuses it. If there's no element matching selector, the method throws an error.\nframe.goto(url[, options])                                       // Goes to url.\nframe.hover(selector)                                            // This method fetches an element with selector, scrolls it into view if needed, and then uses page.mouse to hover over the center of the element. If there's no element matching selector, the method throws an error.\nframe.isDetached()                                               // Returns true if the frame has been detached, or false otherwise.\nframe.name()                                                     // Returns frame's name attribute as specified in the tag.\nframe.parentFrame()                                              // Returns parent frame if any.\nframe.select(selector, ...values)                                // Triggers a change and input event once all the provided options have been selected. If there's no <select> element matching selector, the method throws an error.\nframe.setContent(html[, options])                                // Set content in iframe.\nframe.tap(selector)                                              // This method fetches an element with selector, scrolls it into view if needed, and then uses page.touchscreen to tap in the center of the element. If there's no element matching selector, the method throws an error.\nframe.title()                                                    // Returns the page's title.\nframe.type(selector, text[, options])                            // Sends a keydown, keypress/input, and keyup event for each character in the text.\nframe.url()                                                      // Returns frame's url.\nframe.waitFor(selectorOrFunctionOrTimeout[, options[, ...args]]) // Wait for something.\nframe.waitForFunction(pageFunction[, options[, ...args]])        // Wait for function.\nframe.waitForNavigation([options])                               // Wait for navigation.\nframe.waitForSelector(selector[, options])                       // Wait for selector.\nframe.waitForXPath(xpath[, options])                             // Wait for XPath selector.\n\n// EXECUTION CONTEXT\n// -----\n// The class represents a context for JavaScript execution.\n// Besides pages, execution contexts can be found in workers.\n// https://pptr.dev/#?product=Puppeteer&version=v2.1.1&show=api-class-executioncontext\n\nexecutionContext.evaluate(pageFunction[, ...args])       // Evaluate function in execution context.\nexecutionContext.evaluateHandle(pageFunction[, ...args]) // Evaluate function in execution context and returns JSHandle.\nexecutionContext.frame()                                 // Returns frame associated with this execution context.\nexecutionContext.queryObjects(prototypeHandle)           // The method iterates the JavaScript heap and finds all the objects with the given prototype.\n\n// JSHANDLE\n// -----\n// JSHandle represents an in-page JavaScript object.\n// JSHandles can be created with the page.evaluateHandle method.\n// const windowHandle = await page.evaluateHandle(() => window);\n\njsHandle.asElement()                             // Returns either null or the object handle itself, if the object handle is an instance of ElementHandle.\njsHandle.dispose()                               // Resolves when the object handle is successfully disposed.\njsHandle.evaluate(pageFunction[, ...args])       // Evaluate function in the execution context the handle belongs to.\njsHandle.evaluateHandle(pageFunction[, ...args]) // Evaluate function in the execution context the handle belongs to and returns JS handle.\njsHandle.executionContext()                      // Returns execution context the handle belongs to.\njsHandle.getProperties()                         // Returns a map with property names as keys and JSHandle instances for the property values.\njsHandle.getProperty(propertyName)               // Fetches a single property from the referenced object.\njsHandle.jsonValue()                             // Returns a JSON representation of the object. If the object has a toJSON function, it will not be called.\n\n// ELEMENTHANDLE\n// -----\n// ElementHandle represents an in-page DOM element.\n// ElementHandles can be created with the page.$ method.\n// const hrefElement = await page.$('a');\n\nelementHandle.$(selector)                               // The method runs element.querySelector within the page. If no element matches the selector, the return value resolves to null.\nelementHandle.$$(selector)                              // The method runs element.querySelectorAll within the page. If no elements match the selector, the return value resolves to [].\nelementHandle.$$eval(selector, pageFunction[, ...args]) // This method runs document.querySelectorAll within the element and passes it as the first argument to pageFunction. If there's no element matching selector, the method throws an error.\nelementHandle.$eval(selector, pageFunction[, ...args])  // This method runs document.querySelector within the element and passes it as the first argument to pageFunction. If there's no element matching selector, the method throws an error.\nelementHandle.$x(expression)                            // The method evaluates the XPath expression relative to the elementHandle. If there are no such elements, the method will resolve to an empty array.\nelementHandle.asElement()                               // Returns ElementHandle.\nelementHandle.boundingBox()                             // Returns the bounding box of the element (relative to the main frame), or null if the element is not visible.\nelementHandle.boxModel()                                // Returns boxes of the element, or null if the element is not visible.\nelementHandle.click([options])                          // This method scrolls element into view if needed, and then uses page.mouse to click in the center of the element. If the element is detached from DOM, the method throws an error.\nelementHandle.contentFrame()                            // Resolves to the content frame for element handles referencing iframe nodes, or null otherwise\nelementHandle.dispose()                                 // Stops referencing the element handle. \nelementHandle.evaluate(pageFunction[, ...args])         // Evaluates function in the execution content the element handle belongs to.\nelementHandle.evaluateHandle(pageFunction[, ...args])   // Evaluates function in the execution content the element handle belongs to and returns JS handle.\nelementHandle.executionContext()                        // Returns execution context.\nelementHandle.focus()                                   // Calls focus on the element.\nelementHandle.getProperties()                           // The method returns a map with property names as keys and JSHandle instances for the property values.\nelementHandle.getProperty(propertyName)                 // Fetches a single property from the objectHandle.s\nelementHandle.hover()                                   // This method scrolls element into view if needed, and then uses page.mouse to hover over the center of the element. If the element is detached from DOM, the method throws an error.\nelementHandle.isIntersectingViewport()                  // Resolves to true if the element is visible in the current viewport.\nelementHandle.jsonValue()                               // Returns a JSON representation of the object.\nelementHandle.press(key[, options])                     // Focuses the element, and then uses keyboard.down and keyboard.up.\nelementHandle.screenshot([options])                     // This method scrolls element into view if needed, and then uses page.screenshot to take a screenshot of the element.\nelementHandle.select(...values)                         // Triggers a change and input event once all the provided options have been selected. If there's no <select> element matching selector, the method throws an error.\nelementHandle.tap()                                     // This method scrolls element into view if needed, and then uses touchscreen.tap to tap in the center of the element. If the element is detached from DOM, the method throws an error.\nelementHandle.toString()                                // Returns string.\nelementHandle.type(text[, options])                     // Focuses the element, and then sends a keydown, keypress/input, and keyup event for each character in the text.\nelementHandle.uploadFile(...filePaths)                  // Uploads file.\n\n// REQUEST\n// -----\n// Represents a request which are sent by a page.\n// https://pptr.dev/#?product=Puppeteer&version=v2.1.1&show=api-class-request\n\nrequest.abort([errorCode])    // Aborts request.\nrequest.continue([overrides]) // Continues request with optional request overrides.\nrequest.failure()             // The method returns null unless this request was failed, as reported by requestfailed event.\nrequest.frame()               // Returns the Frame that initiated this request, or null if navigating to error pages.\nrequest.headers()             // Returns an object with HTTP headers associated with the request. All header names are lower-case.\nrequest.isNavigationRequest() // Whether this request is driving frame's navigation.\nrequest.method()              // Returns Request's method (GET, POST, etc.)\nrequest.postData()            // Returns Request's post body, if any.\nrequest.redirectChain()       // Returns the redirect chain.\nrequest.resourceType()        // Returns the request's resource type as it was perceived by the rendering engine. \nrequest.respond(response)     // Fulfills request with given response.\nrequest.response()            // Returns a matching Response object, or null if the response has not been received yet.\nrequest.url()                 // Returns URL of the request.\n\n// RESPONSE\n// -----\n// Response class represents responses which are received by page.\n// https://pptr.dev/#?product=Puppeteer&version=v2.1.1&show=api-class-response\n\nresponse.buffer()            // Resolves to a buffer with response body.\nresponse.frame()             // Returns the frame that initiated this response, or null if navigating to error pages.\nresponse.fromCache()         // True if the response was served from either the browser's disk cache or memory cache.\nresponse.fromServiceWorker() // True if the response was served by a service worker.\nresponse.headers()           // Returns an object with HTTP headers associated with the response. All header names are lower-case.\nresponse.json()              // Resolves to a JSON representation of response body.\nresponse.ok()                // Contains a boolean stating whether the response was successful (status in the range 200-299) or not.\nresponse.remoteAddress()     // Returns remote address.\nresponse.request()           // Retuns the matching Request object.\nresponse.securityDetails()   // Returns the security details if the response was received over the secure connection, or null otherwise.\nresponse.status()            // Contains the status code of the response (e.g., 200 for a success).\nresponse.statusText()        // Contains the status text of the response (e.g. usually an \"OK\" for a success).\nresponse.text()              // Resolves to a text representation of response body.\nresponse.url()               // Contains the URL of the response.\n\n// SECURITY DETAILS\n// -----\n// SecurityDetails class represents the security details when response was received over the secure connection.\n// https://pptr.dev/#?product=Puppeteer&version=v2.1.1&show=api-class-securitydetails\n\nsecurityDetails.issuer()      // Returns a string with the name of issuer of the certificate.\nsecurityDetails.protocol()    // Returns a string with the security protocol, eg. \"TLS 1.2\".\nsecurityDetails.subjectName() // Returns the name of the subject to which the certificate was issued to.\nsecurityDetails.validFrom()   // Returns UnixTime stating the start of validity of the certificate.\nsecurityDetails.validTo()     // Returns  UnixTime stating the end of validity of the certificate.\n\n// TARGET\n// -----\n// https://pptr.dev/#?product=Puppeteer&version=v2.1.1&show=api-class-target\n\ntarget.browser()          // Get the browser the target belongs to.\ntarget.browserContext()   // Returns the browser context.\ntarget.createCDPSession() // Creates a Chrome Devtools Protocol session attached to the target.\ntarget.opener()           // Get the target that opened this target. Top-level targets return null.\ntarget.page()             // Returns the page.\ntarget.type()             // Identifies what kind of target this is.\ntarget.url()              // Returns url.\ntarget.worker()           // Returns worker.\n\n// CDPSESSION\n// -----\n// The CDPSession instances are used to talk raw Chrome Devtools Protocol\n// https://pptr.dev/#?product=Puppeteer&version=v2.1.1&show=api-class-cdpsession\n\ncdpSession.detach()               // Detaches the cdpSession from the target. Once detached, the cdpSession object won't emit any events and can't be used to send messages.\ncdpSession.send(method[, params]) // Send message.\n\n// COVERAGE\n// -----\n// Coverage gathers information about parts of JavaScript and CSS that were used by the page.\n// https://pptr.dev/#?product=Puppeteer&version=v2.1.1&show=api-class-coverage\n\ncoverage.startCSSCoverage([options]) // Start CSS coverage.\ncoverage.startJSCoverage([options])  // Start JS coverage.\ncoverage.stopCSSCoverage()           // Stop CSS coverage.\ncoverage.stopJSCoverage()            // Stop JS coverage.\n"
  },
  {
    "path": "tools/sublime_text.md",
    "content": "# SUBLIME TEXT 3 CHEATSHEET\n\n## Access every command with the command palette\n\n- `shift + cmd + P `: Command palette\n\n\n## Goto anything\n\n- `cmd + P `: Goto file\n\n- `ctrl + G `: Goto line\n\n- `cmd + P `: Fuzzy search\n\n- `cmd + R `: Goto symbol\n\n\n## Quick selections\n\n- `cmd + D `: Select word\n\n- `cmd + K, cmd + D `: Skip and add next\n\n- `cmd + U `: Undo quick select\n\n- `cmd + L `: Select line\n\n- `ctrl + cmd + G `: Select all in file\n\n- `shift + cmd + space `: Expand selection to scope\n\n- `shift + cmd + L `: Split into lines\n\n\n## Edit code\n\n- `cmd + J `: Join 2 lines\n\n- `cmd + shift + D `: Duplicate line\n\n- `cmd + shift + R `: Reindent\n\n- `cmd + shift + K `: Delete line\n\n- `ctrl + cmd + up/down `: Move line/selection up/down\n\n- `alt + cmd + V `: Paste from history\n\n- `shift + cmd + / `: Comment/uncomment line\n\n- `alt + backspace `: Delete word by word\n\n- `alt + fn + backspace `: Forward delete word by word\n\n- `cmd + shift + enter `: Insert line before\n\n- `cmd + enter `: Insert line after\n\n- `ctrl + k, ctrl + l ` : To Lowercase\n\n- `ctrl + k, ctrl + u ` : To Uppercase\n\n\n## Searching\n\n- `cmd + F `: Search in file\n\n- `shift + cmd + F `: Search in all files\n\n- `<open files> `: where filter\n\n\n## Miscelaneous\n\n- `alt + cmd + right/left `: Switch open tab\n\n- `ctrl + ]`: Indent selection\n\n- `ctrl + [ `: Unindent selection\n\n- `alt + - `: Go to previous cursor position\n\n- `alt + shift + - `: Go to next previous cursor position\n\n- `ctrl + b `: Build and execute file\n\n\n## Must have packages\n\n`A file icon, BracketHighlighter, Color Highlighter, Comment-Snippets, DevDocs, EditorConfig, Emmet, File Rename, Git, Git blame, GitGutter, HTML-CSS-JS Prettify, JavaScript Completions, JavaScript Patterns, JavaScript Snippets, LESS, Nodejs, Package Control, Pretty JSON, SideBarEnhancements, SublimeLinter, SublimeLinter-contrib-eslint, Terminal, Termius, auto save`\n\n\n## Preferences\n\n```javascript\n{\n\"color_scheme\": \"Packages/User/Color Highlighter/themes/Boxy Ocean.tmTheme\",\n\"detect_indentation\": false,\n\"folder_exclude_patterns\":\n[\n\"node_modules\",\n\".svn\",\n\".git\",\n\".meteor/local\"\n],\n\"ignored_packages\":\n[\n\"Vintage\"\n],\n\"show_definitions\": true,\n\"theme\": \"Adaptive.sublime-theme\"\n}\n```\n\n## Keymap\n\n```javascript\n[\n{ \"keys\": [\"super+v\"], \"command\": \"paste_and_indent\" },\n{ \"keys\": [\"super+shift+v\"], \"command\": \"paste\" },\n{ \"keys\": [\"super+shift+r\"], \"command\": \"reindent\" },\n{ \"keys\": [\"super+h\"], \"command\": \"dev_docs_search_selection\" }\n]\n\n```\n\n## Syncing settings with iCloud\n\n- `cd ~/Library/Application\\ Support/Sublime\\ Text\\ 3/Packages`\n\n- `mkdir -p ~/Library/Mobile\\ Documents/com\\~apple\\~CloudDocs/WebDev/ST3/Plugins`\n\n- `mv User ~/Library/Mobile\\ Documents/com\\~apple\\~CloudDocs/WebDev/ST3/Plugins`\n\n- `ln -s ~/Library/Mobile\\ Documents/com\\~apple\\~CloudDocs/WebDev/ST3/Plugins/User`\n\n\n## Restore settings from iCloud\n\n- `cd ~/Library/Application\\ Support/Sublime\\ Text\\ 3/Packages`\n\n- `rm -rf User`\n\n- `ln -s ~/Library/Mobile\\ Documents/com\\~apple\\~CloudDocs/WebDev/ST3/Plugins/User`\n"
  },
  {
    "path": "tools/ubuntu.sh",
    "content": "##############################################################################\n# UBUNTU\n##############################################################################\n\nscp /path/to/file user@server:/path/to/destination # Copy file from local to server\n\ndf -h # Check the amount of free space\n\nsudo ufw status # Check status\nsudo ufw allow from remote_IP_address to any port 3306 # Allow external ip to access port\n\nscp user@remote_host:remote_file local_file # download: remote -> local\nscp local_file user@remote_host:remote_file # upload: local -> remote\n\nservice elasticsearch restart # Restart elasticsearch service\n\nsudo -s # Log as root\n\ncat /proc/<process_id>/maps   # Show the current virtual memory usage of a Linux process\n\nip r # Display ip of the server\n\nlsof -i :9000 # List process running on port 9000\nkill -9 $(lsof -t -i:PORT) # Kill the process running on whichever port specified\n\njournalctl -u minio.service -n 100 --no-pager # List last 100 logs for specific service\n\nsudo resize2fs /dev/disk/by-id/scsi-0DO_example # Resize volume\n\nps -ax | grep myprocessname # Search processes\nkill -9 PROCESS_ID # Kill process PID\n"
  },
  {
    "path": "tools/vim.txt",
    "content": "##############################################################################\n# VIM CHEATSHEET\n# WEBSITE: http://www.vim.org/\n# DOCUMENTATION: https://vim.sourceforge.io/docs.php\n##############################################################################\n\n\n##############################################################################\n# CURSOR MOVEMENTS\n##############################################################################\n\n\nh                   move left\nj                   move down\nk                   move up\nl                   move right\nw                   jump by start of words (punctuation considered words)\nW                   jump by words (spaces separate words)\ne                   jump to end of words (punctuation considered words)\nE                   jump to end of words (no punctuation)\nb                   jump backward by words (punctuation considered words)\nB                   jump backward by words (no punctuation)\nge                  jump backward to end of a word\ngE                  jump backwards to the end of a word (words can contain punctuation)\n0                   (zero) start of line\n^                   first non-blank character of line\n$                   jump to the end of the line\ng_                  jump to the last non-blank character of the line\n-                   move line upwards, on the first non-blank character\n+                   move line downwards, on the first non-blank character\n<enter>             move line downwards, on the first non-blank character\ngg                  go to first line\nG                   go to last line\nngg                 go to line n\nnG                  go To line n\n:n                  go To line n\n)                   move the cursor forward to the next sentence.\n(                   move the cursor backward by a sentence.\n{                   move the cursor a paragraph backwards\n}                   move the cursor a paragraph forwards\n]]                  move the cursor a section forwards or to the next {\n[[                  move the cursor a section backwards or the previous {\nH                   move the cursor to the top of the screen.\nM                   move the cursor to the middle of the screen.\nL                   move the cursor to the bottom of the screen.\nfx                  search line forward for 'x'\nFx                  search line backward for 'x'\ntx                  search line forward before 'x'\nTx                  search line backward before 'x'\nCTRL-y              moves screen up one line\nCTRL-e              moves screen down one line\nCTRL-u              moves cursor & screen up ½ page\nCTRL-d              moves cursor & screen down ½ page\nCTRL-b              moves screen up one page, cursor to last line\nCTRL-f              moves screen down one page, cursor to first line\nzz                  shift current line to middle of screen\nz.                  same as zz but also jumps to the first non-black character\nzt                  shift current line to top of screen\nzb                  shift current line to bottom of screen\n\n\n##############################################################################\n# BOOKMARKS\n##############################################################################\n\n\n:marks              list all the current marks\nma                  make a bookmark named a at the current cursor position\n`a                  go to position of bookmark a\n'a                  go to the line with bookmark a\n`0                  go to the position where Vim was previously exited\n`\"                  go to the position when last editing this file\n`.                  go to the line that you last edited\n``                  go to the position before the last jump\ng,                  go to newer position in change list\ng;                  go to older position in change list\n\n# Tip: To jump to a mark you can either use a backtick (`) or an apostrophe (').\n# Using an apostrophe jumps to the beginning (first non-blank) of the line holding the mark.\n\n##############################################################################\n# INSERT MODE\n##############################################################################\n\n\ni                   start insert mode at cursor\nI                   insert at the beginning of the line\ngi                  return to insert mode where you inserted text the last time\ngI                  like \"I\", but always start in column 1\na                   append after the cursor\nA                   append at the end of the line\no                   open (append) blank line below current line\nO                   open blank line above current line\nCTRL-o              Temporarily enter normal mode to issue one normal-mode command(while in insert mode)\nEsc                 exit insert mode\n\n\n##############################################################################\n# EDITING\n##############################################################################\n\n\nr                   replace a single character (does not use insert mode)\nR                   enter Insert mode, replacing characters rather than inserting\nJ                   join line below to the current one with one space in between\ngJ                  join line below to the current one without space in between\ncc                  change (replace) an entire line\ncw                  change (replace) to the end of word (same as ce)\n2cw                 change (replace) repeat cw twice\nciw                 change (replace) word under the cursor\ncaw                 change (replace) word under the cursor and the space after or before it\nci\"                 change (replace) word inside \"\"\ncit                 change (replace) html tag content\ncat                 change (replace) html tag\ncis                 change (replace) sentence under the cursor\ncas                 change (replace) sentence under the cursor and the space after or before it\ncib                 change (replace) inside a block with ()\ncab                 change (replace) a block with ()\nciB                 change (replace) inside a block with {}\ncaB                 change (replace) a block with {}\nC                   change (replace) to the end of line(same as c$)\ncG                  change (replace) to the end of the file\ncgg                 change (replace) from first line to current line\nct'                 change (replace) until the ' character (can change ' for any character)\ns                   delete character at cursor and substitute text\nS                   delete line at cursor and substitute text (same as cc)\nxp                  transpose two letters (delete and paste, technically)\nu                   undo\nCTRL-r              redo\n.                   repeat last command\n~                   switch case\ng~iw                switch case of current word\ngUiw                make current word uppercase\nguiw                make current word lowercase\ngU$                 make uppercase until end of line\ngu$                 make lowercase until end of line\n>>                  indent line one column to right\n>i{                 indent everything in the {}\n<<                  indent line one column to left\n==                  auto-indent current line\nddp                 swap current line with next\nddkP                swap current line with previous\n:%retab             fix spaces / tabs issues in whole file\n:r [name]           insert the file [name] below the cursor.\n:r !{cmd}           execute {cmd} and insert its standard output below the cursor.\n\n# Tip: Instead of b or B one can also use ( or { respectively.\n\n##############################################################################\n# DELETING TEXT\n##############################################################################\n\n\nx                   delete current character\nX                   delete previous character\ndw                  delete (cut) to the end of word (same as de)\ndiw                 delete (cut) word under the cursor\ndaw                 delete (cut) word under the cursor and the space after or before it\ndap                 delete (cut) a paragraph\ndd                  delete (cut) a line\ndt'                 delete (cut) until the next ' character on the line (replace ' by any character)\ndG                  delete (cut) to the end of the file\ndgg                 delete (cut) from first line to current line\nD                   delete (cut) from cursor to end of line (same as d$)\n:[range]d           delete [range] lines\n\n\n##############################################################################\n# COPYING AND MOVING TEXT\n##############################################################################\n\n\nyw                  yank word\nyy                  yank (copy) a line\n2yy                 yank 2 lines\ny$                  yank to end of line\np                   put (paste) the clipboard after cursor/current line\nP                   put (paste) before cursor/current line\ngp                  put (paste) the clipboard after cursor and leave cursor after the new text\ngP                  put (paste) before cursor and leave cursor after the new text\n\"+y                 yank into the system clipboard register\n\"+p                 paste from the system clipboard register\n:set paste          avoid unexpected effects in pasting\n:registers          display the contents of all registers\n\"xyw                yank word into register x\n\"xyy                yank line into register x\n:[range]y x         yank [range] lines into register x\n\"xp                 put the text from register x after the cursor\n\"xP                 put the text from register x before the cursor\n\"xgp                just like \"p\", but leave the cursor just after the new text\n\"xgP                just like \"P\", but leave the cursor just after the new text\n:[line]put x        put the text from register x after [line]\n\n# Tip: if you are using vim extension on vs code, you can enable\n\"vim.useSystemClipboard\": true\nin setting.json, this will allow to Use system clipboard for unnamed register.\n\n\n\n\n##############################################################################\n# MACROS\n##############################################################################\n\n\nqa                  start recording macro 'a'\nq                   end recording macro\n@a                  replay macro 'a'\n@:                  replay last command\n@@                  repeat macro\n\n\n##############################################################################\n# VISUAL MODE\n##############################################################################\n\n\nv                   start visual mode, mark lines, then do command (such as y-yank)\nV                   start linewise visual mode\no                   move to other end of marked area\nU                   upper case of marked area\nCTRL-v              start visual block mode\nO                   move to other corner of block\naw                  mark a word\nab                  a () block (with braces)\naB                  a {} block (with brackets)\nat                  a block with <> tags\nib                  inner () block\niB                  inner {} block\nit                  inner <> block\nEsc                 exit visual mode\n\nVISUAL MODE COMMANDS\n--------------------\n\n>                   shift right\n<                   shift left\nc                   change (replace) marked text\ny                   yank (copy) marked text\nd                   delete marked text\n~                   switch case\n\nVISUAL MODE SHORTCUTS\n---------------------\n\nv%                  selects matching parenthesis\nvi{                 selects matching curly brace\nvi\"                 selects text between double quotes\nvi'                 selects text between single quotes\ngv                  reselect the last selected area\n\n##############################################################################\n# SPELLING\n##############################################################################\n\n\n]s                  next misspelled word\n[s                  previous misspelled word\nzg                  add word to wordlist\nzug                 undo last add word\nz=                  suggest word\n\n\n##############################################################################\n# EXITING\n##############################################################################\n\n\n:q                  quit Vim. This fails when changes have been made.\n:q!                 quit without writing.\n:cq                 quit always, without writing.\n:w                  save without exiting.\n:wq                 write the current file and exit.\n:wq!                write the current file and exit always.\n:wq {file}          write to {file}. Exit if not editing the last\n:wq! {file}         write to {file} and exit always.\n:[range]wq[!]       same as above, but only write the lines in [range].\nZZ                  write current file, if modified, and exit.\nZQ                  quit current file and exit (same as \":q!\").\n\n\n##############################################################################\n# SEARCH/REPLACE\n##############################################################################\n\n\n/pattern                    search for pattern\n?pattern                    search backward for pattern\nn                           repeat search in same direction\nN                           repeat search in opposite direction\n*                           search forward, word under cursor\n#                           search backward, word under cursor\nset ic                      ignore case: turn on\nset noic                    ignore case: turn off\n:%s/old/new/g               replace all old with new throughout file\n:%s/old/new/gc              replace all old with new throughout file with confirmation\n:argdo %s/old/new/gc | wq   open multiple files and run this command to replace old\n                            with new in every file with confirmation, save and quit\n\n\n##############################################################################\n# MULTIPLE FILES\n##############################################################################\n\n\n:e filename         edit a file in a new buffer\n:tabe filename      edit a file in a new tab (Vim7, gVim)\n:ls                 list all buffers\n:bn                 go to next buffer\n:bp                 go to previous buffer\n:bd                 delete a buffer (close a file)\n:b1                 show buffer 1\n:b vimrc            show buffer whose filename begins with \"vimrc\"\n:bufdo <command>    run 'command(s)' in all buffers\n:[range]bufdo <command> run 'command(s)' for buffers in 'range'\n\n\n##############################################################################\n# WINDOWS\n##############################################################################\n\n\n:sp f               split open f\n:vsp f              vsplit open f\nCTRL-w s            split windows\nCTRL-w w            switch between windows\nCTRL-w q            quit a window\nCTRL-w v            split windows vertically\nCTRL-w x            swap windows\nCTRL-w h            left window\nCTRL-w j            down window\nCTRL-w k            up window\nCTRL-w l            right window\nCTRL-w +            increase window height\nCTRL-w -            decrease window height\nCTRL-w <            increase window width\nCTRL-w >            decrease window width\nCTRL-w =            equal window\nCTRL-w o            close other windows\n\n\n##############################################################################\n# QUICKFIX WINDOW\n##############################################################################\n\n\ncopen               open quickfix window\ncclose              close quickfix window\ncc [nr]             display error [nr]\ncfirst              display the first error\nclast               display the last error\n[count]cn           display [count] next error\n[count]cp           display [count] previous error\n\n\n##############################################################################\n# PROGRAMMING\n##############################################################################\n\n\n%                   show matching brace, bracket, or parenthese\ngf                  edit the file whose name is under the cursor\ngF                  edit the file whose name is under the cursor and jump to the line number\ngd                  when the cursor is on a local variable or function, jump to its declaration\n''                  return to the line where the cursor was before the latest jump\nCTRL-o              move to previous position you were at\nCTRL-i              move to more recent position you were at\n:set nu             display numbers (short for :set number)\n:set nonu           hide numbers (short for :set nonumber)\n\n\n##############################################################################\n# PLUGINS > ACK\n##############################################################################\n\n\n:Ack                Search recursively in directory\no                   to open (same as enter)\ngo                  to preview file (open but maintain focus on ack.vim results)\nt                   to open in new tab\nT                   to open in new tab silently\nq                   to close the quickfix window\n\n\n##############################################################################\n# PLUGINS > CHEAT\n##############################################################################\n\n\n:Cheat              open cheat sheet (with autocomplete)\n<leader>ch          open cheat sheet for word under the cursor\n\n\n##############################################################################\n# PLUGINS > GIST\n##############################################################################\n\n\n:Gist               post whole text to gist\n:Gist XXXXX         get gist XXXXX\n:Gist -l            list my gists\n\n\n##############################################################################\n# PLUGINS > GUNDO\n##############################################################################\n\n\n:GundoToggle        show undo tree\n\n\n##############################################################################\n# PLUGINS > LUSTYJUGGLER\n##############################################################################\n\n\n<Leader>lj          show open buffers\n\n\n##############################################################################\n# PLUGINS > NERDCOMMENTER\n##############################################################################\n\n\n<leader>cc          comment out line(s)\n<leader>c<space>    toggle the comment state of the selected line(s)\n\n\n##############################################################################\n# PLUGINS > NERDTREE\n##############################################################################\n\n\n:NERDTreeToggle     show / hide file browser\n:NERDTreeFind       show current file in file browser\n:Bookmark name      bookmark the current node as \"name\"\n\nFILE\n----\n\no                   open in prev window\ngo                  preview\nt                   open in new tab\nT                   open in new tab silently\ni                   open split\ngi                  preview split\ns                   open vsplit\ngs                  preview vsplit\n\nDIRECTORY\n---------\n\no                   open & close node\nO                   recursively open node\nx                   close parent of node\nX                   close all child nodes of current node recursively\ne                   explore selected dir\n\nBOOKMARK\n--------\n\no                   open bookmark\nt                   open in new tab\nT                   open in new tab silently\nD                   delete bookmark\n\nTREE NAVIGATION\n---------------\n\nP                   go to root\np                   go to parent\nK                   go to first child\nJ                   go to last child\nCTRL-j              go to next sibling\nCTRL-k              go to prev sibling\n\nFILESYSTEM\n----------\n\nC                   change tree root to the selected dir\nu                   move tree root up a dir\nU                   move tree root up a dir but leave old root open\nr                   refresh cursor dir\nR                   refresh current root\nm                   show menu\ncd                  change the CWD to the selected dir\n\nTREE FILTERING\n--------------\n\nI                   hidden files\nf                   file filters\nF                   files\nB                   bookmarks\n\nOTHER\n-----\n\nq                   close the NERDTree window\nA                   zoom (maximize-minimize) the NERDTree window\n?                   toggle help\n\n\n##############################################################################\n# PLUGINS > PDV\n##############################################################################\n\n\nCTRL-P              generate PHP DOC\n\n\n##############################################################################\n# PLUGINS > PICKACOLOR\n##############################################################################\n\n\n:PickHEX            choose color in system color picker\n\n\n##############################################################################\n# PLUGINS > SNIPMATE\n##############################################################################\n\n\n<tab>               expand snippet\n\n\n##############################################################################\n# PLUGINS > SPARKUP\n##############################################################################\n\n\nCTRL-e              execute sparkup (zen coding expansion)\nCTRL-n              jump to the next empty tag / attribute\n\n\n##############################################################################\n# PLUGINS > SURROUND\n##############################################################################\n\n\ncs'\"                change surrounding quotes to double-quotes\ncs(}                change surrounding parens to braces\ncs({                change surrounding parens to braces with space\nds'                 delete surrounding quotes\ndst                 delete surrounding tags\nysiw[               surround inner word with brackets\nvees'               surround 2 words (ee) with quotes '\n\n\n##############################################################################\n# PLUGINS > TABULAR\n##############################################################################\n\n\n:Tabularize /,      line the selected lines up on the commas\n\n\n##############################################################################\n# PLUGINS > TAGLIST\n##############################################################################\n\n\n:TlistToggle        open / close taglist window\n<enter>             jump to tag or file\n<space>             display the tag prototype\n\n\n##############################################################################\n# PLUGINS > UNIMPAIRED\n##############################################################################\n\n\n[space              new line above\n]space              new line below\n[e                  exchange line above\n]e                  exchange line below\n[x                  XML encode\n]x                  XML decode (with htmlentities)\n[q                  jump to previous quickfix item\n]q                  jump to next quickfix item\n[Q                  jump to first quickfix item\n]Q                  jump to last quickfix item\n\n\n##############################################################################\n# PLUGINS > VIM-FUGITIVE\n##############################################################################\n\n\n:Git                run a git command\n:Gstatus            git status : - to (un)stage , p to patch, C to commit\n:Gcommit            git commit\n:Gread              empty the buffer and revert to the last commit\n:Gwrite             write the current file and stage the results\n:Gmove              git mv\n:Gremove            git rm\n:Glog               git log\n:Gdiff              perform a vimdiff against the current file of a certain revision\n:Gblame             open blame information in a scroll bound vertical splitt\n:Gbrowse            open github\n\n\n##############################################################################\n# PLUGINS > VIM-MARKDOWN-PREVIEW\n##############################################################################\n\n\n:Mm                 preview markdown document in webbrowser\n\n\n##############################################################################\n# PLUGINS > VIM-PEEPOPEN\n##############################################################################\n\n\n<Leader>p           open the current directory with the peepopen application (fuzzy search)\n\n\n##############################################################################\n# PLUGINS > VIM-SYMFONY\n##############################################################################\n\n\n:Sview              open template file\n:Saction            open action file\n:Smodel             open model file\n:Sfilter            open filter file\n:Sform              open form file\n:Spartial           open partial file / write selected content in partial + include\n:Scomponent         open component file / write selected content in component + include\n:Salternate         open alternate model file (class - table class)\n:Symfony            execute task\n\n\n##############################################################################\n# PERSONAL .VIMRC\n##############################################################################\n\n\n<leader>ev          edit vimrc file\n<leader>sv          reload vimrc file\n<leader>sh          show syntax highlighting groups for word under cursor\n\n<space>             page down\njj                  exit insertion mode\n<leader>q           close the current window\n\n<leader>/           clear the search register\n\n<leader>h           toggle hidden characters\n\n<leader>W           strip all trailing whitespace\n\nCTRL-h              go to left window\nCTRL-j              go to down window\nCTRL-k              go to top window\nCTRL-l              go to right window\n<leader>w           open vertical split window and activate\n\n%%                  will expand to current directory\n<leader>ew          open file from current directory\n<leader>es          open file in split window from current directory\n<leader>cd          change directory to parent dir of current file\n##                  will expand to webroot\n\n:Wrap               wrap text\n<F2>                toggle wrapped text\n\n<F3>                toggle spell check\n\n<F4>                toggle light/dark background\n\n<F5>                underline with dashes\n<F6>                underline with double lines\n\n<leader><up>        bubble line(s) up\n<leader><down>      bublle line(s) down\n\n:Ltag               load tags file\n:Project            cd to project and load tags file\n<leader>t           show current tag for word under cursor\n<leader>st          show current tag for word under cursor in split window\n<leader>tj          show current tag list for word under cursor\n<leader>stj         show current tag list for word under cursor in split window\n\nCTRL-<space>        show omnicomplete menu\n\n<leader>b           surround with strong tags\n<leader>i           surround with em tags\n\nCTRL-p              generate PHP DOC\n\n<leader>a           run Ack\n\n<leader>md          preview markdown\n\n<leader>s           preview in safari\n\n<leader>x           colorpicker\n\n<leader>n           toggle Nerdtree\n<leader>N           close Nerdtree\n<leader>f           find current file in Nerdtree\n\n<leader>l           toggle Taglist\n<leader>L           close Taglist\n\n<leader>ph          set filetype to php.html\n<leader>r           reload all snipmate snippets\n\nCTRL-<tab>          switch between buffers\n\nCTRL-y              go to next tag of attribute in sparkup plugin\n\n<leader>g           toggle Gundo window\n\nIMG<CR>             show image browser to insert image tag with src, width and height\nb                   insert image tag with dimensions from NERDTree\n                    (http://stackoverflow.com/questions/5707925/vim-image-placement)\n"
  },
  {
    "path": "tools/vscode.md",
    "content": "# Visual Studio CheatSheet\n\n## Shortcuts\n\n### Linux\n\n#### General\n\n- `Ctrl`+`Shift`+`P`, `F1`: Show Command Palette\n- `Ctrl`+`Shift`+`T`: Open last closed tab\n- `Ctrl`+`P`: Quick Open, Go to File\n- `Ctrl`+`Shift`+`N`: New window/instance\n- `Ctrl`+`W`: Close window/instance\n- `Ctrl`+`,`: User Settings\n- `Ctrl`+`K`, `Ctrl`+`S`: Keyboard Shortcuts\n\n#### Basic editing\n\n- `Ctrl`+`X`: Cut line (empty selection)\n- `Ctrl`+`C`: Copy line (empty selection)\n- `Ctrl`+`↓/↑`: Move line down / up\n- `Ctrl`+`Shift`+`K`: Delete line\n- `Ctrl`+`Enter` / `Ctrl`+`Shift`+`Enter`: Insert line below / above\n- `Ctrl`+`Shift`+`\\`: Jump to matching bracket\n- `Ctrl`+`]` / `Ctrl`+`[`: Indent / Outdent line\n- `Ctrl`+`Home` / `End`: Go to beginning / end of file\n- `Ctrl`+`↑ / ↓`: Scroll line up / down\n- `Alt`+`PgUp` / `PgDn`: Scroll page up / down\n- `Ctrl`+`Shift`+`[ / ]`: Fold / unfold region\n- `Ctrl`+`K`, `Ctrl`+`[ / ]`: Fold / unfold all subregions\n- `Ctrl`+`K`, `Ctrl`+`0` / `Ctrl`+`K`, `Ctrl`+`J`: Fold /Unfold all regions\n- `Ctrl`+`K`, `Ctrl`+`C`: Add line comment\n- `Ctrl`+`K`, `Ctrl`+`U`: Remove line comment\n- `Ctrl`+`/`: Toggle line comment\n- `Ctrl`+`Shift`+`A`: Toggle block comment\n- `Alt`+`Z`: Toggle word wrap\n\n## Useful Extensions\n\n### HTML & CSS\n\n- [`CSScomb`](https://marketplace.visualstudio.com/items?itemName=mrmlnc.vscode-csscomb): Coding style formatter for CSS, Less, SCSS and Saas.\n\n- [`Puglint`](https://marketplace.visualstudio.com/items?itemName=mrmlnc.vscode-puglint): Linter and style checker for pug.\n\n- [`Sass`](https://marketplace.visualstudio.com/items?itemName=Syler.sass-indented): Indented Sass syntax highlighting, autocomplete & snippets.\n\n- [`SCSS IntelliSense`](https://marketplace.visualstudio.com/items?itemName=mrmlnc.vscode-scss): Advanced autocompletion and refactoring support for SCSS.\n\n- [`XML Format`](https://marketplace.visualstudio.com/items?itemName=mikeburgh.xml-format): Format XML documents.\n\n### JavaScript, Node & NPM\n\n- [`Import Cost`](https://marketplace.visualstudio.com/items?itemName=wix.vscode-import-cost): This extension will display inline in the editor the size of the imported package.\n\n- [`ESLint`](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint): Integrates ESLint into VS Code\n\n- [`NPM`](https://marketplace.visualstudio.com/items?itemName=eg2.vscode-npm-script): NPM support for VS Code.\n\n- [`NPM Intellisense`](https://marketplace.visualstudio.com/items?itemName=christian-kohler.npm-intellisense): Visual Studio Code plugin that autocompletes NPM modules in import statements.\n\n- [`Version Lens`](https://marketplace.visualstudio.com/items?itemName=pflannery.vscode-versionlens): Shows the latest version for each package using code lens.\n\n- [`Vetur`](https://marketplace.visualstudio.com/items?itemName=octref.vetur): Vue tooling for VS Code.\n\n### PHP\n\n- [`Better PHPUnit`](https://marketplace.visualstudio.com/items?itemName=calebporzio.better-phpunit): A better PHPUnit test runner.\n\n- [`Laravel Artisan`](https://marketplace.visualstudio.com/items?itemName=ryannaddy.laravel-artisan): Laravel Artisan commands within Visual Studio Code.\n\n- [`PHP CS Fixer`](https://marketplace.visualstudio.com/items?itemName=junstyle.php-cs-fixer): PHP CS Fixer extension for VS Code, php formatter, php code beautify tool.\n\n- [`PHP Doc Comment VSCode Plugin`](https://marketplace.visualstudio.com/items?itemName=rexshi.phpdoc-comment-vscode-plugin): Add phpdoc @param and @return tag for selected function signatures.\n\n- [`PHP IntelliSense`](https://marketplace.visualstudio.com/items?itemName=felixfbecker.php-intellisense): Advanced Autocompletion and Refactoring support for PHP.\n\n### Perl\n\n- [`Perl`](https://marketplace.visualstudio.com/items?itemName=cfgweb.vscode-perl): Code intelligence for the Perl language.\n\n- [`Perl Toolbox`](https://marketplace.visualstudio.com/items?itemName=d9705996.perl-toolbox): Perl Toolbox for linting and syntax checking for Perl.\n\n- [`Perl Moose`](https://marketplace.visualstudio.com/items?itemName=torrentalle.perl-moose): Perl Moose syntax highlight support for Visual Studio Code.\n\n### Git\n\n- [`Git History`](https://marketplace.visualstudio.com/items?itemName=donjayamanne.githistory): View git log, file history, compare branches or commits.\n\n- [`Gitignore`](https://marketplace.visualstudio.com/items?itemName=codezombiech.gitignore): An extension for Visual Studio Code that assists you in working with .gitignore files.\n\n- [`GitLens`](https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens): Visualize code authorship, code lens, seamlessly Git blame annotations and more.\n\n- [`Gitmoji`](https://marketplace.visualstudio.com/items?itemName=Vtrois.gitmoji-vscode): An emoji tool for your git commit messages.\n\n### Themes\n\n- [`Material Icon Theme`](https://marketplace.visualstudio.com/items?itemName=PKief.material-icon-theme): Material Design Icons for Visual Studio Code.\n\n- [`Palenight Theme`](https://marketplace.visualstudio.com/items?itemName=whizkydee.material-palenight-theme): An elegant and juicy material-like theme for Visual Studio Code.\n\n- [`Office Theme`](https://marketplace.visualstudio.com/items?itemName=huacat.office-theme) A Microsoft Office theme for Visual Studio Code.\n\n### Handy\n\n- [`Better comments`](https://marketplace.visualstudio.com/items?itemName=aaron-bond.better-comments): Improve your code commenting by annotating with alert, informational, TODOs, and more!\n\n- [`Debugger for Chrome`](https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome): Debug your JavaScript code in the Chrome browser.\n\n- [`EditorConfig for VS Code`](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig): EditorConfig Support for Visual Studio Code.\n\n- [`File Utils`](https://marketplace.visualstudio.com/items?itemName=sleistner.vscode-fileutils): A convenient way of creating, duplicating, moving, renaming and deleting files and directories.\n\n- [`Final-Newline`](https://marketplace.visualstudio.com/items?itemName=samverschueren.final-newline): Inserts a final newline when saving the document.\n\n- [`Formatting Toggle`](https://marketplace.visualstudio.com/items?itemName=tombonnike.vscode-status-bar-format-toggle): A VS Code extension that allows you to toggle the formatter (Prettier, Beautify, …) ON and OFF with a simple click.\n\n- [`Open in Github/Bitbucket...`](https://marketplace.visualstudio.com/items?itemName=ziyasal.vscode-open-in-github): Jump to a source code line in Github / Bitbucket, Gitlab, VisualStudio.com\n\n- [`OpenChrome`](https://marketplace.visualstudio.com/items?itemName=huazaierli.openchrome&ssr=false#overview): Open file with Chrome.\n\n- [`Output Colorizer`](https://marketplace.visualstudio.com/items?itemName=IBM.output-colorizer): Syntax Highlighting for log files.\n\n- [`Prettier - Code formatter`](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode): VS Code plugin for prettier/prettier.\n\n- [`Project Manager`](https://marketplace.visualstudio.com/items?itemName=alefragnani.project-manager): Easily switch between projects.\n\n- [`REST Client`](https://marketplace.visualstudio.com/items?itemName=humao.rest-client): REST Client for Visual Studio Code.\n\n- [`SVG Viewer`](https://marketplace.visualstudio.com/items?itemName=cssho.vscode-svgviewer): SVG Viewer for Visual Studio Code.\n\n- [`Terminal`](https://marketplace.visualstudio.com/items?itemName=formulahendry.terminal): Terminal for Visual Studio Code.\n\n- [`Vue Peek`](https://marketplace.visualstudio.com/items?itemName=dariofuzinato.vue-peek): Allows peek and goto definition for Vue single-file components.\n\n- [`VS Live Share`](https://marketplace.visualstudio.com/items?itemName=MS-vsliveshare.vsliveshare): Real-time collaborative development from the comfort of your favorite tools.\n\n- [`Wrap Console Log`](https://marketplace.visualstudio.com/items?itemName=midnightsyntax.vscode-wrap-console-log): Wrap to console.log by word or selection.\n\n- [`Bracket Pair Colorizer`](https://marketplace.visualstudio.com/items?itemName=CoenraadS.bracket-pair-colorizer): Allows matching brackets to be identified with colours.\n\n## My Settings\n\n```javascript\n{\n    // Controls the font size in pixels\n    \"editor.fontSize\": 14,\n\n    // Render vertical rulers after a certain number of\n    // monospace characters. Use multiple values for multiple\n    // rulers. No rulers are drawn if array is empty\n    \"editor.rulers\": [100],\n\n    // The number of spaces a tab is equal to\n    \"editor.tabSize\": 2,\n\n    \"[python]\": {\n        \"editor.tabSize\": 4\n    },\n\n    // Controls the line height\n    \"editor.lineHeight\": 22,\n\n    // Controls the font family\n    \"editor.fontFamily\": \"Fira Code\",\n\n    // Enables font ligatures\n    \"editor.fontLigatures\": true,\n\n    // Controls whether snippets are shown with other suggestions and how they are sorted.\n    \"editor.snippetSuggestions\": \"top\",\n\n    // Ignore extension recommendations\n    \"extensions.ignoreRecommendations\": false,\n\n    // Controls auto save of dirty files\n    \"files.autoSave\": \"afterDelay\",\n\n    // Controls the delay in ms after which a dirty file is saved automatically\n    \"files.autoSaveDelay\": 1000,\n\n    // Configure glob patterns for excluding files and folders\n    \"files.exclude\": {\n        \".yarn\": true,\n        \"**/*.pyc\": true\n    },\n\n    // Insert a final new line at the end of the file when saving it\n    \"files.insertFinalNewline\": true,\n\n    // Confirm before synchronizing git repositories\n    \"git.confirmSync\": false,\n\n    // Commit all changes when there are no staged changes\n    \"git.enableSmartCommit\": true,\n\n    // Whether to lint Python files using pylint\n    \"python.linting.pylintEnabled\": false,\n\n    // Whether to lint Python files using flake8\n    \"python.linting.flake8Enabled\": true,\n\n    // Configure glob patterns for excluding files and folders in\n    // searches. Inherits all glob patterns from the files.exclude setting.\n    \"search.exclude\": {\n        \"**/.git\": true,\n        \"**/.nuxt\": true,\n        \"**/build\": true,\n        \"**/data\": true,\n        \"**/dist\": true,\n        \"**/env\": true\n    },\n\n    // Adjust the zoom level of the window. The original size is 0\n    // and each increment above (e.g. 1) or below (e.g. -1) represents\n    // zooming 20% larger or smaller. You can also enter decimals to\n    // adjust the zoom level with a finer granularity.\n    \"window.zoomLevel\": 0,\n\n    // Overrides colors from the currently selected color theme.\n    \"workbench.colorCustomizations\": {\n        \"statusBar.background\": \"#8252be\",\n        \"statusBar.foreground\": \"#eeffff\",\n        \"titleBar.activeBackground\": \"#282b3c\",\n        \"titleBar.activeForeground\": \"#eeefff\"\n    },\n\n    // Specifies the color theme used in the workbench\n    \"workbench.colorTheme\": \"Material Palenight\",\n\n    // Specifies the icon theme used in the workbench\n    \"workbench.iconTheme\": \"material-icon-theme\",\n\n    // Controls font aliasing method in the workbench\n    \"workbench.fontAliasing\": \"antialiased\",\n    \"explorer.confirmDragAndDrop\": false\n}\n```\n"
  },
  {
    "path": "tools/xcode.txt",
    "content": "##############################################################################\n# XCODE CHEAT SHEET\n# WEBSITE: https://developer.apple.com/xcode/\n# DOCUMENTATION: https://developer.apple.com/documentation/xcodekit\n##############################################################################\n\n\n##############################################################################\n# SEARCH\n##############################################################################\n\n\nCmd + F                     Find in File\nCmd + Option + F            Find & Replace in File\nCmd + Shift + F             Find in Project\nCmd + Option + Shift + F    Find & Replace in Project\n\n\n##############################################################################\n# TABS\n##############################################################################\n\n\nCmd + T                     New Tab\nCmd + }                     Previous Tab\nCmd + {                     Next Tab\n\n\n##############################################################################\n# NAVIGATION\n##############################################################################\n\n\nCmd + Shift + O             Quick Open\nCmd + J                     Focus to Editor\nCmd + Ctrl + UP             Next Counterpart\nCmd + Ctrl + DOWN           Previous Counterpart\nCmd + Ctrl + RIGHT          Next Recent File\nCmd + Ctrl + LEFT           Previous Recent File\nCmd + click                 Defination of Symbol\nCmd + L                     Go to Line\nCmd + Option + LEFT         Fold Section\nCmd + Option + RIGHT        Unfold Section\n\n\n##############################################################################\n# EDITING\n##############################################################################\n\n\nCmd + Option + ENTER        Show Assitant Editor\nCmd + ENTER                 Hide Assitant Editor\nCtrl + SPACE or ESC         Toggle Completions\nCmd + ]                     Indent Section\nCmd + [                     Outdent Section\nCtrl + i                    Fix Indentation\nCmd + /                     Comment / Uncomment\nCmd + Option + [            Move Line Up\nCmd + Option + ]            Move Line Down\n\n\n##############################################################################\n# NAVIGATOR (LEFT PANEL)\n##############################################################################\n\n\nCmd + 0                     Show /Hide \nCmd + 1-8                   Switch tabs \nOption + click              Open Assistant Editor\nShift + Option + click      Decide where to Open\ndouble click                Open in New Window\n\n\n##############################################################################\n# DEBUGGING\n##############################################################################\n\n\nCmd + Shift + Y             Toggle Debug Area\nCmd + '                     Next Issue\nCmd + \"                     Previous Issue\nCmd + \\                     Add / Remove Breakpoint\nCmd + Y                     Active / Deactive Breakpoints\nCmd + K                     Clear Console\n\n\n##############################################################################\n# UTILITIES (RIGHT PANEL)\n##############################################################################\n\n\nCmd + Option + 0            Show / Hide\nCmd + Option + 1-9          Go to Tab\n\n\n##############################################################################\n# DUBUGGING & RUN\n##############################################################################\n\n\nCmd + B                     Build\nCmd + R                     Run \nCmd + .                     Stop\nCmd + Shift + B             Analyze\nCmd + U                     Test \nCmd + Shift + K             Clean\n"
  }
]