{"data": [{"name": "briancodex/react-website-v1", "link": "https://github.com/briancodex/react-website-v1", "tags": [], "stars": 672, "description": null, "lang": "JavaScript", "repo_lang": "", "readme": "This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).\n", "readme_type": "markdown", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "kuwala-io/kuwala", "link": "https://github.com/kuwala-io/kuwala", "tags": ["data", "data-integration", "data-science", "open-data", "spatial-analysis", "elt", "kuwala", "open-source", "scraping", "dbt", "postgres", "pyspark", "python", "jupyter", "admin-boundaries", "google-trends", "population", "react", "no-code", "react-flow"], "stars": 672, "description": "Kuwala is the no-code data platform for BI analysts and engineers enabling you to build powerful analytics workflows. We are set out to bring state-of-the-art data engineering tools you love, such as Airbyte, dbt, or Great Expectations together in one intuitive interface built with React Flow. In addition we provide third-party data into data science models and products with a focus on geospatial data. Currently, the following data connectors are available worldwide: a) High-resolution demographics data b) Point of Interests from Open Street Map c) Google Popular Times", "lang": "JavaScript", "repo_lang": "", "readme": "[![Slack](https://img.shields.io/badge/slack-chat-orange.svg)](https://join.slack.com/t/kuwala-community/shared_invite/zt-l5b2yjfp-2cdhReNACXDkLhuh0jFzZw)\n![License](https://img.shields.io/github/license/kuwala-io/kuwala)\n\n\n\n

\n \n \n

\n\nKuwala is **the data workspace for BI analysts and engineers enabling you to build powerful analytics workflows together.** \nWe are set out to bring **state-of-the-art data engineering tools** you love, such as \n[Airbyte](https://github.com/airbytehq/airbyte), [dbt](https://github.com/dbt-labs/dbt-core) and \n[Prefect](https://github.com/prefecthq/prefect) together in one intuitive interface built with \n[React Flow](https://github.com/wbkd/react-flow).\n\nDo you want to **discuss your first contribution**, want to **learn more in general**, or \n**discuss your specific use-case** for Kuwala? Just **book a digital coffee session** with the core team \n[here](https://calendly.com/kuwala_io/kuwala-community-chat).\n\n![Collaboration between BI analysts and engineers](./docs/images/kuwala_collaborative_cycle.png)\n\nKuwala stands for **extendability, reproducibility, and enablement**. Small data teams build data products fastly and \ncollaboratively. Analysts and engineers stay with their strengths. Kuwala is the tool that makes it possible to keep a \ndata project within scope while having fun again.\n\n- **Kuwala Canvas runs directly on a data warehouse** = Maximum flexibility and no lock-in effect\n- **Engineers enable their analysts** by adding transformations and models via dbt or new data sources through Airbyte\n- **The node-based editor enables analyst** to build advanced data workflows with many data sources and transformations through simple drag-and-drop\n- **With models-as-a-block** the BI analyst can launch advanced Marketing Mix Models and attributions without knowing R or Python\n\n\n\n### Extract and Load with Airbyte\n\nCurrently we support the following databases and data warehouses\n\n- [x] Postgres\n- [x] BigQuery\n- [x] Snowflake\n\n For connecting and loading all your tooling data into a data warehouse, we are integrating with Airbyte connectors. \n For everything related to third-party data, such as POI and demographics data, we are building separate data pipelines.\n\n### Transform with dbt\n\nTo apply transformations on your data, we are integrating dbt which is running on top of your data warehouses. \nEngineers can easily create dbt models and make them reusable for the frontend. We have already a catalog of several \ntransformations that you can use on the canvas. The complete documentation can be found here: \n[https://docs.kuwala.io/](https://docs.kuwala.io/transformation-catalog)\n\n### Run a Data Science Model\n\nWe are going to include open-source data science and AI models as blocks (e.g., \n[Meta's Robyn Marketing Mix Modeling](https://github.com/facebookexperimental/Robyn)).\n\n### Report\n\nYou can easily connect your preferred visualization tool and connect it to a saved table on the canvas in the future. \nWe will make the results exportable to Google Sheets and also available in a Medium-style markdown editor.\n\n---\n\n# How can I use Kuwala?\n\n### Canvas\n\nWith the canvas you can connect to your data warehouse and start building data pipelines. To start the canvas, simply\nrun the following command from inside the root directory:\n\n```zsh\ndocker-compose --profile kuwala up\n```\n\nNow open http://localhost:3000 in your browser, and you are good to go. \ud83d\ude80\n\n### Third-party data connectors\n\nWe currently have five pipelines for different third-party data sources which can easily be imported into a Postgres \ndatabase. The following pipelines are integrated:\n\n - [Admin Boundaries](https://github.com/kuwala-io/kuwala/tree/master/kuwala/pipelines/admin-boundaries/README.md)\n - [Google POIs](https://github.com/kuwala-io/kuwala/tree/master/kuwala/pipelines/google-poi/README.md)\n - [Google Trends](https://github.com/kuwala-io/kuwala/tree/master/kuwala/pipelines/google-trends/README.md)\n - [OSM POIs](https://github.com/kuwala-io/kuwala/tree/master/kuwala/pipelines/osm-poi/README.md)\n - [Population Density](https://github.com/kuwala-io/kuwala/tree/master/kuwala/pipelines/population-density/README.md)\n\n### Using Kuwala components individually\n\nTo use Kuwala's components, such as the data pipelines or the Jupyter environment, individually, please refer to the\n[instructions under `/kuwala`](https://github.com/kuwala-io/kuwala/blob/master/kuwala/README.md).\n\n---\n\n# Use cases\n\n- [How to build an Uber-like analytics system with Kuwala](https://kuwala.io/data-pipelines/how-to-build-an-uber-like-intelligence-system-for-your-new-mobility-startup-without-a-big-data-team/)\n- [Perform location analytics for a grocery store with Kuwala](https://kuwala.io/case-studies/why-instant-grocery-delivery-should-follow-a-data-driven-path-like-uber-to-survive-part-1/)\n- [Querying the most granular demographics data set with Kuwala](https://kuwala.io/data-pipelines/querying-the-most-granular-demographics-dataset/)\n\n---\n\n# How can I contribute?\n\nEvery new issue, question, or comment is a contribution and very welcome! This project lives from your feedback and\ninvolvement!\n\n## Be part of our community\n\nThe best first step to get involved is to join the \n[Kuwala Community on Slack](https://join.slack.com/t/kuwala-community/shared_invite/zt-l5b2yjfp-2cdhReNACXDkLhuh0jFzZw). \nThere we discuss everything related to our roadmap, development, and support. \n\n## Contribute to the project\n\nPlease refer to our [contribution guidelines](https://github.com/kuwala-io/kuwala/tree/master/CONTRIBUTING.md) for further information on how to get involved.\n\n---\n\n# Get more content about Kuwala\n Link | Description \n-------------|-------------\n[Blog](https://kuwala.io/blog/) | Read all our blog articles related to the stuff we are doing here. \n[Join Slack](https://join.slack.com/t/kuwala-community/shared_invite/zt-l5b2yjfp-2cdhReNACXDkLhuh0jFzZw) | Our Slack channel with over 250 data engineers and many discussions.\n[Jupyter notebook - Popularity correlation](https://mybinder.org/v2/gh/kuwala-io/kuwala_examples/1def41ded01dbb67ecada9dc227c834cd93d0721?urlpath=lab%2Ftree%2Fnotebooks%2F1.%20Popularity%20Correlation.ipynb) | Open a Jupyter notebook on Binder and merge external popularity data with Uber traversals by making use of convenient dbt functions. \n[Podcast](https://anchor.fm/kuwala-io) | Listen to our community podcast and maybe join us on the next show.\n[Digital coffee break](https://calendly.com/kuwala_io/kuwala-community-chat?month=2022-02) | Are you looking for new inspiring tech talks? Book a digital coffee chit-chat with one member of the core team.\n[Our roadmap](https://github.com/orgs/kuwala-io/projects/3/views/6) | See our upcoming milestones and sprint planing.\n[Contribution guidelines](https://github.com/kuwala-io/kuwala/tree/master/CONTRIBUTING.md) | Further information on how to get involved.\n", "readme_type": "markdown", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "theophilusx/ssh2-sftp-client", "link": "https://github.com/theophilusx/ssh2-sftp-client", "tags": [], "stars": 673, "description": "a client for SSH2 SFTP ", "lang": "JavaScript", "repo_lang": "", "readme": "#+OPTONS: H:2 toc:2\n#+TITLE: SSH2 SFTP Client\n\n* Overview\n\nan SFTP client for node.js, a wrapper around [[https://github.com/mscdex/ssh2][SSH2]] which provides a high level\nconvenience abstraction as well as a Promise based API.\n\nDocumentation on the methods and available options in the underlying modules can\nbe found on the [[https://github.com/mscdex/ssh2][SSH2]] project pages.\n\nCurrent stable release is *v9.0.4*.\n\nCode has been tested against Node versions 14.20.0, 16.17.2 and 18.8.0\n\nNode versions < 14.x are not supported. \n\n** Version 9.x Changes\n - Fix bug in ~connect()~ method when private key data was corrupted. The method was not\n handling errors fro corrupted ssh private keys and would hang indefinitely without\n reporting any error. Now reports that it was unable to parse the private key. \n - Fix bug in ~end()~ method where it was possible for the module to attempt calling\n the underlying ssh2 ~end()~ method when ssh2 has not been initialised. This could\n lead to undefined reference errors.\n - Fix bug in ~get()~ method where supplied destination streams were not close, creating\n a possible resource leak. If the remote file did not exist, the method would return\n an error, but failed to close any passed in stream supplied as the destination for\n the data in the ~get()~ call. \n - Change the default end and close handlers not to throw error or reject\n promises. Previously, an end or close event would cause an error to be raised or a\n promise to be rejected if the event was deemed to be /unexpected/. However,\n classification of events as being unexpected was unreliable and didn't add much real\n value. Both these handlers will now invalidate the SFTP connection object and log that\n the event fired and nothing else.\n - Changed when event handled flags are reset. Now they are reset after a new set of\n temporary listeners are added.\n - Don't throw an error when calling end() if there is no active SFTP connection. It does\n no harm to call end() when there is no connection, so no need to raise an error.\n - Use nullish coalescing when setting retry parameters instead of or'ing with\n defaults. Allows setting values to 0. \n - *Breaking Change*: This version uses syntax not supported in node versions\n prior to v14. Therefore, node versions less than v14 will not work.\n - *Breaking Change*: This ~list()~ method no longer accepts a regular expression\n for filtering the entries to be returned. You can now specify a filter\n function instead. The function is called for each item in the list of items\n to be returned, passing in the item object as its only argument.\n Essentially, this is just a call to ~Array.filter()~, so the filter function\n should behave in the same way i.e. return true for items to be retained and\n false for those to be dropped.\n - *Breaking Change*: The ability to set ~autoClose~ on read and write streams and\n the ability to set ~end~ on ~pipe~ operations has been removed. These options\n caused confusion for users and were too easy to get wrong, plus it made the\n methods overly complicated. For those use-cases where you want to control\n streams at a low level, two new methods have been added, ~createReadStream()~ and\n ~createWriteStream()~. However, it should be noted that client code is 100%\n responsible for managing streams obtained using these methods. Use at your\n own risk!\n - *Breaking Change*: The 3rd argument to ~uploadDir()~ and ~downloadDir()~ methods\n has been change. Previously, the argument was a filter function used to\n select which directories and files to be transferred. The 3rd argument is\n now an options object with two supported properties, ~filter~ and ~useFastput~\n (for ~uploadDir()~) or ~useFastget~ (for ~downloadDir()~). If ~useFastput~ is true,\n the ~fastPut()~ method will be used to upload files. If ~false~ or missing, the\n slower, but better supported, ~put()~ method will be used. Likewise, the\n ~useFastget~ options can be set to ~true~ to use the ~fastGet()~ method for\n downloading files, otherwise the slower, but more reliable, ~get()~ method\n will be used.\n - The ~uploadDir()~ and ~downloadDir()~ methods now use asynchronous processes to\n upload/download files. This should result in improved performance for these\n two methods.\n - New Methods: Two new methods, ~createWriteStream()~ and ~createReadStream()~\n have been added. These methods will return a stream object connected to a\n remote file on the ~SFTP~ server. Client code is responsible for managing\n these stream objects. This includes adding any necessary event listeners and\n disposing of the objects once finished with them.\n - Re-factoring of Listeners: The library manages temporary listeners in order\n to provide a way to catch events and processes them inside a ~Promise~\n context. Previously, every method added its own set of temporary listeners.\n However, this could result in multiple sets of listeners being added,\n especially for methods which call other methods as part of their processing\n e.g. ~rmdir(),~ ~uploadDir()~ and ~dowqnloadDir()~. To avoid this, /internal only/\n versions of each method have been created. These internal methods use an\n /underscore/ ~_~ prefix. Client code should not use these methods directly. \n - New method: Added ~rcopy()~ method to perform a remote copy of a file on the remote SFTP server. \n - Bumped ssh2 version to 1.11.0\n\n* Installation\n\n#+begin_src shell\n npm install ssh2-sftp-client\n#+end_src\n\n* Basic Usage\n\n#+begin_src javascript\n let Client = require('ssh2-sftp-client');\n let sftp = new Client();\n\n sftp.connect({\n host: '127.0.0.1',\n port: '8080',\n username: 'username',\n password: '******'\n }).then(() => {\n return sftp.list('/pathname');\n }).then(data => {\n console.log(data, 'the data info');\n }).catch(err => {\n console.log(err, 'catch error');\n });\n#+end_src\n\n* Documentation\n\nThe connection options are the same as those offered by the underlying SSH2\nmodule. For full details, please see [[https://github.com/mscdex/ssh2#user-content-client-methods][SSH2 client methods]]\n\nAll the methods will return a Promise, except for ~on()~ and\n~removeListener()~, which are typically only used in special use cases.\n\n** Specifying Paths\n\n The convention with both FTP and SFTP is that paths are specified using a\n 'nix' style i.e. use ~/~ as the path separator. This means that even if your\n SFTP server is running on a win32 platform, you should use ~/~ instead of ~\\~\n as the path separator. For example, for a win32 path of ~C:\\Users\\fred~ you\n would actually use ~/C:/Users/fred~. If your win32 server does not support\n the 'nix' path convention, you can try setting the ~remotePathSep~ property\n of the ~SftpClient~ object to the path separator of your remote server. This\n *might* work, but has not been tested. Please let me know if you need to do\n this and provide details of the SFTP server so that I can try to create an\n appropriate environment and adjust things as necessary. At this point, I'm\n not aware of any win32 based SFTP servers which do not support the 'nix' path\n convention.\n\n All remote paths must either be absolute e.g. ~/absolute/path/to/file~ or\n they can be relative with a prefix of either ~./~ (relative to current remote\n directory) or ~../~ (relative to parent of current remote directory) e.g.\n ~./relative/path/to/file~ or ~../relative/to/parent/file~. It is also\n possible to do things like ~../../../file~ to specify the parent of the\n parent of the parent of the current remote directory. The shell tilde (~~~)\n and common environment variables like ~$HOME~ are NOT supported.\n\n It is important to recognise that the current remote directory may not always\n be what you may expect. A lot will depend on the remote platform of the SFTP\n server and how the SFTP server has been configured. When things don't seem to\n be working as expected, it is often a good idea to verify your assumptions\n regarding the remote directory and remote paths. One way to do this is to\n login using a command line program like ~sftp~ or ~lftp~.\n\n There is a small performance hit for using ~./~ and ~../~ as the module must\n query the remote server to determine what the root path is and derive the\n absolute path. Using absolute paths are therefore more efficient and likely\n more robust.\n\n When specifying file paths, ensure to include a full path i.e. include the\n remote file name. Don't expect the module to append the local file name to the\n path you provide. For example, the following will not work\n\n #+begin_src javascript\n client.put('/home/fred/test.txt', '/remote/dir');\n #+end_src\n\n will not result in the file ~test.txt~ being copied to\n ~/remote/dir/test.txt~. You need to specify the target file name as well e.g.\n\n #+begin_src javascript\n client.put('/home/fred/test.txt', '/remote/dir/test.txt');\n #+end_src\n\n Note that the remote file name does not have to be the same as the local file\n name. The following works fine;\n\n #+begin_src javascript\n client.put('/home/fred/test.txt', '/remote/dir/test-copy.txt');\n #+end_src\n\n This will copy the local file ~test.txt~ to the remote file ~test-copy.txt~\n in the directory ~/remote/dir~.\n\n** Methods\n\n*** new SftpClient(name) ===> SFTP client object\n\nConstructor to create a new ~ssh2-sftp-client~ object. An optional ~name~ string\ncan be provided, which will be used in error messages to help identify which\nclient has thrown the error.\n\n**** Constructor Arguments\n\n- name :: string. An optional name string used in error messages\n\n**** Example Use\n\n#+begin_src javascript\n 'use strict';\n\n const Client = require('ssh2-sftp-client');\n\n const config = {\n host: 'example.com',\n username: 'donald',\n password: 'my-secret'\n };\n\n const sftp = new Client('example-client');\n\n sftp.connect(config)\n .then(() => {\n return sftp.cwd();\n })\n .then(p => {\n console.log(`Remote working directory is ${p}`);\n return sftp.end();\n })\n .catch(err => {\n console.log(`Error: ${err.message}`); // error message will include 'example-client'\n });\n#+end_src\n\n*** connect(config) ===> SFTP object\n\nConnect to an sftp server. Full documentation for connection options is\navailable [[https://github.com/mscdex/ssh2#user-content-client-methods][here]]\n\n**** Connection Options\n\nThis module is based on the excellent [[https://github.com/mscdex/ssh2#client][SSH2]] module. That module is a general SSH2\nclient and server library and provides much more functionality than just SFTP\nconnectivity. Many of the connect options provided by that module are less\nrelevant for SFTP connections. It is recommended you keep the config options to\nthe minimum needed and stick to the options listed in the ~commonOpts~ below.\n\nThe ~retries~, ~retry_factor~ and ~retry_minTimeout~ options are not part of the\nSSH2 module. These are part of the configuration for the [[https://www.npmjs.com/package/retry][retry]] package and what\nis used to enable retrying of sftp connection attempts. See the documentation\nfor that package for an explanation of these values.\n\n#+begin_src javascript\n // common options\n\n let commonOpts {\n host: 'localhost', // string Hostname or IP of server.\n port: 22, // Port number of the server.\n forceIPv4: false, // boolean (optional) Only connect via IPv4 address\n forceIPv6: false, // boolean (optional) Only connect via IPv6 address\n username: 'donald', // string Username for authentication.\n password: 'borsch', // string Password for password-based user authentication\n agent: process.env.SSH_AGENT, // string - Path to ssh-agent's UNIX socket\n privateKey: fs.readFileSync('/path/to/key'), // Buffer or string that contains\n passphrase: 'a pass phrase', // string - For an encrypted private key\n readyTimeout: 20000, // integer How long (in ms) to wait for the SSH handshake\n strictVendor: true, // boolean - Performs a strict server vendor check\n debug: myDebug,// function - Set this to a function that receives a single\n // string argument to get detailed (local) debug information.\n retries: 2, // integer. Number of times to retry connecting\n retry_factor: 2, // integer. Time factor used to calculate time between retries\n retry_minTimeout: 2000, // integer. Minimum timeout between attempts\n };\n\n // rarely used options\n\n let advancedOpts {\n localAddress,\n localPort,\n hostHash,\n hostVerifier,\n agentForward,\n localHostname,\n localUsername,\n tryKeyboard,\n authHandler,\n keepaliveInterval,\n keepaliveCountMax,\n sock,\n algorithms,\n compress\n };\n#+end_src\n\n**** Example Use\n\n#+begin_src javascript\n sftp.connect({\n host: example.com,\n port: 22,\n username: 'donald',\n password: 'youarefired'\n });\n#+end_src\n\n*** list(path, filter) ==> Array[object]\n\nRetrieves a directory listing. This method returns a Promise, which once\nrealised, returns an array of objects representing items in the remote\ndirectory.\n\n- path :: {String} Remote directory path\n- filter :: (optional) {function} A function used to filter the items included\n in the returned array. The function is called for each item with the item\n object being passed in as the argument. The function is passed to\n Array.filter() to perform the filtering.\n\n**** Example Use\n\n#+begin_src javascript\n const Client = require('ssh2-sftp-client');\n\n const config = {\n host: 'example.com',\n port: 22,\n username: 'red-don',\n password: 'my-secret'\n };\n\n let sftp = new Client;\n\n sftp.connect(config)\n .then(() => {\n return sftp.list('/path/to/remote/dir');\n })\n .then(data => {\n console.log(data);\n })\n .then(() => {\n sftp.end();\n })\n .catch(err => {\n console.error(err.message);\n });\n#+end_src\n\n**** Return Objects\n\nThe objects in the array returned by ~list()~ have the following properties;\n\n#+begin_src javascript\n {\n type: '-', // file type(-, d, l)\n name: 'example.txt', // file name\n size: 43, // file size\n modifyTime: 1675645360000, // file timestamp of modified time\n accessTime: 1675645360000, // file timestamp of access time\n rights: {\n user: 'rw',\n group: 'r',\n other: 'r',\n },\n owner: 1000, // user ID\n group: 1000, // group ID\n longname: '-rw-r--r-- 1 fred fred 43 Feb 6 12:02 exaple.txt', // like ls -l line\n }\n#+end_src\n\n*** exists(path) ==> boolean\n\nTests to see if remote file or directory exists. Returns type of remote object\nif it exists or false if it does not.\n\n**** Example Use\n\n#+begin_src javascript\n const Client = require('ssh2-sftp-client');\n\n const config = {\n host: 'example.com',\n port: 22,\n username: 'red-don',\n password: 'my-secret'\n };\n\n let sftp = new Client;\n\n sftp.connect(config)\n .then(() => {\n return sftp.exists('/path/to/remote/dir');\n })\n .then(data => {\n console.log(data); // will be false or d, -, l (dir, file or link)\n })\n .then(() => {\n sftp.end();\n })\n .catch(err => {\n console.error(err.message);\n });\n#+end_src\n\n*** stat(path) ==> object\n\nReturns the attributes associated with the object pointed to by ~path~.\n\n- path :: String. Remote path to directory or file on remote server\n\n**** Attributes\n\nThe ~stat()~ method returns an object with the following properties;\n\n#+begin_src javascript\n let stats = {\n mode: 33279, // integer representing type and permissions\n uid: 1000, // user ID\n gid: 985, // group ID\n size: 5, // file size\n accessTime: 1566868566000, // Last access time. milliseconds\n modifyTime: 1566868566000, // last modify time. milliseconds\n isDirectory: false, // true if object is a directory\n isFile: true, // true if object is a file\n isBlockDevice: false, // true if object is a block device\n isCharacterDevice: false, // true if object is a character device\n isSymbolicLink: false, // true if object is a symbolic link\n isFIFO: false, // true if object is a FIFO\n isSocket: false // true if object is a socket\n };\n#+end_src\n\n**** Example Use\n\n#+begin_src javascript\n let client = new Client();\n\n client.connect(config)\n .then(() => {\n return client.stat('/path/to/remote/file');\n })\n .then(data => {\n // do something with data\n })\n .then(() => {\n client.end();\n })\n .catch(err => {\n console.error(err.message);\n });\n#+end_src\n\n*** get(path, dst, options) ==> String|Stream|Buffer\n\nRetrieve a file from a remote SFTP server. The ~dst~ argument defines the\ndestination and can be either a string, a stream object or undefined. If it is a\nstring, it is interpreted as the path to a location on the local file system\n(path should include the file name). If it is a stream object, the remote data\nis passed to it via a call to pipe(). If ~dst~ is undefined, the method will put\nthe data into a buffer and return that buffer when the Promise is resolved. If\n~dst~ is defined, it is returned when the Promise is resolved.\n\nIn general, if you're going to pass in a string as the destination, you are\nbetter off using the ~fastGet()~ method.\n\n- path :: String. Path to the remote file to download\n- dst :: String|Stream. Destination for the data. If a string, it\n should be a local file path.\n- options :: Options for the ~get()~ command (see below).\n\n**** Options\n\nThe ~options~ argument can be used to pass options to the underlying streams and\npipe call used by this method. The argument is an object with three possible\nproperties, ~readStreamOptions~, ~writeStreamOptions~ and ~pipeOptions~. The\nvalues for each of these properties should be an object containing the required\noptions. For example, possible read stream and pipe options could be defined as\n\n#+begin_src javascript\n let options = {\n readStreamOptions: {\n flags: 'r',\n encoding: null,\n handle: null,\n mode: 0o666,\n autoClose: true\n },\n pipeOptions: {\n end: false\n }};\n \n#+end_src\n\nMost of the time, you won't want to use any options. Sometimes, it may be useful\nto set the encoding. For example, to 'utf-8'. However, it is important not to do\nthis for binary files to avoid data corruption. \n\n**** Example Use\n\n#+begin_src javascript\n let client = new Client();\n\n let remotePath = '/remote/server/path/file.txt';\n let dst = fs.createWriteStream('/local/file/path/copy.txt');\n\n client.connect(config)\n .then(() => {\n return client.get(remotePath, dst);\n })\n .then(() => {\n client.end();\n })\n .catch(err => {\n console.error(err.message);\n });\n#+end_src\n\n- Tip :: See examples file in the Git repository for more examples. You can pass\n any writeable stream in as the destination. For example, if you pass in\n ~zlib.createGunzip()~ writeable stream, you can both download and\n decompress a gzip file 'on the fly'.\n\n*** fastGet(remotePath, localPath, options) ===> string\n\nDownloads a file at remotePath to localPath using parallel reads for faster\nthroughput. This is the simplest method if you just want to download a file.\n\n- remotePath :: String. Path to the remote file to download\n- localPath :: String. Path on local file system for the downloaded file. The\n local path should include the filename to use for saving the\n file.\n- options :: Options for ~fastGet()~ (see below)\n\n**** Options\n\n#+begin_src javascript\n {\n concurrency: 64, // integer. Number of concurrent reads to use\n chunkSize: 32768, // integer. Size of each read in bytes\n step: function(total_transferred, chunk, total) // callback called each time a\n // chunk is transferred\n }\n#+end_src\n\n- Warning :: Some servers do not respond correctly to requests to alter chunk\n size. This can result in lost or corrupted data.\n\n**** Sample Use\n\n#+begin_src javascript\n let client = new Client();\n let remotePath = '/server/path/file.txt';\n let localPath = '/local/path/file.txt';\n\n client.connect(config)\n .then(() => {\n client.fastGet(remotePath, localPath);\n })\n .then(() => {\n client.end();\n })\n .catch(err => {\n console.error(err.message);\n });\n#+end_src\n\n*** put(src, remotePath, options) ==> string\n\nUpload data from local system to remote server. If the ~src~ argument is a\nstring, it is interpreted as a local file path to be used for the data to\ntransfer. If the ~src~ argument is a buffer, the contents of the buffer are\ncopied to the remote file and if it is a readable stream, the contents of that\nstream are piped to the ~remotePath~ on the server.\n\n- src :: string | buffer | readable stream. Data source for data to copy to the\n remote server.\n- remotePath :: string. Path to the remote file to be created on the server.\n- options :: object. Options which can be passed to adjust the read and write stream used\n in sending the data to the remote server or the pipe call used to\n make the data transfer (see below).\n\n**** Options\n\nThe options object supports three properties, ~readStreamOptions~,\n~writeStreamOptions~ and ~pipeOptions~. The value for each property should be an\nobject with options as properties and their associated values representing the\noption value. For example, you might use the following to set ~writeStream~ options.\n\n#+begin_src javascript\n {\n writeStreamOptions: {\n flags: 'w', // w - write and a - append\n encoding: null, // use null for binary files\n mode: 0o666, // mode to use for created file (rwx)\n }}\n#+end_src\n\nThe most common options to use are mode and encoding. The values shown above are\nthe defaults. You do not have to set encoding to utf-8 for text files, null is\nfine for all file types. However, using utf-8 encoding for binary files will\noften result in data corruption.\n\nNote that you cannot set ~autoClose: false~ for ~writeStreamOptions~. If you\nattempt to set this property to false, it will be ignored. This is necessary to\navoid a race condition which may exist when setting ~autoClose~ to false on the\nwriteStream. As there is no easy way to access the writeStream once the promise\nhas been resolved, setting this to autoClose false is not terribly useful as\nthere is no easy way to manually close the stream after the promise has been\nresolved.\n\n**** Example Use\n\n#+begin_src javascript\n let client = new Client();\n\n let data = fs.createReadStream('/path/to/local/file.txt');\n let remote = '/path/to/remote/file.txt';\n\n client.connect(config)\n .then(() => {\n return client.put(data, remote);\n })\n .then(() => {\n return client.end();\n })\n .catch(err => {\n console.error(err.message);\n });\n#+end_src\n\n- Tip :: If the src argument is a path string, consider just using ~fastPut()~.\n\n*** fastPut(localPath, remotePath, options) ==> string\n\nUploads the data in file at ~localPath~ to a new file on remote server at\n~remotePath~ using concurrency. The options object allows tweaking of the fast put process.\n\n- localPath :: string. Path to local file to upload\n- remotePath :: string. Path to remote file to create\n- options :: object. Options passed to createWriteStream (see below)\n\n**** Options\n\n#+begin_src javascript\n {\n concurrency: 64, // integer. Number of concurrent reads\n chunkSize: 32768, // integer. Size of each read in bytes\n mode: 0o755, // mixed. Integer or string representing the file mode to set\n step: function(total_transferred, chunk, total) // function. Called every time\n // a part of a file was transferred\n }\n#+end_src\n\n- Warning :: There have been reports that some SFTP servers will not honour\n requests for non-default chunk sizes. This can result in data loss\n or corruption.\n\n**** Example Use\n\n#+begin_src javascript\n let localFile = '/path/to/file.txt';\n let remoteFile = '/path/to/remote/file.txt';\n let client = new Client();\n\n client.connect(config)\n .then(() => {\n client.fastPut(localFile, remoteFile);\n })\n .then(() => {\n client.end();\n })\n .catch(err => {\n console.error(err.message);\n });\n#+end_src\n\n*** append(input, remotePath, options) ==> string\n\nAppend the ~input~ data to an existing remote file. There is no integrity\nchecking performed apart from normal writeStream checks. This function simply\nopens a writeStream on the remote file in append mode and writes the data passed\nin to the file.\n\n- input :: buffer | readStream. Data to append to remote file\n- remotePath :: string. Path to remote file\n- options :: object. Options to pass to writeStream (see below)\n\n**** Options\n\nThe following options are supported;\n\n#+begin_src javascript\n {\n flags: 'a', // w - write and a - append\n encoding: null, // use null for binary files\n mode: 0o666, // mode to use for created file (rwx)\n autoClose: true // automatically close the write stream when finished\n }\n#+end_src\n\nThe most common options to use are mode and encoding. The values shown above are\nthe defaults. You do not have to set encoding to utf-8 for text files, null is\nfine for all file types. Generally, I would not attempt to append binary files.\n\n**** Example Use\n\n#+begin_src javascript\n let remotePath = '/path/to/remote/file.txt';\n let client = new Client();\n\n client.connect(config)\n .then(() => {\n return client.append(Buffer.from('Hello world'), remotePath);\n })\n .then(() => {\n return client.end();\n })\n .catch(err => {\n console.error(err.message);\n });\n#+end_src\n\n*** mkdir(path, recursive) ==> string\n\nCreate a new directory. If the recursive flag is set to true, the method will\ncreate any directories in the path which do not already exist. Recursive flag\ndefaults to false.\n\n- path :: string. Path to remote directory to create\n- recursive :: boolean. If true, create any missing directories in the path as\n well\n\n**** Example Use\n\n#+begin_src javascript\n let remoteDir = '/path/to/new/dir';\n let client = new Client();\n\n client.connect(config)\n .then(() => {\n return client.mkdir(remoteDir, true);\n })\n .then(() => {\n return client.end();\n })\n .catch(err => {\n console.error(err.message);\n });\n#+end_src\n\n*** rmdir(path, recursive) ==> string\n\nRemove a directory. If removing a directory and recursive flag is set to\n~true~, the specified directory and all sub-directories and files will be\ndeleted. If set to false and the directory has sub-directories or files, the\naction will fail.\n\n- path :: string. Path to remote directory\n- recursive :: boolean. If true, remove all files and directories in target\n directory. Defaults to false\n\n*Note*: There has been at least one report that some SFTP servers will allow\nnon-empty directories to be removed even without the recursive flag being set to\ntrue. While this is not standard behaviour, it is recommended that users verify\nthe behaviour of rmdir if there are plans to rely on the recursive flag to\nprevent removal of non-empty directories.\n\n**** Example Use\n\n#+begin_src javascript\n let remoteDir = '/path/to/remote/dir';\n let client = new Client();\n\n client.connect(config)\n .then(() => {\n return client.rmdir(remoteDir, true);\n })\n .then(() => {\n return client.end();\n })\n .catch(err => {\n console.error(err.message);\n });\n#+end_src\n\n*** delete(path, noErrorOK) ==> string\n\nDelete a file on the remote server.\n\n- path :: string. Path to remote file to be deleted.\n\n- noErrorOK :: boolean. If true, no error is raised when you try to delete a\n non-existent file. Default is false.\n\n**** Example Use\n\n#+begin_src javascript\n let remoteFile = '/path/to/remote/file.txt';\n let client = new Client();\n\n client.connect(config)\n .then(() => {\n return client.delete(remoteFile);\n })\n .then(() => {\n return client.end();\n })\n .catch(err => {\n console.error(err.message);\n });\n#+end_src\n\n*** rename(fromPath, toPath) ==> string\n\nRename a file or directory from ~fromPath~ to ~toPath~. You must have the\nnecessary permissions to modify the remote file.\n\n- fromPath :: string. Path to existing file to be renamed\n- toPath :: string. Path to new file existing file is to be renamed to. Should\n not already exist.\n\n**** Example Use\n\n#+begin_src javascript\n let from = '/remote/path/to/old.txt';\n let to = '/remote/path/to/new.txt';\n let client = new Client();\n\n client.connect(config)\n .then(() => {\n return client.rename(from, to);\n })\n .then(() => {\n return client.end();\n })\n .catch(err => {\n console.error(err.message);\n });\n#+end_src\n\n*** posixRename(fromPath, toPath) ==> string\n\nThis method uses the openssh POSIX rename extension introduced in OpenSSH 4.8.\nThe advantage of this version of rename over standard SFTP rename is that it is\nan atomic operation and will allow renaming a resource where the destination\nname exists. The POSIX rename will also work on some file systems which do not\nsupport standard SFTP rename because they don't support the system hardlink()\ncall. The POSIX rename extension is available on all openSSH servers from 4.8\nand some other implementations. This is an extension to the standard SFTP\nprotocol and therefore is not supported on all sftp servers.\n\n- fromPath :: string. Path to existing file to be renamed.\n- toPath :: string. Path for new name. If it already exists, it will be replaced\n by file specified in fromPath\n\n#+begin_src javascript\n let from = '/remote/path/to/old.txt';\n let to = '/remote/path/to/new.txt';\n let client = new Client();\n\n client.connect(config)\n .then(() => {\n return client.posixRename(from, to);\n })\n .then(() => {\n return client.end();\n })\n .catch(err => {\n console.error(err.message);\n });\n#+end_src\n\n*** chmod(path, mode) ==> string\n\nChange the mode (read, write or execute permissions) of a remote file or\ndirectory.\n\n- path :: string. Path to the remote file or directory\n- mode :: octal. New mode to set for the remote file or directory\n\n**** Example Use\n\n#+begin_src javascript\n let path = '/path/to/remote/file.txt';\n let newMode = 0o644; // rw-r-r\n let client = new Client();\n\n client.connect(config)\n .then(() => {\n return client.chmod(path, newMode);\n })\n .then(() => {\n return client.end();\n })\n .catch(err => {\n console.error(err.message);\n });\n#+end_src\n\n*** realPath(path) ===> string\n\nConverts a relative path to an absolute path on the remote server. This method\nis mainly used internally to resolve remote path names.\n\n*Warning*: Currently, there is a platform inconsistency with this method on\nwin32 platforms. For servers running on non-win32 platforms, providing a path\nwhich does not exist on the remote server will result in an empty e.g. '',\nabsolute path being returned. On servers running on win32 platforms, a\nnormalised path will be returned even if the path does not exist on the remote\nserver. It is therefore advised not to use this method to also verify a path\nexists. instead, use the ~exist()~ method.\n\n- path :: A file path, either relative or absolute. Can handle '.' and '..', but\n does not expand '~'.\n\n*** cwd() ==> string\n\nReturns what the server believes is the current remote working directory.\n\n*** uploadDir(srcDir, dstDir, options) ==> string\n\nUpload the directory specified by ~srcDir~ to the remote directory specified by\n~dstDir~. The ~dstDir~ will be created if necessary. Any sub directories within\n~srcDir~ will also be uploaded. Any existing files in the remote path will be\noverwritten.\n\nThe upload process also emits 'upload' events. These events are fired for each\nsuccessfully uploaded file. The ~upload~ event calls listeners with 1 argument,\nan object which has properties source and destination. The source property is\nthe path of the file uploaded and the destination property is the path to where\nthe file was uploaded. The purpose of this event is to provide some way for\nclient code to get feedback on the upload progress. You can add your own listener\nusing the ~on()~ method.\n\nThe 3rd argument is an options object with two supported properties, ~filter~ and ~useFastput~. \n\nThe ~filter~ option is a function which will be called for each item\nto be uploaded. The function will be called with two arguments. The first\nargument is the full path of the item to be uploaded and the second argument is\na boolean, which will be true if the target path is for a directory. The filter\nfunction will be called for each item in the source path. If the function\nreturns true, the item will be uploaded. If it returns false, it will be\nfiltered and not uploaded. The filter function is called via the ~Array.filter~\nmethod. These array comprehension methods are known to be unsafe for\nasynchronous functions. Therefore, only synchronous filter functions are\nsupported at this time.\n\nThe ~useFastput~ option is a boolean option. If ~true~, the method will use the\nfaster ~fastPut()~ method to upload files. Although this method is faster, it is\nnot supported by all SFTP servers. Enabling this option when unsupported by the\nremote SFTP server will result in failures.\n\n- srcDir :: A local file path specified as a string\n- dstDir :: A remote file path specified as a string\n- options :: An options object which supports two properties, ~filter~ and\n ~useFastput~. A filter predicate function which is called for each item in the\n source path. The argument will receive two arguments. The first is the full\n path to the item and the second is a boolean which will be true if the item is\n a directory. If the function returns true, the item will be uploaded,\n otherwise it will be filtered out and ignored. The ~useFastput~ option is a\n boolean option. If ~true~, the method will use the faster, but less supported,\n ~fastPut()~ method to transfer files. The default is to use the slightly slower,\n but better supported, ~put()~ method.\n \n**** Example\n\n #+begin_src javascript\n 'use strict';\n\n // Example of using the uploadDir() method to upload a directory\n // to a remote SFTP server\n\n const path = require('path');\n const SftpClient = require('../src/index');\n\n const dotenvPath = path.join(__dirname, '..', '.env');\n require('dotenv').config({path: dotenvPath});\n\n const config = {\n host: process.env.SFTP_SERVER,\n username: process.env.SFTP_USER,\n password: process.env.SFTP_PASSWORD,\n port: process.env.SFTP_PORT || 22\n };\n\n async function main() {\n const client = new SftpClient('upload-test');\n const src = path.join(__dirname, '..', 'test', 'testData', 'upload-src');\n const dst = '/home/tim/upload-test';\n\n try {\n await client.connect(config);\n client.on('upload', info => {\n console.log(`Listener: Uploaded ${info.source}`);\n });\n let rslt = await client.uploadDir(src, dst);\n return rslt;\n } catch (err) {\n console.error(err);\n } finally {\n client.end();\n }\n }\n\n main()\n .then(msg => {\n console.log(msg);\n })\n .catch(err => {\n console.log(`main error: ${err.message}`);\n });\n\n #+end_src\n\n*** downloadDir(srcDir, dstDir, options) ==> string\n\nDownload the remote directory specified by ~srcDir~ to the local file system\ndirectory specified by ~dstDir~. The ~dstDir~ directory will be created if\nrequired. All sub directories within ~srcDir~ will also be copied. Any existing\nfiles in the local path will be overwritten. No files in the local path will be\ndeleted.\n\nThe method also emits ~download~ events to provide a way to monitor download\nprogress. The download event listener is called with one argument, an object\nwith two properties, source and destination. The source property is the path to\nthe remote file that has been downloaded and the destination is the local path\nto where the file was downloaded to. You can add a listener for this event using\nthe ~on()~ method.\n\nThe ~options~ argument is an options object with two supported properties, ~filter~\nand ~useFastget~. The ~filter~ argument is a predicate function which will be called\nwith two arguments for each potential item to be downloaded. The first argument\nis the full path of the item and the second argument is a boolean, which will be\ntrue if the item is a directory. If the function returns true, the item will be\nincluded in the download. If it returns false, it will be filtered and ignored.\nThe filter function is called via the ~Array.filter~ method. These array\ncomprehension methods are known to be unsafe for asynchronous functions.\nTherefore, only synchronous filter functions are supported at this time.\n\nIf the ~useFastget~ property is set to ~true~, the method will use ~fastGet()~ to\ntransfer files. The ~fastGet~ method is faster, but not supported by all SFTP\nservices.\n\n- srcDir :: A remote file path specified as a string\n- dstDir :: A local file path specified as a string\n- options :: An object with two supported properties, ~filter~ and ~useFastget~. The\n filter property is a function accepting two arguments, the full path to an\n item and a boolean value which will be true if the item is a directory. The\n function is called for each item in the download path and should return true\n to include the item and false to exclude it in the download. The ~useFastget~\n property is a boolean. If true, the ~fastGet()~ method will be used to transfer\n files. If ~false~ (the default), the slower but better supported ~get()~ method is\n used. .\n \n**** Example\n\n#+begin_src javascript\n 'use strict';\n\n // Example of using the downloadDir() method to upload a directory\n // to a remote SFTP server\n\n const path = require('path');\n const SftpClient = require('../src/index');\n\n const dotenvPath = path.join(__dirname, '..', '.env');\n require('dotenv').config({path: dotenvPath});\n\n const config = {\n host: process.env.SFTP_SERVER,\n username: process.env.SFTP_USER,\n password: process.env.SFTP_PASSWORD,\n port: process.env.SFTP_PORT || 22\n };\n\n async function main() {\n const client = new SftpClient('upload-test');\n const dst = '/tmp';\n const src = '/home/tim/upload-test';\n\n try {\n await client.connect(config);\n client.on('download', info => {\n console.log(`Listener: Download ${info.source}`);\n });\n let rslt = await client.downloadDir(src, dst);\n return rslt;\n } finally {\n client.end();\n }\n }\n\n main()\n .then(msg => {\n console.log(msg);\n })\n .catch(err => {\n console.log(`main error: ${err.message}`);\n });\n\n#+end_src\n\n*** createReadStream(remotePath, options)) ==> stream object\n\n Returns a read stream object which is attached to the remote file specified by\n the ~remotePath~ argument. This is a low level method which just returns a read\n stream object. Client code is fully responsible for managing and releasing the\n resources associated with the stream once finished i.e. closing files,\n removing listeners etc. \n\n - remotePath :: A remote file path specified as a string\n - options :: An options object. Supported properties are \n - flags :: defaults to 'r'\n - encoding :: defaults to null\n - handle :: defaults to null\n - mode :: 0o666\n - autoClose :: defaults to true. If set to false, client code is responsible\n for closing file descriptors when finished\n - start :: Default 0. Position to start reading bytes from (inclusive)\n - end :: Position to stop reading bytes (inclusive). \n\n*** createWriteStream(remotePath, options) ==> stream object\n\n Returns a write stream object which is attached to the remote file specified\n in the ~remotePath~ argument. This is a low level function which just returns\n the stream object. Client code is fully responsible for managing that object,\n including closing any file descriptors and removing listeners etc.\n\n - remotePath :: Path to the remote file specified as a string\n - options :: An object containing stream options. Supported properties include \n - flags :: default 'w'\n - encoding :: default null\n - mode :: 0o666\n - autoClose :: true \n - start :: Byte position to start writing from (inclusive). May require\n changing flag to 'r+'.\n\n*** rcopy(srcPath, dstPath) ==> string\n\n Perform a remote file copy. The file identified by the ~srcPath~ argument will\n be copied to the file specified as the ~dstPath~ argument. The directory where\n ~dstPath~ will be placed must exist, but the actual file must not i.e. no\n overwrites allowed. \n\n - srcPath :: Path to remote file to be copied specified as a string\n - dstPath :: Path to where the copy will be created specified as a string\n\n*** end() ==> boolean\n\nEnds the current client session, releasing the client socket and associated\nresources. This function also removes all listeners associated with the client.\n\n**** Example Use\n\n#+begin_src javascript\n let client = new Client();\n\n client.connect(config)\n .then(() => {\n // do some sftp stuff\n })\n .then(() => {\n return client.end();\n })\n .catch(err => {\n console.error(err.message);\n });\n#+end_src\n\n*** Add and Remove Listeners\n\nAlthough normally not required, you can add and remove custom listeners on the\nssh2 client object. This object supports a number of events, but only a few of\nthem have any meaning in the context of SFTP. These are\n\n- error :: An error occurred. Calls listener with an error argument.\n- end :: The socket has been disconnected. No argument.\n- close :: The socket was closed. \n\n**** on(eventType, listener)\n\nAdds the specified listener to the specified event type. It the event type is\n~error~, the listener should accept 1 argument, which will be an Error object.\nThe event handlers for =end= and =close= events have no arguments.\n\nThe handlers will be added to the beginning of the listener's event handlers, so\nit will be called before any of the =ssh2-sftp-client= listeners.\n\n**** removeListener(eventType, listener)\n\nRemoves the specified listener from the event specified in eventType. Note that\nthe ~end()~ method automatically removes all listeners from the client object.\n\n* Platform Quirks & Warnings\n** Server Capabilities\n\n All SFTP servers and platforms are not equal. Some facilities provided by\n ~ssh2-sftp-client~ either depend on capabilities of the remote server or the\n underlying capabilities of the remote server platform. As an example,\n consider ~chmod()~. This command depends on a remote file system which\n implements the 'nix' concept of users and groups. The /win32/ platform does\n not have the same concept of users and groups, so ~chmod()~ will not behave\n in the same way.\n\n One way to determine whether an issue you are encountering is due to\n ~ssh2-sftp-client~ or due to the remote server or server platform is to use a\n simple CLI sftp program, such as openSSH's sftp command. If you observe the\n same behaviour using plain ~sftp~ on the command line, the issue is likely\n due to server or remote platform limitations. Note that you should not use a\n GUI sftp client, like ~Filezilla~ or ~winSCP~ as such GUI programs often\n attempt to hide these server and platform incompatibilities and will take\n additional steps to simulate missing functionality etc. You want to use a CLI\n program which does as little as possible.\n\n** Issues with ~fastPut()~ and ~fastGet()~ Methods\n\n The ~fastPut()~ and ~fastGet()~ methods are known to be somewhat dependent on\n SFTP server capabilities. Some SFTP servers just do not work correctly with\n concurrent connections and some are known to have issues with negotiating\n packet sizes. These issues can sometimes be resolved by tweaking the options\n supplied to the methods, such as setting number of concurrent connections or\n a specific packet size.\n\n To see an example of the type of issues you can observe with ~fastPut()~ or\n ~fastGet()~, have a look at [[https://github.com/theophilusx/ssh2-sftp-client/issues/407][issue 407]], which describes the experiences of one\n user. Bottom line, when it works, it tends to work well and be significantly\n faster than using just ~get()~ or ~put()~. However, when developing code to\n run against different SFTP servers, especially where you are unable to test\n against each server, you are likely better off just using ~get()~ and ~put()~\n or structuring your code so that users can select which method to use (this\n is what =ssh2-sftp-client= does - for example, see the ~!downloadDir()~ and\n ~uploadDir()~ methods.\n \n** Promises, Events & Managing Exceptions\n\n One of the challenges in providing a Promise based API over a module like\n SSH2, which is event based is how to ensure events are handled appropriately.\n The challenge is due to the synchronous nature of events. You cannot use\n =try/catch= for events because you have no way of knowing when the event\n might fire. For example, it could easily fire after your =try/catch= block as\n completed execution.\n\n Things become even more complicated once you mix in Promises. When you define\n a promise, you have to methods which can be called to fulfil a promise,\n =resolve= and =reject=. Only one can be called - once you call =resolve=, you\n cannot call =reject= (well, you can call it, but it won't have any impact on\n the fulfilment status of the promise). The problem arises when an event, for\n example an =error= event is fired either after you have resolved a promise or\n possibly in-between promises. If you don't catch the =error= event, your\n script will likely crash with an =uncaught exception= error.\n\n To make matters worse, some servers, particularly servers running on a\n Windows platform, will raise multiple errors for the same error /event/. For\n example, when you attempt to connect with a bad username or password, you\n will get a =All authentication methods have failed= exception. However, under\n Windows, you will also get a =Connection reset by peer= exception. If we\n reject the connect promise based on the authentication failure exception,\n what do we do with the =reset by peer= exception? More critically, what will\n handle that exception given the promise has already been fulfilled and\n completed? To make matters worse, it seems that Windows based servers also\n raise an error event for /non-errors/. For example, when you call the =end()=\n method, the connection is closed. On windows, this also results in a\n /connection reset by peer/ error. While it could be argued that the remote\n server resetting the connection after receiving a disconnect request is not\n an error, it doesn't change the fact that one is raised and we need to\n somehow deal with it.\n\n To handle this, =ssh2-sftp-client= implements a couple of strategies.\n Firstly, when you call one of the module's methods, it adds =error=, =end=\n and =close= event listeners which will call the =reject= method on the\n enclosing promise. It also keeps track of whether an error has been handled\n and if it has, it ignores any subsequent errors until the promise ends.\n Typically, the first error caught has the most relevant information and any\n subsequent error events are less critical or informative, so ignoring them\n has no negative impact. Provided one of the events is raised before the\n promise is fulfilled, these handlers will consume the event and deal with it\n appropriately.\n\n In testing, it was found that in some situations, particularly during connect\n operations, subsequent errors fired with a small delay. This prevents the\n errors from being handled by the event handlers associated with the connect\n promise. To deal with this, a small 500ms delay has been added to the\n connect() method, which effectively delays the removal of the event handlers\n until all events have been caught.\n\n The other area where additional events are fired is during the end() call. To\n deal with these events, the =end()= method sets up listeners which will\n simply ignore additional =error=, =end= and =close= events. It is assumed\n that once you have called =end()= you really only care about any main error\n which occurs and no longer care about other errors that may be raised as the\n connection is terminated.\n\n In addition to the promise based event handlers, =ssh2-sftp-client= also\n implements global event handlers which will catch any =error=, =end= or\n =close= events. Essentially, these global handlers only reset the =sftp=\n property of the client object, effectively ensuring any subsequent calls are\n rejected and in the case of an error, send the error to the console.\n\n*** Adding Custom Handlers\n\n While the above strategies appear to work for the majority of use cases,\n there are always going to be edge cases which require more flexible or\n powerful event handling. To support this, the =on()= and =removeListener()=\n methods are provided. Any event listener added using the =on()= method will\n be added at the beginning of the list of handlers for that event, ensuring\n it will be called before any global or promise local events. See the\n documentation for the =on()= method for details.\n \n** Windows Based Servers\n\n It appears that when the sftp server is running on Windows, a /ECONNRESET/\n error signal is raised when the end() method is called. Unfortunately, this\n signal is raised after a considerable delay. This means we cannot remove the\n error handler used in the end() promise as otherwise you will get an uncaught\n exception error. Leaving the handler in place, even though we will ignore\n this error, solves that issue, but unfortunately introduces a new problem.\n Because we are not removing the listener, if you re-use the client object for\n subsequent connections, an additional error handler will be added. If this\n happens more than 11 times, you will eventually see the Node warning about a\n possible memory leak. This is because node monitors the number of error\n handlers and if it sees more than 11 added to an object, it assumes there is\n a problem and generates the warning.\n\n The best way to avoid this issue is to not re-use client objects. Always\n generate a new sftp client object for each new connection.\n\n** Don't Re-use SftpClient Objects\n\n Due to an issue with /ECONNRESET/ error signals when connecting to Windows\n based SFTP servers, it is not possible to remove the error handler in the\n end() method. This means that if you re-use the SftpClient object for\n multiple connections e.g. calling connect(), then end(), then connect() etc,\n you run the risk of multiple error handlers being added to the SftpClient\n object. After 11 handlers have been added, Node will generate a possible\n memory leak warning.\n\n To avoid this problem, don't re-use SftpClient objects. Generate a new\n SftpClient object for each connection. You can perform multiple actions with\n a single connection e.g. upload multiple files, download multiple files etc,\n but after you have called end(), you should not try to re-use the object with\n a further connect() call. Create a new object instead.\n\n* FAQ\n\n** Remote server drops connections with only an end event\n\nMany SFTP servers have rate limiting protection which will drop connections once\na limit has been reached. In particular, openSSH has the setting ~MaxStartups~,\nwhich can be a tuple of the form =max:drop:full= where =max= is the maximum\nallowed unauthenticated connections, =drop= is a percentage value which\nspecifies percentage of connections to be dropped once =max= connections has\nbeen reached and =full= is the number of connections at which point all\nsubsequent connections will be dropped. e.g. =10:30:60= means allow up to 10\nunauthenticated connections after which drop 30% of connection attempts until\nreaching 60 unauthenticated connections, at which time, drop all attempts.\n\nClients first make an unauthenticated connection to the SFTP server to begin\nnegotiation of protocol settings (cipher, authentication method etc). If you are\ncreating multiple connections in a script, it is easy to exceed the limit,\nresulting in some connections being dropped. As SSH2 only raises an 'end' event\nfor these dropped connections, no error is detected. The ~ssh2-sftp-client~ now\nlistens for ~end~ events during the connection process and if one is detected,\nwill reject the connection promise.\n\nOne way to avoid this type of issue is to add a delay between connection\nattempts. It does not need to be a very long delay - just sufficient to permit\nthe previous connection to be authenticated. In fact, the default setting for\nopenSSH is =10:30:60=, so you really just need to have enough delay to ensure\nthat the 1st connection has completed authentication before the 11th connection\nis attempted.\n\n** How can I pass writeable stream as dst for get method?\n\nIf the dst argument passed to the get method is a writeable stream, the remote\nfile will be piped into that writeable. If the writeable you pass in is a\nwriteable stream created with ~fs.createWriteStream()~, the data will be written\nto the file specified in the constructor call to ~createWriteStream()~.\n\nThe writeable stream can be any type of write stream. For example, the below code\nwill convert all the characters in the remote file to upper case before it is\nsaved to the local file system. This could just as easily be something like a\ngunzip stream from ~zlib~, enabling you to decompress remote zipped files as you\nbring them across before saving to local file system.\n\n#+begin_src javascript\n 'use strict';\n\n // Example of using a writeable with get to retrieve a file.\n // This code will read the remote file, convert all characters to upper case\n // and then save it to a local file\n\n const Client = require('../src/index.js');\n const path = require('path');\n const fs = require('fs');\n const through = require('through2');\n\n const config = {\n host: 'arch-vbox',\n port: 22,\n username: 'tim',\n password: 'xxxx'\n };\n\n const sftp = new Client();\n const remoteDir = '/home/tim/testServer';\n\n function toupper() {\n return through(function(buf, enc, next) {\n next(null, buf.toString().toUpperCase());\n });\n }\n\n sftp\n .connect(config)\n .then(() => {\n return sftp.list(remoteDir);\n })\n .then(data => {\n // list of files in testServer\n console.dir(data);\n let remoteFile = path.join(remoteDir, 'test.txt');\n let upperWtr = toupper();\n let fileWtr = fs.createWriteStream(path.join(__dirname, 'loud-text.txt'));\n upperWtr.pipe(fileWtr);\n return sftp.get(remoteFile, upperWtr);\n })\n .then(() => {\n return sftp.end();\n })\n .catch(err => {\n console.error(err.message);\n });\n#+end_src\n\n** How can I upload files without having to specify a password?\n\nThere are a couple of ways to do this. Essentially, you want to setup SSH keys\nand use these for authentication to the remote server.\n\nOne solution, provided by @KalleVuorjoki is to use the SSH agent\nprocess. *Note*: SSH_AUTH_SOCK is normally created by your OS when you load the\nssh-agent as part of the login session.\n\n#+begin_src javascript\n let sftp = new Client();\n sftp.connect({\n host: 'YOUR-HOST',\n port: 'YOUR-PORT',\n username: 'YOUR-USERNAME',\n agent: process.env.SSH_AUTH_SOCK\n }).then(() => {\n sftp.fastPut(/* ... */)\n }\n#+end_src\n\nAnother alternative is to just pass in the SSH key directly as part of the\nconfiguration.\n\n#+begin_src javascript\n let sftp = new Client();\n sftp.connect({\n host: 'YOUR-HOST',\n port: 'YOUR-PORT',\n username: 'YOUR-USERNAME',\n privateKey: fs.readFileSync('/path/to/ssh/key')\n }).then(() => {\n sftp.fastPut(/* ... */)\n }\n#+end_src\n\n** How can I connect through a Socks Proxy\n\nThis solution was provided by @jmorino.\n\n#+begin_src javascript\n import { SocksClient } from 'socks';\n import SFTPClient from 'ssh2-sftp-client';\n\n const host = 'my-sftp-server.net';\n const port = 22; // default SSH/SFTP port on remote server\n\n // connect to SOCKS 5 proxy\n const { socks } = await SocksClient.createConnection({\n proxy: {\n host: 'my.proxy', // proxy hostname\n port: 1080, // proxy port\n type: 5, // for SOCKS v5\n },\n command: 'connect',\n destination: { host, port } // the remote SFTP server\n });\n\n const client = new SFTPClient();\n client.connect({\n host,\n sock: socks.socket, // pass the socket to proxy here (see ssh2 doc)\n username: '.....',\n privateKey: '.....'\n })\n\n // client is connected\n#+end_src\n\n** Timeout while waiting for handshake or handshake errors\n\nSome users have encountered the error 'Timeout while waiting for handshake' or\n'Handshake failed, no matching client->server ciphers. This is often due to the\nclient not having the correct configuration for the transport layer algorithms\nused by ssh2. One of the connect options provided by the ssh2 module is\n~algorithm~, which is an object that allows you to explicitly set the key\nexchange, ciphers, hmac and compression algorithms as well as server\nhost key used to establish the initial secure connection. See the SSH2\ndocumentation for details. Getting these parameters correct usually resolves the\nissue.\n\nWhen encountering this type of problem, one worthwhile approach is to use\nopenSSH's CLI sftp program with the =-v= switch to raise logging levels. This\nwill show you what algorithms the CLI is using. You can then use this\ninformation to match the names with the accepted algorithm names documented in\nthe =ssh2= README to set the properties in the =algorithms= object.\n\n** How can I limit upload/download speed\n\n If you want to limit the amount of bandwidth used during upload/download of\n data, you can use a stream to limit throughput. The following example was\n provided by /kennylbj/. Note that there is a caveat that we must set the\n ~autoClose~ flag to false to avoid calling an extra ~_read()~ on a closed stream\n that may cause _get Permission Denied error in ssh2-streams.\n\n\n #+begin_src javascript\n\n\n const Throttle = require('throttle');\n const progress = require('progress-stream');\n\n // limit download speed\n const throttleStream = new Throttle(config.throttle);\n\n // download progress stream\n const progressStream = progress({\n length: fileSize,\n time: 500,\n });\n progressStream.on('progress', (progress) => {\n console.log(progress.percentage.toFixed(2));\n });\n\n const outStream = createWriteStream(localPath);\n\n // pipe streams together\n throttleStream.pipe(progressStream).pipe(outStream);\n\n try {\n // set autoClose to false\n await client.get(remotePath, throttleStream, { autoClose: false });\n } catch (e) {\n console.log('sftp error', e);\n } finally {\n await client.end();\n }\n #+end_src\n** Connection hangs or fails for larger files\n\n This was contributed by Ladislav Jacho. Thanks. \n\n A symptom of this issue is that you are able to upload small files, but\n uploading larger ones fail. You probably have an MTU/fragmentation problem. For\n each network interface on both client and server set the MTU to 576, e.g.\n =ifconfig eth0 mtu 576=. If that works, you need to find the largest MTU which\n will work for your network. An MTU which is too small will adversely affect\n throughput speed. A common value to use is an MTU of 1400.\n \n For more explanation, see [[https://github.com/theophilusx/ssh2-sftp-client/issues/342][issue #342]].\n \n* Examples\n\nI have started collecting example scripts in the example directory of the\nrepository. These are mainly scripts I have put together in order to investigate\nissues or provide samples for users. They are not robust, lack adequate error\nhandling and may contain errors. However, I think they are still useful for\nhelping developers see how the module and API can be used.\n\n* Troubleshooting\n\nThe ~ssh2-sftp-client~ module is essentially a wrapper around the ~ssh2~ and\n~ssh2-streams~ modules, providing a higher level ~promise~ based API. When you\nrun into issues, it is important to try and determine where the issue lies -\neither in the ssh2-sftp-client module or the underlying ~ssh2~ and\n~ssh2-streams~ modules. One way to do this is to first identify a minimal\nreproducible example which reproduces the issue. Once you have that, try to\nreplicate the functionality just using the ~ssh2~ and ~ssh2-streams~ modules. If\nthe issue still occurs, then you can be fairly confident it is something related\nto those later 2 modules and therefore and issue which should be referred to the\nmaintainer of that module.\n\nThe ~ssh2~ and ~ssh2-streams~ modules are very solid, high quality modules with\na large user base. Most of the time, issues with those modules are due to client\nmisconfiguration. It is therefore very important when trying to diagnose an\nissue to also check the documentation for both ~ssh2~ and ~ssh2-streams~. While\nthese modules have good defaults, the flexibility of the ssh2 protocol means\nthat not all options are available by default. You may need to tweak the\nconnection options, ssh2 algorithms and ciphers etc for some remote servers. The\ndocumentation for both the ~ssh2~ and ~ssh2-streams~ module is quite\ncomprehensive and there is lots of valuable information in the issue logs.\n\nIf you run into an issue which is not repeatable with just the ~ssh2~ and\n~ssh2-streams~ modules, then please log an issue against the ~ssh2-sftp-client~\nmodule and I will investigate. Please note the next section on logging issues.\n\nNote also that in the repository there are two useful directories. The first is\nthe examples directory, which contain some examples of using ~ssh2-sftp-client~\nto perform common tasks. A few minutes reviewing these examples can provide that\nadditional bit of detail to help fix any problems you are encountering.\n\nThe second directory is the validation directory. I have some very simple\nscripts in this directory which perform basic tasks using only the ~ssh2~\nmodules (no ~ssh2-sftp-client~ module). These can be useful when\ntrying to determine if the issue is with the underlying ~ssh2~ module or\nthe ~ssh2-sftp-client~ wrapper module.\n\n** Common Errors\n\n There are some common errors people tend to make when using Promises or\n Async/Await. These are by far the most common problem found in issues logged\n against this module. Please check for some of these before logging your\n issue.\n\n*** Not returning the promise in a ~then()~ block\n\n All methods in ~ssh2-sftp-client~ return a Promise. This means methods are\n executed /asynchrnously/. When you call a method inside the ~then()~ block\n of a promise chain, it is critical that you return the Promise that call\n generates. Failing to do this will result in the ~then()~ block completing\n and your code starting execution of the next ~then()~, ~catch()~ or\n ~finally()~ block before your promise has been fulfilled. For example, the\n following will not do what you expect\n\n #+begin_src javascript\n sftp.connect(config)\n .then(() => {\n sftp.fastGet('foo.txt', 'bar.txt');\n }).then(rslt => {\n console.log(rslt);\n sftp.end();\n }).catch(e => {\n console.error(e.message);\n });\n #+end_src\n\n In the above code, the ~sftp.end()~ method will almost certainly be called\n before ~sftp.fastGet()~ has been fulfilled (unless the /foo.txt/ file is\n really small!). In fact, the whole promise chain will complete and exit even\n before the ~sftp.end()~ call has been fulfilled. The correct code would be\n something like\n\n #+begin_src javascript\n sftp.connect(config)\n .then(() => {\n return sftp.fastGet('foo.txt', 'bar.txt');\n }).then(rslt => {\n console.log(rslt);\n return sftp.end();\n }).catch(e => {\n console.error(e.message);\n });\n #+end_src\n\n Note the ~return~ statements. These ensure that the Promise returned by the\n client method is returned into the promise chain. It will be this promise\n the next block in the chain will wait on to be fulfilled before the next\n block is executed. Without the return statement, that block will return the\n default promise for that block, which essentially says /this block has been\n fulfilled/. What you really want is the promise which says /your sftp client\n method call has been fulfilled/.\n\n A common symptom of this type of error is for file uploads or download to\n fail to complete or for data in those files to be truncated. What is\n happening is that the connection is being ended before the transfer has\n completed.\n\n*** Mixing Promise Chains and Async/Await\n\n Another common error is to mix Promise chains and async/await calls. This is\n rarely a great idea. While you can do this, it tends to create complicated\n and difficult to maintain code. Select one approach and stick with it. Both\n approaches are functionally equivalent, so there is no reason to mix up the\n two paradigms. My personal preference would be to use async/await as I think\n that is more /natural/ for most developers. For example, the following is\n more complex and difficult to follow than necessary (and has a bug!)\n\n #+begin_src javascript\n sftp.connect(config)\n .then(() => {\n return sftp.cwd();\n }).then(async (d) => {\n console.log(`Remote directory is ${d}`);\n try {\n await sftp.fastGet(`${d}/foo.txt`, `./bar.txt`);\n }.catch(e => {\n console.error(e.message);\n });\n }).catch(e => {\n console.error(e.message);\n }).finally(() => {\n sftp.end();\n });\n #+end_src\n\n The main bug in the above code is the ~then()~ block is not returning the\n Promise generated by the call to ~sftp.fastGet()~. What it is actually\n returning is a fulfilled promise which says the ~then()~ block has been run\n (note that the await'ed promise is not being returned and is therefore\n outside the main Promise chain). As a result, the ~finally()~ block will be\n executed before the await promise has been fulfilled.\n\n Using async/await inside the promise chain has created unnecessary\n complexity and leads to incorrect assumptions regarding how the code will\n execute. A quick glance at the code is likely to give the impression that\n execution will wait for the ~sftp.fastGet()~ call to be fulfilled before\n continuing. This is not the case. The code would be more clearly expressed\n as either\n\n #+begin_src javascript\n sftp.connect(config)\n .then(() => {\n return sftp.cwd();\n }).then(d => {\n console.log(`remote dir ${d}`);\n return sftp.fastGet(`${d}/foot.txt`, 'bar.txt');\n }).catch(e => {\n console.error(e.message);\n }).finally(() => {\n return sftp.end();\n });\n #+end_src\n\n *or, using async/await*\n\n #+begin_src javascript\n async function doSftp() {\n try {\n let sftp = await sftp.connect(conf);\n let d = await sftp.cwd();\n console.log(`remote dir is ${d}`);\n await sftp.fastGet(`${d}/foo.txt`, 'bat.txt');\n } catch (e) {\n console.error(e.message);\n } finally {\n await sftp.end();\n }\n }\n #+end_src\n\n*** Try/catch and Error Handlers\n\n Another common error is to try and use a try/catch block to catch event\n signals, such as an error event. In general, you cannot use try/catch blocks\n for asynchronous code and expect errors to be caught by the ~catch~ block.\n Handling errors in asynchronous code is one of the key reasons we now have\n the Promise and async/await frameworks.\n\n The basic problem is that the try/catch block will have completed execution\n before the asynchronous code has completed. If the asynchronous code has not\n completed, then there is a potential for it to raise an error. However, as\n the try/catch block has already completed, there is no /catch/ waiting to\n catch the error. It will bubble up and probably result in your script\n exiting with an uncaught exception error.\n\n Error events are essentially asynchronous code. You don't know when such\n events will fire. Therefore, you cannot use a try/catch block to catch such\n event errors. Even creating an error handler which then throws an exception\n won't help as the key problem is that your try/catch block has already\n executed. There are a number of alternative ways to deal with this\n situation. However, the key symptom is that you see occasional uncaught\n error exceptions that cause your script to exit abnormally despite having\n try/catch blocks in your script. What you need to do is look at your code\n and find where errors are raised asynchronously and use an event handler or\n some other mechanism to manage any errors raised.\n\n*** Server Differences\n\n Not all SFTP servers are the same. Like most standards, the SFTP protocol\n has some level of interpretation and allows different levels of compliance.\n This means there can be differences in behaviour between different servers\n and code which works with one server will not work the same with another.\n For example, the value returned by /realpath/ for non-existent objects can\n differ significantly. Some servers will throw an error for a particular\n operation while others will just return null, some servers support\n concurrent operations (such as used by fastGet/fastPut) while others will\n not and of course, the text of error messages can vary significantly. In\n particular, we have noticed significant differences across different\n platforms. It is therefore advisable to do comprehensive testing when the\n SFTP server is moved to a new platform. This includes moving from to a cloud\n based service even if the underlying platform remains the same. I have\n noticed that some cloud platforms can generate unexpected events, possibly\n related to additional functionality or features associated with the cloud\n implementation. For example, it appears SFTP servers running under Azure\n will generate an error event when the connection is closed even when the\n client has requested the connection be terminated. The same SFTP server\n running natively on Windows does not appear to exhibit such behaviour.\n\n*** Avoid Concurrent Operations\n\n Technically, SFTP should be able to perform multiple operations\n concurrently. As node is single threaded, what we a really talking about is\n running multiple execution contexts as a pool where node will switch\n contexts when each context is blocked due to things like waiting on network\n data etc. However, I have found this to be extremely unreliable and of very\n little benefit from a performance perspective. My recommendation is to\n therefore avoid executing multiple requests over the same connection in\n parallel (for example, generating multiple ~get()~ promises and using\n something like ~Promise.all()~ to resolve them.\n\n If you are going to try and perform concurrent operations, you need to test\n extensively and ensure you are using data which is large enough that context\n switching does occur (i.e. the request is not completed in a single run).\n Some SFTP servers will handle concurrent operations better than others.\n\n** Debugging Support\n\nYou can add a ~debug~ property to the config object passed in to ~connect()~ to\nturn on debugging. This will generate quite a lot of output. The value of the\nproperty should be a function which accepts a single string argument. For example;\n\n#+begin_src javascript\n config.debug = msg => {\n console.error(msg);\n };\n\n#+end_src\n\nEnabling debugging can generate a lot of output. If you use console.error() as\nthe output (as in the example above), you can redirect the output to a file\nusing shell redirection e.g.\n\n#+begin_src shell\n node script.js 2> debug.log\n\n#+end_src\n\nIf you just want to see debug messages from ~ssh2-sftp-client~ and exclude debug\nmessages from the underlying ~ssh2~ and ~ssh2-streams~ modules, you can filter\nbased on messages which start with 'CLIENT' e.g.\n\n#+begin_src javascript\n {\n debug: (msg) => {\n if (msg.startsWith('CLIENT')) {\n console.error(msg);\n }\n }\n }\n#+end_src\n* Logging Issues\n\nPlease log an issue for all bugs, questions, feature and enhancement\nrequests. Please ensure you include the module version, node version and\nplatform.\n\nI am happy to try and help diagnose and fix any issues you encounter while using\nthe ~ssh2-sftp-client~ module. However, I will only put in effort if you are\nprepared to put in the effort to provide the information necessary to reproduce\nthe issue. Things which will help\n\n- Node version you are using\n- Version of ssh2-sftp-client you are using\n- Platform your client is running on (Linux, macOS, Windows)\n- Platform and software for the remote SFTP server when possible\n- Example of your code or a minimal script which reproduces the issue you are\n encountering. By far, the most common issue is incorrect use of the module\n API. Example code can usually result in such issues being resolved very\n quickly.\n\nPerhaps the best assistance is a minimal reproducible example of the issue. Once\nthe issue can be readily reproduced, it can usually be fixed very quickly.\n\n* Pull Requests \n\nPull requests are always welcomed. However, please ensure your changes pass all\ntests and if you're adding a new feature, that tests for that feature are\nincluded. Likewise, for new features or enhancements, please include any\nrelevant documentation updates.\n\n*Note*: The =README.md= file is generated from the =README.org= file. Therefore,\nany documentation updates or fixes need to be made to the =README.org= file.\nThis file is /tangled/ using =Emacs= org mode. If you don't use Emacs or\norg-mode, don't be too concerned. The org-mode syntax is straight-forward and\nsimilar to /markdown/. I will verify any updates to =README.org= and generate a\nnew =README.md= when necessary. The main point to note is that any changes made\ndirectly to =README.md= will not persist and will be lost when a new version is\ngenerated, so don't modify that file. \n\nThis module will adopt a standard semantic versioning policy. Please indicate in\nyour pull request what level of change it represents i.e.\n\n- Major :: Change to API or major change in functionality which will require an\n increase in major version number.\n- Minor :: Minor change, enhancement or new feature which does not change\n existing API and will not break existing client code.\n- Bug Fix :: No change to functionality or features. Simple fix of an existing\n bug.\n\n* Contributors\n\nThis module was initially written by jyu213. On August 23rd, 2019, theophilusx\ntook over responsibility for maintaining this module. A number of other people\nhave contributed to this module, but until now, this was not tracked. My\nintention is to credit anyone who contributes going forward.\n\nThanks to the following for their contributions -\n\n- jyu213 :: Original author\n- theophilusx :: Current maintainer\n- henrytk :: Documentation fix\n- waldyrious :: Documentation fixes\n- james-pellow :: Cleanup and fix for connect method logic\n- jhorbulyk :: Contributed posixRename() functionality\n- teenangst :: Contributed fix for error code 4 in stat() method\n- kennylbj :: Contributed example of using a throttle stream to limit\n upload/download bandwidth.\n- anton-erofeev :: Documentation fix\n- Ladislav Jacho :: Contributed solution explanation for connections hanging\n when transferring larger files.\n- Emma Milner :: Contributed fix for put() bug\n- Witni Davis :: Contributed PR to fix put() RCE when using 'finish' rather than\n 'close' to resolve promise\n- Maik Marschner :: Contributed fix for connect() not returning sftp object.\n Also included test to check for this regression in future.\n- cakemasher :: Contributed fix for removeTempListeners().\n \n", "readme_type": "text", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "nodkz/conf-talks", "link": "https://github.com/nodkz/conf-talks", "tags": ["graphql"], "stars": 672, "description": "GraphQL \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c \u2014 \u0437\u0434\u0435\u0441\u044c \u043c\u043d\u043e\u0433\u043e \u0441\u0442\u0430\u0442\u0435\u0439 \u0438 \u0432\u0438\u0434\u0435\u043e \u043e\u0431 \u044d\u0442\u043e\u0439 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438.", "lang": "JavaScript", "repo_lang": "", "readme": "# In this turnip, my articles and presentations about GraphQL\n\nPS. A bunch of spelling and grammatical errors is the norm for me. I warned you, so stay strong. But you can help correct the mistake - click the \"Edit\" button and send a Pull Request with edits. Thank you.\n\n## Articles\n\n### GraphQL\n\n- [GraphQL types](./articles/graphql/types)\n- [GraphQL schema](./articles/graphql/schema)\n- [Ways to build GraphQL schemas](./articles/graphql/schema-build-ways)\n- [GraphQL server](./articles/graphql/server)\n- [Authentication and Authorization](./articles/graphql/auth)\n- [Working with files](./articles/graphql/fileUploads)\n- [i18n - internationalization in GraphQL](./articles/graphql/i18n)\n- [How to deal with errors in GraphQL?](./articles/graphql/errors)\n- [DataLoader - correctly solve the problem of N + 1 requests] (./articles/graphql/dataloader)\n- **PRO:** [GraphQL schema design - making API convenient, avoiding pain and suffering](./articles/graphql/schema-design) \ud83c\udf36\ud83c\udf36\ud83c\udf36\n- [GraphQL on frontend](./articles/graphql/clients)\n- [Why does graphql have a problem with N+1](./articles/graphql/dataloader/N+1.md)\n- [What is Node Interface?](./articles/graphql/schema-design/NodeInterface.md)\n\n### Other\n\n- [GraphQL or No-GraphQL [EN] - a good article about the pros and cons of GraphQL](https://levelup.gitconnected.com/graphql-or-no-graphql-395c80edc3d)\n- [Swagger - last century](./articles/swagger)\n- [Redux - boilerplate](./articles/redux)\n- [Difference in `graphql-compose` and `Prisma` approaches](./articles/graphql-compose/graphql-compose-vs-prisma.md)\n\n## Upcoming performances (planned)\n\n- April 18, 2022, Online, [HolyJS](https://holyjs.ru/en/)\n## Past events\n\n- November 2, 2021, Online, [HolyJS](https://holyjs-moscow.ru/en/)\n- September 25, 2021, Online, [404fest](https://2021.404fest.ru/)\n- July 12, 2021, Online, [Podlodka Frontend Crew, season #2](https://podlodka.io/)\n- April 20-23, 2021, Online, [HolyJS](https://holyjs-piter.ru/2021/spb/talks/2p1h40vvmegpfqutj8ji4h/)\n- April 4, 2021, Online, [Podlodka Backend Crew Season #1](https://podlodka.io/)\n- 2November 5-28, 2020, Online, [HolyJS](https://holyjs-moscow.ru/2020/msk/talks/5xx2i0vcleyeatztadt6ap/)\n- June 24, 2020, St. Petersburg, [HolyJS online](https://holyjs-piter.ru/2020/spb/talks/26ewxf0eetneqysa49i6sh/)\n- May 19, 2020, Online, [Hard morning with HolyJS #2](https://www.youtube.com/watch?v=ZIE2_c6MRZ0)\n- February 29, 2020, Moscow, [Ya\u2764\ufe0fFrontend](https://yandex.ru/promo/yandex4developers/yalovefrontend2020#form)\n- December 7, 2019, Krasnodar, [GDG Krasnodar DevFest 2019](https://www.meetup.com/gdgkrasnodar/events/264023548/)\n- November 8-9, 2019, Moscow, [HolyJS](https://holyjs-moscow.ru/people/5sspmntbo4kaeioeywg86m/)\n- October 5-6, 2019, Kharkiv, [KharkivJS](https://kharkivjs.org/) \n- August 24, St. Petersburg, [TechTrain](https://techtrain.ru/2019/talks/16mjji8u09ybzcd9ecpgna/)\n- June 29, 2019, Almaty, [AlmatyJS](https://almatyjs.timepad.ru/event/996360/)\n- June 15, 2019, Nur-Sultan, [AstanaJS](https://astanajs.timepad.ru/event/978851/)\n- May 28, 2019, Moscow, Skolkovo, [BackendConf (RIT++)](https://backendconf.ru/moscow-rit/2019/abstracts/4874)\n- May 27, 2019, Moscow, Skolkovo, [FrontendConf (RIT++)](https://frontendconf.ru/moscow-rit/2019/abstracts/5127)\n- May 24, 2019, St. Petersburg, [HolyJS](https://holyjs-piter.ru/talks/5aijmcmhxyojks5vdbf5ct/)\n- May 12, 2019, Kyiv, [YouTube stream recording: Dawn of GraphQL](https://youtu.be/jd3BpKv7LZ8), Zlit Tech, InLight Studio\n- May 11, 2019, Kyiv, Workshop [Apollo-client with fragments and static analysis](https://zlit.events/dawn-of-the-graphql/the-first-flight-of-apollo), Wix Office ([ photo](https://photos.app.goo.gl/uYY1Fn6qoTMyqaA57)\n- March 23, 2019, Minsk, [workshop in the SPACE event space](https://vk.com/@-178787432-varim-graphql-klient-so-staticheskim-analizom) ([photo](https://www .facebook.com/pg/MinskJS/photos/?tab=album&album_id=2017956155174105\n), [repo](https://github.com/nodkz/graphql-workshop-by))\n- February 16, 2019, Nizhny Novgorod, [GraphQL meetup](https://career.orioninc.ru/meetups/b01da9a8-898b-421b-8b43-7d27a827ff66) from Mera.ru\n- January 26, 2019, St. Petersburg, [GraphQL workshop](https://graphql-course.ru/) \u2013 server, client and static analysis ([repo](https://github.com/nodkz/graphql-workshop -ru))\n- January 24, 2019, St. Petersburg, [GraphQL meetup](https://habr.com/ru/company/wrike/blog/438124/) in Wrike\n- November 27, 2018, Moscow, [Moscow GraphQL Meetup](https://habr.com/en/post/430626/)\n- November 24, 2018, Moscow, [HolyJS 2018](https://2018.holyjs-moscow.ru/talks/5ulreiooe80eao6qwwkyyi/)\n\n## Video of my performances\n\n### Which projects should use GraphQL and which should not?, July 12, 2021, Podlodka Frontend Crew, season #2\n\nGraphQL is a tool, not a silver bullet. And each tool is convenient for its category of tasks.\n\nGraphQL is needed if:\n- models are constantly evolving and the number of fields is growing;\n- there is an interaction between the backend and the frontend, which is supposed to have a state manager;\n- you need static typing on the frontend according to the server data scheme;\n- if there are many different entities (models), there are many connections between them and the client needs their aggregation (a la LEFT JOIN) and preferably in one http request.\n\nGraphQL is not needed if:\n- work is being done with files or other binary data;\n- authentication, oidc and/or oauth2;\n- CRDT and multi-user editing;\n- there is an active server-to-server communication that is demanding on speed, memory and/or traffic.\n\nDuration 92 minutes.\n\n\"Which\n\n### Round table: Protocol features, April 4, 2021, Podlodka Backend Crew, season #1\n\nWe discuss the applicability of the JSON-RPC, GraphQL, gRPC protocols. Their strengths and weaknesses.\n\nDuration 87 minutes.\n\n\"Roundtable:\n\n### Roarmicrofrontend integration, module federation, Webpack 5, HolyJS 2020, Online\n\nI'm talking about module federation in Webpack 5, about a new technology for the microfrontend industry. It allows you to import into your application any external module / component from somewhere on another server deployed separately assembled by webpack application. In simple words, for business, different teams develop pieces of applications and deploy them separately, and the final assembly of the application takes place in the user's browser.\n[Link to presentation](http://bit.ly/module-federation).\n\nDuration 73 minutes.\n\n\"Revolution\n\n### Wrapping an existing REST API in GraphQL (methodology for 1000000 rubles), HolyJS 2020, Online\n\nIs it really possible to wrap the REST API in GraphQL? And how to do R&D for this technology? Usually it is customary to run a technology on TodoMVC - I did just that. In the report, I analyzed Entity, relations between types (drawn an analogy with LEFT JOIN), solved the problems of N + 1, QueryCost and Authentication. And I calculated how long it would take to develop such a GraphQL proxy.\n[Link to presentation](http://bit.ly/rest2graphql).\n\nDuration 74 minutes.\n\n\"Wrapping\n\n### ApolloClient 3 - say goodbye to Redux, REST API and Relay (I \ud83d\udc9b Frontend 2020, Moscow 2020)\n\nThe report deals with the current sores of the REST API and Redux; how with GraphQL the Developer Experience for developers rises to a completely new level; what's new and good in ApolloClient 3.\n[Link to presentation](http://bit.ly/apollo-client-3).\n\nDuration 49 minutes.\n\n\"ApolloClient\n\n### GraphQL and how the academic environment idolizes it (HolyJS Moscow 2019)\n\n\u201cgrey\u201d scientific papers began to appear in the academic environment, which painfully describe the possibilities of GraphQL: \"We'll show that GraphQL can reduce the size of the JSON documents returned by REST APIs in 94% (in number of fields) and in 99 % (in number of bytes), both median results\". GraphQL is certainly good, but not that good. [Link to presentation](http://bit.ly/fragment-model#/10).\n\nDuration 11 minutes.\n\n\"GraphQL\n\n### GraphQL fragments on the client: History of appearance, usage errors (HolyJS Moscow 2019)\n\nThe report will discuss the following approaches: JSON Models (hard manual labor), Type Models (similar to generating models from Swagger), Response Models (ApolloClient approach), Fragment Models (Relay approach). The speaker will also share common front-end mistakes that are made when working with GraphQL fragments. [Link to presentation](http://bit.ly/fragment-model). Feedback (chart , reviews).\n\nDuration 60 minutes.\n\n\"GraphQL\n\n### GraphQL: fragment model on the client (KharkivJSx10)\n\nThe GraphQL query language hascomfort fragments, but not everyone understands why exactly they are needed. Facebook works with GraphQL on clients with the so-called fragment model, which helps to scale and prevent errors even at the development stage. What kind of animal is this, we will figure it out together. [Link to presentation](http://bit.ly/graphql-fragment-model).\n\nDuration 57 minutes.\n\n\"GraphQL:\n\n### Forming a picture of the GraphQL world (TechTrain 2019)\n\nThe report is aimed at beginners and skeptics, both back-enders and front-enders. I describe and show what GraphQL is in simple words. I tell you what parts the GraphQL server consists of. What is he responsible for, and what will the backender have to implement on its own. I show several ways how you can request data from a GraphQL server. I tell you why we need fancy GraphQL clients. How they allow you to generate GraphQL queries at the development stage without errors. How they allow you to send requests to the server, cache responses and work with data. [Link to presentation](http://bit.ly/techtrain-graphql).\n\nDuration 45 minutes.\n\n\"Generating\n\n### GraphQL Schema Design - Building Schemas Correctly (Version 2) (Backend Conf 2019, RIT++)\n\nGraphQL schema can turn into a headache and a lot of additional code for developers. Therefore, the more convenient the scheme, the faster, easier and with fewer errors your client applications will be developed. [These rules](https://github.com/nodkz/conf-talks/tree/master/articles/graphql/schema-design) allow you to develop a convention for your backend developers. [Link to presentation](http://bit.ly/rit-graphql-design).\n\nDuration 49 minutes.\n\n\"GraphQL\n\n### ApolloClient or Relay with fragments, hairy GraphQL (HolyJS Piter 2019)\n\nComparing architecture of ApolloClient and Relay. I analyze the fragmented approach, in which requests are collected from the bottom up. I explain that a good GraphQL is a \u201chairy\u201d GraphQL that has many connections. And if there are few connections, then this is already RestQL and it is almost impossible to use a fragment approach with it. [Link to presentation](http://bit.ly/piter-graphql-client).\n\nPerformance feedback: chart, reviews.\n\nDuration 58 minutes.\n\n\"ApolloClient\n\n### 5 approaches to building GraphQL schemas (Kyiv 2019, Zlit Tech)\n\nLet's analyze what a GraphQL server is and what parts it consists of. Let's dwell on the description of the GraphQL schema. Consider 5 approaches to building schemas using: graphql, graphql-tools, graphql-compose, type-graphql, nexus. Let's compare the approaches with each other, understand the strengths and weaknesses of each of them. [Article and code](https://github.com/nodkz/conf-talks/tree/master/articles/graphql/schema-build-ways) allows you to develop a convention for your backend developers. [Link to presentation](http://bit.ly/kyiv-graphql).\n\nDuration 49 minutes.\n\n\"5\n\n### Designand GraphQL schema design patterns (Piter GraphQL Meetup 2019, Wrike)\n\nI talk about the rules that must be used when building GraphQL schemas. I explain the situations in which they allow you to avoid reworking the circuits in the future. [These rules](https://github.com/nodkz/conf-talks/tree/master/articles/graphql/schema-design) allow you to develop a convention for your backend developers. [Link to presentation](http://bit.ly/piter-graphql-meetup).\n\nDuration 52 minutes.\n\n\"GraphQL\n\n### Building a GraphQL server (HolyJS Moscow 2018)\n\nI\u2019m talking about what packages the GraphQL server consists of, what ways to build a schema in NodeJS exist in 2018. I analyze in detail how to organize Authorizations and how to use the DataLoader correctly (to solve the N + 1 Problem). The report was well appreciated (chart< /a>, reviews ), because it touches and covers the most basic problems of GraphQL. [Link to presentation](http://bit.ly/holy-graphql).\n\n\"Building\n\n### How to deal with errors in GraphQL (GraphQL Moscow Meetup at Rambler 2018)\n\nI tell you in detail about how to work with errors in GraphQL. And how can you wind up Union-types in order to return custom errors. The video starts at 28 minutes.\n\n\"How\n\n### How to work with internationalization (i18n) in GraphQL (GraphQL Moscow Meetup at Rambler 2018)\n\nI\u2019m talking about how it is most convenient for front-end developers to fasten internationalization in your GraphQL api. The report starts at 1:59:00.\n\n\"How\n\n### GraphQL - we conclude a profitable contract between the server and the client (HolyJS Moscow 2017)\n\nIntroduction to GraphQL. We analyze static analysis with GraphQL on the client side, GraphQL problems.\n\n\"GraphQL\n\n### React, Relay and GraphQL are quite a normal component approach (FrontTalks, Yekaterinburg 2016)\n\nIntroduction to GraphQL, component approach and Relay.\n\n\"React,\n\n### Backend, Frontend - everything is mixed up. Sightseeing tour into the future of web development (FrontendFellows, Almaty 2016)\n\nMy very first report. I recommend skipping the first 10 minutes blah blah blah.\n\n\"Backend,\n\n## Translations\n\n### GraphQL: The Documentary (Russian version)\n\nAs part of HolyJS 2019Moscow participated in the translation of the film.\n\nLee Byron, Dan Schafer and Nick Schrock (Creators of GraphQL) and other well-known members of the #GraphQL community, \"GraphQL: The Documentary\" tells the story of the emergence of GraphQL, its impact on the entire web development industry and on such technology giants as Facebook, Twitter, Airbnb and Github.\n\n\"GraphQL:", "readme_type": "markdown", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "ireaderlab/zkdash", "link": "https://github.com/ireaderlab/zkdash", "tags": ["zookeeper", "qconf", "dashboard"], "stars": 672, "description": "A dashboard for zookeeper and Qconf", "lang": "JavaScript", "repo_lang": "", "readme": "# zkdash\n\nzkdash\u662f\u4e00\u4e2azookeeper\u7684\u7ba1\u7406\u754c\u9762\uff0c\u4e5f\u53ef\u4ee5\u4f5c\u4e3a\u4efb\u4f55\u57fa\u4e8ezookeeper\u7684\u914d\u7f6e\u7ba1\u7406\u9879\u76ee\u6bd4\u5982\uff1aQconf\n\n## \u5f00\u53d1\u89c4\u5212\n\nzkdash\u76ee\u524d\u6b63\u5728\u5f00\u53d1\u7b2c\u4e8c\u7248\u672c\uff0c\u66f4\u6613\u7528\uff0c\u66f4\u5f00\u53d1\uff0c\u62e5\u6709\u5b8c\u5584\u6743\u9650\u7ba1\u7406\uff0c\u652f\u6301zk\uff0c\u66f4\u6613\u7528\u3002\n\u7b2c\u4e8c\u7248\u5df2\u7ecf\u5728\u7740\u624b\u5f00\u6e90\u76f8\u5173\u5de5\u4f5c\uff0c\u4f1a\u6253\u9020\u4e00\u4e2a\u57fa\u4e8e\u914d\u7f6e\u4e2d\u5fc3\uff0c\u670d\u52a1\u53d1\u73b0\uff0cCICD\uff0cCMDB\u4e00\u4f53\u5316\u7684\u5fae\u670d\u52a1\u7ba1\u7406\u5e73\u53f0\u3002\n\n### zkdash\u9875\u9762\u5c55\u793a\n\n![zkdash_conf](docs/images/zkdash_conf.jpg)\n\n![zkdash_search](docs/images/zkdash_search.jpg)\n\n![zkdash_snapshot](docs/images/zkdash_snapshot.jpg)\n\n![zkdash_zookeeper](docs/images/zkdash_zookeeper.jpg)\n\n\n### \u5b89\u88c5\u4e0e\u8fd0\u884c\n\u5b89\u88c5\u6b65\u9aa4\n\n - \u5b89\u88c5\u5e76\u8fd0\u884cmysql\n \n - \u5b89\u88c5python2.7, \u7248\u672c\u6700\u597d >= 2.7.6\n\n - \u4e0b\u8f7dzkdash `git clone https://github.com/ireaderlab/zkdash.git`\n\n - \u5b89\u88c5\u4f9d\u8d56\u9879\n\t\n\t```\n cd zkdash\n pip install -r requirements.txt\n ```\n\n - \u8bbe\u7f6e\u914d\u7f6e\u6587\u4ef6\n \n \t\u6839\u636e\u9700\u8981\u4fee\u6539\u5f53\u524d\u76ee\u5f55\u4e0b./conf/conf.yml\u4e2d\u76f8\u5173\u914d\u7f6e\u4fe1\u606f\uff0c\u914d\u7f6e\u6587\u4ef6\u8be6\u7ec6\u8bf4\u660e\u89c1\u540e\u9762\n\n - \u540c\u6b65\u6570\u636e\u5e93\u8868\u7ed3\u6784\n \u9996\u5148\u521b\u5efa\u6570\u636e\u5e93zkdash\uff0c\u5e76\u8bbe\u7f6e\u6570\u636e\u5e93\u7684\u7528\u6237\u540d\u548c\u5bc6\u7801\n \u5c06\u914d\u7f6e\u6587\u4ef6\u7684\u6570\u636e\u5e93\u7684\u7528\u6237\u540d\u548c\u5bc6\u7801\u8fdb\u884c\u4fee\u6539\n \n ```\n DATABASE:\n db: 'zkdash'\n host: '192.168.1.1' # \u4fee\u6539\u4e3a\u4f60\u7684\u6570\u636e\u5e93\u5730\u5740\n port: 3306 # \u8bbe\u7f6e\u7aef\u53e3\u53f7\n user: 'tokyo' # \u4fee\u6539\u7528\u6237\u540d\n passwd: 'tokyo!' # \u4fee\u6539\u5bc6\u7801\n ```\n \n \u8bbe\u7f6e\u5b8c\u6210\u540e\u8fdb\u884c\u521d\u59cb\u5316\u6570\u636e\u5e93\n \t\n ```\n cd zkdash\n python ./bin/syncdb.py # \u6ce8\u610f\u6267\u884c\u8def\u5f84\u5fc5\u987b\u4e3a./bin/syncdb.py\n ```\n\t\n\t\u8bf4\u660e\uff1a\u6570\u636e\u5e93\u4f7f\u7528mysql\uff0c\u521b\u5efa\u8868\u7ed3\u6784\u524d\u8bf7\u5148\u914d\u7f6e\u6570\u636e\u5e93\u8fde\u63a5\u4fe1\u606f\n\n - \u8fd0\u884c\n\n\t```\n\tcd zkdash\n\tpython init.py -port=8888\n\t```\n\t\n\t\u8bf4\u660e\uff1a\u521d\u6b21\u8fd0\u884czkdash\u65f6\u9700\u8981\u5230zookeeper\u7ba1\u7406\u83dc\u5355\u4e0b\u589e\u52a0\u76d1\u63a7\u7684zookeeper\u96c6\u7fa4ip\u4fe1\u606f\n\n\n### \u914d\u7f6e\u6587\u4ef6\u8bf4\u660e\n\n\u914d\u7f6e\u6587\u4ef6\u8be6\u7ec6\u8bf4\u660e\n\n\u6570\u636e\u5e93\u914d\u7f6e\u9879(DATABASE)\n\n - db: \u6570\u636e\u5e93\u540d\u79f0\n - host: ip\u5730\u5740\n - port: \u7aef\u53e3\u53f7\n - user: \u7528\u6237\u540d\n - passwd: \u5bc6\u7801\n\n\u5168\u5c40\u914d\u7f6e\u9879\n\n - USE_QCONF: \u662f\u5426\u901a\u8fc7QConf\u83b7\u53d6zookeeper\u6570\u636e\uff08\u4f7f\u7528\u8be5\u9879\u53ef\u4ee5\u63d0\u9ad8\u6811\u5f62\u5c55\u793a\u914d\u7f6e\u4fe1\u606f\u7684\u54cd\u5e94\u901f\u5ea6\uff09\n\n\n### \u4e0eQConf\u7684\u642d\u914d\u4f7f\u7528\n\n - \u53cd\u9988\u670d\u52a1\u5668\u5730\u5740\uff1ahttp://ip:port/api/v1/feedback\uff08Agent\u540c\u6b65\u72b6\u51b5\u67e5\u770b\u4f9d\u8d56\u6b64\u53cd\u9988\u4fe1\u606f\uff09\n\n\n### \u6ce8\u610f\u4e8b\u9879\n 1. \u65b0\u589e\u8282\u70b9\u9700\u8981\u5148\u6307\u5b9a\u7236\u8282\u70b9\uff0c\u5e76\u4e14\u53ea\u80fd\u9010\u7ea7\u589e\u52a0\n 2. \u5f53\u8bbe\u7f6e\u4f7f\u7528QConf\u83b7\u53d6zookeeper\u6570\u636e\u65f6\uff0czookeeper\u7ba1\u7406\u83dc\u5355\u4e0b\u7684zookeeper\u96c6\u7fa4\u540d\u79f0\u9700\u8981\u4e0eQConf\n \u5ba2\u6237\u7aefAgent\u914d\u7f6e\u6587\u4ef6\u7684idc\u540d\u79f0\u4e00\u81f4\n", "readme_type": "markdown", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "falling-sky/source", "link": "https://github.com/falling-sky/source", "tags": [], "stars": 673, "description": "Main source for falling-sky. Mostly HTML, JavaScript.", "lang": "JavaScript", "repo_lang": "", "readme": "[![Build Status](https://travis-ci.org/falling-sky/source.svg?branch=master)](https://travis-ci.org/falling-sky/source)\n\nsource\n======\n\nMain source for falling-sky. Mostly HTML, JavaScript.\n\nDepnds on Go 1.6. Newer versions *may* work but are untested at this time.\n\nDepends on \"fsbuilder\". Use `make fsbuilder` to make.\n\nReading/writing latest translations from Crowdin depends on credentials, and crowdin-cli.\nIf you're working with the cached .po files in git, building won't block on crowdin.\n\nSee the `Makefile` for what all can be set or done.\n\n\nmaintainers\n===========\n\nI've asked a couple people to step in and help with care and feeding.\n\n * Check the latest [crowdin translations](https://crowdin.com/project/falling-sky/activity_stream)\n * Spot check recent changes with Google Translate\n * Look for evil JavaScript\n * Check for any support related [issues](https://github.com/falling-sky/source/issues) filed.\n * If there are mirror updates to be made:\n * Edit `sites.json` [here](https://github.com/falling-sky/source/tree/master/sites) \n * If this is for \"Other Sites\" instead of a full mirror, specify `mirror: false`\n * If there were translations changed, and no other recent config changes, give a gratuitious kick to the [build system](https://travis-ci.org/falling-sky/source).\n * Builds take ~2 minutes\n * Builds check all mirrors, and suppress any that are unreachable\n * Builds push to the live site http://master.test-ipv6.com\n * Builds push to the distribution server \n\n", "readme_type": "markdown", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "TyCoding/tumo", "link": "https://github.com/TyCoding/tumo", "tags": [], "stars": 672, "description": ":rocket: Best Beautiful Java Blog", "lang": "JavaScript", "repo_lang": "", "readme": "#Tumo Blog\n\n> Tumo Blog is a simple and beautiful blog system based on SpringBoot2.X + Vue.js.\n\n![License](https://img.shields.io/badge/License-MIT-green) [![GitHub stars](https://img.shields.io/github/stars/TyCoding/tumo?label= Stars)](https://github.com/TyCoding/tumo/stargazers) ![SpringBoot](https://img.shields.io/badge/SpringBoot-2.3.1.RELEASE-orange)\n\n[Tumo](https://github.com/TyCoding/tumo) is a blog system based on SpringBoot2.x. [Tumo](https://github.com/TyCoding/tumo) The system has a concise and standardized code design, with the help of Vue.js and Thymeleaf to build traditional single architecture projects; at the same time, [Tumo-Vue](https: //github.com/TyCoding/tumo-vue) A system with a front-end and back-end separation architecture also came into being. The two projects are implemented with the same back-end logic, the difference is that the former uses a single architecture, while the latter uses Vue2.x to implement a front-end and back-end separation architecture. The combination of the two better helps developers get familiar with the rapid development of the SpringBoot framework and learn how the project transitions from a single architecture to a front-end and back-end separation architecture.\n\n- Online preview: [http://tumo.tycoding.cn/](http://tumo.tycoding.cn/)\n- Background address: [http://tumo.tycoding.cn/login](http://tumo.tycoding.cn/login)\n- Development documentation: [http://docs.tumo.tycoding.cn/#/](http://docs.tumo.tycoding.cn/#/)\n\n## Vue version\n\nOn the basis of the back-end project of this blog, a Vue-based single-page version has been developed, which is the best practice for you **transition from a single architecture to a front-end and back-end separation architecture**.\n\nProject source code: [https://github.com/TyCoding/tumo-vue](https://github.com/TyCoding/tumo-vue) I hope everyone will support star and fork.\n\n## Technology Selection\n\n| Name | Version | Env | Version |\n| -- | -- | -- | -- |\n| Spring Boot | 2.3.1.RELEASE | JDK | 1.8 |\n| Mybatis | 2.1.3 | MySQL | 5.7 |\n| Spring-Shiro | 1.5.2 | IDEA | 2020.1 |\n\n## Documentation\n\nTeach you the actual combat of SpringBoot projects.\n\nPlease move to project development and use documents: [http://docs.tumo.tycoding.cn](http://docs.tumo.tycoding.cn)\n\n\nThe document will be published on my official account **Programmer Tu Mo** as soon as possible, please continue to pay attention!\n\n| Programmer Tu Mo |\n| -------------------------------------------------- ---------- |\n| ![qrcode_for_gh](http://tycoding.cn/imgs/20200610184737.jpg) |\n\n## please drink juice\n\n| Alipay | WechatPay |\n| -------------------------------------------------- --------- | ---------------------------------------- ------------------ |\n| ![alipay_258px](http://tycoding.cn/imgs/20200610132929.png) | ![wechat_258px](http://tycoding.cn/imgs/20200610132940.png) |\n\n## preview\n\n![Screenshot 2020-06-30 am 10.15.37](http://tycoding.cn/imgs/20200630101539.png)\n\n![Screenshot 2020-06-30 am 10.15.53](http://tycoding.cn/imgs/20200630101555.png)\n\n![Screenshot 2020-06-30 am 10.16.22](http://tycoding.cn/imgs/20200630101625.png)\n\n![Screenshot 2020-06-30 am 10.16.36](http://tycoding.cn/imgs/20200630101638.png)\n\n![Screenshot 2020-06-30 am 10.16.53](http://tycoding.cn/imgs/20200630101655.png)\n\n![Screenshot 2020-06-30 am 10.17.53](http://tycoding.cn/imgs/20200630101800.png)\n\n![Screenshot 2020-06-30 am 10.18.11](http://tycoding.cn/imgs/20200630101813.png)\n\n![Screenshot 2020-06-30 am 10.18.23](http://tycoding.cn/imgs/20200630101825.png)\n\n![Screenshot 2020-06-30 am 10.18.38](http://tycoding.cn/imgs/20200630101840.png)\n\n![Screenshot 2020-06-30 am 10.18.50](http://tycoding.cn/imgs/20200630101852.png)\n\n![Screenshot 2020-06-30 am 10.19.31](http://tycoding.cn/imgs/20200630101934.png)\n\n![Screenshot 2020-06-30 am 10.19.46](http://tycoding.cn/imgs/20200630101948.png)\n\n![Screenshot 2020-06-30 am 10.19.58](http://tycoding.cn/imgs/20200630102000.png)\n\n![Screenshot 2020-06-30 am 10.20.43](http://tycoding.cn/imgs/20200630102045.png)\n\n\n## comminicate\n\nQQGroup: 671017003\n\nWeChatGroup: Follow the official account to view\n\n## contact me\n\n- [Blog@TyCoding's blog](http://www.tycoding.cn)\n\n- [GitHub@TyCoding](https://github.com/TyCoding)", "readme_type": "markdown", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "rafaelw/mutation-summary", "link": "https://github.com/rafaelw/mutation-summary", "tags": [], "stars": 672, "description": "A JavaScript library that makes observing changes to the DOM easy", "lang": "JavaScript", "repo_lang": "", "readme": "# What is this? #\n\nMutation Summary is a JavaScript library that makes observing changes to the DOM fast, easy and safe.\n\nIt's built on top of (and requires) a new browser API called [DOM Mutation Observers](http://dom.spec.whatwg.org/#mutation-observers).\n\n * [Browsers which currently implement DOM Mutation Observers](DOMMutationObservers.md#browser-availability).\n * [DOM Mutation Observers API and its relationship to this library and (the deprecated) DOM Mutation Events](DOMMutationObservers.md).\n\n\n\n# Why do I need it? #\n\nMutation Summary does five main things for you:\n\n * **It tells you how the document is different now from how it was.** As its name suggests, it summarizes what\u2019s happened. It\u2019s as if it takes a picture of the document when you first create it, and then again after each time it calls you back. When things have changed, it calls you with a concise description of exactly what\u2019s different now from the last picture it took for you.\n * **It handles any and all changes, no matter how complex.** All kinds of things can happen to the DOM: values can change and but put back to what they were, large parts can be pulled out, changed, rearranged, put back. Mutation Summary can take any crazy thing you throw at it. Go ahead, tear the document to shreds, Mutation Summary won\u2019t even blink.\n * **It lets you express what kinds of things you\u2019re interested in.** It presents a query API that lets you tell it exactly what kinds of changes you\u2019re interested in. This includes support for simple CSS-like selector descriptions of elements you care about.\n * **It\u2019s fast.** The time and memory it takes is dependant on number of changes that occurred (which typically involves only a few nodes) -- not the size of your document (which is commonly thousands of nodes).\n * **It can automatically ignore changes you make during your callback.** Mutation Summary is going to call you back when changes have occurred. If you need to react to those changes by making more changes -- won\u2019t you hear about those changes the next time it calls you back? Not unless you [ask for that](APIReference.md#configuration-options). By default, it stops watching the document immediately before it calls you back and resumes watching as soon as your callback finishes.\n\n# What is it useful for? #\n\nLots of things, here are some examples:\n\n * **Browser extensions.** Want to make a browser extension that creates a link to your mapping application whenever an address appears in a page? You\u2019ll need to know when those addresses appear (and disappear).\n * **Implement missing HTML capabilities.** Think building web apps is too darn hard and you know what\u2019s missing from HTML that would make it a snap? Writing the code for the desired behavior is only half the battle--you\u2019ll also need to know when those elements and attributes show up and what happens to them. In fact, there\u2019s already two widely used classes of libraries which do exactly this, but don\u2019t currently have a good way to observe changes to the DOM.\n * **UI Widget** libraries, e.g. Dojo Widgets\n * **Templating** and/or **Databinding** libraries, e.g. Angular or KnockoutJS\n * **Text Editors.** HTML Text editors often want to observe what\u2019s being input and \u201cfix it up\u201d so that they can maintain a consistent WYSWIG UI.\n\n# What is this _not_ useful for? #\n\nThe intent here isn't to be all things to all use-cases. Mutation Summary is not meant to:\n\n * **Use the DOM as some sort of state-transition machine.** It won't report transient states that the DOM moved through. It will only tell you what the difference is between the previous state and the present one.\n * **Observing complex selectors.** It offers support for a simple [subset of CSS selectors](APIReference.md#supported-selector-syntax). Want to observe all elements that match `\u201cdiv[foo] span.bar > p:first-child\u201d`? Unfortunately, efficiently computing that is much harder and currently outside the scope of this library.\n\nNote that both of the above use cases are possible given the data that the underlying Mutation Observers API provides -- we simply judged them to be outside the \"80% use case\" that we targeted with this particular library.\n\n# Where can Mutation Summary be used? #\n\nThe Mutation Summary library depends on the presence of the Mutation Observer DOM API. Mutation Observers are available in\n\n * [Google Chrome](https://www.google.com/chrome)\n * [Firefox](http://www.mozilla.org/en-US/firefox/new/) \n * [Safari](http://www.apple.com/safari/)\n * [Opera](http://www.opera.com/)\n * [IE11](http://www.microsoft.com/ie)\n\nMutation Observers is the work of the [W3C WebApps working group](http://www.w3.org/2008/webapps/). In the future it will be implemented in other browsers (we\u2019ll keep the above list of supporting browsers as up-to-date as possible).\n\n# Great. I want to get started. What\u2019s next? #\n\n * Check out the [tutorial](Tutorial.md) and the [API reference](APIReference.md).\n\n# Google groups discussion list #\n\n * [mutation-summary-discuss@googlegroups.com](https://groups.google.com/group/mutation-summary-discuss)\n", "readme_type": "markdown", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "moreartyjs/moreartyjs", "link": "https://github.com/moreartyjs/moreartyjs", "tags": [], "stars": 672, "description": "Morearty.js - centralized state management for React in pure JavaScript", "lang": "JavaScript", "repo_lang": "", "readme": "[npm-url]: https://npmjs.org/package/morearty\n[npm-image]: http://img.shields.io/npm/v/morearty.svg?style=flat\n\n# Morearty.js\n[![NPM version][npm-image]][npm-url] [![Build Status](https://travis-ci.org/moreartyjs/moreartyjs.svg?branch=master)](https://travis-ci.org/moreartyjs/moreartyjs) [![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/moreartyjs/moreartyjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n[![devDependency Status](https://david-dm.org/moreartyjs/moreartyjs/dev-status.svg)](https://david-dm.org/moreartyjs/moreartyjs#info=devDependencies)\n\n* [Introduction](#introduction)\n* [Download](#download)\n* [Dependencies](#dependencies)\n* [Current status](#current-status)\n* [Documentation](#documentation)\n* [Usage](#usage)\n* [TodoMVC](#todomvc)\n * [App component](#app-component)\n * [Header component](#header-component)\n * [TodoList component](#todolist-component)\n * [TodoItem component](#todoitem-component)\n * [Footer component](#footer-component)\n * [Starting the application](#starting-the-application)\n * [Principal differences from raw React](#principal-differences-from-raw-react)\n* [Flux implementation](#flux-implementation)\n* [React Native support](#react-native-support)\n* [Care to help?](#care-to-help)\n * [Building Morearty](#building-morearty)\n* [Credits](#credits)\n\n# Introduction\n\n**Morearty.js** is a thin layer on top of [React](http://facebook.github.io/react/index.html) (implemented as a mixin) providing better state management facilities in the manner of [Om](https://github.com/swannodette/om) but written in pure JavaScript.\n\nUnderneath, Morearty leverages immutable data structures, provided by Facebook's [Immutable](https://github.com/facebook/immutable-js) library, which hold the state of an application. That state is described by a single [Binding](https://rawgit.com/moreartyjs/moreartyjs/master/doc/Binding.html) object and all state transitions are performed through it. When an application component needs to delegate a part of its state to a sub-component, it can create a [sub-binding](https://rawgit.com/moreartyjs/moreartyjs/master/doc/Binding.html#sub) which points to a nested location within the global state and is fully synchronized with the original binding. This way every component knows only what it should know and the entire state is effectively encapsulated. Morearty detects any changes automatically and triggers re-rendering. Moreover, each component gets a correctly defined [shouldComponentUpdate](http://facebook.github.io/react/docs/component-specs.html#updating-shouldcomponentupdate) method that compares the component's state using straightforward JavaScript strict equals operator `===`. So, only the components whose state was altered are re-rendered.\n\nMorearty puts state updates in a render queue and applies them asynchronously in [requestAnimationFrame](http://www.paulirish.com/2011/requestanimationframe-for-smart-animating/) in one pass, falling back to `setTimeout` when `requestAnimationFrame` is not available. This dramatically simplifies reasoning about the application and improves performance.\n\nSee [documentation](#documentation) for more info.\n\n# Download\n\nBrowser, AMD, Node.js environments are supported. You can get [production](https://raw.githubusercontent.com/moreartyjs/moreartyjs/master/dist/morearty.min.js) or [development](https://raw.githubusercontent.com/moreartyjs/moreartyjs/master/dist/morearty.js) versions. Or just `npm install morearty`.\n\n# Dependencies\n\nMorearty requires React version 0.13 or higher ([download](http://facebook.github.io/react/downloads.html)) and Immutable 3.7 and above ([download](https://github.com/facebook/immutable-js/releases)). **Both should be available as global variables with names `React` and `Immutable` unless you're using NPM.** Require.js users can do something like:\n\n```javascript\nrequire.config({\n paths: {\n react: 'path/to/react',\n immutable: 'path/to/immutable'\n }\n});\n\nrequire(['react', 'immutable'], function (React, Imm) {\n window.React = React;\n window.Immutable = Imm;\n\n require(['component/Bootstrap'], function (Bootstrap) {\n React.renderComponent(\n Bootstrap(),\n document.getElementById('root')\n );\n });\n});\n```\n\n# Current status\n\n**Morearty** 0.7 series changes:\n\n* Support React 0.14 (starting from `0.7.25`).\n* React Native [support](#react-native-support) (thanks to @gilbox).\n* Support React 0.13 and Immutable 3.7.\n* Asynchronous rendering is the default, synchronous mode is no longer supported.\n* Support [cancelling](https://rawgit.com/moreartyjs/moreartyjs/master/doc/TransactionContext.html#cancel) transactions.\n* Support `this.addBindingListener(...)` in components for component lifecycle bounded listeners creation. Just listen for changes, all required cleanup is performed in `componentWillUnmount` automatically.\n* Support `renderOnce` configuration parameter useful to ensure rendering is performed only once. Other server rendering corrections.\n* `Context.bootstrap` helper method simplifying application bootstrapping.\n* Support dynamic bindings ([#36](https://github.com/moreartyjs/moreartyjs/issues/36)).\n* Support passing custom React context ([#37](https://github.com/moreartyjs/moreartyjs/issues/37)).\n* Introduced [observed bindings](https://github.com/moreartyjs/moreartyjs/wiki/Authoring-components#using-observed-bindings) and [observed props](https://github.com/moreartyjs/moreartyjs/wiki/Authoring-components#using-observed-props).\n* Support IE8. Deprecate `Binding.delete` in favor of `remove`.\n* Support `getDefaultMetaState` in components.\n\n**Morearty** 0.6 series changes:\n\n* React 0.12 and Immutable 3.0 or higher now required.\n* Introduce [bindings meta info](https://github.com/moreartyjs/moreartyjs/wiki/Binding#attaching-meta-information) that allows to store data you don't want to put in the main state, e.g. validation info, history, and so on.\n* Generate less garbage during render.\n* History module migrated on meta binding API.\n\nSee [releases page](https://github.com/moreartyjs/moreartyjs/releases) for detailed per-release changes descriptions.\n\n# Documentation\n\nSee Wiki [pages](https://github.com/moreartyjs/moreartyjs/wiki) for a thourough explanation of Morearty concepts.\n\nAuto-generated API documentation is available [here](https://rawgit.com/moreartyjs/moreartyjs/master/doc/index.html).\n\n# Usage\n\nTo start using Morearty.js add the script to the page or load it with your favorite AMD loader, e.g. [Require.js](http://requirejs.org/), and create Morearty context using [createContext](https://rawgit.com/moreartyjs/moreartyjs/master/doc/Morearty.html#createContext) method:\n\n```javascript\nvar Ctx = Morearty.createContext({\n initialState: {\n nowShowing: 'all',\n items: [{\n title: 'My first task',\n completed: false,\n editing: false\n }]\n }\n});\n```\n\nWhen you create components this way, each acquires a correctly defined `shouldComponentUpdate` method which uses that component's binding (if any) to determine if its state was changed. By default, state is transferred to sub-components in the `binding` attribute and can be retrieved using the `getDefaultBinding` method.\n\n# TodoMVC\nTo continue this introduction, [TodoMVC](http://todomvc.com/) implementation based on Morearty.js will be used ([repository](https://github.com/moreartyjs/todomvc-moreartyjs), [application](https://rawgit.com/moreartyjs/todomvc-moreartyjs/master/index.html)). You should have some previous React knowledge to follow painlessly, only Morearty-specific parts will be described.\n\n## App component\nLet's now define main application module `App`:\n\n```javascript\nvar NOW_SHOWING = Object.freeze({ ALL: 'all', ACTIVE: 'active', COMPLETED: 'completed' });\n\nvar App = React.createClass({\n displayName: 'App',\n\n mixins: [Morearty.Mixin],\n\n componentDidMount: function () {\n var binding = this.getDefaultBinding();\n Router({\n '/': binding.set.bind(binding, 'nowShowing', NOW_SHOWING.ALL),\n '/active': binding.set.bind(binding, 'nowShowing', NOW_SHOWING.ACTIVE),\n '/completed': binding.set.bind(binding, 'nowShowing', NOW_SHOWING.COMPLETED)\n }).init();\n },\n\n render: function () {\n var binding = this.getDefaultBinding();\n return (\n
\n
\n \n
\n );\n }\n});\n```\n\nNotice that `App` uses `getDefaultBinding` method to retrieve its state binding and delegate it to its children. See `getDefaultBinding` API [doc](https://rawgit.com/moreartyjs/moreartyjs/master/doc/Morearty.Mixin.html#getDefaultBinding) for the discussion of the default binding concept.\n\n## Header component\n\n```javascript\nvar Header = React.createClass({\n displayName: 'Header',\n mixins: [Morearty.Mixin],\n\n componentDidMount: function () {\n this.refs.newTodo.getDOMNode().focus(); // focus on show\n },\n\n onAddTodo: function (event) {\n var title = event.target.value;\n if (title) {\n this.getDefaultBinding().update('items', function (todos) { // add new item\n return todos.push(Immutable.Map({\n id: currentId++,\n title: title,\n completed: false,\n editing: false\n }));\n });\n event.target.value = '';\n }\n },\n\n render: function () {\n return (\n \n );\n }\n});\n```\n\nIn `onAddTodo` method component state is [updated](https://rawgit.com/moreartyjs/moreartyjs/master/doc/Binding.html#update) by appending new TODO item to the list. `render` method output custom `input` component version suitable for [rendering in requestAnimationFrame](https://github.com/moreartyjs/moreartyjs#requestanimationframe-support).\n\n## TodoList component\n\n```javascript\nvar TodoList = React.createClass({\n displayName: 'TodoList',\n\n mixins: [Morearty.Mixin],\n\n onToggleAll: function (event) {\n var completed = event.target.checked;\n this.getDefaultBinding().update('items', function (items) {\n return items.map(function (item) {\n return item.set('completed', completed);\n });\n });\n },\n\n render: function () {\n var binding = this.getDefaultBinding();\n var nowShowing = binding.get('nowShowing');\n var itemsBinding = binding.sub('items');\n var items = itemsBinding.get();\n\n var isShown = function (item) {\n switch (nowShowing) {\n case NOW_SHOWING.ALL:\n return true;\n case NOW_SHOWING.ACTIVE:\n return !item.get('completed');\n case NOW_SHOWING.COMPLETED:\n return item.get('completed');\n }\n };\n\n var renderTodo = function (item, index) {\n var itemBinding = itemsBinding.sub(index);\n return isShown(item) ? : null;\n };\n\n var allCompleted = !items.find(function (item) {\n return !item.get('completed');\n });\n\n return (\n
\n {\n items.count() ?\n :\n null\n }\n
    { items.map(renderTodo).toArray() }
\n
\n );\n }\n});\n```\n\n`onToggleAll` callback sets `completed` property on all items. Note how state is transferred to the children: only the relevant sub-state is passed using [sub](https://rawgit.com/moreartyjs/moreartyjs/master/doc/Binding.html#sub) method which creates a sub-binding pointing deeper into global state. So, TODO item can only access and modify its own cell, and the rest of application state is protected from incidental modification. [val](https://rawgit.com/moreartyjs/moreartyjs/master/doc/Binding.html#val) method allows to retrieve the value stored in the binding or in its sub-path.\n\n## TodoItem\n\n```javascript\nvar TodoItem = React.createClass({\n displayName: 'TodoItem',\n\n mixins: [Morearty.Mixin],\n\n componentDidUpdate: function () {\n var ctx = this.getMoreartyContext();\n if (ctx.isChanged(this.getDefaultBinding().sub('editing'))) {\n var node = this.refs.editField.getDOMNode();\n node.focus();\n node.setSelectionRange(0, node.value.length);\n }\n },\n\n onToggleCompleted: function (event) {\n this.getDefaultBinding().set('completed', event.target.checked);\n },\n\n onToggleEditing: function (editing) {\n this.getDefaultBinding().set('editing', editing);\n },\n\n onEnter: function (event) {\n this.getDefaultBinding().atomically()\n .set('title', event.target.value)\n .set('editing', false)\n .commit();\n },\n\n render: function () {\n var binding = this.getDefaultBinding();\n var item = binding.get();\n\n var liClass = React.addons.classSet({\n completed: item.get('completed'),\n editing: item.get('editing')\n });\n var title = item.get('title');\n\n return (\n
  • \n
    \n \n \n \n
    \n \n
  • \n );\n }\n});\n```\n\nHere component title is written to the global state using [set](https://rawgit.com/moreartyjs/moreartyjs/master/doc/Callback.html#set) helper when text in changed. To remove the item no callback needs to be passed from the parent: item component just calls Binding's [remove](https://rawgit.com/moreartyjs/moreartyjs/master/doc/Binding.html#remove) method which removes it from the list of items. In `onEnter` method transaction is used to prevent re-rendering between state transitions. It effectively notifies global listeners once on [commit](https://rawgit.com/moreartyjs/moreartyjs/master/doc/TransactionContext.html#commit).\n\n## Footer component\n\n```javascript\nvar Footer = React.createClass({\n displayName: 'Footer',\n\n mixins: [Morearty.Mixin],\n\n onClearCompleted: function () {\n this.getDefaultBinding().update('items', function (items) {\n return items.filter(function (item) {\n return !item.get('completed');\n });\n });\n },\n\n render: function () {\n var binding = this.getDefaultBinding();\n var nowShowing = binding.get('nowShowing');\n\n var items = binding.get('items');\n var completedItemsCount = items.reduce(function (acc, item) {\n return item.get('completed') ? acc + 1 : acc;\n }, 0);\n\n return (\n \n );\n }\n});\n```\n\nNothing special here so let's jump straight to...\n\n## Starting the application\n\n```javascript\n\nvar Bootstrap = Ctx.bootstrap(App); // will pass root binding to App\n\nReact.render(\n ,\n document.getElementById('root')\n);\n```\n\n`Ctx.bootstrap` method creates Morearty application bootstrap component which is then passed to React render routine.\n\n## Principal differences from raw React\n\nYou can compare this Morearty-based TodoMVC implementation to the official React [version](https://github.com/tastejs/todomvc/tree/gh-pages/architecture-examples/react). Main highlights are:\n\n* No callbacks are passed to sub-components. This becomes especially useful when you find yourself trying to transfer a callback to a component's grand-children (you may never know how your DOM may be restructured after a redesign). There is nothing inherently wrong in passing callbacks to sub-components, but in many cases this can be avoided.\n* No hacks in code simulating immutable state and other tricks (look at the comments within React version sources).\n* Reasoning about the application is much simpler!\n* Each component gets a `shouldComponentUpdate` method, no need to define it manually (but you can if you like).\n* Less code.\n\n# Flux implementation\n\n[z3tsu](https://github.com/z3tsu) provided Flux version of Todo-MVC based on [Reflux](https://github.com/spoike/refluxjs): [z3tsu/todomvc-morearty-reflux](https://github.com/z3tsu/todomvc-morearty-reflux).\n\n# React Native support\n\nStarting from version *0.7.16* running on React Native is supported:\n\n```javascript\nvar Morearty = require('morearty/native');\n```\n\n# Care to help?\n\nFeel free to [provide](https://github.com/moreartyjs/moreartyjs/issues) ideas, suggestions, enhancements, documentation improvements. Any feedback or input is highly appreciated. Morearty development is currently driven mostly by *feature requests*.\n\n## Building Morearty\n\nMorearty uses NPM scripts for building: `npm run ` where `command` is one of:\n\n* test (run tests);\n* build (run tests and build dist files);\n* doc (generate documentation).\n\n# Credits\n\n* Alexander Semenov @Tvaroh (author)\n* Marat Bektimirov @mbektimirov (collaborator)\n* Tim Griesser @tgriesser (collaborator)\n* Pavel Birukov @r00ger (collaborator)\n* Gil Birman @gilbox (collaborator)\n* Valentine Valyaeff @valff (collaborator)\n", "readme_type": "markdown", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "daleharvey/pacman", "link": "https://github.com/daleharvey/pacman", "tags": [], "stars": 672, "description": "HTML5 Pacman", "lang": "JavaScript", "repo_lang": "", "readme": "", "readme_type": "text", "hn_comments": "Direct link to Nodeler if you want to skip the blog intro:\nhttp://nodeler.com/I would like to see a pacman in svg for comparison purposes.It says:Sorry, needs a decent browser:\n(firefox 3.6+, Chrome 4+, Opera 10+ and Safari 4+)But I run \"Chromium 6.0.484.0 (54673) Ubuntu 10.04\".I feel that it would work perfectly on chromium 6, and you are a little bit too strict in your user agent check :-)pacman_util.js is missing from your tree, and I don't see anywhere mentioning what it might be,.It produces an uncaught Security error\" code: \"1000 [sic weird quotes] in Firefox when the Firefox pref dom.storage.enabled is set to false. Here's how to catch it: http://github.com/stepahn/Modernizr/commit/6ab14fff80c8e1c01...Is there a way to turn the sound off? I couldn't find a way.Is there a way to turn the sound off? I couldn't find a way.Seems to have a small bug, dead ghosts that are on their way back to the middle to be reborn can kill you while you are still able to eat the other ghosts.Cool. The ghosts aren't very intelligent. :)so the google one was what, flash?It complains in Safari 5 and the WebKit nightly build that I need a better browser.That was one of the more difficult pacman implementations I've played.", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "hail2u/node-css-mqpacker", "link": "https://github.com/hail2u/node-css-mqpacker", "tags": [], "stars": 672, "description": "Pack same CSS media query rules into one using PostCSS", "lang": "JavaScript", "repo_lang": "", "readme": "CSS MQPacker\n============\n\nPack same CSS media query rules into one using PostCSS\n\n\nSYNOPSIS\n--------\n\nA well componentized CSS file may have same media queries that can merge:\n\n```css\n.foo {\n\twidth: 240px;\n}\n\n@media screen and (min-width: 768px) {\n\t.foo {\n\t\twidth: 576px;\n\t}\n}\n\n.bar {\n\twidth: 160px;\n}\n\n@media screen and (min-width: 768px) {\n\t.bar {\n\t\twidth: 384px;\n\t}\n}\n```\n\nThis tool packs exactly same media queries:\n\n```css\n.foo {\n\twidth: 240px;\n}\n\n.bar {\n\twidth: 160px;\n}\n\n@media screen and (min-width: 768px) {\n\t.foo {\n\t\twidth: 576px;\n\t}\n\t.bar {\n\t\twidth: 384px;\n\t}\n}\n```\n\nINSTALL\n-------\n\n $ echo @hail2u:registry=https://npm.pkg.github.com >> .npmrc\n $ npm install --save-dev @hail2u/css-mqpacker\n\nIf you or your team member does not have GitHub account, you can install\ndirectly from the GitHub repository:\n\n $ npm install --save-dev github:hail2u/node-css-mqpacker#\n\n`` should be replaced with one of the [available tags][1].\n\n\nUSAGE\n-----\n\nOf course, this package can be used as PostCSS plugin:\n\n```javascript\nconst fs = require(\"fs\");\nconst postcss = require(\"postcss\");\n\npostcss([\n\trequire(\"@hail2u/css-mqpacker\")()\n]).process(fs.readFileSync(\"from.css\", \"utf8\")).then(function (result) {\n\tconsole.log(result.css);\n});\n```\n\nIt is a recommended way to use this tool.\n\n\n### As standard Node.js package\n\nThis package is also a Node.js module. For example, you can read `from.css`,\nprocess its content, and output processed CSS to STDOUT:\n\n```javascript\nconst fs = require(\"fs\");\nconst mqpacker = require(\"@hail2u/css-mqpacker\");\n\nconsole.log(mqpacker.pack(fs.readFileSync(\"from.css\", \"utf8\"), {\n\tfrom: \"from.css\",\n\tmap: {\n\t\tinline: false\n\t},\n\tto: \"to.css\"\n}).css);\n```\n\n\n### As CLI Program\n\nThis package also installs a command line interface.\n\n\n $ node ./node_modules/.bin/mqpacker --help\n Usage: mqpacker [options] INPUT [OUTPUT]\n \n Description:\n Pack same CSS media query rules into one using PostCSS\n \n Options:\n -s, --sort Sort \u201cmin-width\u201d queries.\n --sourcemap Create source map file.\n -h, --help Show this message.\n --version Print version information.\n \n Use a single dash for INPUT to read CSS from standard input.\n \n Examples:\n $ mqpacker fragmented.css\n $ mqpacker fragmented.css > packed.css\n\nWhen PostCSS failed to parse INPUT, CLI shows a CSS parse error in GNU error\nformat instead of Node.js stack trace.\n\nThe `--sort` option does not currently support a custom function.\n\n\nOPTIONS\n-------\n\n### sort\n\nBy default, CSS MQPacker pack and order media queries as they are defined ([the\n\u201cfirst win\u201d algorithm][2]). If you want to sort media queries automatically,\npass `sort: true` to this module.\n\n```javascript\npostcss([\n\tmqpacker({\n\t\tsort: true\n\t})\n]).process(css);\n```\n\nCurrently, this option only supports `min-width` queries with specific units\n(`ch`, `em`, `ex`, `px`, and `rem`). If you want to do more, you need to create\nyour own sorting function and pass it to this module like this:\n\n```javascript\npostcss([\n\tmqpacker({\n\t\tsort: function (a, b) {\n\t\t\treturn a.localeCompare(b);\n\t\t}\n\t})\n]).process(css);\n```\n\nIn this example, all your media queries will sort by A-Z order.\n\nThis sorting function is directly passed to `Array#sort()` method of an array of\nall your media queries.\n\n\nAPI\n---\n\n### pack(css[, options])\n\nPacks media queries in `css`.\n\nThe second argument is optional. The `options` are:\n\n- [options][3] mentioned above\n- the second argument of [PostCSS\u2019s `process()` method][4]\n\nYou can specify both at the same time.\n\n```javascript\nconst fs = require(\"fs\");\nconst mqpacker = require(\"@hail2u/css-mqpacker\");\n\nconst result = mqpacker.pack(fs.readFileSync(\"from.css\", \"utf8\"), {\n\tfrom: \"from.css\",\n\tmap: {\n\t\tinline: false\n\t},\n\tsort: true,\n\tto: \"to.css\"\n});\nfs.writeFileSync(\"to.css\", result.css);\nfs.writeFileSync(\"to.css.map\", result.map);\n```\n\n\nNOTES\n-----\n\nWith CSS MQPacker, the processed CSS is always valid CSS, but you and your\nwebsite user will get unexpected results. This section explains how CSS MQPacker\nworks and what you should keep in mind.\n\n\n### CSS Cascading Order\n\nCSS MQPacker changes rulesets\u2019 order. This means the processed CSS will have an\nunexpected cascading order. For example:\n\n```css\n@media (min-width: 640px) {\n\t.foo {\n\t\twidth: 300px;\n\t}\n}\n\n.foo {\n\twidth: 400px;\n}\n```\n\nBecomes:\n\n```css\n.foo {\n\twidth: 400px;\n}\n\n@media (min-width: 640px) {\n\t.foo {\n\t\twidth: 300px;\n\t}\n}\n```\n\n`.foo` is always `400px` with original CSS. With processed CSS, however, `.foo`\nis `300px` if viewport is wider than `640px`.\n\nThis does not occur on small project. However, this could occur frequently on\nlarge project. For example, if you want to override a CSS framework (like\nBootstrap) component declaration, your whole CSS code will be something similar\nto above example. To avoid this problem, you should pack only CSS you write, and\nthen concatenate with a CSS framework.\n\n\n### The \u201cFirst Win\u201d Algorithm\n\nCSS MQPacker is implemented with the \u201cfirst win\u201d algorithm. This means:\n\n```css\n.foo {\n\twidth: 10px;\n}\n\n@media (min-width: 640px) {\n\t.foo {\n\t\twidth: 150px;\n\t}\n}\n\n.bar {\n\twidth: 20px;\n}\n\n@media (min-width: 320px) {\n\t.bar {\n\t\twidth: 200px;\n\t}\n}\n\n@media (min-width: 640px) {\n\t.bar {\n\t\twidth: 300px;\n\t}\n}\n```\n\nBecomes:\n\n```css\n.foo {\n\twidth: 10px;\n}\n\n.bar {\n\twidth: 20px;\n}\n\n@media (min-width: 640px) {\n\t.foo {\n\t\twidth: 150px;\n\t}\n\t.bar {\n\t\twidth: 300px;\n\t}\n}\n\n@media (min-width: 320px) {\n\t.bar {\n\t\twidth: 200px;\n\t}\n}\n```\n\nThis breaks cascading order of `.bar`, and `.bar` will be displayed in `200px`\ninstead of `300px` even if a viewport wider than `640px`.\n\nI suggest defining a query order on top of your CSS:\n\n```css\n@media (min-width: 320px) { /* Wider than 320px */ }\n@media (min-width: 640px) { /* Wider than 640px */ }\n```\n\nIf you use simple `min-width` queries only, [the `sort` option][5] can help.\n\n\n### Multiple Classes\n\nCSS MQPacker works only with CSS. This may break CSS applying order to an\nelements that have multiple classes. For example:\n\n```css\n@media (min-width: 320px) {\n\t.foo {\n\t\twidth: 100px;\n\t}\n}\n\n@media (min-width: 640px) {\n\t.bar {\n\t\twidth: 200px;\n\t}\n}\n\n@media (min-width: 320px) {\n\t.baz {\n\t\twidth: 300px;\n\t}\n}\n```\n\nBecomes:\n\n```css\n@media (min-width: 320px) {\n\t.foo {\n\t\twidth: 100px;\n\t}\n\t.baz {\n\t\twidth: 300px;\n\t}\n}\n\n@media (min-width: 640px) {\n\t.bar {\n\t\twidth: 200px;\n\t}\n}\n```\n\nThe result looks good. However, if an HTML element has `class=\"bar baz\"` and\nviewport width larger than `640px`, that element `width` incorrectly set to\n`200px` instead of `300px`. This problem cannot be resolved only with CSS, so be\ncareful!\n\n\nLICENSE\n-------\n\nMIT\n\n\n[1]: https://github.com/hail2u/node-css-mqpacker/tags\n[2]: #the-first-win-algorithm\n[3]: #options\n[4]: http://api.postcss.org/global.html#processOptions\n[5]: #sort\n", "readme_type": "markdown", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "gopinav/React-Tutorials", "link": "https://github.com/gopinav/React-Tutorials", "tags": [], "stars": 673, "description": "Source code related to the YouTube tutorial series", "lang": "JavaScript", "repo_lang": "", "readme": "", "readme_type": "text", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "GoogleChromeLabs/estimator.dev", "link": "https://github.com/GoogleChromeLabs/estimator.dev", "tags": ["modern-javascript", "es6", "javascript"], "stars": 671, "description": "\ud83e\uddee Calculate the size and performance impact of switching to modern JavaScript syntax.", "lang": "JavaScript", "repo_lang": "", "readme": "**\u26a0\ufe0f This repo is no longer maintained. We now recommend developers use the [`legacy-javascript`](https://github.com/GoogleChrome/lighthouse/pull/10303) audit in Lighthouse to assess the benefits of switching to modern JavaScript syntax.**\n\n# EStimator\n\nCalculate the size and performance improvement a site could achieve by switching to modern JavaScript syntax.\n\n### Privacy\n\nSubmitting a URL for analysis is stateless. The service does not store any information about you or the URLs you analyze.\nA minimal Google Analytics ping is used to record page visits _(URL and referrer)_ and JavaScript errors, as well as the total calculated size difference number _(but not the URL you entered)_.\n\n### Hacking\n\n```sh\n# clone it\ngit clone git@github.com:GoogleChromeLabs/estimator.dev.git\ncd estimator.dev\n\n# install dependencies and firebase CLI\nnpm install\nnpm install -g firebase-tools\n\n# build the front-end:\nnpm run build\n\n# start the server and functions\nfirebase emulators:start\n```\n", "readme_type": "markdown", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "frandiox/vitedge", "link": "https://github.com/frandiox/vitedge", "tags": ["vite", "esr", "cloudflare", "ssr", "vue", "edge", "react", "worker", "hmr"], "stars": 671, "description": "Edge-side rendering and fullstack Vite framework", "lang": "JavaScript", "repo_lang": "", "readme": "# Vitedge\n\n[Vite](https://github.com/vitejs/vite) _Edge Side Rendering_ (ESR) framework for Vue and React, or bring your own view library.\n\n> What's ESR? Think of SSR (Server Side Rendering) in CDN nodes instead of actual servers. This is possible today thanks to [Cloudflare Workers](https://workers.cloudflare.com/) (and maybe some other platforms in the near future).\n\nVitedge is **just a Vite app \u2122** that prerenders the first view in an edge worker and runs the rest as an SPA. That means it will lead to good SEO while keeping the snappy routing and DX of an SPA.\n\nIt can replace static site generators in some situations since it builds on the fly and caches at the edge. Therefore, instead of getting a static `index.html` from the CDN, the CDN itself will create it on the fly or provide it from cache if it was already accessed (with configurable cache age + stale-while-revalidate).\n\nEven though running it at the edge is ideal, it is actually compatible with any Node environment such as Vercel or Netlify.\n\nSee [live demo](https://vitessedge.zable.workers.dev/), and [Vue](https://github.com/frandiox/vitessedge-template) or [React](https://github.com/frandiox/reactesse-edge-template) starter templates. If you want to bring your own view library, have a look at the [Vanilla JS example](./examples/vanilla) as a guide.\n\n## Features\n\n- \u26a1 Ultrafast development and HMR powered by Vite and ES Modules.\n- \u2694\ufe0f Renders and caches at the edge for maximum performance in production. Cache is configurable.\n- \ud83d\udc81\u200d\u2642\ufe0f Each page gets its server data as props by default but can be set in a store instead.\n- \ud83d\udd3d HTTP/2 server push for your assets to speed up the loading time without waterfall requests.\n- \ud83e\uddf1 Automatically creates endpoints for your API based on filesystem routes.\n\n## Docs & Community\n\nSee [docs](https://vitedge.js.org).\n\nTo talk about Vitedge, join [ViteLand Discord](https://discord.gg/taRZdpzHhR) and check `#vitedge` channel or use [GitHub's Discussions](https://github.com/frandiox/vitedge/discussions).\n\n## Starters\n\n- Vue, TS, i18n - [Code](https://github.com/frandiox/vitessedge-template) | [Demo](https://vitessedge.zable.workers.dev/)\n- React, TS, i18n - [Code](https://github.com/frandiox/reactesse-edge-template) | [Demo](https://reactesse.zable.workers.dev/)\n\n## Roadmap\n\n- [x] Support TypeScript projects.\n- [x] Custom Vite dev-server that serves API/Props during development.\n- [x] Docs website.\n- [x] Extract CF worker boilerplate as utilities.\n- [x] Cache props/html in worker and make it configurable.\n- [x] i18n compatible.\n- [x] Starter template.\n- [x] Auth utilities/guide (passing JWT in requests as cookies).\n- [x] Compatibility with Node runtime for other providers (Vercel/Netlify...).\n- [ ] Add example using Vercel's edge cache.\n- [x] Detect imported files in HTML and push them with HTTP/2.\n- [x] Add an SSR mode for local development (web worker?).\n- [x] Support GraphQL, sitemap and other dynamic endpoints.\n- [x] React compatibility.\n- [x] Provide React starter template.\n- [x] Support Vite 2.\n- [x] HMR for API side.\n- [x] Page props HMR in browser on file save.\n- [x] Preload assets using Vite's manifest.\n- [x] Support self-requests to API endpoints during SSR.\n- [x] Support parameters and wildcards in API file routes (`api/path/[param].js`).\n- [ ] Stale-while-revalidate cache for pages.\n- [x] CORS defaults.\n- [x] Throw errors from API/Props endpoints.\n- [x] Redirects with 3xx HTTP codes.\n- [x] Mockup KV and cache in development.\n- [ ] Mockup DO in development.\n- [ ] Rewrite in TypeScript.\n- [x] Guide to bring your own view framework.\n- [x] Preview mode to simulate Worker environment in development.\n- [ ] Support Wrangler v2.\n- [ ] Deploy to fullstack Cloudflare Pages.\n- [ ] Streaming mode.\n- [ ] Support React 18\n\n## Contributing\n\nSee [contributing guide](./.github/contributing.md).\n", "readme_type": "markdown", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "tailwindlabs/heroicons.com", "link": "https://github.com/tailwindlabs/heroicons.com", "tags": [], "stars": 671, "description": null, "lang": "JavaScript", "repo_lang": "", "readme": "This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).\n\n## Getting Started\n\nFirst, run the development server:\n\n```bash\nnpm run dev\n# or\nyarn dev\n```\n\nOpen [http://localhost:3000](http://localhost:3000) with your browser to see the result.\n\nYou can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file.\n\n[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`.\n\nThe `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.\n\n## Learn More\n\nTo learn more about Next.js, take a look at the following resources:\n\n- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.\n- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.\n\nYou can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!\n\n## Deploy on Vercel\n\nThe easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.\n\nCheck out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.\n", "readme_type": "markdown", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "lucidworks/banana", "link": "https://github.com/lucidworks/banana", "tags": [], "stars": 671, "description": "Banana for Solr - A Port of Kibana ", "lang": "JavaScript", "repo_lang": "", "readme": "# Banana\n\nThe Banana project was forked from [Kibana](https://github.com/elastic/kibana), and works with all kinds of time series\n(and non-time series) data stored in [Apache Solr](https://lucene.apache.org/solr/). It uses Kibana's powerful dashboard\nconfiguration capabilities, ports key panels to work with Solr, and provides significant additional capabilities,\nincluding new panels that leverage [D3.js](http://d3js.org).\n\nThe goal is to create a rich and flexible UI, enabling users to rapidly develop end-to-end applications that leverage\nthe power of Apache Solr. Data can be ingested into Solr through a variety of ways, including\n[Logstash](https://www.elastic.co/products/logstash), [Flume](https://flume.apache.org) and other connectors.\n \n## IMPORTANT\n\nPull the repo from the `release` branch for production deployment; version x.y.z will be tagged as x.y.z\n\n`develop` branch is used for active development and cutting edge features.\n`fusion` branch is used for Lucidworks Fusion release. The code base and features are the same as `develop`. The main difference\nis in the configuration. \n\n## Banana 1.6.26\n\nThis release includes the following bug fixes and improvement:\n\n1. Enhance heatmap\n * Add axis and axis labels\n * Add axis grid and ticks\n * Add gradient legend and ranges\n * Fix heatmap transpose icon\n * Enhance positioning and padding of panel elements\n * Fix bettermap tooltip and hint text\n1. Enhance hits panel\n * Add panel horizontal and vertical direction option\n * Fix metrics text and label overlap and margins\n1. Fix bettermap render issue when resized\n1. Fix jshint warnings\n\n## Older Release Notes\n\nYou can find all previous [Release Notes](https://github.com/LucidWorks/banana/wiki/Release-Notes) on our wiki page.\n\n## Installation and Quick Start\n### Requirements\n* A modern web browser. The latest version of [Chrome](http://www.google.com/chrome/) and\n[Firefox](https://www.mozilla.org/en-US/firefox/new/) have been tested to work. [Safari](http://www.apple.com/safari/)\nalso works, except for the \"Export to File\" feature for saving dashboards. We recommend that you use Chrome or Firefox\nwhile building dashboards.\n* Solr 6.x or at least 4.4+ (Solr server's endpoint must be open, or a proxy configured to allow access to it).\n* A webserver (optional).\n\n### Installation Options\n#### Option 1: Run Banana webapp within your existing Solr instance\n##### Solr 5+ Instructions\n1. Run Solr at least once to create the webapp directory (this step might be unnecessary for Solr 6):\n\n cd $SOLR_HOME/bin\n ./solr start\n\n2. Copy banana folder to `$SOLR_HOME/server/solr-webapp/webapp/`\n\n cd $SOLR_HOME/server/solr-webapp/webapp\n cp -R $BANANA_HOME/src ./banana\n\n NOTES: For production, you should run `grunt build` command to generate the optimized code in `dist` directory. And then copy the `dist` directory to the production web server. For example:\n\n cd $BANANA_HOME\n npm install\n bower install\n grunt build\n cp -R ./dist $SOLR_HOME/server/solr-webapp/webapp/banana\n\n3. Browse to [http://localhost:8983/solr/banana/index.html](http://localhost:8983/solr/banana/index.html)\n\n##### Solr 4 Instructions\n1. Run Solr at least once to create the webapp directories:\n\n cd $SOLR_HOME/example\n java -jar start.jar\n \n2. Copy banana folder to $SOLR_HOME/example/solr-webapp/webapp/\n3. Browse to [http://localhost:8983/solr/banana/src/index.html](http://localhost:8983/solr/banana/src/index.html)\n\n_**NOTES:**_ If your Solr server/port is different from [localhost:8983](http://localhost:8983), edit\nbanana/src/config.js and banana/src/app/dashboards/default.json to enter the hostname and port that you are using.\nRemember that banana runs within the client browser, so provide a fully qualified domain name (FQDN), because the\nhostname and port number you provide should be resolvable from the client machines.\n\nIf you have not created the data collections and ingested data into Solr, you will see an error message saying\n\"Collection not found at ..\" You can use any connector to get data into Solr. If you want to use Logstash, please go to\nthe Solr Output Plug-in for [Logstash Page](https://github.com/LucidWorks/solrlogmanager) for code, documentation and\nexamples.\n\n#### Option 2: Complete SLK Stack\nLucidworks has packaged Solr, Logstash (with a Solr Output Plug-in), and Banana (the Solr port of Kibana), along with\nexample collections and dashboards in order to rapidly enable proof-of-concepts and initial development/testing.\nSee [http://www.lucidworks.com/lucidworks-silk/](http://www.lucidworks.com/lucidworks-silk/).\n\n#### Option 3: Building and installing from a WAR file\n_NOTES: This option is only applicable to Solr 5 or 4. Solr 6 has a different architecture._\n1. Pull the source code of Banana version that you want from the\n[release](https://github.com/LucidWorks/banana/tree/release) branch in the repo;\nFor example, version *x.y.z* will be tagged as `x.y.z`.\n\n2. Run a command line `ant` from within the banana directory to build the war file:\n\n ```bash\n cd $BANANA_HOME\n ant\n ```\n3. The war file will be called *banana-\\.war* and will be located in $BANANA_HOME/build.\nCopy the war file and banana's jetty context file to Solr directories:\n * For Solr 5:\n\n ```bash\n cp $BANANA_HOME/build/banana-.war $SOLR_HOME/server/webapps/banana.war\n cp $BANANA_HOME/jetty-contexts/banana-context.xml $SOLR_HOME/server/contexts/\n ```\n * For Solr 4:\n\n ```bash\n cp $BANANA_HOME/build/banana-.war $SOLR_HOME/example/webapps/banana.war\n cp $BANANA_HOME/jetty-contexts/banana-context.xml $SOLR_HOME/example/contexts/\n ```\n4. Run Solr:\n * For Solr 5:\n\n ```bash\n cd $SOLR_HOME/bin/\n ./solr start\n ```\n * For Solr 4:\n\n ```bash\n cd $SOLR_HOME/example/\n java -jar start.jar\n ```\n5. Browse to [http://localhost:8983/banana](http://localhost:8983/banana) (or the FQDN of your Solr server).\n \n#### Option 4: Run Banana webapp in a web server\nBanana is an [AngularJS app](https://angularjs.org) and can be run in any webserver that has access to Solr.\nYou will need to enable [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing) on the Solr instances that\nyou query, or configure a proxy that makes requests to banana and Solr as same-origin. We typically recommend the\nlatter approach.\n\n### Storing Dashboards in Solr\nIf you want to save and load dashboards from Solr, then you need to create a collection called `banana-int` first. For Solr 6, here are the steps:\n\n cd $SOLR_HOME/bin\n ./solr create -c banana-int\n\nFor Solr 5 and 4, you have to create the `banana-int` collection using the configuration files provided in either\nthe _resources/banana-int-solr-5.0_ (for Solr 5) directory or the _resources/banana-int-solr-4.5_ directory\n(for Solr 4.5). If you are using SolrCloud, you will need to upload the configuration into\n[ZooKeeper](https://zookeeper.apache.org) and then create the collection using that configuration.\n\nThe Solr server configured in config.js will serve as the default node for each dashboard; you can configure each\ndashboard to point to a different Solr endpoint as long as your webserver and Solr put out the correct CORS headers.\nSee the README file under the _resources/enable-cors_ directory for a guide.\n\n### Changes to your dashboards\nIf you created dashboards for Banana 1.0.0, you did not have a global filtering panel. In some cases, these filter\nvalues can be implicitly set to defaults that may lead to strange search results. We recommend updating your old\ndashboards by adding a filtering panel. A good way to do it visually is to put the filtering panel on its own row and\nhide it when it is not needed.\n\n## FAQ\n\n__Q__: How do I secure my Solr endpoint so that users do not have access to it? \n__A__: The simplest solution is to use an [Apache](http://projects.apache.org/projects/http_server.html) or\n[nginx](http://nginx.org) reverse proxy (See for example https://groups.google.com/forum/#!topic/ajax-solr/pLtYfm83I98).\n\n__Q__: Can I use banana for non-time series data? \n__A__: Yes, from version 1.3 onwards, non-time series data are also supported.\n\n## Resources\n\n1.\tLucidworks SILK: http://www.lucidworks.com/lucidworks-silk/\n2.\tWebinar on Lucidworks SILK: http://programs.lucidworks.com/SiLK-introduction_Register.html.\n3.\tLogstash: http://logstash.net/\n4.\tSILK Use Cases: https://github.com/LucidWorks/silkusecases. Provides example configuration files, schemas and\ndashboards required to build applications that use Solr and Banana.\n\n## Publishing WAR Artifacts to Maven Central\n\n1. \tGet hold of\n[maven-ant-tasks-X.X.X.jar](http://search.maven.org/#search|gav|1|g%3A%22org.apache.maven%22%20AND%20a%3A%22maven-ant-tasks%22)\nand put it in this directory\n2. \tExecute *ant -lib . deploy* from this directory, this will sign the Maven artifacts (currently just .war) and send\nthem to a [Sonatype OSSRH](https://oss.sonatype.org/) staging repository. Details of how to set this up can be found\n[here](http://central.sonatype.org/pages/ossrh-guide.html). N.B. Ensure that you have an *release* profile contained\nwithin ~/.m2/settings.xml\n3.\tOnce you've read, and are happy with the staging repos, close it. \n\n## Support\n\nBanana uses the dashboard configuration capabilities of Kibana (from which it is forked) and ports key panels to work\nwith Solr. Moreover, it provides many additional capabilities like heatmaps, range facets, panel specific filters,\nglobal parameters, and visualization of \"group-by\" style queries. We are continuing to add many new panels that go well\nbeyond what is available in Kibana, helping users build complete applications that leverage the data stored in\nApache Solr, HDFS and a variety of sources in the enterprise.\n\nIf you have any questions, please email banana-support@lucidworks.com\n\n## Trademarks\n\nKibana is a trademark of Elasticsearch BV \nLogstash is a trademark of Elasticsearch BV\n", "readme_type": "markdown", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "developit/vhtml", "link": "https://github.com/developit/vhtml", "tags": ["html-string", "jsx", "hyperscript", "vdom", "virtual-dom", "preact"], "stars": 671, "description": "Render JSX/Hyperscript to HTML strings, without VDOM \ud83c\udf08", "lang": "JavaScript", "repo_lang": "", "readme": "# vhtml\n\n[![NPM](https://img.shields.io/npm/v/vhtml.svg?style=flat)](https://www.npmjs.org/package/vhtml)\n[![travis-ci](https://travis-ci.org/developit/vhtml.svg?branch=master)](https://travis-ci.org/developit/vhtml)\n\n### **Render JSX/Hyperscript to HTML strings, without VDOM**\n\n> Need to use HTML strings (angular?) but want to use JSX? vhtml's got your back.\n>\n> Building components? do yourself a favor and use [\"Preact\"](https://github.com/developit/preact)\n\n[**JSFiddle Demo**](https://jsfiddle.net/developit/9q0vyskg/)\n\n---\n\n\n## Installation\n\nVia npm:\n\n`npm install --save vhtml`\n\n\n---\n\n\n## Usage\n\n```js\n// import the library:\nimport h from 'vhtml';\n\n// tell babel to transpile JSX to h() calls:\n/** @jsx h */\n\n// now render JSX to an HTML string!\nlet items = ['one', 'two', 'three'];\n\ndocument.body.innerHTML = (\n
    \n

    Hi!

    \n

    Here is a list of {items.length} items:

    \n
      \n { items.map( item => (\n
    • { item }
    • \n )) }\n
    \n
    \n);\n```\n\n\n### New: \"Sortof\" Components!\n\n`vhtml` intentionally does not transform JSX to a Virtual DOM, instead serializing it directly to HTML.\nHowever, it's still possible to make use of basic Pure Functional Components as a sort of \"template partial\".\n\nWhen `vhtml` is given a Function as the JSX tag name, it will invoke that function and pass it `{ children, ...props }`.\nThis is the same signature as a Pure Functional Component in react/preact, except `children` is an Array of already-serialized HTML strings.\n\nThis actually means it's possible to build compositional template modifiers with these simple Components, or even higher-order components.\n\nHere's a more complex version of the previous example that uses a component to encapsulate iteration items:\n\n```js\nlet items = ['one', 'two'];\n\nconst Item = ({ item, index, children }) => (\n
  • \n

    {item}

    \n {children}\n
  • \n);\n\nconsole.log(\n
    \n

    Hi!

    \n
      \n { items.map( (item, index) => (\n \n This is item {item}!\n \n )) }\n
    \n
    \n);\n```\n\nThe above outputs the following HTML:\n\n```html\n
    \n

    Hi!

    \n
      \n
    • \n

      one

      This is item one!\n
    • \n
    • \n

      two

      This is item two!\n
    • \n
    \n
    \n```\n", "readme_type": "markdown", "hn_comments": "I wonder if the market for that is closer to public sector work, or anything else with a hard requirement of accessibility. \"Clean, semantic HTML\" is very compatible with \"parsable with accessibility tools\", and so far difficult for automated publishing tools to get right without human intervention.Also, if there was any money left in interactive editorial work \u2014 creating bespoke storytelling visualizations for news or long-form stories \u2014 I might look there, because the requirements often require thinking outside of what dynamic or automated publishing tools provide. But that feels like an already small and shrinking field.If you can build a simple to use CMS to go along with whatever you make then sure.And make it so it can be hosted on something sensible where as a client all I need to do is drop some images and a json text map using ftp and the site will start using those assets.Is there a big market? Yes.But the problem is that the combination of site builders out there (Wix, Squarespace) and thousands of free templates means that many businesses can get about 80% of the benefit of a great custom site for a fraction of the cost.My suggestion? Treat building sites as a side gig and see how it goes.I don't think there exists a single person who both a) cares about \"clean, semantic HTML/CSS/JS\" and b) can't build such website himself.Now if you forget the letter soup and instead go for \"clean, stylish design and magnificent UI\" you'll find as much work as you had back then.If I ever decided to go that route again (tried, failed) I would create several micro web agencies each targeting a niche. An agency specialised in websites for accountants, another one specialising in websites for architects, etc. Businesses spend a surprising amount of money when buying \"premium\". Follow that money.Being able to make excellent static sites and more advanced things than that is the easy part. Convincing the potential customer to give you the time of the day is the hard part. They will go with their nephew, Wix, an expensive local agency using Wordpress, or social media only - anybody but a competent web designer. Yes I said web designer.Use your creativity and skills to create killer online businesses for yourself instead of trying to sell web sites to others. It will save you a lot of frustration.This is my experience.Short answer is of course yes. There are plenty of small businesses that need a web site to advertise their presence, etc, but without dynamic content requiring a database.Of course finding clients will take a bit of leg-work, and given they don't have a site already, it would suggest they wouldn't be willing to spend a lot of money.You'd be competing with things like Wix, Squarespace and so on though. There are lots of ways to quickly and cheaply make simple info sites.I've worked as a web developer for ten years on websites with millions of monthly views (e.g NFL, HowStuffWorks, etc.) while living in Los Angeles. I've also hired and managed a remote team of developers while living in Asia.I'm working on a website for my girlfriend's Chinese teaching business. We paid a premium for branding, logo design, and photography. Even though I've worked in the publishing industry for years, making marketing pages full time for much of that time, the website I'm creating is with a Leadpages template with the company's brand colors.If you want to brand yourself as an excellent frontend developer, here's what I'd suggest:1. Skip trying to go the agency route to find clients. Clients want a full-service agency (design + development + managing ad spend) or agencies specializing in specific social platforms. Development is always an afterthought or a cost center in these examples.2. Find an established company or startup and reach out to their MARKETING team, not their engineering team. Marketing teams are the ones looking for static websites the most. I have a close friend who's a MASTER at CSS. Best CSS person I've met in my life. He's made an excellent career, getting San Francisco salary while working remotely in the middle of nowhere in Canada. He couldn't write a unit test or do a leetcode problem to save his life, but the marketing team loves him more than anyone else.3. Be EXCELLENT at front end. Invest in some high-quality online courses for CSS. Be able to center divs in your sleep. This strategy will only work if you're excellent, especially if you're trying to get USA level pay remotely. If you're only average, or even great, you're competing with thousands who are equally as good as you.The good news is being EXCELLENT is incredibly doable. Lots of engineers (including myself) switch from a frontend focus to full stack/backend because they're not fans of design, so their CSS skills deteriorate.Depending on the market, absolutely. Especially if you are not averse to templating-style work.But given the experience you shared, I don't really know if you mean that you are providing end-to-end experiences, e.g. bundling a static site generator and instructions as to how to blog with it, or if you are instead just packaging flat files with .html to be opened in the browser OR maybe used for someone else's templating work, and that's it.If it's more just \"I wanna author HTML\" then the opportunities may be more limited and you may have to answer more directly to the graphic design & SEO parts of the customer base in order to build up clientele. (My experience with people who use the word \"semantic\" in their list of skills has been that graphic design & SEO aren't really as interesting for them :-))Related question maybe--can you see yourself building on others' graphics-focused work to make that kind of thing more semantically acceptable? That could be an interesting position.Either way good luck to you.Oh, while you're here, I recently started exploring the possibility of starting a small shop. When I looked into Shopify I had absolutely no idea how to get started or how much it cost and your website failed to even come close to answering those things in the few minutes I had to investigate. Whereas with SquareSpace provided those answers in seconds.This is extremely cool!I haven't much of a clue on motion capture. But, the capture I want to do requires feet, hands, face, shoulders, arms, knees, fingers, AND the ability to do it in any position. Curl up in ball. Roll over on the floor. I want to capture more than just a head and hands upright but AFAIK there's no solution under $20k.See user name. if I want to make pr0n, I need to be able to capture those positions. Is there anything that can do it on the cheap?Plugging in this one we did for reference a long time ago! Capture + share dances https://blog.mozvr.com/a-saturday-night/That\u2019s cool! What would the typical use case for this be (and why did Shopify build it)?That's great!I assume the hand capture (+ head position) doesn't give you enough to apply inverse kinematics reliably (i.e. better than VRchat), is that correct? It's a naive assumption on my part given that wrists aren't captured, but perhaps there are really smart ways to solve this. It feels like it could be a \"next step\" to have upper-body motion capture.Thanks for this! I have been working on something similar for an upcoming education app, record a course and play in the same app with a compact file format (1MB per minute, could be much less with some tricks). You can see a demo here : https://youtu.be/zcHAzQXm3Hg and more at https://explayn.me I will definitely check your lib, and will be happy to switch if it\u2019s better !This is a really great project, thanks, will definitely have a play with this and it might enable some project prototyping for me that are too small for a proper mocap setup.This is great, well done, and thanks for open sourcing it.I started to build something like this early last year, but got too busy with another pet project and having a baby. Here's some demos and notes if you're interested. \nhttps://twitter.com/convey_it/status/1433163282597171200This could be great for people doing work with various sign languages.With an expensive Quest Pro you could capture your facial expressions using the headset's eye and face-tracking features.Any more on this?As for hands - is it able to track hands and fingers only or also an object within a hand? I can see this being useful to 'puppeteer' a 3D object by hand used as a proxy of it... Or a simple object within a hand.Outside of maybe a cliff-climbing game I struggled with finding a reason for buying a headset at all. This seems like a plausible use for animation.How well does it do with occlusion? Holding, or manipulating an object, and capturing those interactions.Non physicist writing here, so maybe this is dumb.What I've read about entanglement is this: do something to a particle, and a predicable thing happens to another particle.So, I am dreaming of a \"radio\" that has no interference because instead of agitating the electromagnetic field, it manipulates one particle.\nOn the other end there is another \"radio\" that measures the entangled particle and turns the movement/spin/whatever of the particle on that end into data (voice/video), and vice-versa.The problem, I guess, is the Heisenberg uncertainty principle (again, non-physicists so possibly there are workable cheats around this). So, measuring of one particle already changes it, therefore any incoming data is nullified?I wonder what would happen if you sent the two entangled light beams through the double slit experiment, one through each slit. (I am not a physicist, this might be stupid)What are the practical uses for an entangled light beam vs existing entangled particles?The new part here is creating two entangled light beams at wavelengths suitable for interacting with trapped atoms.The general technique of creating entangled beams via OPO has been used for years at other wavelengths, and the resulting beams have been used for quantum optics experiments (including some rather spectacular ones).What is new here is that by using light at wavelengths that can interact with trapped atoms, there is a possibility to use such atoms as quantum memory.It wluld be interesting to send one beam alternatively throught a linear or circular polarizer. Then you can check the polarization on the other beam and see if you have faster than light information transmission. With all the implications about causality.Very open ended question. Maybe tell us what you tried so far, what depth knowledge or background you has now.pick any of the top results on youtube for react development. course not super necessary but if u really want, check react on coursera and take any of top results with good rating.if you want to be very successful dont glue yourself to one specific stack.start with react node but focus on patterns like how requests are made from client to server, server gives back responses. you application had metrics, logs, likely connects to some database.it would be good to take an intro to CS course on YouTube. Stanford and mit have free online.Deeper understanding will help u differentiate from crowd of everyone else trying to take boot camp and become coder.practice what you learn. Code side projects. learning react? Everything u learn, try apply to your own website.Great work! Instead of faiss, you could use a standalone vector search engine like Qdrant https://github.com/qdrant/qdrant It would bring some advantages like, for example, filtering support.", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "pizzaql/pizzaql", "link": "https://github.com/pizzaql/pizzaql", "tags": ["pizzaql", "order-management", "orders", "pizza", "restaurant", "open-source", "react", "javascript", "nextjs", "styled-components", "prisma", "graphql", "database", "auth0", "authentication", "ssr", "formik", "babel", "apollo"], "stars": 671, "description": ":pizza: Modern OSS Order Management System for Pizza Restaurants", "lang": "JavaScript", "repo_lang": "", "readme": "# Note: Please check the rewritten version of PizzaQL (currently WIP): https://github.com/pizzaql/next\n---\n\n# [![PizzaQL](media/logo/horizontal-scaled.png)](https://github.com/pizzaql/pizzaql)\n\n> Modern OSS Order Management System for Pizza Restaurants.\n\n[![Build Status](https://travis-ci.org/pizzaql/pizzaql.svg?branch=master)](https://travis-ci.org/pizzaql/pizzaql)\n[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/xojs/xo)\n[![style: styled-components](https://img.shields.io/badge/style-%F0%9F%92%85%20styled--components-orange.svg?colorB=daa357&colorA=db748e)](https://github.com/styled-components/styled-components)\n\n

    \n \n \"Open\n \n \n \"Patreon\"\n \n

    \n\n## Goal\n\nThe goal of this project is to provide a modern and easy to use order management system with order placement form as well. You can track progress in our TODO list :smile: \n\n## Docs\n\n> Please note, that we are currently preparing a new docs for PizzaQL. Stay tuned \ud83d\ude4c\n\n[Here :zap:](https://docs.pizzaql.tech/)\n\n## Screenshots\n\n![Order Placement Form](media/screenshots/form.png)\n![Dashboard)](media/screenshots/dashboard.png)\n\n[See more screenshots](https://github.com/pizzaql/pizzaql/tree/master/media/screenshots)\n\n## TODO\n\n**Order Placement System**\n* [x] Basic Frontend\n * [x] Production-ready Frontend (styles etc.)\n * [x] Rewrite to Apollo Client\n * [x] Use HTML5 form validation wherever possible\n * [x] Implement prices\n * [x] Online payments via Stripe\n * [ ] Rewrite online payments to use react-stripe-elements\n * [x] Delivery time selection\n * [x] Display delivery time based on current hour\n * [x] Rewrite to @apollo/react-hooks\n * [ ] Rewrite to use react-hook-form\n* [x] Working Backend\n * [x] Creating orders\n* [x] Thank you page\n * [x] Ability to copy order id\n * [x] Display simplified order id\n * [x] Show time left to order delivery\n * [x] Rewrite to @apollo/react-hooks\n\n**Order Management System**\n\n* [x] Login\n * [x] Full security with Auth0\n* [x] Basic Frontend\n * [x] Listing orders\n * [x] Rewrite to @apollo/react-hooks\n * [ ] Rewrite to GraphQL Subscriptions (**WIP**)\n * [x] Ability to change order status\n * [x] Ability to delete orders\n * [x] Confirmation alert\n * [x] Ability to manually add orders\n * [ ] Ability to delete all orders with 1 click\n * [ ] Ability to sort orders\n * [ ] Production-ready Frontend (styles etc.)\n* [x] Working Backend\n\n**Documentation**\n\n* [x] Guides\n * [x] Development\n * [x] Production\n * [ ] Security\n * [ ] Deployment\n\n**Other**\n\n* [x] Rewrite backend to Prisma 2\n* [ ] Testing with Cypress.io\n* [ ] Integration with Algolia Places API (?)\n* [ ] Release a public demo (**WIP**)\n\n(?) - unsure.\n\n## Technology Stack\n\n**Frontend:**\n\n- [React](https://reactjs.org/)\n- [Next.js](https://nextjs.org/)\n- [Apollo Client](https://github.com/apollographql/apollo-client)\n- [styled-components](https://www.styled-components.com/)\n- [Blueprint](https://blueprintjs.com/)\n\n**Backend:**\n\n- [Prisma 2](https://github.com/prisma/prisma2)\n- [GraphQL](https://graphql.org/)\n- [Auth0](https://auth0.com/)\n\n## Sponsors\n\n \n \"Digital\n \n
    \n \n \"Sauce\n \n\n## License\n\nMIT\n", "readme_type": "markdown", "hn_comments": "Hi HN!My name is Antoni, I'm 16 years old self-taught developer from Poland. During my free time, I enjoy creating small open-source projects. Today, I'm happy to announce my biggest project ever, which is PizzaQL. It's an order placement & management system for pizza restaurants, built using modern technologies, like React, Next.js, GraphQL & more. Even though it is not finished yet, it is usable :) I would really like to receive constructive criticism & suggestions. Also, if you liked the project, consider starring it on Github - it means a lot to me.Thanks!~ Antoni Kepinski (aka xxczaki)You share a pizza, which makes it more communal.In my city some tech events make the point of publicising the fact that they don't have pizza and instead have a proper buffet. Apparently the buffet is cheaper for them too!When we release a new version, we always have a big pizza delivery. I'm struggling to think what food you could replace that with, that could satisfy the broad mix of people in our place.It's a good question though!Any example which tech ? In my country seems not that popularNot mentioned already is that pizza is ubiquitous within the US. Pretty much anywhere you go, you can order pizza from one of Dominoes/Pizza Hut/Papa John's/Little Ceasar's/local pizza shop. If you're supporting events across the company, pizza is the easy choice, especially since it's easy to order in bulk and easy to clean up afterwards. And as already mentioned, it can be made gluten-free or vegan to satisfy most food restrictions.What food would you expect to see instead? I also see lots of sandwiches and (in Silicon Valley) salad. Though I wish there were more healthy options, I also have to admit that some of the time when there are healthy options (veggie sticks), I choose to eat the less healthy stuff that's available.It's not just the tech industry...it's the whole world.pizza has the highest margin of all fast food varieties. I think this is also the reason it was available for delivery long before modern food delivery services.It's the quintessential cheap delivery food that the world love, and it got there through decades of unorganized marketing.I wouldn't be surprised if it'll be replaced in a few generations or so by something else (popplers?).Why is the shark basically unchanged for 450 million years? Perfect adaptation to the environment.It\u2019s the least expensive per serving food you can get delivered.In my opinion, Ramen (asian noodles) deserve some room in the junk food podium. There is even an essay from Paul Graham quoting them (Ramen profitable) ;-).It's the second most perfect food, next to The Sandwich.A few reasons I think:- inexpensive\n- delicious\n- stacks well (can serve at scale)\n- not messy, even without platesNearly everyone likes pizza, and there are lots of varieties for various tastes.At my work, we've tried various foods, but we always come back to pizza because it's so universally liked and so convenient.The \"winner take all\" turn of the culture has hurt the legitimacy of the system and I think it feeds anti-vax, \"the moon landing was a hoax\", etc. It's just too transparent that the people in charge grade their own papers.To counter it, the elite has to be held to a standard higher than we hold other people. Otherwise the erosion will keep happening.Right, and Marilyn Monroe's death is why people believe that the moon landing was faked? Or are we overthinking this?I would suggest that people believe in Pizzagate because other people who knew better but had reasons to pretend not encouraged them to do so. Once you start from the premise that Hillary Clinton is the Queen of Night, and that clues to this truth are woven throughout the fabric of reality, then any old list of nouns--pizza, takeout, whatever--can be mapped to any other list plausibly enough.(If I sound grouchy about this, I am--I sometimes shop or dine on the block where Comet Pizza is.)The conversation was civil. Why was this flagged??I think the majority of politicians in Western countries have at least one filmed child sex episode. Assume you're a very powerful politician and you need underlings in powerful positions, which you can help novices get, but once they get powerful they become independent and can stop being underlings.\nFilming them having sex with an kid, or at least an obviously underage teen, is the single best blackmail material possible. Damage potential basically equal to murder evidence, but there's no hard to hide murder victim - and in child sex one victim can be used several times, as opposed to just one time in murder.As every such cabal would be much more effective than a lone politician, eventually power would entirely shift to competing cabals bound by child sex blackmail - making it impossible to dismantle externally, because both the executive, the judicial system and the biggest media would be controlled by people in such arrangements. Media in particular would have the main job - in case of any genuine leaks, mix the truth with outlandish claims to discredit it as a dumb conspiracy theory.The game theory works out so nice I don't see any alternative, it's the stable state of the political system. I can see it being murder though, if disposing a body is much easier than my estimate.In non-Western societies it could be something else. In North Korea, being filmed shitting on a photo of the current leader would work much better I guess.I'm half-convinced of the notion that the \"Pizzagate\" idea was spread on the plan that \"whatever our side is about to be accused of, make sure that the other side is accused of it first\".It's like projection, only not unconscious; it's deliberate deflection to make the real thing look less believable when it comes up.What I am more certain of, is that in general in modern politics, disinformation has been weaponized to a high degree.I'm sorry, but I need to get this out of my system...Iiiiif a dronehits your eyewith a bigpizza piethat's an A. I.I can\u2019t wait to see the first time someone hijacks the pizza bot Fast and the Furious style...This seems like a great idea and the prefect stepping stone into fully autonomous cars for people.$7 for grocery delivery also sounds like a steal. Fairly odd that the \u2018car\u2019 only goes 25 mph.I cant wait for a robot to deliver pizza into my mouth, while I watch porn on my oculus rift, then pop a few melatonin pills and fall asleep on my couch.I really like this idea. The best part is comparing the pizza prices. That is hard to get from most websites.Hey HN,I've been working on this website for the last couple of weeks in an effort to offer a more curated guide to Neapolitan Pizza in cities across the US.Currently I have 6 cities listed, with plans to add many more. The basic idea is that when you're going to visit a city, you could see what the good options are on here. Or for locals it could help you find a new favorite for Neapolitan Pizza.One of the ways it tries to curate more than what Yelp or Google do, is to list the standard prices of a Margherita pizza at each of the restaurants so users can easily compare them (think big mac index[1] for pizza). It also shows just one photo of the restaurants pizza and one photo of their restaurant to give you a feel for the place.There is not a plan to add user reviews, as every location listed is curated and therefore suggested to be a great place for Neapolitan Pizza. There is the ability to pull up the location on yelp/google/their website to find out more.I've also packaged it up into a basic shell of a react-native application for Android (essentially just loads the website): https://play.google.com/store/apps/details?id=com.thegoodstu...[1] https://en.wikipedia.org/wiki/Big_Mac_Index", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "cn-panda/JavaCodeAudit", "link": "https://github.com/cn-panda/JavaCodeAudit", "tags": ["vulnerability-analysis", "ssrf", "java", "rce", "fastjson", "jackson", "xss", "sql", "code", "weblogic"], "stars": 671, "description": "Getting started with java code auditing \u4ee3\u7801\u5ba1\u8ba1\u5165\u95e8\u7684\u5c0f\u9879\u76ee", "lang": "JavaScript", "repo_lang": "", "readme": "# About\nThe articles in this series are aimed at people who have a basic knowledge of Java's basic syntax. The contents of this series of articles mainly include:\n\n* Introduction to audit environment\n* SQL vulnerability principle and actual case introduction\n* XSS vulnerability principle and actual case introduction\n* SSRF vulnerability principle and actual case introduction\n* RCE vulnerability principle and actual case introduction\n* Includes vulnerability principles and actual case introductions\n* Serialization vulnerability principle and actual case introduction\n* S2 series classic vulnerability analysis\n* WebLogic series of classic vulnerability analysis\n* fastjson series classic vulnerability analysis\n* Jackson series classic vulnerability analysis, etc.\n\nThe content order may be slightly adjusted, but the overall content will not change. Finally, I hope that this series of articles can bring you a little gain.\n\nThis project contains the source code needed based on the above article\n\nHave fun\n\n\n# \u5173\u4e8e\n\u672c\u7cfb\u5217\u7684\u6587\u7ae0\u9762\u5411\u4eba\u7fa4\u4e3b\u8981\u662f\u62e5\u6709 Java \u57fa\u672c\u8bed\u6cd5\u57fa\u7840\u7684\u670b\u53cb\uff0c\u7cfb\u5217\u6587\u7ae0\u7684\u5185\u5bb9\u4e3b\u8981\u5305\u62ec\uff1a\n\n* \u5ba1\u8ba1\u73af\u5883\u4ecb\u7ecd\n* SQL \u6f0f\u6d1e\u539f\u7406\u4e0e\u5b9e\u9645\u6848\u4f8b\u4ecb\u7ecd\n* XSS \u6f0f\u6d1e\u539f\u7406\u4e0e\u5b9e\u9645\u6848\u4f8b\u4ecb\u7ecd\n* SSRF \u6f0f\u6d1e\u539f\u7406\u4e0e\u5b9e\u9645\u6848\u4f8b\u4ecb\u7ecd\n* RCE \u6f0f\u6d1e\u539f\u7406\u4e0e\u5b9e\u9645\u6848\u4f8b\u4ecb\u7ecd\n* \u5305\u542b\u6f0f\u6d1e\u539f\u7406\u4e0e\u5b9e\u9645\u6848\u4f8b\u4ecb\u7ecd\n* \u5e8f\u5217\u5316\u6f0f\u6d1e\u539f\u7406\u4e0e\u5b9e\u9645\u6848\u4f8b\u4ecb\u7ecd\n* S2\u7cfb\u5217\u7ecf\u5178\u6f0f\u6d1e\u5206\u6790\n* WebLogic \u7cfb\u5217\u7ecf\u5178\u6f0f\u6d1e\u5206\u6790\n* fastjson\u7cfb\u5217\u7ecf\u5178\u6f0f\u6d1e\u5206\u6790\n* jackson\u7cfb\u5217\u7ecf\u5178\u6f0f\u6d1e\u5206\u6790\u7b49\n\n\u53ef\u80fd\u5185\u5bb9\u987a\u5e8f\u4f1a\u7565\u6709\u8c03\u6574\uff0c\u4f46\u662f\u603b\u4f53\u5185\u5bb9\u4e0d\u4f1a\u6539\u53d8\uff0c\u6700\u540e\u5e0c\u671b\u8fd9\u7cfb\u5217\u7684\u6587\u7ae0\u80fd\u591f\u7ed9\u4f60\u5e26\u6765\u4e00\u70b9\u6536\u83b7\u3002\n\n\u672c\u9879\u76ee\u5305\u542b\u4e86\u57fa\u4e8e\u4e0a\u8ff0\u6587\u7ae0\u4e2d\u9700\u8981\u7684\u6e90\u7801\n\n\u73a9\u7684\u5f00\u5fc3\n\n\n", "readme_type": "markdown", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "alpine-collective/alpine-magic-helpers", "link": "https://github.com/alpine-collective/alpine-magic-helpers", "tags": ["alpinejs", "magic-helper", "alpine", "alpine-collective"], "stars": 671, "description": "A collection of magic properties and helper functions for use with Alpine.js", "lang": "JavaScript", "repo_lang": "", "readme": "\n[![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/alpine-collective/alpine-magic-helpers?label=version&style=flat-square)](https://www.npmjs.com/package/alpine-magic-helpers)\n[![](https://data.jsdelivr.com/v1/package/gh/alpine-collective/alpine-magic-helpers/badge)](https://www.jsdelivr.com/package/gh/alpine-collective/alpine-magic-helpers)\n[![npm bundle size](https://img.shields.io/bundlephobia/minzip/alpine-magic-helpers?color=#0F0)](https://bundlephobia.com/result?p=alpine-magic-helpers)\n\n# Magic Helpers\n\nA collection of magic properties and helper functions for use with [Alpine.js](https://github.com/alpinejs/alpine) version 2\n\n:warning: Notice: This collection of helpers will be tied to version 2 of Alpine and will only receive bug fixes and minor updates as needed.\n\n\u2192 New features and plugins for V3 that will be found in the [toolkit repo](https://github.com/alpine-collective/toolkit).\n\n## About\n\nAdds the following magic helpers to use with Alpine JS.\n| Magic Helpers | Description |\n| --- | --- |\n| [`$component/$parent`](#component) | Natively access and update data from other components or the parent component. |\n| [`$fetch/$get/$post`](#fetch) | Using Axios, fetch JSON from an external source. |\n| [`$interval`](#interval) | Run a function every n milliseconds. Optionally start and stop the timer. |\n| [`$range`](#range) | Iterate over a range of values. |\n| [`$refresh`](#refresh) | Manually refresh a component. |\n| [`$screen`](#screen) | Detect if the current browser width is equal or greater than a given breakpoint. |\n| [`$scroll`](#scroll) | Scroll the page vertically to a specific position. |\n| [`$truncate`](#truncate) | Limit a text string to a specific number of characters or words. |\n| [`$undo`](#undo) | Track and undo state changes inside your component. |\n\nAdds the following custom directives to use with Alpine JS.\n| Custom Directives | Description |\n| --- | --- |\n| [`x-unsafe-html`](#x-unsafe-html) | like x-html but allowing new javascript scripts to run. |\n\n ***More to come!***\n\n\ud83d\ude80 If you have ideas for more magic helpers or custom directives, please open a [discussion](https://github.com/alpine-collective/alpine-magic-helpers/discussions) or join us on the [AlpineJS Discord](https://discord.gg/snmCYk3)\n\n**Known issues**\n* [Using `$component`/`$parent` in `x-init`](#warning-using-componentparent-in-x-init)\n* [Using Magic Helpers with Livewire](#warning-using-magic-helpers-with-livewire)\n\n## Installation\n\nInclude the following `\n```\n\nOr you can use the specific magic helpers you need:\n\n```html\n\n\n\n\n\n\n\n\n\n\n```\n\n---\n\n### Manual\n\nIf you wish to create your own bundle:\n\n```bash\nnpm install alpine-magic-helpers --save\n```\n\nThen add the following to your script:\n\n```javascript\nimport 'alpine-magic-helpers'\nimport 'alpinejs'\n```\n\nOr you can import the specific magic helpers you need like so:\n\n```javascript\nimport 'alpine-magic-helpers/dist/component'\nimport 'alpine-magic-helpers/dist/fetch'\nimport 'alpinejs'\n```\n\n---\n\n### :warning: **Using Magic Helpers with Livewire**\nWhen using magic helpers along with Laravel Livewire, you need to make sure that the library is registered after Livewire to prevent Livewire from overriding the magic helper startup callbacks. This can be done either using the defer attribute on the magic helper script or including the magic helper script at the bottom of your body after `@livewireScripts` **without** the `defer` attribute.\n\n---\n\n### `$component`\n**Example:**\n\nArguably more useful, this also adds a `$parent` magic helper to access parent data\n```html\n
    \n

    \n \n
    \n```\n[Demo](https://codepen.io/KevinBatdorf/pen/XWdjWrr)\n\nYou may watch other components, but you must give them each an id using the 'id' attribute or `x-id` if you need more flexibility:\n```html\n
    \n \n \n

    \n
    \n\n
    \n```\n\n#### :warning: **Using `$component`/`$parent` in `x-init`**\n```html\n \n
    \n
    baz = $parent.foo\">\n \n
    \n
    \n \n
    \n
    baz = $parent.foo)\">\n \n
    \n
    \n \n
    \n
    baz = $parent.foo)\">\n \n
    \n
    \n```\nWhen a component is initialised, the observed component may not be ready yet due to the way Alpine starts up. This is always true for `$parent` and it occurs for `$component` when the observer is placed before the observed component in the page structure.\nPrevious versions were using a hack to evaluate the missing x-data on the fly but that strategy wasn't allowing to use nested magic properties and it was not syncronising properly in some edge cases.\nThe magic helper since version 1.0 defers the resolution of those properties (resolving temporary to empty strings/noop functions) until the observed component is ready and then refreshes the component: this happens in a few milliseconds and it's not noticable by the final users but refreshing a component won't rerun `x-init` with the correct values.\n**If developers need to use the magic property inside x-init, they'll need to manually postpone the execution of x-init for one tick either using the Alpine native `$nextTick` or a setTimeout with no duration (See examples above).**\n\n---\n\n### `$fetch`\n**Example:**\n```html\n
    console.log(data))\">\n \n
    \n```\n[Demo](https://codepen.io/KevinBatdorf/pen/poyyXKj)\n\n> As a shortcut, you can optionally use `$get(url, params)` or `$post(url, data)` to conveniently send a GET or POST request with params or data as the second argument.\n\n**Optionally pass in an Axios options object**\n\nIf you need more control, you may pass in an object to customize the request [See all options](https://github.com/axios/axios).\n\n**Example:**\n\n```html\n
    console.log(data))\">\n
    \n```\n> Note that this will return the entire response object, whereas by default `$fetch` will only return the data\n\n---\n\n### `$interval`\n**Example:**\n```html\n\n\n```\n[Demo](https://codepen.io/KevinBatdorf/pen/xxVVoaX?editors=1010)\n\n**Optionally pass in options**\n\nBy default, `$interval ` will run your function every `nth` millisecond when browser provides an animation frame (via `requestAnimationFrame`). This means that the function will not run if the browser tab is not visible. Optionally, you may pass in the following options as the second parameter:\n| Property | Description |\n| --- | --- |\n| `timer` | Timer in milliseconds. |\n| `delay` | Delay the first run. N.B. The first run is also delayed by the timer time. |\n| `forceInterval` | Ignore the browser animation request mechanism. Default is false |\n\n> \u26a0\ufe0f We also add a hidden property `autoIntervalTest` that will clear/stop the timer if set to false, and start the timer if then set to true.\n\n**Example:**\n\n```html\n\n \n\n```\n[Demo](https://codepen.io/KevinBatdorf/pen/poyyXQy?editors=1010)\n\n---\n\n### `$range`\n**Example:**\n\nThe `$range` helper mostly mimics implementations found in other languages `$range(start, stop, step = 1)`\n```html\n
    \n \n
    \n\n```\n[Demo](https://codepen.io/KevinBatdorf/pen/vYKbPBd)\n\n> N.B: You may use `$range(10)` which will compute to `[1...10]`\n\n---\n\n\n### `$refresh`\n**Example:**\n```html\n
    \n \n \n
    \n```\n[Demo](https://codepen.io/KevinBatdorf/pen/PobZjrz?editors=1000)\n\n---\n### `$screen`\n**Example:**\n\nThe `$screen` helper detects if the current browser width is equal or greater than a given breakpoint and returns `true` or `false` based on the result.\n\n```html\n
    \n This will be visible if the window width is equal or greater than 1024px.\n
    \n```\n\n*By default the `$screen` helper uses the following endpoint borrowed by **Tailwind CSS**:*\n- `xs`: 0px\n- `sm`: 640px\n- `md`: 768px\n- `lg`: 1024px\n- `xl`: 1280px\n- `2xl`: 1536px\n\n> \u26a0\ufe0f **NOTE**: A single breakpoint is only going to tell you if the browser width is equal or greater than the given breakpoint. If you want to restrict the check to a specific range, you will need to negate the next endpoint as:\n\n```html\n
    \n This will be visible if screen width is equal or greater than 768px but smaller then 1024px.\n
    \n```\n\n**Custom breakpoints**\n\nYou can pass a numeric value to use an ad-hoc breakpoint.\n```html\n
    \n This will be visible if screen width is equal or greater than 999px.\n
    \n```\n\nYou can also override the default breakpoints including the following `\n```\nAnd using those breakpoints in your page.\n```html\n
    \n This will be visible if screen width is equal or greater than 769px.\n
    \n```\n\n[Demo](https://codepen.io/KevinBatdorf/pen/OJXKRXE?editors=1000)\n\n---\n\n### `$scroll`\n**Example:**\n```html\n
    \n
    \n ...\n
    \n \n
    \n```\n[Demo](https://codepen.io/KevinBatdorf/pen/PozVLPy?editors=1000)\n\nAlternatively, you can pass a css selector to scroll to an element at any position.\n```html\n
    \n
    \n
    \n \n
    \n```\n\n`$scroll` also supports integers to scroll to a specific point of the page.\n```html\n\n```\n[Demo](https://codepen.io/KevinBatdorf/pen/PozVLPy?editors=1000) (same as above)\n\n`$scroll` optionally supports a second parameter where it's possible to define the behavior mode, `auto|smooth` (default smooth):\n```html\n
    \n
    \n ...\n
    \n \n
    \n...\n
    \n
    \n
    \n \n
    \n...\n\n```\nWith offset:\n```html\n
    \n
    \n ...\n
    \n \n
    \n...\n
    \n
    \n
    \n \n
    \n...\n\n```\nWith both:\n```html\n
    \n
    \n ...\n
    \n \n
    \n...\n
    \n
    \n
    \n \n
    \n...\n\n```\n[Demo](https://codepen.io/KevinBatdorf/pen/PozVLPy?editors=1000) (same as above)\n\n---\n\n### `$truncate`\n**Example:**\n```html\n\n \n\n```\nYou may also pass a third argument to change the string that will be appended to the end:\n```html\n\n \n\n```\n[Demo](https://codepen.io/KevinBatdorf/pen/BaKKgGg?editors=1000)\n\n**Optionally pass in options**\n\nBy default, `$truncate` will return take characters as a parameter. Instead you can pass in an object and trim by words. You may also update the ellipsis.\n\n**Example:**\n\n```html\n\n \n\n```\n[Demo](https://codepen.io/KevinBatdorf/pen/BaKKgGg?editors=1000) (same as above)\n> Behind the scenes, for words, this uses `sentence.split(\" \").splice(0, words).join(\" \")` which does not define a word in all languages.\n\n---\n### `$undo`\n**Example:**\n```html\n
    \n \n \n
    \n```\n[Demo](https://codepen.io/KevinBatdorf/pen/jOrVzOg?editors=1000)\n\nThe `$undo` helper actually involves three helpers in one. First, add the `$track()` helper to the `x-init` directive to start tracking the component state. Next, add a button to `$undo()` changes as needed. And finally, you can access whether changes have occurred by using `$history.length`.\n\n**Optionally pass in options**\n\nBy default, `$undo` will track all properties. Optionally you may limit the properties by passing in a string with the property name, or an array of property names.\n\n**Example:**\n\n```html\n
    \n \n \n \n
    \n```\n> Use `$track(['prop1', 'prop2'])` to track multiple properties\n\n[Demo](https://codepen.io/KevinBatdorf/pen/VwjmXLy?editors=1000)\n\n---\n### `x-unsafe-html`\n**Example:**\n```html\n
    \n
    \n \n
    \n```\n\n> :warning: **Only use on trusted content.** :warning:\n>\n> Dynamically rendering HTML from third parties can easily lead to [XSS](https://developer.mozilla.org/en-US/docs/Glossary/Cross-site_scripting) vulnerabilities.\n\n[Demo](https://codepen.io/KevinBatdorf/pen/poNYpZb)\n\n---\n\n## License\n\nCopyright (c) 2020 Alpine Collective\n\nLicensed under the MIT license, see [LICENSE.md](LICENSE.md) for details.\n", "readme_type": "markdown", "hn_comments": "This is really cool. I absolutely love Alpine, and a lot of these look like they could come in quite handy.TIL (by reading the source code) that you can add your own $functions to Alpine as well! I will definitely be making use of that functionality at some point.Alpine.js is one of those ideas that filled a massive void many people didn't even know existed (I certainly didn't, though was subconsciously annoyed with the options). Data-centric, declarative template rendering was married to SPA frameworks, which are very good at what they do but are often overkill. Alpine cut development time in half for one of my projects and I'm looking forward to reaching for it again.Loving the PETAL stack.PhoenixElixirTailwindCSSAlpineJSLiveView", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "airbnb/prop-types", "link": "https://github.com/airbnb/prop-types", "tags": [], "stars": 671, "description": "Custom React PropType validators that we use at Airbnb.", "lang": "JavaScript", "repo_lang": "", "readme": "# prop-types [![Version Badge][npm-version-svg]][package-url]\n\n[![Build Status][travis-svg]][travis-url]\n[![dependency status][deps-svg]][deps-url]\n[![dev dependency status][dev-deps-svg]][dev-deps-url]\n[![License][license-image]][license-url]\n[![Downloads][downloads-image]][downloads-url]\n\n[![npm badge][npm-badge-png]][package-url]\n\nCustom React PropType validators that we use at Airbnb. Use of [airbnb-js-shims](https://npmjs.com/package/airbnb-js-shims) or the equivalent is recommended.\n\n - `and`: ensure that all provided propType validators pass\n - `foo: and([number, nonNegativeInteger])`\n - `between`: provide an object with an `gt` or `gte` number, and an `lt` or `lte` number (only one item allowed from each pairs; one or both pairs may be provided), and the resulting propType validator will ensure the prop value is a number within the given range. Alternatively, you can provide a function that takes the `props` object and returns a number for each of the `gt`/`gte`/`lt`/`lte` values.\n - `foo: between({ gte: 0, lte: 5 })`\n - `foo: between({ gt: 0, lt: 5 })`\n - `booleanSome`: provide a list of props, and all must be booleans, and at least one of them must be `true`.\n - `foo: booleanSome('small', 'medium', 'large')`\n - `childrenHavePropXorChildren`: ensure that either all children have the indicated prop, all children have children, or all children have neither.\n - `foo: childrenHavePropXorChildren('bar')`\n - `childrenOf`: restrict the children prop to only allow children that pass the given propType validator.\n - `children: childrenOf(number.isRequired)`\n - `childrenOfType`: restrict the children prop to only allow children of the given element types - takes a Component, an HTML tag name, or `\"*\"` to match everything.\n - `children: childrenOfType('span')`\n - `children: childrenOfType(Component)`\n - `childrenSequenceOf`: restrict the children prop to be a sequenceOf the given \"specifiers\" (see `sequenceOf`)\n - `children: childrenSequenceOf({validator: string, min: 0, max: 5})`\n - `componentWithName`: restrict the prop to only allow a component with a certain name/displayName. Accepts a string, or a regular expression. Also accepts an `options` object with an optional `stripHOCs` array of string HOC names to strip off before validating; an HOC name must not contain parentheses and must be in camelCase.\n - `foo: componentWithName('Component')`\n - `foo: componentWithName('Component', { stripHOCs: ['withDirection', 'withStyles'] })`\n - `disallowedIf`: restrict the prop from being provided if the given other prop name matches the given other prop type. The other prop type validator only applies if the other prop name is not a null value.\n - `foo: disallowedIf(string, 'bar', bool)`\n - `elementType`: require that the prop be a specific type of React element - takes a Component, an HTML tag name, or `\"*\"` to match everything.\n - `foo: elementType('span')`\n - `foo: elementType(Component)`\n - `empty`: a value that React renders to nothing: `undefined`, `null`, `false`, the empty string, or an array of those things.\n - `foo: empty()`\n - `explicitNull`: only allow `null` or `undefined`/omission - and only `null` when required.\n - `foo: explicitNull()`\n - `forbidExtraProps`: pass your entire `propTypes` object into this function, and any nonspecified prop will error.\n - `Component.propTypes = forbidExtraProps({foo: number.isRequired})`\n - `integer`: require the prop be an integer.\n - `foo: integer()`\n - `keysOf`: pass in a proptype, and require all the keys of a prop to have that type\n - `foo: keysOf(number)`\n - `mutuallyExclusiveProps`: provide a propType, and a list of props, and only one prop out of the list will be permitted, validated by the given propType.\n - `foo: mutuallyExclusiveProps(bool, 'bar', 'sna')`\n - `mutuallyExclusiveTrueProps`: provide a list of props, and all must be booleans, and only one is allowed to be true.\n - `foo: mutuallyExclusiveTrueProps('bar', 'sna')`\n - `nChildren`: require a specific amount of children.\n - `children: nChildren(3)`\n - `children: nChildren(3, childrenOfType('span'))`\n - `nonNegativeInteger`: require that the prop be a number, that is 0, or a finite positive integer.\n - `foo: nonNegativeInteger()`\n - `nonNegativeNumber`: require that the prop be a number, that is 0, or a finite positive number.\n - `foo: nonNegativeNumber()`\n - `numericString`: require the prop be a string that is conceptually numeric.\n - `foo: numericString()`\n - `object`: same as `PropTypes.object`, but can be called outside of React's propType flow.\n - `or`: recursively allows only the provided propTypes, or arrays of those propTypes.\n - `foo: or([bool.isRequired, explicitNull()])`\n - `predicate`: provide a predicate function, and an optional message, and will fail when the predicate returns false.\n - `foo: predicate((x) => x % 2 === 0, 'must be an even integer')`\n - `range`: provide a min, and a max, and the prop must be an integer in the range `[min, max)`\n - `foo: range(-1, 2)`\n - `ref`: require the prop to be a React ref. These can be either the object returned from `React.createRef()` or \"callback\" refs.\n - `foo: ref()`\n - `requiredBy`: pass in a prop name and propType, and require that the prop is defined and is not its default value if the passed in prop name is truthy. if the default value is not provided, defaults to checking against `null`.\n - `foo: requiredBy('bar', bool)`\n - `restrictedProp`: this prop is not permitted to be anything but `null` or `undefined`.\n - `foo: restrictedProp()`\n - `foo: restrictedProp(new TypeError('Custom Error'))`\n - `sequenceOf`: takes 1 or more \"specifiers\": an object with a \"validator\" function (a propType validator), a \"min\" nonNegativeInteger, and a \"max\" nonNegativeInteger. If both \"min\" and \"max\" may be omitted, they default to 1; if only \"max\" is omitted, it defaults to Infinity; if only \"min\" is omitted, it defaults to 1.\n - `foo: sequenceOf({validator: string, min: 0, max: 5})`\n - `shape`: takes a shape, and allows it to be enforced on any non-null/undefined value.\n - `foo: shape({ length: oneOf([2]) })`\n - `stringEndsWith`: takes a non-empty string, and returns a validator that ensures the prop value is a string that ends with it.\n - `foo: stringEndsWith('.png')`\n - `stringStartsWith`: takes a non-empty string, and returns a validator that ensures the prop value is a string that starts with it.\n - `foo: stringStartsWith('prefix-')`\n - `uniqueArray`: this prop must be an array, and all values must be unique (determined by `Object.is`). Like `PropTypes.array`, but with uniqueness.\n - `foo: uniqueArray()`\n - `uniqueArrayOf`: `uniqueArray`, with a type validator applied. Like `PropTypes.arrayOf`, but with uniqueness. Can also take an optional mapper function that allows for a non-standard unique calculation (otherwise, `Object.is` is used by default). The function is applied to each element in the array, and the resulting values are compared using the standard unique calculation.\n - `foo: uniqueArrayOf(number)`\n - `foo: uniqueArrayOf(element => element ** 2)`\n - `foo: uniqueArrayOf(element => element ** 2, 'test')`\n - `foo: uniqueArrayOf(array, element => element[0] ** 2, 'test')`\n - `valuesOf`: a non-object requiring `PropTypes.objectOf`. Takes a propType validator, and applies it to every own value on the propValue.\n - `foo: valuesOf(number)`\n - `withShape`: takes a PropType and a shape, and allows it to be enforced on any non-null/undefined value.\n - `foo: withShape(array, { length: oneOf([2]) })`\n\n## Production\nSince `PropTypes` are typically not included in production builds of React, this library\u2019s functionality serves no useful purpose. As such, when the `NODE_ENV` environment variable is `\"production\"`, instead of exporting the implementations of all these prop types, we export mock functions - in other words, something that ensures that no exceptions are thrown, but does no validation. When environment variables are inlined (via a browserify transform or webpack plugin), then tools like webpack or uglify are able to determine that only the mocks will be imported - and can avoid including the entire implementations in the final bundle that is sent to the browser. This allows for a much smaller ultimate file size, and faster in-browser performance, without sacrificing the benefits of `PropTypes` themselves.\n\n## Tests\nClone the repo, `npm install`, `npm run react`, and run `npm test`\n\n[package-url]: https://npmjs.org/package/airbnb-prop-types\n[npm-version-svg]: http://versionbadg.es/airbnb/prop-types.svg\n[travis-svg]: https://travis-ci.org/airbnb/prop-types.svg\n[travis-url]: https://travis-ci.org/airbnb/prop-types\n[deps-svg]: https://david-dm.org/airbnb/prop-types.svg\n[deps-url]: https://david-dm.org/airbnb/prop-types\n[dev-deps-svg]: https://david-dm.org/airbnb/prop-types/dev-status.svg\n[dev-deps-url]: https://david-dm.org/airbnb/prop-types#info=devDependencies\n[npm-badge-png]: https://nodei.co/npm/airbnb-prop-types.png?downloads=true&stars=true\n[license-image]: http://img.shields.io/npm/l/airbnb-prop-types.svg\n[license-url]: LICENSE\n[downloads-image]: http://img.shields.io/npm/dm/airbnb-prop-types.svg\n[downloads-url]: http://npm-stat.com/charts.html?package=airbnb-prop-types\n", "readme_type": "markdown", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "denysdovhan/inboxer", "link": "https://github.com/denysdovhan/inboxer", "tags": ["electron", "electron-app", "macos", "nodejs", "javascript", "macos-app", "linux", "linux-app", "google-inbox", "mail", "gmail", "gmail-inbox", "windows-app", "windows"], "stars": 671, "description": "Unofficial, free and open-source Inbox by Gmail Desktop App", "lang": "JavaScript", "repo_lang": "", "readme": "> ## \ud83d\udea7 This project is deprecated! \ud83d\udea7\n>\n> As you know Google is going to take down Inbox service.\n>\n> **This project is not maintained anymore. Since Inbox is closed this project has to be closed as well. It just cannot operate normally without Inbox.**\n>\n> You can find more information [here](https://github.com/denysdovhan/inboxer/issues/101).\n\n
    \n \n

    Inboxer

    \n

    \n \"Version\"\n \"Travis\n \"Platform\"\n \"Donate\n \"Donate\n \"Donate\n

    \n
    \n\n> Unofficial, free and open-source Google Gmail Desktop App\n\nInboxer \u2014 started out as an unofficial Inbox by Gmail client for desktop platforms. However, Google plans to discontinue Inbox at the end of March 2019 ([see official announcement](https://www.blog.google/products/gmail/inbox-signing-find-your-favorite-features-new-gmail/)). To keep Inboxer alive we have converted it to work with Gmail. Inboxer is now built on top of Gmail web-version. It has pleasant UI and supports useful keyboard shortcuts.\n\nInboxer is highly inspired by these projects:\n\n* [Caprine](https://github.com/sindresorhus/caprine) by [Sindre Sorhus](https://github.com/sindresorhus)\n* [Ramme](https://github.com/terkelg/ramme) by [Terkel Gjervig Nielsen](https://github.com/terkelg)\n* [Keep](https://github.com/andrepolischuk/keep) by [Andrey Polischuk](https://github.com/andrepolischuk)\n\nCheck out these ones as great examples of Electron applications. All of them are under the MIT license.\n\n## Features\n\n* Familiar Gmail interface\n* Cross-platform (macOS/Linux/Windows)\n* Useful Keyboard shortcuts\n* Multiple accounts\n* Optional Always on Top\n* Auto-updates to the latest version\n* Desktop notifications\n* **TODO:** Dark theme\n* **TODO:** Custom text size\n* **TODO:** Ability to use as default mail client\n\nAll feature requests and contributions are welcome!\n\n## Screenshot\n\n* **TODO:** Update screenshot to show latest version working with Gmail\n![Inboxer on Mac](./media/inboxer-mac.png)\n\n## Installation\n\nInboxer works well on **macOS 10.9+**, **Linux** and **Windows 7+**. You can download the latest version on [Releases](https://github.com/denysdovhan/inboxer/releases) page or below.\nInboxer is also available through the nix package manager (see [package in nix](https://nixos.org/nixos/packages.html#inboxer))\n\n### macOS\n\n[**Download**][download] the `.dmg` file or install via [Homebrew-Cask](https://caskroom.github.io/):\n\n```\n$ brew cask install inboxer\n```\n\n### Linux\n\n[**Download**][download] the `.AppImage`* or `.deb` or `.snap` file.\n\n\\* \u2014 Notice, that the `AppImage` needs to be [made executable](http://discourse.appimage.org/t/how-to-make-an-appimage-executable/80) after download.\n\n### Windows\n\n[**Download**][download] the `.exe` file.\n\n### Package Inboxer from source\n\nYou'll need `electron` and `npm` installed in your system.\n[**Download**][download] and extract the source code (`.zip` or `.tar.gz` file).\nInside the source code folder, run:\n```\n$ npm install\n```\nThen package the app with:\n```\n$ npm run dist\n```\nThis builds packages for all architectures. Use `dist:mac`, `dist:linux`, or `dist:win` to package a single architecture. The packages will be found in the `dist` folder.\n\n## Keyboard shortcuts\n\nInboxer supports all Gmail keyboard shortcuts, system-specific keybindings and more. Additional keybindings are listed below:\n\n| Description | Keys\n|------------------------------|---------\n| Preferences | Cmd/Ctrl P\n| Compose Message | Cmd/Ctrl N\n| Go to Inbox | Cmd/Ctrl I\n| Go to Snoozed | Cmd/Ctrl S\n| Go to Done | Cmd/Ctrl D\n| Drafts | Cmd/Ctrl Shift D\n| Sent | Cmd/Ctrl Shift S\n| Trash | Alt Shift T\n| Spam | Alt Shift S\n| Open Contacts | Cmd/Ctrl Shift C\n| Search | Cmd/Ctrl F\n| Toggle Sidebar | Cmd/Ctrl /\n| Toggle \"Always on Top\" | Cmd/Ctrl Shift T\n| Keyboard Shortcuts Reference | Shift / or ?\n| Toggle Developer Tools | Option Cmd I _(macOS)_ or Ctrl Shift I\n\n## Disclaimer\n\nThis code is in no way affiliated with, authorised, maintained, sponsored or endorsed by Google or any of its affiliates or subsidiaries. This is an independent and unofficial Gmail app. Use it at your own risk.\n\n## End User License Agreement\n\n* You **will not** use this repository for sending mass spam or any other malicious activity.\n* We / You **will not** support anyone who is violating this EULA conditions.\n* Repository is just for learning / personal purposes thus **should not** be part of any service available on the Internet that is trying to do any malicious activity (mass bulk request, spam etc).\n\n## Donate\n\nHi! I work on this project in my spare time, beside my primary job. I hope enjoy using Inboxer, and if you do, please, [support this project \ud83d\ude4f\ud83c\udffb][donate-card-url].\n\n| Credit/Debit card | Bitcoin | Ethereum |\n|:-----------------:|:-------:|:--------:|\n| [Donate with LiqPay][donate-card-url] | `1FrPrQb6ACTkbSBAz9PduJWrDFfq41Ggb4` | `0x6aF39C917359897ae6969Ad682C14110afe1a0a1` |\n| | | |\n\nI would appreciate your support! _Thank you!_\n\n[donate-readme]: https://github.com/denysdovhan/inboxer#donate\n[donate-card-url]: https://www.liqpay.com/en/checkout/380951100392\n[donate-card-image]: https://img.shields.io/badge/donate-LiqPay-blue.svg?style=flat-square\n[donate-btc-image]: https://img.shields.io/badge/donate-BTC-yellow.svg?style=flat-square\n[donate-eth-image]: https://img.shields.io/badge/donate-ETH-gray.svg?style=flat-square\n\n## License\n\nMIT \u00a9 [Denys Dovhan](http://denysdovhan.com)\n\n\n\n[download]: https://github.com/denysdovhan/inboxer/releases/latest\n", "readme_type": "markdown", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "RoderickQiu/wnr", "link": "https://github.com/RoderickQiu/wnr", "tags": ["timer", "pomodoro", "electron-app", "floss", "windows", "macos", "linux", "time-managment", "pomodoro-technique", "productivity-timer", "productivity-booster", "electron"], "stars": 671, "description": "\u23f1\ufe0f Work/Rest Timer. Stricter. Prettier. More features. Win/Mac/Linux. Will update when there are new issues.", "lang": "JavaScript", "repo_lang": "", "readme": "

    \n\n

    wnr

    \n\n

    \n \u4e00\u500b\u64c1\u6709\u9ad8\u53ef\u64f4\u5c55\u6027\u7684\u6642\u9593\u7ba1\u7406\u8a08\u7b97\u6a5f\u8edf\u4ef6 | \u4e2d\u6587\u7db2\u7ad9\n

    \n\n

    \n \u4e0b\u8f09\u5730\u5740 (Win/Mac/Linux): GitHub Release | Softpedia\n (Windows) | \u767e\u5ea6\u7db2\u76e4\uff08swh3\uff09 | \u85cd\u594f\u96f2\u9ad8\u901f\u4e0b\u8f09\n

    \n\n

    \n English README | \u7b80\u4f53\u4e2d\u6587\u7b80\u4ecb | \u6b63\u9ad4\u4e2d\u6587\u7c21\u4ecb | \u958b\u767c\u5c0e\u5f15\u6587\u6a94 | \u806f\u7e6b\u6211\n

    \n\n---\n\n## \u8ca2\u737b\n\n\u975e\u5e38\u611f\u8b1d\u4f60\u7684\u8ca2\u737b\u3002\n\n- \u5982\u679c\u4f60\u60f3\u5831\u544a\u4e00\u4e9b\u671f\u671b\u7684\u7279\u6027\u6216\u6f0f\u6d1e\uff0c\u8acb\u96a8\u6642 [\u63d0\u4ea4 Issue](https://github.com/RoderickQiu/wnr/issues/new) \u3002\n\n- \u5982\u679c\u4f60\u505a\u4e86\u4e9b\u4e0d\u932f\u7684\u6539\u9032\uff0c\u90a3\u9ebc\u8acb [\u63d0\u4ea4 Pull Request](https://github.com/RoderickQiu/wnr/pulls) \u3002\n\n- \u5982\u679c\u4f60\u60f3\u7232 wnr \u6dfb\u52a0\u4e00\u7a2e\u8a9e\u8a00\u7684\u652f\u6301\uff0c [\u8acb\u5148\u95b1\u8b80\u9019\u4efd\u6307\u5357](https://github.com/RoderickQiu/wnr/blob/master/locales/README.md) \u3002\n\n## \u5982\u4f55\u69cb\u5efa\n\n```shell\nyarn # \u5b89\u88dd\u4f9d\u8cf4\n\nyarn start # \u904b\u884c\u7a0b\u5e8f\n\nyarn dir # \u50c5\u50c5\u6253\u5305\u57fa\u790e\u53ef\u57f7\u884c\u6587\u4ef6\n\nyarn nsis # Windows\u5e73\u81faNSIS\u5b89\u88dd\u5305\u6253\u5305\n\nyarn nsis-ia32 # Windows\u5e73\u81faNSIS\u5b89\u88dd\u5305\u6253\u5305\uff0832\u4f4d\uff09\n\nyarn 7zip # Windows\u5e73\u81fa7z\u4fbf\u651c\u7248\u6253\u5305\n\nyarn 7zip-ia32 # Windows\u5e73\u81fa7z\u4fbf\u651c\u7248\u6253\u5305\uff0832\u4f4d\uff09\n\nyarn mac # macOS\u7248\u672c\u6253\u5305\n\nyarn linux # Linux\u7248\u672c\u6253\u5305\n\nyarn appimage # linux AppImage\u6253\u5305\n```\n\n\u66f4\u591a\u6709\u95dc wnr \u7684\u6280\u8853\u7d30\u7bc0\u548c\u958b\u767c\u5efa\u8b70\uff0c\u8acb\u67e5\u770b **[DEVELOPMENT_GUIDE](https://github.com/RoderickQiu/wnr/blob/master/DEVELOPMENT_GUIDE.md)** \u3002\n\n## \u7248\u6b0a\u548c\u9cf4\u8b1d\n\n\u7248\u6b0a\u6240\u6709 (c) 2019-2022 **[Roderick Qiu](https://r-q.name)** \u548c\u5176\u4ed6\u8ca2\u737b\u8005\u3002\u4fdd\u7559\u6240\u6709\u6b0a\u5229\u3002\n\n\u4f7f\u7528 **[MPL 2.0 \u8a31\u53ef\u8b49](https://github.com/RoderickQiu/wnr/blob/master/LICENSE)** \u9032\u884c\u8a31\u53ef\u3002\n\n### \u4f7f\u7528\u7684\u8edf\u4ef6\u5305\n\n#### \u4e3b\u7a0b\u5e8f\n\n\u5b8c\u6574\u7684\u8a31\u53ef\u8b49\u6587\u672c\u53c3\u898b [\u9019\u500b\u6587\u4ef6](https://github.com/RoderickQiu/wnr/blob/master/NOTICE.md) \uff0c\u540c\u6642\u4e5f\u5305\u542b\u5728\u6bcf\u4e00\u4efd wnr \u7684\u526f\u672c\u4e2d\u3002\n\n- node-shi\uff0c[**\u6211\u81ea\u5df1\u7684\u9805\u76ee**](https://www.npmjs.com/package/node-shi) \u4f7f\u7528 MIT \u8a31\u53ef\u8b49\u3002\n- cmd-or-ctrl\uff0c[**\u53e6\u4e00\u500b\u6211\u81ea\u5df1\u7684\u9805\u76ee**](https://www.npmjs.com/package/cmd-or-ctrl) \u4f7f\u7528 MIT \u8a31\u53ef\u8b49\u3002\n- node-auto-launch\uff0cTeamwork\uff0cMIT \u8a31\u53ef\u8b49\u3002\n- compare-version\uff0ckevva\uff0cMIT \u8a31\u53ef\u8b49\u3002\n- electron-store\uff0csindresorhus\uff0cMIT \u8a31\u53ef\u8b49\u3002\n- i18n-node\uff0cmashpie\uff0cMIT \u8a31\u53ef\u8b49\u3002\n- crypto-js\uff0cbrix\uff0cMIT \u8a31\u53ef\u8b49\u3002\n- copy-to-clipboard\uff0csudodoki\uff0cMIT \u8a31\u53ef\u8b49\u3002\n- request\uff0crequest\uff0cApache-2.0 \u8a31\u53ef\u8b49\u3002\n- winreg\uff0cfresc81\uff0cBSD 2-Clause \u8a31\u53ef\u8b49\u3002\n- **electron\uff0celectron\uff0cMIT \u8a31\u53ef\u8b49**\u3002\n- electron-builder\uff0celectron-userland\uff0cMIT \u8a31\u53ef\u8b49\u3002\n- jquery\uff0cjquery\uff0cMIT \u8a31\u53ef\u8b49\u3002\n- bootstrap\uff0ctwbs\uff0cMIT \u8a31\u53ef\u8b49\u3002\n- iconfont\uff0cALIMAMA MUX\uff0c\u8a31\u53ef\u8b49\u53c3\u898b [\u6b64\u7db2\u7ad9](https://www.iconfont.cn/) \u3002\n- node-md5\uff0cpvorb\uff0cBSD-3-Clause \u8a31\u53ef\u8b49\u3002\n- dotenv\uff0cmotdotla\uff0cBSD-2-Clause \u8a31\u53ef\u8b49\u3002\n- electron-debug\uff0csindresorhus\uff0cMIT \u8a31\u53ef\u8b49\u3002\n- node-fetch\uff0cnode-fetch\uff0cMIT \u8a31\u53ef\u8b49\u3002\n- node-notifier\uff0cmikaelbr\uff0cMIT \u8a31\u53ef\u8b49\u3002\n- popper.js\uff0cpopperjs\uff0cMIT \u8a31\u53ef\u8b49\u3002\n- schart.js\uff0clin-xin\uff0cMIT \u8a31\u53ef\u8b49\u3002\n- cross-env\uff0ckentcdodds\uff0cMIT \u8a31\u53ef\u8b49\u3002\n\n### \u958b\u767c\u74b0\u5883\n\n- **node\uff0cnodejs\uff0c**[**\u8a31\u53ef\u8b49**](https://github.com/nodejs/node/blob/master/LICENSE) \u3002\n- NSIS\uff0cNullsoft\uff0czlib/libpng \u8a31\u53ef\u8b49\u3002\n- WebStorm\uff0cJetBrains\uff0c[\u8a31\u53ef\u8b49](https://www.jetbrains.com/legal/#licensing) \u3002\n", "readme_type": "markdown", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "spekt8/spekt8", "link": "https://github.com/spekt8/spekt8", "tags": ["kubernetes", "kubernetes-cluster", "kubernetes-monitoring", "docker", "docker-container", "docker-image", "visualization"], "stars": 671, "description": "Visualize your Kubernetes cluster in real time", "lang": "JavaScript", "repo_lang": "", "readme": "", "readme_type": "markdown", "hn_comments": "I'd love to tinker with this. What is a classic problem or demo for graph neural networks? Is there an equivalent to the MNIST problem for GNNs that would make a good learning exercise?YEEES I will finally be able to complete a college assignment that I postponedAs soon as I saw the title, my reaction was \"YESSSS!\"... A while ago, I was looking for something like this, but I soon realized that deep learning on graphs is still comparatively new, and not many python modules exist for it.How is the data fed into the model? Are the graphs represented by a dictionary or an adjacency matrix (or neither)? Does anyone have more links I can read more about graph based deep learning?", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "eddywashere/node-stripe-membership-saas", "link": "https://github.com/eddywashere/node-stripe-membership-saas", "tags": [], "stars": 671, "description": "This project is a boilerplate express app for creating a membership/subscription site with Stripe.", "lang": "JavaScript", "repo_lang": "", "readme": "# Node Stripe Membership SaaS\n\nThis project is a boilerplate express app for creating a membership/subscription site with [Stripe](https://stripe.com), [Mailgun](https://mailgun.com/signup), mongodb and swig. Inspired by [sahat/hackathon-starter](https://github.com/sahat/hackathon-starter) and [RailsApps/rails-stripe-membership-saas](https://github.com/RailsApps/rails-stripe-membership-saas). It also handles stripe webhooks.\n\nCheck out the [demo](https://node-stripe-membership-saas.herokuapp.com/dashboard)!\n\n\n \n\n\n### System Requirements\n\n- mongodb\n- nodejs\n\n### Getting Started\n\nFirst update `/server/config/secrets.js` with the following credentials:\n\n- Stripe [API keys](https://dashboard.stripe.com/account/apikeys) and [plan info](https://dashboard.stripe.com/test/plans)\n- [Mailgun](https://mailgun.com/signup) for sending forgot/reset password confirmations.\n- session secret\n- google analytics id\n\nInstall dependencies with `npm install`.\n\nStart the server with `node server`.\n\nNote: Stripe webhooks can be recieved at `https://your-url.com/stripe/events`.\n\n### Heroku Deployment\n\n```\nheroku create your-awesome-saas-product\nheroku addons:add mongohq\nheroku config:set SESSION_SECRET='your_secret';\nheroku config:set STRIPE_KEY='sk_test_example'\nheroku config:set STRIPE_PUB_KEY='pk_test_example'\nheroku config:set MAILGUN_USER='example.org'\nheroku config:set MAILGUN_PASSWORD='key-secret'\nheroku config:set GOOGLE_ANALYTICS='UA-XXXXXX-1'\n```\n\nWant add a heroku deploy button? Pull requests welcome :]\n", "readme_type": "markdown", "hn_comments": "Dude Nice! I'm glad you published this. Will let you know if I hit any issues.", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "sindresorhus/leven", "link": "https://github.com/sindresorhus/leven", "tags": [], "stars": 671, "description": "Measure the difference between two strings with the fastest JS implementation of the Levenshtein distance algorithm", "lang": "JavaScript", "repo_lang": "", "readme": "# leven\n\n> Measure the difference between two strings using the [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) algorithm\n\n## Install\n\n```\n$ npm install leven\n```\n\n## Usage\n\n```js\nimport leven from 'leven';\n\nleven('cat', 'cow');\n//=> 2\n```\n\n## Related\n\n- [leven-cli](https://github.com/sindresorhus/leven-cli) - CLI for this module\n\n---\n\n
    \n\t\n\t\tGet professional support for this package with a Tidelift subscription\n\t\n\t
    \n\t\n\t\tTidelift helps make open source sustainable for maintainers while giving companies
    assurances about security, maintenance, and licensing for their dependencies.\n\t
    \n
    \n", "readme_type": "markdown", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "engine262/engine262", "link": "https://github.com/engine262/engine262", "tags": ["ecma262", "javascript", "interpreter", "reference-implementation", "engine262"], "stars": 670, "description": "An implementation of ECMA-262 in JavaScript", "lang": "JavaScript", "repo_lang": "", "readme": "# engine262\n\nAn implementation of ECMA-262 in JavaScript\n\nGoals\n- 100% Spec Compliance\n- Introspection\n- Ease of modification\n\nNon-Goals\n- Speed at the expense of any of the goals\n\nThis project is bound by a [Code of Conduct][COC].\n\nJoin us in `#engine262:matrix.org`.\n\n## Why this exists\n\nWhile helping develop new features for JavaScript, I've found that one of the\nmost useful methods of finding what works and what doesn't is being able to\nactually run code using the new feature. [Babel][] is fantastic for this, but\nsometimes features just can't be nicely represented with it. Similarly,\nimplementing a feature in one of the engines is a large undertaking, involving\nlong compile times and annoying bugs with the optimizing compilers.\n\nengine262 is a tool to allow JavaScript developers to have a sandbox where new\nfeatures can be quickly prototyped and explored. As an example, adding\n[do expressions][] to this engine is as simple as the following diff:\n\n```diff\n--- a/src/evaluator.mjs\n+++ b/src/evaluator.mjs\n@@ -232,6 +232,8 @@ export function* Evaluate(node) {\n case 'GeneratorBody':\n case 'AsyncGeneratorBody':\n return yield* Evaluate_AnyFunctionBody(node);\n+ case 'DoExpression':\n+ return yield* Evaluate_Block(node.Block);\n default:\n throw new OutOfRange('Evaluate', node);\n }\n--- a/src/parser/ExpressionParser.mjs\n+++ b/src/parser/ExpressionParser.mjs\n@@ -579,6 +579,12 @@ export class ExpressionParser extends FunctionParser {\n return this.parseRegularExpressionLiteral();\n case Token.LPAREN:\n return this.parseParenthesizedExpression();\n+ case Token.DO: {\n+ const node = this.startNode();\n+ this.next();\n+ node.Block = this.parseBlock();\n+ return this.finishNode(node, 'DoExpression');\n+ }\n default:\n return this.unexpected();\n }\n```\n\nThis simplicity applies to many other proposals, such as [optional chaining][],\n[pattern matching][], [the pipeline operator][], and more. This engine has also\nbeen used to find bugs in ECMA-262 and [test262][], the test suite for\nconforming JavaScript implementations.\n\n## Requirements\n\nTo run engine262 itself, a engine with support for recent ECMAScript features\nis needed. Additionally, the CLI (`bin/engine262.js`) and test262 runner\n(`test/test262/test262.js`) require a recent version of Node.js.\n\n## Using engine262\n\nUse it online: https://engine262.js.org\n\nYou can install the latest engine262 build from [GitHub Packages][].\n\nIf you install it globally, you can use the CLI like so:\n\n`$ engine262`\n\nOr, you can install it locally and use the API:\n\n```js\n'use strict';\n\nconst {\n Agent,\n setSurroundingAgent,\n ManagedRealm,\n Value,\n\n CreateDataProperty,\n\n inspect,\n} = require('engine262');\n\nconst agent = new Agent({\n // onDebugger() {},\n // ensureCanCompileStrings() {},\n // hasSourceTextAvailable() {},\n // loadImportedModule() {},\n // onNodeEvaluation() {},\n // features: [],\n});\nsetSurroundingAgent(agent);\n\nconst realm = new ManagedRealm({\n // promiseRejectionTracker() {},\n // getImportMetaProperties() {},\n // finalizeImportMeta() {},\n // randomSeed() {},\n});\n\nrealm.scope(() => {\n // Add print function from host\n const print = new Value((args) => {\n console.log(...args.map((tmp) => inspect(tmp)));\n return Value.undefined;\n });\n CreateDataProperty(realm.GlobalObject, new Value('print'), print);\n});\n\nrealm.evaluateScript(`\n'use strict';\n\nasync function* numbers() {\n let i = 0;\n while (true) {\n const n = await Promise.resolve(i++);\n yield n;\n }\n}\n\n(async () => {\n for await (const item of numbers()) {\n print(item);\n }\n})();\n`);\n\n// a stream of numbers fills your console. it fills you with determination.\n```\n\n## Testing engine262\n\nThis project can be run against [test262][], which is particularly useful\nfor developing new features and/or tests:\n```sh\n$ # build engine262\n$ npm run build\n\n$ # update local test262 in test/test262/test262\n$ git submodule update --init --recursive\n\n$ # update local test262 to a pull request\n$ pushd test/test262/test262\n$ git fetch origin refs/pull/$PR_NUMBER/head && git checkout FETCH_HEAD\n$ popd\n\n$ # run specific tests\n$ npm run test:test262 built-ins/AsyncGenerator*\n\n$ # run all tests\n$ npm run test:test262\n```\nThe output will indicate counts for total tests, passing tests, failing tests, and skipped tests.\n\n## Related Projects\n\nMany people and organizations have attempted to write a JavaScript interpreter\nin JavaScript much like engine262, with different goals. Some of them are\nincluded here for reference, though engine262 is not based on any of them.\n\n- https://github.com/facebook/prepack\n- https://github.com/mozilla/narcissus\n- https://github.com/NeilFraser/JS-Interpreter\n- https://github.com/metaes/metaes\n- https://github.com/Siubaak/sval\n\n[Babel]: https://babeljs.io/\n[COC]: https://github.com/engine262/engine262/blob/master/CODE_OF_CONDUCT.md\n[do expressions]: https://github.com/tc39/proposal-do-expressions\n[optional chaining]: https://github.com/tc39/proposal-optional-chaining\n[pattern matching]: https://github.com/tc39/proposal-pattern-matching\n[test262]: https://github.com/tc39/test262\n[the pipeline operator]: https://github.com/tc39/proposal-pipeline-operator\n[GitHub Packages]: https://github.com/engine262/engine262/packages\n", "readme_type": "markdown", "hn_comments": "engine262 is primarily designed as an interface for developing and verifying JavaScript languages features as they're added to the JavaScript specification. If you read through the source, most of the code mirrors the algorithms as they appear in the specification. As such, performance is an explicit non-goal.Hopefully y'all get a kick out of playing with some future JS features too. I'm also working locally on a system for stepping through code, although it depends on SharedArrayBuffer, which is disabled in many browsers.Fun example of specification parity: https://tc39.es/ecma262/#sec-object.fromentries vs https://github.com/engine262/engine262/blob/85fdf5b2dcd50269...old newsold news", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "elclanrs/jq-idealforms-old", "link": "https://github.com/elclanrs/jq-idealforms-old", "tags": [], "stars": 670, "description": "The ultimate framework for building and validating responsive HTML5 forms.", "lang": "JavaScript", "repo_lang": "", "readme": "![Ideal Forms logo](http://i.imgur.com/SdOk2.jpg)\n\n# Check out [Ideal Forms 3](https://github.com/elclanrs/jq-idealforms)! Ideal Forms 2 is no longer supported.\n\n**Ideal Forms** is the ultimate framework for building and validating responsive HTML5 forms.\n\n* **[DEMO](http://elclanrs.github.com/jq-idealforms-old)**\n* **Support:** IE8+, Webkit, Firefox, Opera, iOS 5+, Android 4.0+.\n* **jQuery 1.7+, UI 1.8+**\n* **License:** [GPL](http://www.gnu.org/licenses/gpl.html) or [MIT](http://en.wikipedia.org/wiki/MIT_License)\n* [Download as zip](https://github.com/elclanrs/jq-idealforms/raw/master/zip/jquery.idealforms.zip)\n\n### Features:\n* Fully responsive (AKA adaptive, adapts to the container, no css media queries needed)\n* Keyboard support\n* Every input type can be customized including `select`, `radio`, `checkbox` and `file`\n* Custom datepicker using jQuery UI (with fallback)\n* \"On the spot\" validation\n* Localization\n\n### Updates:\n**02/26/13**\n- Update grunt to 0.4.0 and fix alignment issues css\n\n[Update history](#update-history)\n\n### Videos:\n* [Simulating slow AJAX requests with loading status](http://www.youtube.com/watch?v=-FSShf8jlAg)\n* [Adding and removing fields dynamically](http://www.youtube.com/watch?v=z-wPmywl4Tc&feature=youtu.be)\n\n### FAQ:\n* [Integrating Google reCAPTCHA](https://github.com/elclanrs/jq-idealforms/issues/30)\n* [Playing nice with Twitter Bootstrap](https://github.com/elclanrs/jq-idealforms/issues/32#issuecomment-7747413)\n* [Submit form with AJAX](https://github.com/elclanrs/jq-idealforms/issues/42)\n\n### Help:\n* Help localizing Ideal Forms in other languages.\n\nTable of contents:\n------------------\n\n- [Setup](#setup)\n- [Markup](#markup)\n- [Options](#options)\n - [inputs](#inputs)\n - [globalFlags](#globalflags)\n - [onSuccess](#onsuccess)\n - [onFail](#onfail)\n - [responsiveAt](#responsiveat)\n - [disableCustom](#disablecustom)\n- [Filters](#filters)\n- [Flags](#flags)\n- [Adding custom filters and flags](#adding-custom-filters-and-flags)\n- [Methods](#methods)\n - [setOptions](#setoptions)\n - [setFieldOptions](#setfieldoptions)\n - [isValid](#isvalid)\n - [isValidField](#isvalidfield)\n - [getInvalid](#getinvalid)\n - [getInvalidInTab](#getinvalidintab)\n - [addFields](#addfields)\n - [removeFields](#removefields)\n - [toggleFields](#togglefields)\n - [focusFirst](#focusfirst)\n - [focusFirstInvalid](#focusfirstinvalid)\n - [switchTab](#switchtab)\n - [nextTab](#nexttab)\n - [prevTab](#prevtab)\n - [firstTab](#firsttab)\n - [lastTab](#slasttab)\n - [reset](#reset)\n - [resetFields](#resetfields)\n - [fresh](#fresh)\n - [freshFields](#freshfields)\n - [reload](#reload)\n- [Example](#example)\n- [Theming](#theming)\n\nSetup:\n-----\n\n* Load [jQuery library](http://jquery.com)\n* Load `js/min/jquery.idealforms.min.js` plugin\n* Load `css/jquery.idealforms.css` stylesheet\n* Load [jQuery UI](http://jqueryui.com/) for datepicker support\n* Replace your document's opening `` tag with the following conditional comments. This will load the appropiate fixes for all supported IE versions:\n\n```html\n\n\n \n```\n\n* Load an [HTML5 shim](http://code.google.com/p/html5shim/) for IE8 unless you're using [Modernizr](http://modernizr.com/) which already has a shim.\n* To localize Ideal Forms in your language, load the corresponding file from `js/i18n` after loading the plugin.\n* Finally, call Ideal Forms on each form separately. Assign each form to a variable to have access to the public methods.\n\n```javascript\nvar $myform = $('#my-form').idealforms({ options }).data('idealforms');\n```\n\nMarkup:\n------\n\nFor Ideal Forms to work its magic create your markup using the following template as a reference, nothing fancy, just the usual form tags wrapped in a `
    `. Drop the form into a container of any size and Ideal Forms will do the rest.\n\n```html\n
    \n\n \n
    \n\n \n
    \n

    My Heading

    \n

    Description here

    \n
    \n\n \n
    \n
    \n
    \n\n \n
    \n\n \n
    \n \n \n
    \n\n
    \n\n \n
    \n\n
    \n

    My Heading

    \n

    Description here

    \n
    \n\n \n
    \n \n \n \n \n
    \n\n \n
    \n \n \n \n \n
    \n\n
    \n\n \n

    \n\n \n
    \n \n \n
    \n\n
    \n```\n\nThe `name` attribute will be used in the plugin's options to add filters to each input. This provides a lot of flexibility and the possibility to create custom errors, and tweak the filter's values.\n\nAlternatively, for very simple forms, you can do it \"the easy way\" and just add the filters to the `data-ideal` attribute.\n```html\n
    \n
    \n
    \n
    \n
    \n```\n\n**Notes:**\n* If you're working with dynamic fields check documentation on [addFields](#addfields).\n* If you want to add custom elements to the form _always_ wrap them in a `div` with class `ideal-wrap`.\n\n## Options:\n\n### inputs\nAdd all the inputs you want to validate here. Use the name attribute of the input as key. To be consistent always put the key in quotes. Array group names can be used too, ie. `name[]`.\n\n* **filters:** A space separated string of filters.\n* **data:** Filters that take values can be specified in here. Check documentation on **[Filters](#filters)** for more info.\n* **errors:** Use the filter name as the key value and add your custom error. You can use inline HTML tags within the error string.\n* **flags:** Flags are simply functions that run when an input tries to validate. See documentation on **[Flags](#flags)**.\n\n```javascript\ninputs: {\n // The name attribute of the input in quotes\n 'myinput': {\n filters: 'required min',\n data: { min: 10 },\n errors: { min: 'At least 10 characters' },\n flags: 'noclass noinvalidicon'\n }\n}\n```\n\n### globalFlags\nList the flags that you want to apply to all inputs.\n```javascript\nglobalFlags: 'noerror noicons'\n```\n\n### onSuccess\n```javascript\nonSuccess: function(e) {\n // Form validates\n}\n```\n\n### onFail\n```javascript\nonFail: function(){\n // Form does NOT validate\n}\n```\n\n### responsiveAt\nBy default, Ideal Forms will make the form \"adaptive\". It will adapt to the container allowing it to work with any responsive grid system.\nYou can change this behavior by assigning a number value to the `responsiveAt` option.\n```javascript\n// Make responsive only at a certain window size.\n// Default is `\"auto\"` to adapt to the container\n// Set to `false` to disable responsiveness\n// To always show the responsive layout use a large number ie `3000`\nresponsiveAt: 480\n```\n\n### disableCustom\nDisables custom inputs and uses system default so you can use other replacement plugins.\n```javascript\ndisableCustom: 'file select radiocheck button'\n```\n\n## Filters:\n\n### required\nThe field is required. This filter ONLY works with text inputs (text, password, textarea). For `select` use `exclude` to exclude the default option. For `radio` and `checkbox` use `min: 1` which will require at least one option to be checked.\n\n### number\nMust be a number.\n\n### digits\nOnly digits.\n\n### range\nOnly numbers within a range. Usually combined with `number` or `digits`.\n```javascript\n'myinput': {\n filters: 'number range',\n data: { range: [ 1, 100 ] }\n}\n```\n\n### name\nMust be at least 3 characters long, and must only contain letters.\n\n### username\nMust be between 4 and 32 characters long and start with a letter. You may use letters, numbers, underscores, and one dot (.)\n\n### pass\nMust be at least 6 characters long, and contain at least one number, one uppercase and one lowercase letter.\n\n### strongpass\nMust be at least 8 characters long and contain at least one uppercase and one lowercase letter and one number or special character.\n\n### email\nMust be a valid e-mail address.\n\n### phone\nMust be a valid US phone number.\n\n### zip\nMust be a valid US zip code.\n\n### url\nMust be a valid URL.\n\n### date\nMust be a valid date. This filter effectively validates a date, so stuff like `02-31-2012` or `30/80/2000` would be invalid. You can use any format with 4 digit year and any delimiter character. The default format is `mm/dd/yyyy`.\n```javascript\n'myinput': {\n filters: 'date',\n data: { date: 'dd-mm-yyyy' } // or `yyyy~dd~mm` or `mm*yyyy*dd`\n}\n```\nTo use the datepicker you need to load jQuery UI and add the class `datepicker` to your date input. Ideal Forms will apply the custom format that you specify without having to configure the datepicker. It's seamless.\n\n### dob\nMust be a valid date of birth in this century, that is 100 years range from the current year.\n\n```javascript\n'myinput': {\n filters: 'dob',\n data: { dob: 'yyyy/dd/mm' }\n}\n```\n\n### min\n* Must be at least `x` characters minimum.\n* Must have at least `x` checkboxes checked.\n\n```javascript\n'myinput': {\n filters: 'min',\n data: { min: 10 }\n}\n```\n\n### max\n* `x` characters maximum.\n* No more than `x` checkboxes checked.\n\n```javascript\n'myinput': {\n filters: 'max',\n data: { max: 10 }\n}\n```\n\n### exclude\n* Prevent validation if the value matches any value in the given array.\n* Use this filter to exclude the default (usually first) option of a `select` input.\n\n```javascript\n'myinput': {\n filters: 'exclude',\n data: {\n // Always an array even if just one value\n // Values are case-sensitive\n exclude: ['one', 'two', 'three']\n }\n}\n```\n\n### equalto\nThe value must match a value of another input.\n```javascript\n'myinput': {\n filters: 'equalto',\n data: { equalto: '#myid' } // You can use any valid jQuery selector\n}\n```\n\n### extension\nThis filter is designed for `file` inputs. It supports multifile in HTML5 browsers.\n```javascript\n'myinput': {\n filters: 'extension',\n data: { extension: [ 'jpg', 'png' ] } // Always array even if just one\n}\n```\n\n### ajax\nValidate a response from the server. The `ajax` filter must be added at last after all other filters.\n\nThis method is a light wrapper around `$.ajax`, so any parameter valid in jQuery's `$.ajax` is also valid in Ideal Forms' `ajax` except `success` and `error` because they are set up automatically but you can use `_success` and `_error` instead.\n\nIn most cases passing the `url` should be enough. The server will receive the value of the input in `$_POST[inputname]`. The default `dataType` is `json`. Ideal Forms handles success and error from the server. The field will switch to _loading status_ if the response takes some time to come back. Here's an example in PHP:\n\n**validate.php**\n```php\n2 languages.' }\n },\n 'options': {\n filters: 'min'\n data: { min: 1 },\n errors: { min: 'Check only 1 option.' }\n }\n }\n};\n\nvar $myform = $('#my-form').idealforms( options ).data('idealforms');\n```\n\nTheming:\n-------\n\n**Ideal Forms** relays on a carefully crafted [LESS](http://lesscss.org/) stylesheet. Everything is customizable, from the simplest text input, to the select menus, radios, and checkboxes.\n\nHere's a list of all the Ideal Forms UI elements that can be customized: tabs, labels, headings, separators, icons, errors, text inputs, buttons, select dropdowns, radios, checkboxes, datepicker... Really, ANYTHING.\n\n### User config:\n\nAll user options are located in `less/themes/theme/theme.less`. You can safely edit all values from the \"user config\". The \"extra\" options must be edited wisely since most of the variables here are relative to other variables defined elsewhere.\n\nThe names of the user config variables are pretty self-explanatory. If you screw up you can always go back.\nWhen you finish editing the user config don't forget to load your theme in `less/jquery.idealforms.less` and compile into `css`.\n\n### @font-size\nThe overall font size. Usually adjusting this option should be enough in most cases. Keep in mind that the bigger the font, the bigger the icons need to be. Ideal Forms will try to align everything as close as possible, but it's recommended that the icons are aprox. the same size as the font-size.\n\n### @small-font-size\nIdeal Forms uses a smaller font-size for `button`, `select`, `radio`, `checkbox` and `file`. This makes UI elements stand out more and feel more integrated. Change to `100%` to use the default font-size.\n\n### @input-width\nAdjust this option if the form doesn't quite fit your container. It's recommended to use this format `@font-size * number`.\nAll inputs will have the width set here but you can change the width of any particular input by targeting its id. This won't affect the responsive layout.\n```css\n#comments { width: 200px; }\n```\n\n### @label-align\nAlign labels to either `left` or `right`.\n\n### @label-width\nMost of the time `auto` will work just fine but if you have really long label names then it's a good idea to tweak this value.\n\n### @border-width\nWidth of every border property. Usually there's no need to change the default value of `1px` unless you want a \"thick\" border look, suitable for some occasions. `box-shadow` properties depend on this option.\n\n### @border-radius\nRadius for round corners.\n\n### @css3-anim\n`true` or `false` to enable or disable css3 animations (transitions).\n\n### @css3-effects\n`true` or `false` to enable or disable css3 box-shadow and gradients.\n\n**Enjoy :)**\n\nUpdate History:\n--------------\n**02/21/13**\n* Fix #116 tab issue by escaping regex\n* Fix overlapping selects (z-index issues)\n\n**01/28/13**\n* Fix z-index issues with datepicker.\n\n**11/29/12**\n* Add flags to grunt build and fix globalFlags not loading.\n\n**11/21/12**\n* Prevent modifier keys ( ctrl, meta, super... ) in select menu to avoid regexp error.\n\n**11/01/12**\n* Refactor custom file because of bug that prevented IE from submitting the file.\n\n**10/24/12**\n* Fix serious bug in `_adjust` that caused weird behaviors with some methods.\n\n**10/12/12**\n* Setup grunt.js\n* Massive refactoring and cleanup\n\n**10/11/12**\n* Remove `placeholder` polyfill. It was buggy and unfinished. Check for better polyfills [here](https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-Browser-Polyfills)\n* Re-organize and cleanup validate method\n* Restore flags, big regression, ooops!\n* Fix some undefined errors with non-existent flags and filters\n\n**10/09/12**\n* New [ajax](#ajax) filter\n* Sprite for validation icons\n\n**10/07/12**\n* Better `number` filter\n\n**10/02/12**\n* use `data-ideal` instead of class\n* cleanup and optimize radiocheck.js\n* fix datepicker undefined error\n* fix duplicated tabs with multiple forms\n", "readme_type": "markdown", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "jcoppieters/cody", "link": "https://github.com/jcoppieters/cody", "tags": [], "stars": 670, "description": "Javascript Content Management System running on Node.js", "lang": "JavaScript", "repo_lang": "", "readme": "# Cody CMS\n\nA Javascript Content Management System running on Node.js\n\nWe finally took upon the task, we are happy to announce the transition to Express 4 is now done! (dixit Slawo)\n\nSee http://www.cody-cms.org for more info and examples on http://github.com/jcoppieters/cody-samples\n\nYou can now use npm to install Cody thanks to Jonas.\n\n## Features\n\n* Node.js CMS\n* Easy-to-use graphical interface + wysiwyg (what you see is what you get) editor that allows non-programmers to manage the site's *content*, *users*, *files*, *forms* and *images*.\n* Tree structured GUI to manage the structure of the site and the editable content by using templates and drag-and-drop.\n* Works seamless with your existing node.js code.\n\n\n## Getting Started\n\nBy following these steps you will be running your own CMS system in no time. If any of the steps do not work for you, please report this as an issue on this github repository and we will look into it as soon as possible!\n\n* Install [nodejs](http://nodejs.org/download/) and [mysql](http://dev.mysql.com/downloads/mysql/)\n* Create a new directory for your cms and navigate to it (in unix):\n\n ```bash\n\t$ mkdir codydev\n\t$ cd codydev\n ```\n* Install cody and its dependencies\n \n ```bash\n\t$ npm install cody\n ``` \n\n* Set up a new web site using the guided scaffolding\n\n ```bash\n $ node ./node_modules/cody/bin/create_site\n \n Creating cody web tree in current directory\n 1) Enter sitename: mysite\n Note: also using my site as database name.\n Note: by default the mysql root user has no password so you can just hit enter, if you forgot the root password see http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html\n 2) Enter root password for mysql so we can create a new database and user: \n 3) Enter site database user: mysitename\n 4) Enter site database password: mysitepassword\n 5) Enter hostname for site: mysite.local (or localhost)\n Site mysite has been prepared.\n \n Please create DNS entries, or add to /etc/hosts:\n 127.0.0.1 mysite.local\n \n Also check index.js and config.json to fine-tune extra parameters, encryption key, ...\n \n Start your site using:\n forever start mysite.js\n or\n node mysite.js\n ```\n* Add a DNS entry for given hostname, e.g.\n\n ```bash\n $ sudo bash -c 'echo 127.0.0.1 mysite.local >> /etc/hosts'\n ```\n* Run the server\n \n ```bash\n $ node mysite.js\n ```\n or if you want to automatically restart the server on changes\n \n ```bash\n $ forever start mysite.js\n ```\n \n* Go to \"http://mysite.local:3001\" to see your current site and go to \"http://mysite.local:3001/en/dashboard\" to see the CMS of the site.\n\n the default users are: 'super', 'admin', 'test' and 'user' which all have password 'empty'\n you can ofcourse use \"http://localhost:3001\" too.\n\n\n## Configuration\n\nThe create_site scaffolding creates a config.json file in the root of your project directory. This configuration can be adjust in the following three ways, listed in order of overwriting order (e.g. values of 2 will overwrite those of 1, etc.):\n\n1. Manually adjust the values in the config.json file\n2. Create your own config file and supply it at command-line with the -c option (since v3.2.5, thanks to [andretw](https://github.com/jcoppieters/cody/pull/17))\n```bash\n$ node index.js -c my_overwriting_config.json\n```\n3. Provide environment variables\n```bash\n$ dbuser=dbuser dbpassword=dbpassword port=8080 node index.js\n```\n\nCareful, all three cases need a server restart before they take effect!\nHave a look at the generated config.json file to see which configuration variables you can use.\n\n\n## Troubleshooting\n\n##### I get \"ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)\" when running the scaffold script\n > Your mysql server is not started.\n \n * On Mac OS: go to \"System Preferences\" -> \"Mysql\" -> \"Start\"\n * On any unix machine: ```$ mysqld &```\n\n##### After \"5) Enter hostname for site\" it prompts for \"Enter password:\"\n > You entered the incorrect password for your root user of the mysql database.\n \n Try to figure out the correct password or reset it: http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html\n\n## Contributors\n\n * Johan Coppieters\n * Jonas Maes\n * Tim Coppieters\n * Dieter\n * Laurens\n * Jelle\n\n * devoidfury\n * Andretw\n * You? We are always happy to review and accept your issues/pull requests!\n \n## License\n\nCopyright (c) 2012-2015 Johan Coppieters, Howest Brugge. See the LICENSE.md file for license rights and\nlimitations. This project is licensed under the terms of the MIT license.\n\n\nJohan Coppieters, Jonas Maes, Howest Brugge - Tim Coppieters, VUB.\n", "readme_type": "markdown", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "lalitkapoor/github-changes", "link": "https://github.com/lalitkapoor/github-changes", "tags": [], "stars": 670, "description": "Generate a changelog based on merged pull requests or commit messages", "lang": "JavaScript", "repo_lang": "", "readme": "github-changes [![NPM version](https://badge.fury.io/js/github-changes.png)](http://badge.fury.io/js/github-changes)\n==============\n\nGenerate a changelog based on merged pull requests or commit messages\n\n[![NPM](https://nodei.co/npm/github-changes.png)](https://nodei.co/npm/github-changes/)\n\n[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/lalitkapoor/github-changes?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\n### Installation\n\n```\nnpm install -g github-changes\n```\n\n```\nUsage: github-changes [options]\n\nOptions:\n -o, --owner (required) owner of the Github repository\n -r, --repository (required) name of the Github repository\n -d, --data (DEPRECATED) use pull requests or commits (choices: pulls, commits) [commits]\n -b, --branch name of the default branch [master]\n -n, --tag-name tag name for upcoming release [upcoming]\n -a, --auth prompt to auth with Github - use this for private repos and higher rate limits\n -k, --token need to use this or --auth for private repos and higher rate limits\n -f, --file name of the file to output the changelog to [CHANGELOG.md]\n -t, --title title to appear in the top of the changelog [Change Log]\n -z, --time-zone time zone [UTC]\n -m, --date-format date format [(YYYY/MM/DD HH:mm Z)]\n -v, --verbose output details\n --host alternate host name to use with github enterprise [api.github.com]\n --path-prefix path-prefix for use with github enterprise\n --between-tags only diff between these two tags, separate by 3 dots ...\n --for-tag only get changes for this tag\n --issue-body (DEPRECATED) include the body of the issue (--data MUST equal 'pulls')\n --no-merges do not include merges\n --only-merges only include merges\n --only-pulls only include pull requests\n --use-commit-body use the commit body of a merge instead of the message - \"Merge branch...\"\n --order-semver use semantic versioning for the ordering instead of the tag date\n --reverse-changes reverse the order of changes within a release (show oldest first)\n --hide-tag-names hide tag names in changelog\n```\n\n### Example usage\n\n#### Generate changelog via pull requests\n```bash\ngithub-changes -o lalitkapoor -r github-changes -a --only-pulls --use-commit-body\n```\n\n#### Output\n ## Change Log\n\n ### v1.0.3 (2016/08/19 08:25 +00:00)\n - [#59](https://github.com/lalitkapoor/github-changes/pull/59) added --time-zone option (@YuG1224)\n - [#55](https://github.com/lalitkapoor/github-changes/pull/55) Update README with correct links! (@PunkChameleon)\n\n ### v1.0.2 (2016/02/22 00:53 +00:00)\n - [#53](https://github.com/lalitkapoor/github-changes/pull/53) added --for-tag option to generate changelog for single tag (@ivpusic)\n\n ### v1.0.1 (2016/01/12 01:52 +00:00)\n - [#52](https://github.com/lalitkapoor/github-changes/pull/52) Update ghauth dependency (@nunorafaelrocha)\n\n ### v1.0.0 (2015/04/12 14:32 +00:00)\n - [#47](https://github.com/lalitkapoor/github-changes/pull/47) Add a Gitter chat badge to README.md (@gitter-badger)\n\n ### v0.0.16 (2014/11/26 11:15 +00:00)\n - [#30](https://github.com/lalitkapoor/github-changes/pull/30) show changes between two tags (@lalitkapoor)\n\n ### v0.0.14 (2014/11/06 02:45 +00:00)\n - [#41](https://github.com/lalitkapoor/github-changes/pull/41) Aesthetic fixes (@nylen)\n - [#46](https://github.com/lalitkapoor/github-changes/pull/46) Add option to allow specifying the date format (@fixe)\n - [#45](https://github.com/lalitkapoor/github-changes/pull/45) Add option to allow specifying the changelog title (@fixe)\n\n ### v0.0.13 (2014/10/26 23:25 +00:00)\n - [#42](https://github.com/lalitkapoor/github-changes/pull/42) Fetch 100 tags per page (only 1 page for now) (@nylen)\n\n ### v0.0.12 (2014/09/02 05:37 +00:00)\n - [#36](https://github.com/lalitkapoor/github-changes/pull/36) PR links point to https://null/... (@lalitkapoor)\n - [#35](https://github.com/lalitkapoor/github-changes/pull/35) Update README.md with Grunt Plugin Info (@PunkChameleon)\n\n ...\n\n\n\n#### Generate changelog via commit messages\n```bash\ngithub-changes -o npm -r npm -a\n```\n\n#### Output\n\n ## Change Log\n\n ### upcoming (2014/02/23 10:02 +00:00)\n - [70fd532](https://github.com/npm/npm/commit/70fd532c91335e76bda9366234b53a0498b9901a) fix prune.js test with empty cache (@robertkowalski)\n - [6fd6ff7](https://github.com/npm/npm/commit/6fd6ff7e536ea6acd33037b1878d4eca1f931985) Sort dependencies when --save'ing. (@domenic)\n - [2ddd060](https://github.com/npm/npm/commit/2ddd06037e9bd58cd95a380a9381ff90bea47f0d) add test, some boyscouting (@robertkowalski)\n - [17f07df](https://github.com/npm/npm/commit/17f07df8ad8e594304c2445bf7489cb53346f2c5) Add --save-exact config for --save[-dev|-optional]. (@timoxley)\n - [4b51920](https://github.com/npm/npm/commit/4b5192071654e2b312a7678b7586e435be62f473) Prevent creation of node_modules/npm-4503-c (@timoxley)\n - [30b6783](https://github.com/npm/npm/commit/30b67836b51b68614c9e87dc476c0961d53ec6d4) doc: update misc/semver.md (@isaacs)\n\n ### v1.4.4 (2014/02/20 16:04 +00:00)\n - [05d2490](https://github.com/npm/npm/commit/05d2490526fa40adc55727e92d4d30bd63aabaad) uid-number@0.0.4 (@isaacs)\n - [3850441](https://github.com/npm/npm/commit/3850441fd8c2fd71ebfd8e9986bc5f2e482ab6db) Document the --tag option of npm-publish (@kriskowal)\n - [14e650b](https://github.com/npm/npm/commit/14e650bce0bfebba10094c961ac104a61417a5de) alias 't' to 'test' (@isaacs)\n - [d50b826](https://github.com/npm/npm/commit/d50b826b9e5884c0f4e1101b90c7206a138a43e7) uid-number@0.0.5 (@isaacs)\n - [cd7e4a2](https://github.com/npm/npm/commit/cd7e4a23037f3ae1928bac02332784ffab557be9) v1.4.4 (@isaacs)\n\n ### v1.4.3 (2014/02/17 04:37 +00:00)\n - [3ce6905](https://github.com/npm/npm/commit/3ce6905bf6b0963956d7dbb8a89fc29d379de91c) view: remove arbitrary cache limit (@isaacs)\n - [bb6fb4d](https://github.com/npm/npm/commit/bb6fb4d158f175ddeb2956b361f854c273b6bed0) read-installed@1.0.0 (@isaacs)\n - [caa7065](https://github.com/npm/npm/commit/caa7065b06ffb55ea3410e5a14ddc80c26844b13) new tests for read-installed (@isaacs)\n - [401a642](https://github.com/npm/npm/commit/401a64286aa6665a94d1d2f13604f7014c5fce87) link: do not allow linking unnamed packages (@isaacs)\n - [09223de](https://github.com/npm/npm/commit/09223de8778b3e8fb0ecfec82cf6058d2c659518) Forbid deleting important npm dirs (@isaacs)\n - [86028e9](https://github.com/npm/npm/commit/86028e9fd8524d5e520ce01ba2ebab5a030103fc) dedupe: respect dependency versions (@rafeca)\n - [02d4322](https://github.com/npm/npm/commit/02d4322cd4f67a078a29019d2c4ef591b281132c) Follow redirects on curl|sh installer script (@isaacs)\n - [8a26f6f](https://github.com/npm/npm/commit/8a26f6ff7e9769985f74b60eed54e488a4d4a804) Test for repo command (@isaacs)\n - [acc4d02](https://github.com/npm/npm/commit/acc4d023c57d07704b20a0955e4bf10ee91bdc83) prune: Added back --production support (@davglass)\n - [0a3151c](https://github.com/npm/npm/commit/0a3151c9cbeb50c1c65895685c2eabdc7e2608dc) default to ^ instead of ~ (@mikolalysenko)\n - [9ae71de](https://github.com/npm/npm/commit/9ae71de7802132c349c60f1b740a734761fec4a1) npm-registry-client@0.4.4 (@isaacs)\n - [46d8768](https://github.com/npm/npm/commit/46d876821d1dd94c050d5ebc86444bed12c56739) \"install ./pkg@1.2.3\" should install local module (@rlidwka)\n - [f469847](https://github.com/npm/npm/commit/f46984787e8bb219cfd1d8394932dca2ed6b3b2c) test: express is not in mocks, use underscore instead (@isaacs)\n\n ...\n\n### Using with Grunt\n\nIf you want to generate a changelog within a grunt workflow, [a grunt plugin] (https://github.com/PunkChameleon/grunt-github-changes) that can be utilized. To install:\n\n```\nnpm install grunt-github-changes --save-dev\n```\n\nFor further details and specifics on how to use (and to contribute), see [grunt-github-changes](https://github.com/PunkChameleon/grunt-github-changes).\n\n### FAQ\n\n#### How are squashed pull request matched?\n\nWhen a pull request is merged with \"Squash and merge\", there isn't a merge commit. \nBy checking the commit message for ` (#123)` etc, we can match the correct pull request.\n", "readme_type": "markdown", "hn_comments": "I Would love any constructive feedback. Thanks!! :)", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "freegroup/draw2d", "link": "https://github.com/freegroup/draw2d", "tags": [], "stars": 670, "description": "Create Visio like drawings, diagrams or workflows with JavaScript and HTML5", "lang": "JavaScript", "repo_lang": "", "readme": "# Draw2D\nCreate Visio like drawings, diagrams or workflows in JavaScript and HTML5.\n\nDraw2D is a modern HTML 5 JavaScript library for visualization and interaction with \ndiagrams and graphs. Draw2D touch makes it easy to create visual languages & tools of various \nkinds.\n\nThe new source code home of my http://www.draw2d.org project. New *home* because I switch the license to MIT.\n\n\n## Documentation\n\nhttps://freegroup.github.io/draw2d/index.html\n\n## Local Development\n``` \nnvm use v14.15.0\n\nnpm install\nDIR=/examples yarn dev\n\n```\n\n## build\n``` \n./build.sh\n```\n\n## publish new version\n``` \nnpm version patch\nnpm publish\n```\n\n## Projects using Draw2D\n\n### Electra.Academy\nConnect your Raspi, Arduino or an WebUSB enabled Device. Use a visual programming language to connect, control, \nand play with all the sensors and tools.\n\n[Github Repo](https://electra.academy/)\n\n### YOUR Project\n**Feel free to contact me if you want list your project here**\n", "readme_type": "markdown", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "PckdHQ/Pckd", "link": "https://github.com/PckdHQ/Pckd", "tags": ["customizable", "react", "nodejs", "redux", "bitly", "javascript", "url-shortener", "graphql", "self-hosted", "tracking", "url", "reactjs", "link-shortener"], "stars": 669, "description": "The \u26a1\ufe0f analytics-intensive, self-hostable link-shortener with a beautiful UI | AKA free bit.ly alternative \ud83d\ude80", "lang": "JavaScript", "repo_lang": "", "readme": "
    \n\n\n\n![Pckd](https://user-images.githubusercontent.com/48997634/157104510-21df472c-d0d9-4075-96f1-18aded5905a5.png)\n\n
    \n\n # \ud83d\udd17 Pckd\n\n Quick start\n   \u2022  \n Demo\n   \u2022  \n Docs\n   \u2022  \n Blog\n   \u2022  \n Twitter\n   \u2022  \n Discord\n
    \n\n
    \n
    \n\n# \u26d4\ufe0f\ud83d\uded1 This version of the project is not currently being maintained\n\nWe're focusing our efforts towards creating Pckd V2, since further development/improvements on V1 won't be sustainable. Therefore, we can't guarantee solutions to all problems at the time. Please check back in a few months for Pckd V2. Until then, try out other awesome URL shorteners like [dub](https://github.com/steven-tey/dub), [etc.](https://github.com/738/awesome-url-shortener#self-hosting-opensource)\n\n
    \n\n[](https://user-images.githubusercontent.com/48997634/174793049-67f58409-a449-442f-913c-6a7859a7bf29.png)\n\n**Pckd is a free-to-use URL Shortener**, that can be easily self-hosted with awesome features like:\n\n- \ud83d\udd17 Shorten URLs (or `pckd`s) with, or without an account\n- \ud83d\udd8c\ufe0f Customize back-halfs on every pckd\n- \ud83d\udd0c Deploy to custom URL and Infrastructure\n- \ud83e\udde4 Customize settings like link back-halfs, link targets, tracking info, etc.\n- \ud83d\udd75\ufe0f\u200d\u2642\ufe0f Track each click on a pckd, and retrieve\n - \ud83c\udf10 IP address (Spoof-resistant)\n - \ud83d\udd78\ufe0f ISP Name\n - \ud83d\uddfa\ufe0f IP-Location\n - \ud83d\udcbb Device details like OS Version and Device Model\n - \ud83e\ude9f Browser Name and including version\n- \ud83d\udcaf Custom Loading/Redirecting Screen (self-hosted only)\n- \ud83c\udfc3\u200d\u2642\ufe0f Quick Redirections in 150ms!\n- \ud83d\udd10 Fast, Reliable and Secure\n- \ud83d\udc6e Secure Secret Storage and handling using \ud83d\udcbb environment variables\n- \u2728 Built on a modern tech stack\n- \ud83d\udcbf Compatible with MySQL, PostgreSQL, MongoDB and [many\nmore](https://www.prisma.io/docs/reference/database-reference/supported-databases)\n\nThis project was created to be the most powerful URL shortener for the public, so no wonder it's so feature-rich\n\n

    (back to top)

    \n\n## \ud83d\udcf8 Screenshots\n\nHere is a sneak peek of the application and it's visuals \ud83d\ude0d:\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \"Dashboard\n
    \n

    Dashboard Page

    \n
    \n \"Login\n
    \n

    Login

    \n
    \n \"Signup\"\n
    \n

    Signup

    \n
    \n \"Account\n
    \n

    Account Page

    \n
    \n \"Reset\n
    \n

    Reset Password

    \n
    \n \"Home\n
    \n

    Home Page

    \n
    \n\nWant to create your own iteration? [View the designs on\nFigma](https://www.figma.com/file/CWmPgKuSWm6dvihp1XXTn1/Pckd-2?node-id=230%3A427)\n\n

    (back to top)

    \n\n\n\n## \ud83c\udf97 Supporters\n\nPckd is made possible by support from some awesome folks including:\n\n### \ud83d\ude07 One-off Backers\n\n\n\n \n \n \n \n \n \n
    \n \n \"geekedtv\"\n
    \n Geeked\n
    \n
    \n \n \"Ben\n
    \n Ben Notix\n
    \n
    \n \n \"rizwan95\"\n
    \n Rizwan Ahmed\n
    \n
    \n \n \"Add\n
    \n [Add your support]\n
    \n
    \n\n## \ud83e\udd14 Why does Pckd exist?\n\nAfter looking at all the `aka.ms` links out there which flood windows, along with the numerous time saving been prompted\nto buy premium plans from `bit.ly` while shortening my URLs, the decision of having a reliable, personal URL shortener\nhosted on a custom domain for free caught wind.\n\n

    (back to top)

    \n\n## \ud83e\uddee Comparison\n\nPckd stacks up well against major URL Shorteners\n\n![Comparison Table including other free and paid\nshorteners](https://user-images.githubusercontent.com/48997634/174783368-41a35e85-bcda-4d12-adc6-b21a9d3ffc39.png)\n\n\n

    (back to top)

    \n\n## \ud83d\ude32 Built With (Tech Stack)\n\nThe following technologies were involved in the making of this project.\n\n- \u269b\ufe0f [React JS](https://reactjs.org/) - Frontend\n- \ud83d\ude80 [Apollo GraphQL Server v3](https://www.apollographql.com/docs/apollo-server/) - Server API\n- \ud83e\udde9 [GraphQL Template By Mohit](https://github.com/Just-Moh-it/grapqhl-backend) - Boilerplate for Apollo\n- \ud83d\udcbf [Prisma](https://www.prisma.io/) - ORM\n- \ud83d\ude28 Any relational or non-relational [database that Prisma\nsupports](https://www.prisma.io/docs/reference/database-reference/supported-databases)\n- \ud83d\uddfa\ufe0f [Redux](https://redux.js.org/) w/ [Redux Toolkit](https://redux-toolkit.js.org/) - State management\n- \ud83c\udf10 [IP Registry](https://ipregistry.co/) - Free Geolocation lookups\n\n

    (back to top)

    \n\n\n\n# \ud83e\udd2f Quick Start Guide\n\nTo get started with having your own instance of Pckd, follow the steps described in the following section\n\n## \ud83d\udea6 Get an API Key first\n\nPckd uses [IP Registry](https://ipregistry.co/) for Geo-location look-ups to track hits (free for 100,000 lookups)\n\nObtain an **API key** from the [ipregistry.co](https://ipregistry.co) website\n\n## \ud83d\udcbe Installation\n\nPckd supports the following installations\n\n- \ud83d\udee0 [Build from source code](https://docs.pckd.me/docs/install-from-code)\n- \ud83d\udce6 [Soon] [Deploy the release](https://docs.pckd.me/docs/install-from-release)\n- \ud83d\udc33 [Unstable] [Docker-Compose Installation](https://docs.pckd.me/docs/install-from-dockerhub)\n- \ud83d\udc0b [Soon] [Docker-Hub Pre-built Image](https://docs.pckd.me/docs/install-from-docker-compose)\n\nRead all installation docs [here](https://docs.pckd.me/docs/getting-started/installation/install_intro)\n\n

    (back to top)

    \n\n# \ud83d\udee3 Roadmap\n\nThis project is far from perfect, and we'll reach there one day, or at least get close.\n\n- Link-in-bio feature (Discussion [#49](https://github.com/PckdHQ/Pckd/discussions/49))\n- Admin Panel Support (Discussion [#43](https://github.com/PckdHQ/Pckd/issues/43))\n- Multiple Subdomain Support (Discussion [#14](https://github.com/PckdHQ/Pckd/issues/14))\n- Email Notifications for hits if enabled (Discussion [#18](https://github.com/PckdHQ/Pckd/issues/18))\n- Custom OG Preview for social-sharing (Discussion [#39](https://github.com/PckdHQ/Pckd/discussions/39))\n- One-Click Deploys (Discussion [#44](https://github.com/PckdHQ/Pckd/discussions/44))\n- Password-protected links (Discussion [#41](https://github.com/PckdHQ/Pckd/discussions/41))\n\nHave a look at the \ud83d\udee3 [Roadmap](https://github.com/Just-Moh-it/Pckd/issues) for a full list of proposed features and\nenhancements.\n\n

    (back to top)

    \n\n# \ud83d\udcd0 Architecture\n\nHere's a diagram explaining exactly how everything fits into place\n\n
    \n \n

    Here's how everything fits into the scene

    \n
    \n\n\n\n# \ud83c\udf08 Contributing\n\nContributions are what make the open-source community such an amazing place to learn, inspire, and create. Any\ncontributions you make are **greatly appreciated**.\n\nIf you have a suggestion that would make this better, please fork the repo and create a pull request. You can also\nsimply open an issue with the tag \"enhancement\".\nDon't forget to give the project a star! Thanks again!\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\nAlso, refer to [`Contributing.md`](contributing.md)\n\n

    (back to top)

    \n\n\n# Contributors\n\n\n \n \n \n \n \n \n \n
    \n \n \"Just-Moh-it\"\n
    \n Mohit Yadav\n
    \n
    \n \n \"ItzDerock\"\n
    \n Derock\n
    \n
    \n \n \"rizwan95\"\n
    \n Rizwan Ahmed\n
    \n
    \n \n \"petrleocompel\"\n
    \n Petr Leo Compel\n
    \n
    \n \n \"Sujith46\"\n
    \n Sujith\n
    \n
    \n\n# \ud83d\udc4b Author\n\n### \ud83d\udc81\ud83c\udffb\u200d\u2642\ufe0f Mohit Yadav\n\nYou can reach out to Mohit Yadav, the maintainer of the app on [Twitter](https://twitter.com/Just_Moh_it), [yo@mohitya.dev](mailto:yo@mohitya.dev) or\n[Discord](https://discord.gg/cqNbdEmazR)\n\n\n \n \n \n \n \n
    \n \n \"Join\n

    For installation support

    \n
    \n
    \n \n \"Buy\n

    To support Projects

    \n
    \n
    \n \n \"Visit\n

    Awesome projects

    \n
    \n
    \n\n

    (back to top)

    \n\n\n\n# \ud83d\udee1 License\n\nDistributed under the **MIT License**. See [`LICENSE.md`](LICENSE.md) for more information.\n\n

    (back to top)

    \n\n# \ud83c\udf1f Support this project\n\n![](https://user-images.githubusercontent.com/48997634/174794647-0c851917-e5c9-4fb9-bf88-b61d89dc2f4f.gif)\n\n### [\u23eb\u2b50\ufe0f Scroll to the star button](#start-of-content)\n\nIf you believe this project has potential, feel free to **star this repo** just like many [amazing people](/stargazers)\nhave.\n\n\n\n\n\n[contributors-shield]: https://img.shields.io/github/contributors/Just-Moh-it/Pckd.svg?style=flat-square&logo=github\n[contributors-url]: https://github.com/Just-Moh-it/Pckd/graphs/contributors\n[last-commit-shield]: https://img.shields.io/github/last-commit/Just-Moh-it/Pckd?style=flat-square&logo=anchor\n[last-commit-url]: https://github.com/Just-Moh-it/Pckd/commit/main\n[forks-shield]: https://img.shields.io/github/forks/Just-Moh-it/Pckd.svg?style=flat-square&logo=curseforge\n[forks-url]: https://github.com/Just-Moh-it/Pckd/network/members\n[stars-shield]: https://img.shields.io/github/stars/Just-Moh-it/Pckd.svg?style=flat-square&logo=Apache-Spark\n[stars-url]: https://github.com/Just-Moh-it/Pckd/stargazers\n[issues-shield]: https://img.shields.io/github/issues/Just-Moh-it/Pckd.svg?style=flat-square&logo=testing-library\n[issues-url]: https://github.com/Just-Moh-it/Pckd/issues\n[license-shield]: https://img.shields.io/github/license/Just-Moh-it/Pckd.svg?style=flat-square&logo=gmail\n[license-url]: https://github.com/Just-Moh-it/Pckd/blob/master/LICENSE.md\n", "readme_type": "markdown", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "desmondmorris/node-tesseract", "link": "https://github.com/desmondmorris/node-tesseract", "tags": [], "stars": 670, "description": "A simple wrapper for the Tesseract OCR package", "lang": "JavaScript", "repo_lang": "", "readme": "# Tesseract for node.js\n\n[![NPM](https://nodei.co/npm/node-tesseract.png)](https://nodei.co/npm/node-tesseract/)\n\nA simple wrapper for the Tesseract OCR package for node.js\n\n## Requirements\n\n* Tesseract 3.01 or higher is needed for this to work\n\n## Installation\nThere is a hard dependency on the [Tesseract project](https://github.com/tesseract-ocr/tesseract). You can find installation instructions for various platforms on the project site. For Homebrew users, the installation is quick and easy.\n\n brew install tesseract --with-all-languages\n\nThe above will install all of the language packages available, if you don't need them all you can remove the `--all-languages` flag and install them manually, by downloading them to your local machine and then exposing the `TESSDATA_PREFIX` variable into your path:\n\n export TESSDATA_PREFIX=~/Downloads/\n\nYou can then go about installing the node-module to expose the JavaScript API:\n\n npm install node-tesseract\n\n## Usage\n\n```JavaScript\nvar tesseract = require('node-tesseract');\n\n// Recognize text of any language in any format\ntesseract.process(__dirname + '/path/to/image.jpg',function(err, text) {\n\tif(err) {\n\t\tconsole.error(err);\n\t} else {\n\t\tconsole.log(text);\n\t}\n});\n\n// Recognize German text in a single uniform block of text and set the binary path\n\nvar options = {\n\tl: 'deu',\n\tpsm: 6,\n\tbinary: '/usr/local/bin/tesseract'\n};\n\ntesseract.process(__dirname + '/path/to/image.jpg', options, function(err, text) {\n\tif(err) {\n\t\tconsole.error(err);\n\t} else {\n\t\tconsole.log(text);\n\t}\n});\n```\n\n## Changelog\n* **0.2.7**: Adds output file extension detection\n* **0.2.6**: Catches exception when deleting tmp files that do not exist\n* **0.2.5**: Preserves whitespace and replaces tmp module\n* **0.2.4**: Removes console logging for messaging\n* **0.2.3**: The ability to set the binary path via the config object. Better installation documentation.\n* **0.2.2**: Adds test converage to utils module\n* **0.2.1**: Strips leading & trailing whitespace from output by default\n* **0.2.0**: Adds ability to pass options via a configuration object.\n* **0.1.1**: Updates tmp module.\n* **0.1.0**: Removes preprocessing functionatlity. See #3.\n* **0.0.3**: Adds basic test coverage for process method\n* **0.0.2**: Pulls in changes by [joscha](https://github.com/joscha) including: refactored to support tesseract 3.01, added language parameter, config parameter, documentation, Added support for custom preprocessors, OTB Preprocessor using ImageMagick 'convert'\n* **0.0.1**: Initial version\n", "readme_type": "markdown", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "postcss/sugarss", "link": "https://github.com/postcss/sugarss", "tags": [], "stars": 670, "description": "Indent-based CSS syntax for PostCSS", "lang": "JavaScript", "repo_lang": "", "readme": "# SugarSS\n\n\n\nIndent-based CSS syntax for [PostCSS].\n\n```sass\na\n color: blue\n\n.multiline,\n.selector\n box-shadow: 1px 0 9px rgba(0, 0, 0, .4),\n 1px 0 3px rgba(0, 0, 0, .6)\n\n// Mobile\n@media (max-width: 400px)\n .body\n padding: 0 10px\n```\n\nAs any PostCSS custom syntax, SugarSS has source map, [stylelint]\nand [postcss-sorting] support out-of-box.\n\nIt was designed to be used with [postcss-simple-vars] and [postcss-nested].\nBut you can use it with any PostCSS plugins\nor use it without any PostCSS plugins.\nWith [postcss-mixins] you can use `@mixin` syntax as in Sass.\n\n\n \"Sponsored\n\n\n[postcss-mixins]: https://github.com/postcss/postcss-mixins\n[postcss-nested]: https://github.com/postcss/postcss-nested\n[postcss-simple-vars]: https://github.com/postcss/postcss-simple-vars\n[postcss-sorting]: https://github.com/hudochenkov/postcss-sorting\n[stylelint]: http://stylelint.io/\n[PostCSS]: https://github.com/postcss/postcss\n\n\n## Syntax\n\nSugarSS MIME-type is `text/x-sugarss` with `.sss` file extension.\n\n\n### Indent\n\nWe recommend 2 spaces indent. However, SugarSS autodetects indent\nand can be used with tabs or spaces.\n\nBut it is prohibited to mix spaces and tabs in SugarSS sources.\n\n\n### Multiline\n\nSugarSS was designed to have intuitively multiline selectors and declaration\nvalues.\n\nThere are 3 rules for any types of nodes:\n\n```sass\n// 1. New line inside brackets will be ignored\n@supports ( (display: flex) and\n (display: grid) )\n\n// 2. Comma at the end of the line\n@media (max-width: 400px),\n (max-height: 800px)\n\n// 3. Backslash before new line\n@media screen and \\\n (min-width: 600px)\n```\n\nIn a selector you can put a new line anywhere. Just keep same indent\nfor every line of selector:\n\n```sass\n.parent >\n.child\n color: black\n```\n\nIn a declaration value you can put a new line anywhere. Just keep a bigger indent\nfor the value:\n\n```sass\n.one\n background: linear-gradient(rgba(0, 0, 0, 0), black)\n linear-gradient(red, rgba(255, 0, 0, 0))\n\n.two\n background:\n linear-gradient(rgba(0, 0, 0, 0), black)\n linear-gradient(red, rgba(255, 0, 0, 0))\n```\n\n\n### Comments\n\nSugarSS supports two types of comments:\n\n```sass\n/*\n Multiline comments\n */\n\n// Inline comments\n```\n\nThere is no \u201csilent\u201d comment in SugarSS. Output CSS will contain all comments\nfrom `.sss` source. But you can use [postcss-discard-comments]\nfor Sass\u2019s silent/loud comments behaviour.\n\n[postcss-discard-comments]: https://www.npmjs.com/package/postcss-discard-comments\n\n\n### Rule and Declarations\n\nSugarSS separates selectors and declarations by `:\\s` or `:\\n` token.\n\nSo you must write a space after the property name: `color: black` is good,\n`color:black` is prohibited.\n\n\n### Other\n\nSugarSS is just a syntax, it change the way how you write CSS,\nbut do not add preprocessor features build-in.\n\nHere are PostCSS plugins which could add you preprocessor features:\n\n* **[postcss-simple-vars]** adds variables.\n* **[postcss-nested]** adds nested rules.\n* **[postcss-import]** adds `@import` directive support.\n* **[postcss-import-ext-glob]** extends [postcss-import] path resolver to allow glob usage as a path.\n* **[postcss-mixins]** add `@mixin` support.\n* **[postcss-functions]** allows you to define own CSS functions in JS.\n\n[postcss-functions]: https://github.com/andyjansson/postcss-functions\n[postcss-mixins]: https://github.com/postcss/postcss-mixins\n[postcss-import-ext-glob]: https://github.com/dimitrinicolas/postcss-import-ext-glob\n[postcss-import]: https://github.com/postcss/postcss-import\n[postcss-nested]: https://github.com/postcss/postcss-nested\n[postcss-simple-vars]: https://github.com/postcss/postcss-simple-vars\n\n\n## Text Editors\n\n* SublimeText: [Syntax Highlighting for .SSS SugarSS]\n* Atom: [language-postcss], [source-preview-postcss] and [build-sugarss]\n* Vim: [vim-sugarss]\n* VSCode: [vetur](https://vuejs.github.io/vetur/), and [postcss-sugarss-language](https://github.com/MhMadHamster/vscode-postcss-language)\n\nWe are working on syntax highlight support in text editors.\n\nRight now, you can set `Sass` or `Stylus` syntax highlight for `.sss` files.\n\n[Syntax Highlighting for .SSS SugarSS]: https://packagecontrol.io/packages/Syntax%20Highlighting%20for%20SSS%20SugarSS\n[source-preview-postcss]: https://atom.io/packages/source-preview-postcss\n[language-postcss]: https://atom.io/packages/language-postcss\n[build-sugarss]: https://atom.io/packages/build-sugarss\n[vim-sugarss]: https://github.com/hhsnopek/vim-sugarss\n\n\n## Usage\n\nSugarSS needs PostCSS compiler. Install [`postcss-loader`] for webpack,\n[`gulp-postcss`] for Gulp, [`postcss-cli`] for npm scripts.\n[Parcel] has build-in support for PostCSS.\n\nThen install SugarSS: `npm install --save-dev postcss sugarss` if you use npm\nand `yarn add --dev postcss sugarss` if you use Yarn.\n\nThen create `.postcssrc` file:\n\n```json\n{\n \"parser\": \"sugarss\",\n \"plugins\": {\n \"postcss-simple-vars\": {}\n }\n}\n```\n\n[`postcss-loader`]: https://github.com/postcss/postcss-loader\n[`gulp-postcss`]: https://github.com/postcss/gulp-postcss\n[`postcss-cli`]: https://github.com/postcss/postcss-cli\n[Parcel]: https://parceljs.org/transforms.html\n\n\n### Imports\n\nIf you doesn\u2019t use Webpack or Parcel, you need some PostCSS plugin\nto process `@import` directives.\n\nIf you want `@import`, install [postcss-import] and add it to `.postcssrc` file:\n\n```diff js\n{\n \"parser\": \"sugarss\",\n \"plugins\": {\n+ \"postcss-import\": {},\n \"postcss-simple-vars\": {}\n }\n}\n```\n\n[postcss-import]: https://github.com/postcss/postcss-import\n\n\n### Mixins\n\nFor mixins support, install [postcss-mixins] and add it to `.postcssrc` file:\n\n```diff js\n{\n \"parser\": \"sugarss\",\n \"plugins\": {\n+ \"postcss-mixins\": {\n+ \"mixinsDir\": \"./mixins\"\n+ },\n \"postcss-simple-vars\": {}\n }\n}\n```\n\nNow you can define your mixins in `mixins/` dir.\nFor example create `mixins/circle.sss` with:\n\n```sss\n@define-mixin circle $size\n border-radius: 50%\n width: $size\n height: $size\n```\n\n\n### Functions\n\nTo define custom functions you need to install [postcss-functions]\nand add it to `.postcssrc` file:\n\n```diff js\n{\n \"parser\": \"sugarss\",\n \"plugins\": {\n+ \"postcss-functions\": {\n+ \"glob\": \"./functions\"\n+ },\n \"postcss-simple-vars\": {}\n }\n}\n```\n\nThen you can define functions in `functions/` dir. For example,\n`functions/foo.js` will define `foo()` function in CSS:\n\n```js\nmodule.exports = function (args) {\n return 'foo'\n}\n```\n\n\n### SugarSS to SugarSS\n\nSometimes we use PostCSS not to build CSS, but to fix source files.\nFor example, to sort properties by [postcss-sorting].\n\nFor this cases use the `syntax` option, instead of `parser`:\n\n```js\ngulp.task('sort', function () {\n return gulp.src('src/**/*.sss')\n .pipe(postcss([sorting], { syntax: sugarss }))\n .pipe(gulp.dest('src'));\n});\n```\n\n[postcss-sorting]: https://github.com/hudochenkov/postcss-sorting\n\n\n### CSS to SugarSS\n\nYou can even compile existing CSS sources to SugarSS syntax.\nJust use `stringifier` option instead of `parser`:\n\n```js\npostcss().process(css, { stringifier: sugarss }).then(function (result) {\n result.content // Converted SugarSS content\n});\n```\n\n\n## Thanks\n\nCute project logo was made by [Maria Keller](http://www.mariakellerac.com/).\n", "readme_type": "markdown", "hn_comments": "Why not use SugarCRM with its built in email. Use IMAP to fetch your email from Gmail, and send from within SugarCRM to your contacts. I have used SugarCRM this way before and it worked ok. I am not a massive fan of the software, but it does seem to have the features you want. It has a limited activity stream too. You could always fork the code to make it do exactly what you want, since it is open source.Batchbook with Rapportive widget?See a mental health professional. I think lots of people see this as some sign of weakness or personality flaw; that you're \"crazy\" if you see a psychologist or psychiatrist. That's a bunch of bull#*$(. They are there to help you put things in perspective, in ways that might be difficult to discuss with your family or friends.With that being said, not all mental health professionals are created equally. Put together a list of those in your area. Have a session with a few of them before deciding on one. This sounds like at the very least depression, and maybe there are other things in play as well. None of these things are a big deal if dealt with properly. If not, they can last for years and put you in a bad place. Don't let it get to that stage. Make the decision to fix it now and get some help. Feel free to contact me personally if you would like to discuss in more detail.see a doctor and before you go on meds see a coupleA couple of things:1. I was in a similar state, and found out I had hyperthyroidism. Thyroid now removed, I'm much better, but there are many other such conditions that can be causing things that you might not have all the tools yourself to work out, so check with a doctor or your school's nurse at the very least.2. Caffeine screws most people I know up. It's very fun and useful, and I don't recognize myself without it because I drank soda from a very early age, but this all could be contributing.3. A lot of what you describe isn't too terribly bad, honestly, I mean, you need downtime, you are in college which is a hell of a lot of work.4. The net makes you think you're terribly non-productive. Every single awesome throw-away link is some 10,000 man hours at the very least. I think we're all, in the tech world at least, trying to cope with this to varying degrees.5. I highly recommend a counselor. Having a mostly unbiased third party is an amazing asset.6. My big problem is not so much that I don't want to go out, just that I don't want to change what I'm doing, or I don't want to transition to the next thing. I highly recommend forcing yourself to get over that hump, and to go out and meet new people. Ask them questions. You'll hate it because they don't read the same feeds as you do, but you'll absolutely love it because if you hadn't done it, you would've never had had such a great time discovering what those people are all about. At the very least it is a great distraction, but often, people are a lot cooler than you may think.Best of luck! You can do it!!!You definitely sound depressed.I like to think of happiness as something I'm either taking in or using up (like food). Starving people can't immediately eat large meals. I would think of your condition in the same way, except you're starving for energy/life/happiness. You can build it up though. Find a little bit at a time until you can use that to find more.Find something (anything) that holds your interest. So you can try to build up interest to eventual happiness. It will probably require social interaction. It would be great if you could eventually talk about a passion you have with someone who shares it.I'm an intellectual introvert and a social animal. But if I'm in my house for weeks learning stuff, I start to lose my social appetite (meaning I don't want to talk to or meet people). Forcing yourself to do things feels meaningless, but it isn't always. You can find enjoyable times on accident. It's not always possible to predict whether you'll have a good time, so you have to use your energy to at least try.I gave this advice to a friend and it worked. She started taking photography classes and I helped her figure out why she was depressed (moved home, no job, fewer friends, etc). Good luck.Pretty much everyone here has talked about stuff that could be wrong with you, and it is possible, but I want to offer an alternative explanation: you aren't being challenged enough. I was in school for two years and experienced a lot of the same stuff you did (I'm 21 now, I dropped out):1) Was smart enough to glide through classes for my whole life, college not an exception2) Started off having a lot of fun but got over the drinking and partying phase faster than my classmates, definitely felt lack of connection with my classmates3) Thought a lot about whether or not I was actually depressed, especially because of the lack of connection w/ classmates. Tried a lot of stuff (diet, exercise, shrink etc.) Nothing quite seemed to do the trick (though the exercise helps a ton with daily stress but will not fix depression).Although I obviously can't recommend it to everyone, I dropped out and started working. Now I had been freelancing and doing internships since I was about 15 so I had a solid shot at an entry level position at a startup. I can't tell you how much happier it made me.You may not be able to just drop out, but I bet if you find an internship or something that involves you in the \"real world\" in a way that's somewhat meaningful to you (ie: not getting coffee) you'll get a lot more satisfaction out of life.Remember you're young, you're not exactly supposed to have it all figured out yet. Even old people don't have life figured out yet, no one ever does. You also sound pretty introverted, and self reflective. This is a really great trait, but it can be crippling if you don't know how to manage it. You'll learn to know yourself and catch yourself repeating patterns.It doesn't sound like there's anything wrong with you to me, but again I'm just a dog on the internet. My contact info is in my profile, feel free to email me if you'd like to chat sometime.Go to a doctor, have one/several check you for depression.Sounds like pretty typical depression.Sleeping is good, getting a counselor is not bad either.I've been through rough times in the last year myself. Since a couple of months I am back on track again (or so it seems) and I've come to realize that my situation was/is far from rare.\nI've met people all over the place (once I was able to talk about it) who have been through nearly exactly the same thing.Do you feel a diffuse stress at times? Diffuse meaning that you're not able to pinpoint where the stress originates from but at the same time the stress feels familiar because you've had the exact same feeling before.While IANA mental health professional by any means, reading your post you sound more bored than depressed. Getting through your college work with little effort and maturing beyond your peer groups typical socialising will contribute heavily to regular boredom. You are also at a point where lots of people are at a loss for what to do with their lives.I certainly can't offer any concrete advice, people close to you and professionals you may have access to at college can. Take advantage of what they can do for you.Go see an MD and/or psychologist soon. Soon, as in pick up the phone or walk down the street and schedule it now and see someone this week. Its great you have reached out to a forum where there are people whose advice you seem to respect. As I read through the other comments, almost everyone agrees you need to see a doctor. Don't hold back, tell them what you've said here. This is nothing to be ashamed of.Flip this 180: \"I have been holed up by my self pretty much\"\nI've realized the more social I am the happier and healthier I am. And I do not suggest virtual social methods - I mean face to face, close friends, casual acquaintances, and strangers.I was in exactly the same situation as you. You sound depressed. Get medication, consider therapy. Once you feel better in yourself, search for a purpose beyond school. Try different things to feel better and find what you really want to do.Looking back, I realised I thought I was only good to be a student. Really, what I wanted was a real purpose and real problems to solve.Your situation may well be completely different, of course.Nil desperandum!I know you will get through this. I did.I became chronically depressed when I was 15. I was hospitalized between my first and second year of college.What got me through it? Friends and a focus on school. Having a goal was huge, I also had a job that I HAD to go to.Also don't be afraid of medication, for short-term it can help, used to stabilized so you can get your habits going that will organically help your depression.At the end, even though I still suffer from it. I manage it. I finished college, did grad school. I am married, have a family and have been part of two successful ventures.You will get through it!I'm simply amazed by the fact that so many here seem to have gone through a similar phase in their life. Of course I want to be of some help, too.Maybe it's helpful to explain a little bit why so many people here advise you to see a professional therapist. Apart from your \"symptoms\", that sound familiar to everyone who went through a depressive phase, a good therapist can check you through to narrow down what kind of mindset lead to your current state and what's holding you back from getting better.\nNo matter how smart somebody is or how complex he's thinking, we're all cramped inside our own little world of interpretation and assumption, which is majorly based on our past experience and current environment. Sometimes it's incredibly helpful when someone slightly lifts up our glasses to show us a glimpse of the world outside this tiny scope. To put things into a broader perspective.For example, your current lack of motivation and concentration could have various causes. No one here, and often even people who know you very good, can tell you what's behind it. A therapist also can't do this, but he or she is able to find the cause together with you through (a lot) of interviews. Maybe it's not even required to get any medication at all but deciding this should be done by an expert in this field.From what you've written it sounds to me, that you don't have a valid and healthful yardstick to measure yourself against. A lot of people don't. We tend to always look to what lies in front of us and forget about what lies behind. The internet isn't helpful here either, as it appears that no matter how much effort we put into something, there is always something we don't know, always people way better than us. \nThis might even be true, but it's not healthy to measure yourself against that. To be confident in your own abilities is very important. We need to take a break sometimes (better regularly) and discover all the new things we learned and achieved.\nMaybe you feel like everything just played into your hands and you didn't do much work to get where you are now. That can lead you to the assumption that you're just lucky and everyone expects you to succeed in everything easily but you fear that you fail every minute. This feeling can develop further into a form of anxiety where you're unable to start something because you \"know\" that you (might) fail and so you don't even start.\nMaybe you're unable to deal with your fast maturity, leaving you unable to communicate properly with people below or above your mature-level.But it also could be something totally different, which is why we all here encourage you to visit a professional.I hope I helped you or someone in a similar situation. If you feel like it, just respond honestly to someone here. I wish you all the best and hope you become clear about your situation quickly.You really should see a professional -- do it right away (why suffer further?) This may be a chemical thing you can't control. Or something else. Fixing it yourself could work, but it could not. Go to a doctor or mental health counselor first; they will be able to help or refer you to someone who can. It's really important -- it could be caused by many, many things, and a doctor/mental health professional will be able to help figure this out/eliminate other causes.Please make an appointment with whatever you have available at your school today (all colleges should have these services).BTW: You're extremely brave to reach out -- my hat's off to you! But don't stop here! Take the extra step to get the help you need -- you do deserve it.I was clinically depressed in college and you sound very much like me back then. You really need to see your college's medical center psychologist - most colleges have one. ASAP. Please.I was a top student all through high school and first year of college and became utterly depressed to the point where I failed a class because I simply could not drag myself out of my dorm room to go to the final exam. That happened to be a real kick in the pants for me... to jolt me out of my state. And get me to a doctor.Few things that may help\n- It is a phase, it will pass. But you need to be proactive and get moving. And get to a doctor - please.\n- Join a bunch of clubs or sports teams (if you're athletic) or volunteer. Sometimes going to class seems unbearable but having other activities, especially ones where you have a commitment to show up for your team helps.\n- Get a job - same as above. Accountability to others helps.\n- Take time off and travel. If you're doing fine in college and getting decent grades etc., and can afford to skip a semester - do it! College is the last time you will have a chance to do completely new things. And traveling doesnt have to cost a lot of money... esp if you're a college student and dont mind hostels.\n- And above all, PLEASE DONT DRINK or SMOKE POT. Both will make the situation MUCH worse.I cant say I fully recovered but I am not at all the way I was in college. You will get out of it, but you need to act.In addition to all the great advice here, I would suggest you learn Meditation and practice it everyday, it will take just 20 minutes. While I don't guarantee anything in the short run, you will see benefits in the long run with regards to issues of this nature.Assuming there's no organic cause, why not try looking at self-help books? I found the following useful:http://www.amazon.com/Happiness-Trap-Struggling-Start-Living...Depression can be anger that cannot be expressed because it's denied since too long and 'forgotten', outside help with a professional may be very helpfulI think it's much more common than what you may think.I've passed through a similar phase when I was at the university long ago, too much partying, alcohol and lots of junk food. Drink water and try to exercise and achieve small goals (say, add two or five more minutes of running for session each week) and involve in another type of activities to give you some relief from stress without trashing your body.Also, talk to other people/real friends about how you feel or seek counseling.When I was in a similar point in my life, I found it best to create something. Creation for me helped to build a motivation and a sense of pride. Be it a webpage that you have been thinking about building, a model car, a wood project, just something that you can see progress on and you can have a passion for.See if there is a club that you can join at your college; sailing, woodworking, fencing, pottery, etc... These have also helped me to find a motivation and a sense of accomplishment, plus they tend to push you to learn and grow your skills.If you're sure it's not medical related force yourself to go out and talk to someone. Anyone. About anything. I'm a college student too, so if you want to talk, email me at yadavh@umich.edu and we can set some time to just shoot the shit. Yeah you don't know me, but maybe you've still got a little spontaneity in you.Struggling with OCD and depression myself, it can be very difficult to do anything, socializing, hobbies etc. There is some really good advice on here though.Definitely consider talking to someone. A close friend, family even. I'd really suggest trying to find a counselor, psychologist or psychiatrist though. It might take some time to find one that you feel comfortable with, don't give up. I'm still looking.I hadn't thought of suggesting this, but I have been having a problem with this myself, and that is entagld's comment(1st right now) - \"It would be great if you could eventually talk about a passion you have with someone who shares it.\" I'd even extend that to working on a project that you are passionate about with someone. You would be surprised how much of a difference this can make.I really hope you can find some direction or help from the comments here. Good luck.I could tell you the same advice others have given you here, or those you already looked up: Get a hobby like reading, Exercise everyday, go see a doctor etc. All those things work. But do you have someone to talk to, other than over an anonymous post on HN?I dont know what use I could be of, but I can lend a ear anytime you need one. Or maybe help talk stuff over. If you feel you need that, email me cherian-dot-abraham-at-gmail-dot-com.Instead of just advice, I thought giving you that was maybe a bit more helpful.I don't claim to have the answers; I do claim to have empathy. What you're describing isn't far off what I lived through around your age, though you sound like you're managing better academically with it than I did. Well done for that.For me, exercise helps but isn't a panacaea. Proper sleep helps but too much sleep can be a symptom of depression I understand. I've had a tendency to almost obsessively research things sometiems in that position, close myself off in that pursuit then look back later and realise it's been an excuse to shut off. The people around you, odds on, care more about you and your health and happiness than you think. More of them have suffered or will suffer something like you are now than you might expect.What little wisdom I do have in this area says to try and stay in touch with some degree of 'normal' life in the outside world. Forcing yourself into too much risks burnout which is no more helpful, but managing at least some leiure (i.e. outside classes) outside world interaction will, I suspect, help you. Most people are fundamentally nice and helpful IME, frankly,(One little thing, you say you have no connection with your peers any more and seem to feel you've moved on beyond the pursuits that seem to interest them. For most of my life the vast bulk of my friends have been older than me; they're just who I tend to find interesting. Later stages of undergraduate education aren't conducive to significant friendships with older people than yourself though. You may find you benefit from trying to reach out into new social avenues outside education eo engage with peers at a different point in their lives than where you currently are yourself.)\"I have hardly put any effort into anything that I have been doing/done.\"Do you know why? Has the work seemed meaningless, boring, overwhelming, etc.?\"I am unable to concentrate\"All the time or only during specific activities?\"I can't seem to find motivation to do work\"Do you have any motivation for non-work activities?\"and though I did have that phase, I can't stand that anymore.\"Why can't you stand it anymore?\"I don't seem to understand what is wrong with me\"I know what that feels like. It's frustrating.> I have been holed up by my self pretty much, and well I don't seem to understand what is wrong with me / what i need to do to fix this ? is this just a phase of life ?I'm going to say something a little different than others here. There's nothing wrong with you. This is just a phase and it too will pass. Thinking that there is something wrong with you or that you need to fix something may just make things worse.I had a similar experience when I was in school. I ended up going on prozac for a few months, and it made all the difference in the world. As others have suggested, make an appointment with a psychiatrist and see what they can offer you. It doesn't necessarily have to be pharmaceutical in nature.Sounds like you're burnt out. A form of depression (well to me). I've had it many times due to heavy/obsessive work towards something, eg a school assignment from start to due date and from morning to late only to get a B mark was a bit insulting. Anyhow, for each burn out, I could not simply get over it. I know it's temporary but can't break out of it sooner than later.However, recently as of last year, I've started doing exercise every day, a consistent sleep pattern and my diet is pretty healthy. As for social links, I joined a Volleyball club. Despite being deaf, I get game challenges, exercise and a chance to chat a bit. Helps reduce the chance of burnout, or at least I feel fit.If you're not feeling very motivated, do something that normally motivates you for a bit. Do you like the movies? Put in a movie, like Amelie for example. You are unlikely to laugh but it's a change of pace. Maybe play Starcraft 2?Hope you recover soon.The fact that you recognise your predicament, and are asking for help is a strong indicator that you will get better quickly.I tried pretending to my friends and family that I was more or less ok. I think I must have been pretty good at it too, as no one ever suggested to me that I might have been depressed until I got to the point of having a scary psychotic episode.I got better within months after accepting my condition and learning how to manage it.As almost everyone else has stated, depression is totally managable if you seek professional help.Sometimes with medication and sometimes simply with therapy and lifestyle changes.Television and computers fool our brain into thinking that it is active, but give it none of the rewards of actually taking action and either failing or succeeding.Boycott television and don't use the computer or iPod for a day. Do what you feel like doing, as long as you are actually doing something, not simply consuming media.Another tactic for getting yourself out of a rut is to just try something new. The more different to your current activities the better. Something physical that involves other people is a good bet, but anything that strikes you as interesting is good. As a student you probably have access to loads of clubs/societies that do all kinds of odd activities, take advantage of this.Also, +1 to all the comments suggesting you see a doctor/counselor.Some thoughts from personal experience:- Stop thinking.- Take a blank sheet of paper.- Write 1 simple task at the top, e.g. do the laundry.- Do not write any more tasks.- Put the paper somewhere in your face.- Complete said task. Force yourself to do so.- No interruptions, get it done.- Cross off the task.Congratulations, you've set a goal and achieved it. Trivial, but it's progress. You are now allowed to turn the brain back on and think. Momentum is good. Breathe deep! I noticed that at extreme low points I damn near stop. Perhaps this is why exercise is recommended so much, to help you move and breathe again.Mentally I've found two things help:- Knowing that there is a way forward out of this mess. May require outside help and support to convince you of this.- Simplifying and focusing on one small thing at a time. There are very few things in life that really must be done right now, some will have to wait and until there is space there's no point stressing about them.If you have understanding friends or family, TALK.1. take up the drinking/partying lifestyle again, if only occasionally - being \"holed up\" is not gonna improve yr mood/motivation, and there's evidence that sleep deprivation can improve mood temporarily.2. get some basic physical testing done by a doctor in order to eliminate the possibility of conditions like anaemia or a thyroid problem3. speak to a doctor/psychiatrist - preferably the latter - about the possibility of you suffering from depression/anxiety. be cautious of medication, especially in the US, but by no means completely discount it as an option.Not sure this will help, but here are my two cents:1. Are you a Celiac? http://www.celiac.com/2. Advice I received from a Taxi Driver -- \"If you're having a bad day, walk away.\" He referred to his 'bad days' as those when he didn't make money, but his advice struck a cord with me: If you cannot do anything about it, walk away and try again another day.you mentioned receiving the advice \"go to a doctor / shrink / and talk stuff out.\" but did not mention pursuing it. this is good advice and as a college student you have several people you can talk to about this:- college-health therapist, social worker, or doctor\n - family doctor\n - recommended or yellow page'd therapist, social worker, or doctorThese folks will be able to help you assess your troubles, and initiate treatment or refer you to a provider proper treatment.Good luck, hang in there :)I've been feeling the same way myself the past couple of days. Not sure if it's due to the weather and all the rain recently. But I've been feeling burnt out myself. I don't have any solutions at the moment, except I think on Friday I'm going to take a personal day off (1st time this year) and stay away from the computer and go out of the city and just hang around. Maybe the change of scenery might do me some good.As for you - sorry no advice but maybe go somewhere you haven't gone before yet preferably outdoors. Good luck!actually, two more important points:1. do NOT, under ANY circumstances, resort to \"alternative\" - i.e. clinically and scientifically invalid - medicine. there's absolutely no evidence that chiropractic, for example, could be of any use to you.2. while you have several symptoms in common w/ depression don't take too seriously the people here declaring that it's that - it could be, but there are a number of other conditions - namely anxiety - which overlap w/ it, and the average HN reader isn't qualified to tell them apart.There are already great suggestions here I think, and I also echo the medical route if you think it's appropriate. I want to add another possibility, because with a broad enough range of options you might find something quite effective.It occurs to me you may be under challenged. It seems your academic life comes easy enough for you to simply go through the motions, allowing for listlessness to set in. To remedy that I'd find some challenge to take you out of your comfort zone like a marathon, for example, or trying to master something such as a game/sport or new skill. Done correctly, you won't really have time to stare at a screen for 30 minutes. Find something constructive that interests you. If it's something that scares you (because you may fail) even better. It may just be that you're in a rut and need to be shaken out of it. One thing is for sure: you can't regularly challenge yourself to scary things outside your comfort zone, succeed in such enterprises and remain depressed all the while. At least I sincerely doubt it.Good luck!Sorry about how you are feeling. Was a bit depressed when I was quite alone in the UK.I felt really better when I called home, achieved a little success or just took a break.Are you at/near home? If not, visit home and some childhood friends.Visit the hospital and you will see how lucky you are to be healthy,I believe depression is just a state of mind and you are in control.Just kow that life is generally not supposed to be serious.I hope you feel better soon.I went through the same thing. The best advice I can give you now is to go chiropractor that specializes in many different types of medicines. DO NOT go to a regular MD - they will not help you any.Depression is a symptom, and can be caused by a variety of factors. You need someone who is unbiased and well educated, and a well-rounded chiropractor is a great starting point.Nutritional Deficiencies\nToxicity\nMalfunctioning (thyroid, adrenal)these are all major possible contributing factors that need to be checked.You can email me at anony304@gmail.com and I'll help you try to figure out the root. Detail in your symptoms helps too (e.g. do you get dizzy when you stand up, are you lethargic, digestive irregularities, etc).Hey there! I'm one of the guys building the scalable, bolt-on search. Thanks for the mention :DThe one thing all players in the tech industry have in common:http://www.youtube.com/watch?v=08Wr5BYu9ZI&feature=relat...Nice post! But on HN's behalf, I think there's alot of doers out there on the forum. That's why this is the only forum I truly enjoy.Please change your title, because it comes off douchey and someone who wanted to go, IS building something, and didn't get in may take it the wrong way. PG+ co know why people didn't get in, so making assumptions about it isn't a good thing.Those who attended are either doers/want to do something. The audience included a lot of people who want to do startups, not just those who have done it before. The purpose of SUS according to the website/general vibe seemed to be: \"If you're thinking about a startup, then starting doing it\".", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "aholachek/bundle-wizard", "link": "https://github.com/aholachek/bundle-wizard", "tags": ["performance", "bundle-analyzer", "javascript", "developer-tools"], "stars": 670, "description": "Magically easy insight into the JavaScript loaded by a web app", "lang": "JavaScript", "repo_lang": "", "readme": "# \ud83e\uddd9\u200d\u2642\ufe0f bundle-wizard\n\n[![npm version](https://badge.fury.io/js/bundle-wizard.svg)](https://badge.fury.io/js/bundle-wizard)\n\nThis command line utility makes it simple to create visualizations of the JS bundles that were fetched for any specific page (or \"entry point\") of a web app.\n\n## Example\n\n`npx bundle-wizard reddit.com`\n\n\n\"bundle-wizard\n\n\n[Check out a live demo of this visualization](https://bundle-wizard-spectrum.netlify.app/)\n\n## Try it out on a production app:\n\nTry any of the following commands to take a peek at the JavaScript code different sites are shipping:\n\n1. `npx bundle-wizard reddit.com`\n2. `npx bundle-wizard codesandbox.io`\n3. `npx bundle-wizard gatsbyjs.org`\n4. `npx bundle-wizard codecademy.com`\n5. `npx bundle-wizard id.atlassian.com`\n\n## Try it out on an app running locally:\n\nWant to use bundle-wizard but haven't deployed your app yet? It's as easy as:\n\n#### 1. Build your app locally\n\ne.g. `npm run build`\n\n#### 2. Serve the build folder\n\ne.g. `npx serve -s build`\n\n#### 3. Call bundle-wizard with the correct localhost url\n\ne.g. `npx bundle-wizard localhost:5000/sign-up`\n\n## Additional features\n\n### View source code\n\nIf sourcemaps are properly configured you should be able to click on a square to see the code it represents:\n\n![demonstration of code feature](./example.gif)\n\n(Note: for performance reasons, this functionality will be automatically stripped if you decide to package your bundle-wizard files in order to host or share them).\n\n### Filter bundles with regex\n\nWant to know all the bundles that contain code from certain library (say, `momentjs` or `lodash`)? Wondering how much weight in your bundles is from `node_modules` vs custom code? You can answer questions like these by putting a search string or regex into the bottom search bar that allows you to filter the view based on the name of the containing folder bundle name, or script:\n\n![demo of simple search](./codecademy-example.png)\n\n## Optional command line arguments\n\n### `url` (initial argument)\n\nTo skip the initial prompt, provide a url as a first argument:\n\n`npx bundle-wizard reddit.com`\n\n### `interact` flag\n\nIf you need to do some work in the browser getting the page ready for analysis (perhaps by signing in and then visiting a certain page), use the following command:\n\n`npx -p puppeteer -p bundle-wizard bundle-wizard --interact`\n\nThe persistent npm equivalent would be running:\n\n`npm install -g puppeteer bundle-wizard`\n\n`bundle-wizard --interact`\n\nYou might be wondering why you have to install puppeteer as a peer dependency to use the interact command. By default `bundle-wizard` uses `puppeteer-core`, which is faster to download than `puppeteer` because it doesn't come bundled with a version of chromium. Since the `--interact` command opens a browser in non-headless mode, unlike the default `bundle-wizard` command, it requires the full `puppeteer` package to work reliably.\n\nAfter running this command and specifying a url, you will see a browser window that will pop up that you can interact with. When you are ready to proceed, type `y` into the console in respond to the waiting prompt to reload the page and start measuring performance.\n\n**Note**: While this tool does not record any data, it's still recommended from a common sense perspective to enter login information only for test accounts.\n\n### `desktop` flag\n\nBy default, `bundle-wizard` will analyze a mobile version of the site. To analyze the desktop version instead, pass the `--desktop` flag:\n\n`npx bundle-wizard --desktop`\n\n### `ignoreHTTPSErrors` flag\n\nIf you are running an HTTPS connection on localhost and want to test a local site, you'll need to use this setting to prevent self-signed certificate errors:\n\n`npx bundle-wizard https://localhost:5000 --ignoreHTTPSErrors`\n\n### `port` argument\n\nBy default, `bundle-wizard` will try to find an open port in the 3000 range. However, if you'd like it to run on a certain port, you can do so by passing in a value for `--port`:\n\n`npx bundle-wizard https://localhost:3000 --port=4000`\n\n## How it works\n\n`bundle-wizard` uses [Puppeteer](https://github.com/puppeteer/puppeteer) to download a web page, measure performance, and examine the JavaScript it sends to the client. It then analyzes the code using the awesome [source-map-explorer](https://github.com/danvk/source-map-explorer) library and creates a custom visualization.\n\n### Requirement: downloadable sourcemaps\n\nThis utility downloads sourcemaps from the url you provide. This requires the sourcemaps to be publically available, or at least available on your network. You might need to point to a testing instead of production build, for instance, as some apps disable sourcemaps in production.\n\nDon't have access to sourcemaps in your prod app? Try [building your app locally.](#try-it-out-on-an-app-running-locally)\n", "readme_type": "markdown", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "codevise/pageflow", "link": "https://github.com/codevise/pageflow", "tags": ["scrollytelling", "multimedia-storytelling", "storytelling"], "stars": 670, "description": "Multimedia story telling for the web.", "lang": "JavaScript", "repo_lang": "", "readme": "# Pageflow\n\n[![Gem Version](https://badge.fury.io/rb/pageflow.svg)](http://badge.fury.io/rb/pageflow)\n[![Build Status](https://github.com/codevise/pageflow/workflows/tests/badge.svg)](https://github.com/codevise/pageflow/actions)\n[![Coverage Status](https://coveralls.io/repos/github/codevise/pageflow/badge.svg?branch=master)](https://coveralls.io/github/codevise/pageflow?branch=master)\n[![Code Climate](https://codeclimate.com/github/codevise/pageflow/badges/gpa.svg)](https://codeclimate.com/github/codevise/pageflow)\n[![Reviewed by Hound](https://img.shields.io/badge/Reviewed_by-Hound-8E64B0.svg)](https://houndci.com)\n\nMultimedia storytelling for the web. Built in cooperation with [WDR](https://wdr.de).\n\nFor a high level introduction and example Pageflow stories see\n[pageflow.io](https://pageflow.io).\n\n* [Getting Started](https://github.com/codevise/pageflow/wiki/Getting-Started)\n* [Guides](https://github.com/codevise/pageflow/blob/master/doc/index.md)\n* [JavaScript API Reference of `pageflow` package](http://codevise.github.io/pageflow-docs/js/master/index.html)\n* [List of Plugins](https://github.com/codevise/pageflow/wiki/List-of-Plugins)\n\n## Updating\n\nFor instructions on how to update from a prior version of the gem see\nthe\n[Updating Pageflow](https://github.com/codevise/pageflow/wiki/Updating-Pageflow)\nwiki page.\n\n## Ingredients\n\nPageflow is a Rails engine which roughly consists of the following\ncomponents:\n\n* A full MVC stack to manage and display Pageflow stories\n* User and permission management with support for isolated accounts\n and user collaboration\n* A client side application for live preview editing of stories\n* Background jobs to process and encode images, audios and videos\n* Generators to quickly bootstrap a new Rails application\n\nPageflow assumes the following choice of libraries:\n\n* [Devise](https://github.com/plataformatec/devise) for authentication\n* [CanCanCan](https://github.com/CanCanCommunity/cancancan) for authorization\n* [ActiveAdmin](http://activeadmin.info/) for administration\n* [Resque](https://github.com/resque/resque) for as default for background jobs\n* [FriendlyId](https://github.com/norman/friendly_id) for pretty URLs\n* [Paperclip](https://github.com/thoughtbot/paperclip) for attachment handling\n* [Backbone](http://backbonejs.org/) [Marionette](http://marionettejs.com/) for the editor\n* [React](https://facebook.github.io/react/)/[Redux](http://redux.js.org/) for the frontend\n\n## Requirements\n\nPageflow runs in environments with:\n\n* Ruby >= 2.1 (see `.travis.yml` for supported versions)\n* Node >= 10.18\n* Rails 4.2\n* Redis server (for Resque)\n* A database server supported by Active Record (tested with MySQL)\n* ImageMagick\n* [Audio Waveform Image Generator](https://github.com/bbc/audiowaveform#installation)\n\nAccounts of the following cloud services have to be registered:\n\n* [Amazon Web Services](http://aws.amazon.com) for S3 file storage and\n (optionally) Cloudfront content delivery\n* [Zencoder](http://zencoder.com) for video/audio encoding\n\n## Installation\n\nGenerate a new Rails application using the MySQL database adapter:\n\n $ rails new my_pageflow --database=mysql\n $ cd my_pageflow\n\nDo not name your application `\"pageflow\"` since it will cause conflicts\nwhich constant names created by Pageflow itself.\n\n### Database Setup\n\nEnter valid MySQL credentials inside `config/database.yml` and create\nthe database:\n\n $ rake db:create\n\n### Gem Dependencies\n\nAdd these lines to your application's Gemfile, replacing `X.Y.Z` with\nthe current Pageflow version number. It is recommended to depend on a\nspecific minor version using the pessimistic version constraint\noperator. See Pageflow's\n[versioning policy](https://github.com/codevise/pageflow/blob/master/doc/versioning_policy.md)\nfor details.\n\n # Gemfile\n gem 'pageflow', '~> X.Y.Z'\n\n # The install generator sets up Resque as Active Job backend\n gem 'resque', '~> 1.25'\n gem 'resque-scheduler', '~> 2.5'\n gem 'ar_after_transaction', '~> 0.5.0'\n gem 'redis', '~> 3.0'\n gem 'redis-namespace', '~> 1.5'\n\nRun bundler to install dependencies:\n\n $ bundle install\n\n### Running the Generator\n\nNow you can run the generator to setup Pageflow and its dependencies:\n\n $ rails generate pageflow:install\n\nThe generator will invoke Active Admin and Devise generators in turn\nand apply some configuration changes. When asked to overwrite the\n`db/seeds.rb` file, choose yes.\n\nTo better understand Pageflow's configuration choices, you can run the\nsingle steps of the `install` generator one by one. See the wiki page\n[The Install Generator in Detail](https://github.com/codevise/pageflow/wiki/The-Install-Generator-in-Detail)\nfor more. If you'd rather not look behind the scenes for now, you can\nsafely read on.\n\n### Database Migration\n\nNow you can migrate the database.\n\n $ rake db:migrate\n\nFinally, you can populate the database with some example data, so\nthings do not look too blank in development mode.\n\n $ rake db:seed\n\n## Configuration\n\nPageflow stores files in S3 buckets also in development\nmode. Otherwise there's no way to have Zencoder encode them. See\n[setting up external services](./doc/setting_up_external_services.md).\n\nThe host application can utilize environment variables to configure the API keys for S3 and Zencoder. The variables can be found in the generated Pageflow initializer.\n\nFor available configuration options and examples see the inline docs\nin `config/initializers/pageflow.rb` in your generated rails app.\n\nEnsure you have defined default url options in your environments\nfiles. Here is an example of `default_url_options` appropriate for a\ndevelopment environment in `config/environments/development.rb`:\n\n config.action_mailer.default_url_options = {host: 'localhost:3000'}\n\nIn production, `:host` should be set to the actual host of your\napplication.\n\n## Running Pageflow\n\nIn addition to the Rails server, you need to start two Rake tasks for\nthe background job processing. These tasks are listed in `Procfile` which\nis generated in the project root folder by the Pageflow installer.\n\nConsider using the [foreman gem](https://github.com/ddollar/foreman) to start all of\nthese processes (including the Rails server) with a single command in your\ndevelopment environment.\n\nThe built-in Resque web server is mounted at `/background_jobs`. Use it to\ninspect the state of background jobs, and restart failed jobs. This functionality\nis only available for admins.\n\n## Troubleshooting\n\nIf you run into problems during the installation of Pageflow, please refer to the [Troubleshooting](doc/troubleshooting.md) docs. If that doesn't help, consider [filing an issue](https://github.com/codevise/pageflow/issues?state=open).\n\n## Security Policy\n\nSee [`SECURITY.md`](https://github.com/codevise/pageflow/blob/master/SECURITY.md).\n\n## Contributing\n\nPull requests are welcome on GitHub at\nhttps://github.com/codevise/pageflow. Everyone interacting in the\nproject's codebases, issue trackers and mailing lists is expected to\nfollow the\n[code of conduct](https://github.com/codevise/pageflow/blob/master/CODE_OF_CONDUCT.md).\n\nSee the\n[Contributing section](https://github.com/codevise/pageflow/blob/master/doc/index.md#contributing)\nin the guides list for instructions on how to setup your development\nenvironment. The\n[GitHub wiki](https://github.com/codevise/pageflow/wiki#contributing-to-pageflow)\ncontains high level guides on common development workflows.\n\n## License\n\nThe gem is available as open source under the terms of the\n[MIT License](https://github.com/codevise/pageflow/blob/master/MIT-LICENSE).\n\n## Special Thanks\n\nBuilt in cooperation with:\n\n[![WDR](doc/supporter_logos/wdr.png)](https://wdr.de)\n\nWe would like to express our special thanks to the following services\nfor supporting Pageflow through free open source plans:\n\n[![BrowserStack](doc/supporter_logos/browser_stack.png)](https://browserstack.com)\n", "readme_type": "markdown", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "annnhan/vue-spa-template", "link": "https://github.com/annnhan/vue-spa-template", "tags": [], "stars": 670, "description": "The base code of vue.js project.", "lang": "JavaScript", "repo_lang": "", "readme": "## Project Description\n\nThe front-end development environment based on vue.js is used for the development of single-page applications after the front-end and back-end separation, and the latest language features such as ES Next and scss can be used during development. Items include:\n\n- Basic libraries: `vue.js`, `vue-router`, `vuex`, `whatwg-fetch`\n- Compilation/packaging tools: `webpack`, `babel`, `node-sass`\n- Unit testing tools: `karma`, `mocha`, `sinon-chai`\n- Local server: `express`\n\n## Directory Structure\n\n \u251c\u2500\u2500 README.md project introduction\n \u251c\u2500\u2500 index.html entry page\n \u251c\u2500\u2500 build build script directory\n \u2502 \u251c\u2500\u2500 build-server.js runs the local build server and can access the built page\n \u2502 \u251c\u2500\u2500 build.js production environment build script\n \u2502 \u251c\u2500\u2500 dev-client.js development server hot reload script, mainly used to realize the automatic page refresh in the development stage\n \u2502 \u251c\u2500\u2500 dev-server.js run local development server\n \u2502 \u251c\u2500\u2500 utils.js build related tools\n \u2502 \u251c\u2500\u2500 webpack.base.conf.js wabpack basic configuration\n \u2502 \u251c\u2500\u2500 webpack.dev.conf.js wabpack development environment configuration\n \u2502 \u2514\u2500\u2500 webpack.prod.conf.js wabpack production environment configuration\n \u251c\u2500\u2500 config project configuration\n \u2502 \u251c\u2500\u2500 dev.env.js development environment variables\n \u2502 \u251c\u2500\u2500 index.js project configuration file\n \u2502 \u251c\u2500\u2500 prod.env.js production environment variables\n \u2502 \u2514\u2500\u2500 test.env.js test environment variables\n \u251c\u2500\u2500 mock mock data directory\n \u2502 \u2514\u2500\u2500 hello.js\n \u251c\u2500\u2500 package.json npm package configuration file, which defines the npm script of the project, dependent packages and other information\n \u251c\u2500\u2500 src source directory\n \u2502 \u251c\u2500\u2500 main.js entry js file\n \u2502 \u251c\u2500\u2500 app.vue root component\n \u2502 \u251c\u2500\u2500 components public component directory\n \u2502 \u2502 \u2514\u2500\u2500 title.vue\n \u2502 \u251c\u2500\u2500 assets resource directory, the resources here will be built by wabpack\n \u2502 \u2502 \u2514\u2500\u2500 images\n \u2502 \u2502 \u2514\u2500\u2500 logo.png\n \u2502 \u251c\u2500\u2500 routes front-end routing\n \u2502 \u2502 \u2514\u2500\u2500 index.js\n \u2502 \u251c\u2500\u2500 store application-level data (state)\n \u2502 \u2502 \u2514\u2500\u2500 index.js\n \u2502 \u2514\u2500\u2500 views page directory\n \u2502 \u251c\u2500\u2500 hello.vue\n \u2502 \u2514\u2500\u2500 notfound.vue\n \u251c\u2500\u2500 static Pure static resources, will not be constructed by wabpack.\n \u2514\u2500\u2500 test test file directory (unit&e2e)\n \u2514\u2500\u2500 unit unit test\n \u251c\u2500\u2500 index.jsentry script\n \u251c\u2500\u2500 karma.conf.js karma configuration file\n \u2514\u2500\u2500 specs single test case directory\n \u2514\u2500\u2500 Hello.spec.js\n\n## Environment installation\n\nThis project depends on node.js, install node.js and cnpm before use (significantly increase the download speed of dependent packages).\n1. Download and install node.js by yourself: [https://nodejs.org/en/download/](https://nodejs.org/en/download/)\n2. Then install the cnpm command:\n\n npm install -g cnpm --registry=https://registry.npm.taobao.org\n\n\n## Quick start\n\n git clone https://github.com/hanan198501/vue-spa-template.git\n cd vue-spa-template\n cnpm install\n npm run dev\n\n## Command list:\n\n #Open the local development server, monitor the changes of project files, build in real time and automatically refresh the browser, and visit http://localhost:8081 in the browser\n npm run dev\n\n #Use the production environment configuration to build the project, and the built files will be output to the \"dist\" directory,\n npm run build\n\n #Run the build server, you can view the built page\n npm run build-server\n\n # run unit tests\n npm run unit\n \n## Separation of front and rear ends\n\nThe project realizes the front-end and back-end separation based on the spa method, and the server distinguishes the front-end page and back-end interface requests through nginx, and distributes them to different services. The front end physically has only one entry page, and the routing is controlled by the front end (based on vue-router), and the corresponding data and components are loaded for rendering according to different urls.\n\n## interface mock\n\nAfter the front-end and back-end are separated, you need to define the interface information (request address, parameters, return information, etc.) with the back-end classmates before development. The front-end can start coding by mocking without waiting for the back-end interface to be ready.\nThe local development server of the project is built based on express. Through the express middleware mechanism, we have added the interface mock function to dev-server.\nDuring development, the mock data of the interface is placed in the mock directory, and each file is as follows:\n\n\n module.exports = {\n \n // interface address\n api: '/api/hello',\n \n // return data refer to http://expressjs.com/zh-cn/4x/api.html\n response: function (req, res) {\n res. send(`\n

    hello vue!

    \n `);\n }\n }\n\n\n## Modularity\n\nES2015 module syntax can be used during development, and each file will be compiled into an amd module during construction.\n\n## Componentization\n\nThe whole application is built by vue components, and the display of corresponding components is controlled by vue-router. The component tree structure is as follows:\n\n app.vue root component (there is only one for the whole application)\n \u251c\u2500\u2500view1.vue page-level component, placed in the views directory, when there are sub-components, you can create a sub-directory\n \u2502 \u251c\u2500\u2500component1.vue Functional components, public ones are placed in the components directory, otherwise they are placed in the views subdirectory\n \u2502 \u251c\u2500\u2500component2.vue\n \u2502 \u2514\u2500\u2500component3.vue\n \u251c\u2500\u2500view2.vue\n \u2502 \u251c\u2500\u2500component1.vue\n \u2502 \u2514\u2500\u2500component4.vue\n \u2514\u2500\u2500view3.vue\n \u251c\u2500\u2500component5.vue\n ...\n\n\n## unit test\n\nUnit tests can be written for each component and placed under the `test/unit/specs` directory. The directory structure of the unit test case is recommended to be consistent with the test file (relative to src), and the file name of each test case starts with `.spec .js` ending.\nWhen executing `npm run unit`, all `spec.js` files will be traversed, and the test report will be generated in the `test/unit/coverage` directory.\n\n\n## joint debugging method\n\nAfter the front-end and back-end are separated, since the server-side and front-end development environments are on two different machines, the asynchronous requests from the front-end need to be proxied to the back-end machine.\nWhen joint debugging, just run the dev script through the proxy parameter, and all the interfaces defined in the mock directory will be forwarded to the machine specified by the proxy parameter:\n\n # 172.16.36.90:8083 is the environment address of the backend machine\n npm run dev -- --proxy=172.16.36.90:8083\n\nIn this way, if the interface /api/hello is defined in the mock directory, it will be forwarded to http://172.16.36.90/:8083/api/hello\n\n## related resources\n\n- QQ group: 568815621\n- vue.js official website: [https://vuejs.org/](https://vuejs.org/)\n- vue.js Chinese website: [http://vuefe.cn/](http://vuefe.cn/)\n- vue-router documentation: [http://router.vuejs.org/zh-cn/index.html/](http://router.vuejs.org/zh-cn/index.html)\n- vuex documentation: [http://vuex.vuejs.org/](http://vuex.vuejs.org/)\n- webpack documentation: [https://webpack.github.io/docs/](https://webpack.github.io/docs/)\n- ES2015 Getting Started Tutorial: [http://es6.ruanyifeng.com/](http://es6.ruanyifeng.com/)\n- scss documentation: [http://sass-lang.com/documentation/file.SASS_REFERENCE.html](http://sass-lang.com/documentation/file.SASS_REFERENCE.html)\n- mocha documentation: [http://mochajs.org/](http://mochajs.org/)\n- Express Chinese official website: [http://expressjs.com/zh-cn/](http://expressjs.com/zh-cn/)", "readme_type": "markdown", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "dominictarr/through", "link": "https://github.com/dominictarr/through", "tags": [], "stars": 670, "description": "simple way to create a ReadableWritable stream that works", "lang": "JavaScript", "repo_lang": "", "readme": "#through\n\n[![build status](https://secure.travis-ci.org/dominictarr/through.png)](http://travis-ci.org/dominictarr/through)\n[![testling badge](https://ci.testling.com/dominictarr/through.png)](https://ci.testling.com/dominictarr/through)\n\nEasy way to create a `Stream` that is both `readable` and `writable`. \n\n* Pass in optional `write` and `end` methods.\n* `through` takes care of pause/resume logic if you use `this.queue(data)` instead of `this.emit('data', data)`.\n* Use `this.pause()` and `this.resume()` to manage flow.\n* Check `this.paused` to see current flow state. (`write` always returns `!this.paused`).\n\nThis function is the basis for most of the synchronous streams in \n[event-stream](http://github.com/dominictarr/event-stream).\n\n``` js\nvar through = require('through')\n\nthrough(function write(data) {\n this.queue(data) //data *must* not be null\n },\n function end () { //optional\n this.queue(null)\n })\n```\n\nOr, can also be used _without_ buffering on pause, use `this.emit('data', data)`,\nand this.emit('end')\n\n``` js\nvar through = require('through')\n\nthrough(function write(data) {\n this.emit('data', data)\n //this.pause() \n },\n function end () { //optional\n this.emit('end')\n })\n```\n\n## Extended Options\n\nYou will probably not need these 99% of the time.\n\n### autoDestroy=false\n\nBy default, `through` emits close when the writable\nand readable side of the stream has ended.\nIf that is not desired, set `autoDestroy=false`.\n\n``` js\nvar through = require('through')\n\n//like this\nvar ts = through(write, end, {autoDestroy: false})\n//or like this\nvar ts = through(write, end)\nts.autoDestroy = false\n```\n\n## License\n\nMIT / Apache2\n", "readme_type": "markdown", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "emn178/js-md5", "link": "https://github.com/emn178/js-md5", "tags": ["javascript", "md5"], "stars": 670, "description": "A simple MD5 hash function for JavaScript supports UTF-8 encoding.", "lang": "JavaScript", "repo_lang": "", "readme": "# js-md5\n[![Build Status](https://travis-ci.org/emn178/js-md5.svg?branch=master)](https://travis-ci.org/emn178/js-md5)\n[![Coverage Status](https://coveralls.io/repos/emn178/js-md5/badge.svg?branch=master)](https://coveralls.io/r/emn178/js-md5?branch=master) \n[![NPM](https://nodei.co/npm/js-md5.png?stars&downloads)](https://nodei.co/npm/js-md5/)\n\nA simple MD5 hash function for JavaScript supports UTF-8 encoding.\n\n## Demo\n[MD5 Online](http://emn178.github.io/online-tools/md5.html) \n[MD5 File Checksum Online](http://emn178.github.io/online-tools/md5_checksum.html)\n\n## Download\n[Compress](https://raw.github.com/emn178/js-md5/master/build/md5.min.js) \n[Uncompress](https://raw.github.com/emn178/js-md5/master/src/md5.js)\n\n## Installation\nYou can also install js-md5 by using Bower.\n\n bower install md5\n\nFor node.js, you can use this command to install:\n\n npm install js-md5\n\n## Notice\n`buffer` method is deprecated. This maybe confuse with Buffer in node.js. Please use `arrayBuffer` instead.\n\n## Usage\nYou could use like this:\n```JavaScript\nmd5('Message to hash');\nvar hash = md5.create();\nhash.update('Message to hash');\nhash.hex();\n```\nIf you use node.js, you should require the module first:\n```JavaScript\nmd5 = require('js-md5');\n```\nIt supports AMD:\n```JavaScript\nrequire(['your/path/md5.js'], function(md5) {\n// ...\n});\n```\n[See document](https://emn178.github.com/js-md5/doc/)\n\n## Example\n```JavaScript\nmd5(''); // d41d8cd98f00b204e9800998ecf8427e\nmd5('The quick brown fox jumps over the lazy dog'); // 9e107d9d372bb6826bd81d3542a419d6\nmd5('The quick brown fox jumps over the lazy dog.'); // e4d909c290d0fb1ca068ffaddf22cbd0\n\n// It also supports UTF-8 encoding\nmd5('\u4e2d\u6587'); // a7bac2239fcdcb3a067903d8077c4a07\n\n// It also supports byte `Array`, `Uint8Array`, `ArrayBuffer`\nmd5([]); // d41d8cd98f00b204e9800998ecf8427e\nmd5(new Uint8Array([])); // d41d8cd98f00b204e9800998ecf8427e\n\n// Different output\nmd5(''); // d41d8cd98f00b204e9800998ecf8427e\nmd5.hex(''); // d41d8cd98f00b204e9800998ecf8427e\nmd5.array(''); // [212, 29, 140, 217, 143, 0, 178, 4, 233, 128, 9, 152, 236, 248, 66, 126]\nmd5.digest(''); // [212, 29, 140, 217, 143, 0, 178, 4, 233, 128, 9, 152, 236, 248, 66, 126]\nmd5.arrayBuffer(''); // ArrayBuffer\nmd5.buffer(''); // ArrayBuffer, deprecated, This maybe confuse with Buffer in node.js. Please use arrayBuffer instead.\nmd5.base64(''); // 1B2M2Y8AsgTpgAmY7PhCfg==\n```\n\n## License\nThe project is released under the [MIT license](http://www.opensource.org/licenses/MIT).\n\n## Contact\nThe project's website is located at https://github.com/emn178/js-md5 \nAuthor: Chen, Yi-Cyuan (emn178@gmail.com)\n", "readme_type": "markdown", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "aws-actions/amazon-ecr-login", "link": "https://github.com/aws-actions/amazon-ecr-login", "tags": [], "stars": 672, "description": "Logs into Amazon ECR with the local Docker client.", "lang": "JavaScript", "repo_lang": "", "readme": "## Amazon ECR \"Login\" Action for GitHub Actions\n\nLogs in the local Docker client to one or more Amazon ECR Private registries or an Amazon ECR Public registry.\n\n**Table of Contents**\n\n\n\n- [Example of Usage](#examples-of-usage)\n- [Credentials and Region](#credentials-and-region)\n- [Permissions](#permissions)\n- [Troubleshooting](#troubleshooting)\n- [License Summary](#license-summary)\n- [Security Disclosures](#security-disclosures)\n\n\n\n## Examples of Usage\n\n### Building and pushing an image\n\n#### Before each of the following examples, make sure to include the following:\n```yaml\n - name: Checkout repo\n uses: actions/checkout@v3\n\n - name: Configure AWS credentials\n uses: aws-actions/configure-aws-credentials@v1 # More information on this action can be found below in the 'AWS Credentials' section\n with:\n role-to-assume: arn:aws:iam::123456789012:role/my-github-actions-role\n aws-region: aws-region-1\n```\n\n#### Login to Amazon ECR Private, then build and push a Docker image:\n```yaml\n - name: Login to Amazon ECR\n id: login-ecr\n uses: aws-actions/amazon-ecr-login@v1\n\n - name: Build, tag, and push docker image to Amazon ECR\n env:\n REGISTRY: ${{ steps.login-ecr.outputs.registry }}\n REPOSITORY: my-ecr-repo\n IMAGE_TAG: ${{ github.sha }}\n run: |\n docker build -t $REGISTRY/$REPOSITORY:$IMAGE_TAG .\n docker push $REGISTRY/$REPOSITORY:$IMAGE_TAG\n```\n\n#### Login to Amazon ECR Public, then build and push a Docker image:\n```yaml\n - name: Login to Amazon ECR Public\n id: login-ecr-public\n uses: aws-actions/amazon-ecr-login@v1\n with:\n registry-type: public\n\n - name: Build, tag, and push docker image to Amazon ECR Public\n env:\n REGISTRY: ${{ steps.login-ecr-public.outputs.registry }}\n REGISTRY_ALIAS: my-ecr-public-registry-alias\n REPOSITORY: my-ecr-public-repo\n IMAGE_TAG: ${{ github.sha }}\n run: |\n docker build -t $REGISTRY/$REGISTRY_ALIAS/$REPOSITORY:$IMAGE_TAG .\n docker push $REGISTRY/$REGISTRY_ALIAS/$REPOSITORY:$IMAGE_TAG\n```\n\n#### Login to Amazon ECR Private, then package and push a Helm chart:\n```yaml\n - name: Login to Amazon ECR\n id: login-ecr\n uses: aws-actions/amazon-ecr-login@v1\n\n - name: Package and push helm chart to Amazon ECR\n env:\n REGISTRY: ${{ steps.login-ecr.outputs.registry }}\n REPOSITORY: my-ecr-repo\n run: |\n helm package $REPOSITORY\n helm push $REPOSITORY-0.1.0.tgz oci://$REGISTRY\n```\n\n#### Login to Amazon ECR Public, then package and push a Helm chart:\n```yaml\n - name: Login to Amazon ECR Public\n id: login-ecr-public\n uses: aws-actions/amazon-ecr-login@v1\n with:\n registry-type: public\n\n - name: Package and push helm chart to Amazon ECR Public\n env:\n REGISTRY: ${{ steps.login-ecr-public.outputs.registry }}\n REGISTRY_ALIAS: my-ecr-public-registry-alias\n REPOSITORY: my-ecr-public-repo\n run: |\n helm package $REPOSITORY\n helm push $REPOSITORY-0.1.0.tgz oci://$REGISTRY/$REGISTRY_ALIAS\n```\n\n(Helm uses the same credential store as Docker, so Helm can authenticate with the same credentials that you use for Docker)\n\n#### Login to ECR on multiple AWS accounts\n\n```yaml\n - name: Configure AWS credentials\n uses: aws-actions/configure-aws-credentials@v1\n with:\n role-to-assume: arn:aws:iam::123456789012:role/my-github-actions-role\n aws-region: aws-region-1\n\n - name: Login to Amazon ECR\n id: login-ecr\n uses: aws-actions/amazon-ecr-login@v1\n with:\n registries: \"123456789012,998877665544\"\n```\n\nThe repository on account `998877665544` needs to explicitly grant access to role:\n`arn:aws:iam::123456789012:role/my-github-actions-role` in order for cross-account access to work\n\nPlease refer to [AWS docs](https://aws.amazon.com/premiumsupport/knowledge-center/secondary-account-access-ecr/)\nfor details on how to configure ECR policies\n\n### Using an image as a service\n\nLogin to Amazon ECR Private, then use the outputted Docker credentials to run your private image as a service in another job\n```yaml\njobs:\n login-to-amazon-ecr:\n runs-on: ubuntu-latest\n steps:\n - name: Configure AWS credentials\n uses: aws-actions/configure-aws-credentials@v1\n with:\n role-to-assume: arn:aws:iam::123456789012:role/my-github-actions-role\n aws-region: us-east-1\n mask-aws-account-id: 'false'\n - name: Login to Amazon ECR\n id: login-ecr\n uses: aws-actions/amazon-ecr-login@v1\n outputs:\n registry: ${{ steps.login-ecr.outputs.registry }}\n docker_username: ${{ steps.login-ecr.outputs.docker_username_123456789012_dkr_ecr_us_east_1_amazonaws_com }} # More information on these outputs can be found below in the 'Docker Credentials' section\n docker_password: ${{ steps.login-ecr.outputs.docker_password_123456789012_dkr_ecr_us_east_1_amazonaws_com }}\n\n run-with-internal-service:\n name: Run something with an internal image as a service\n needs: login-to-amazon-ecr\n runs-on: ubuntu-latest\n services:\n internal-service:\n image: ${{ needs.login-to-amazon-ecr.outputs.registry }}/my-ecr-repo:latest\n credentials:\n username: ${{ needs.login-to-amazon-ecr.outputs.docker_username }}\n password: ${{ needs.login-to-amazon-ecr.outputs.docker_password }}\n ports:\n - '80:80'\n steps:\n - name: Run steps in container\n run: echo \"run steps in container\"\n```\n\nSee [action.yml](action.yml) for the full documentation for this action's inputs and outputs.\n\n## Credentials and Region\n\n### AWS Credentials\n\nThis action relies on the [default behavior of the AWS SDK for Javascript](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/setting-credentials-node.html) to determine AWS credentials and region. Use [the `aws-actions/configure-aws-credentials` action](https://github.com/aws-actions/configure-aws-credentials) to configure the GitHub Actions environment with a role using GitHub's OIDC provider and your desired region.\n\n```yaml\n - name: Configure AWS credentials\n uses: aws-actions/configure-aws-credentials@v1\n with:\n role-to-assume: arn:aws:iam::123456789012:role/my-github-actions-role\n aws-region: us-east-1\n\n - name: Login to Amazon ECR Private\n id: login-ecr\n uses: aws-actions/amazon-ecr-login@v1\n```\n\nWe recommend following [Amazon IAM best practices](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html) when using AWS services in GitHub Actions workflows, including:\n* [Assume an IAM role](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#bp-workloads-use-roles) to receive temporary credentials. See the [Sample IAM Role CloudFormation Template](https://github.com/aws-actions/configure-aws-credentials#sample-iam-role-cloudformation-template) in the `aws-actions/configure-aws-credentials` action to get an example.\n* [Grant least privilege](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#grant-least-privilege) to the IAM role used in GitHub Actions workflows. Grant only the permissions required to perform the actions in your GitHub Actions workflows. See the Permissions section below for the permissions required by this action.\n* [Monitor the activity](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#remove-credentials) of the IAM role used in GitHub Actions workflows.\n\n### Docker Credentials\nThe registry URIs for ECR Private and ECR Public are as follows:\n- Registry URI for ECR Private: `123456789012.dkr.ecr.aws-region-1.amazonaws.com`\n- Registry URI for ECR Public: `public.ecr.aws`\n\nAfter logging in, you can access the docker username and password via action outputs using the following format:\n\nIf using ECR Private:\n- Docker username output: `docker_username_123456789012_dkr_ecr_aws_region_1_amazonaws_com`\n- Docker password output: `docker_password_123456789012_dkr_ecr_aws_region_1_amazonaws_com`\n\nIf using ECR Public:\n- Docker username output: `docker_username_public_ecr_aws`\n- Docker password output: `docker_password_public_ecr_aws`\n\nTo push Helm charts, you can also login through Docker. By default, Helm can authenticate with the same credentials that you use for Docker.\n\n## Permissions\n\n### ECR Private\n\nTo see how and where to implement the permissions below, see the [IAM section in the Amazon ECR User Guide](https://docs.aws.amazon.com/AmazonECR/latest/userguide/security-iam.html).\n\nThis action requires the following minimum set of permissions to login to ECR Private:\n\n```json\n{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"GetAuthorizationToken\",\n \"Effect\": \"Allow\",\n \"Action\": [\n \"ecr:GetAuthorizationToken\"\n ],\n \"Resource\": \"*\"\n }\n ]\n}\n```\n\nDocker commands in your GitHub Actions workflow, like `docker pull` and `docker push`, may require additional permissions attached to the credentials used by this action.\n\nThe following minimum permissions are required for pulling an image from an ECR Private repository:\n\n```json\n{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"AllowPull\",\n \"Effect\": \"Allow\",\n \"Action\": [\n \"ecr:BatchGetImage\",\n \"ecr:GetDownloadUrlForLayer\"\n ],\n \"Resource\": \"arn:aws:ecr:us-east-1:123456789012:repository/my-ecr-repo\"\n }\n ]\n}\n```\n\nThe following minimum permissions are required for pushing and pulling images in an ECR Private repository:\n\n```json\n{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"AllowPushPull\",\n \"Effect\": \"Allow\",\n \"Action\": [\n \"ecr:BatchGetImage\",\n \"ecr:BatchCheckLayerAvailability\",\n \"ecr:CompleteLayerUpload\",\n \"ecr:GetDownloadUrlForLayer\",\n \"ecr:InitiateLayerUpload\",\n \"ecr:PutImage\",\n \"ecr:UploadLayerPart\"\n ],\n \"Resource\": \"arn:aws:ecr:us-east-1:123456789012:repository/my-ecr-repo\"\n }\n ]\n}\n```\n\n### ECR Public\n\nTo see how and where to implement the permissions below, see the [IAM section in the Amazon ECR Public User Guide](https://docs.aws.amazon.com/AmazonECR/latest/public/security-iam.html).\n\n\nThis action requires the following minimum set of permissions to login to ECR Public:\n\n```json\n{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"GetAuthorizationToken\",\n \"Effect\": \"Allow\",\n \"Action\": [\n \"ecr-public:GetAuthorizationToken\",\n \"sts:GetServiceBearerToken\"\n ],\n \"Resource\": \"*\"\n }\n ]\n}\n```\n\nDocker commands in your GitHub Actions workflow, like `docker push`, may require additional permissions attached to the credentials used by this action. There are no permissions needed for pulling images from ECR Public.\n\nThe following minimum permissions are required for pushing an image to an ECR Public repository:\n\n```json\n{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"AllowPush\",\n \"Effect\": \"Allow\",\n \"Action\": [\n \"ecr-public:BatchCheckLayerAvailability\",\n \"ecr-public:CompleteLayerUpload\",\n \"ecr-public:InitiateLayerUpload\",\n \"ecr-public:PutImage\",\n \"ecr-public:UploadLayerPart\"\n ],\n \"Resource\": \"arn:aws:ecr-public::123456789012:repository/my-ecr-public-repo\"\n }\n ]\n}\n```\n\n## Troubleshooting\n\n### Configure credentials\n\n`Inaccessible host: 'api.ecr-public.aws-region-1.amazonaws.com' at port 'undefined'. This service may not be available in the 'aws-region-1' region.`\n\n- The `AWS_DEFAULT_REGION` environment variable is configured as a region where ECR Public isn't available.\n- ECR Public can only be logged into from the `us-east-1` region. In the `aws-actions/configure-aws-credentials` action, the `aws-region` input must be `us-east-1`.\n\n`GetAuthorizationToken command is only supported in us-east-1.`\n\n- The `AWS_DEFAULT_REGION` environment variable is configured as `us-west-2`.\n- ECR Public can only be logged into from the `us-east-1` region. In the `aws-actions/configure-aws-credentials` action, the `aws-region` input must be `us-east-1`.\n\n### Inputs\n\n`Invalid parameter at 'registryIds' failed to satisfy constraint: 'Member must satisfy constraint: [Member must satisfy regular expression pattern: [0-9]{12}]'`\n\n- One of the registries you provided in the `registries` input isn't a sequence of 12 digits\n- For users providing only a single registry ID in the `registries` input, if the ID begins with a 0, make sure to enclose it in quotes. GitHub Actions will read an input as a number if all of the characters in the input are digits. So if your registry ID begins with a 0, the 0 will be truncated. See issue [#225](https://github.com/aws-actions/amazon-ecr-login/issues/225).\n\n## License Summary\n\nThis code is made available under the MIT license.\n\n## Security Disclosures\n\nIf you would like to report a potential security issue in this project, please do not create a GitHub issue. Instead, please follow the instructions [here](https://aws.amazon.com/security/vulnerability-reporting/) or [email AWS security directly](mailto:aws-security@amazon.com).\n", "readme_type": "markdown", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "soulwire/WTFEngine", "link": "https://github.com/soulwire/WTFEngine", "tags": [], "stars": 670, "description": "An HTML / CSS / JavaScript template for creating WhatTheFuckIsMyMashup.com style web sites", "lang": "JavaScript", "repo_lang": "", "readme": "# WTF Engine\n\nInspired by [WhatTheFuckShouldIMakeForDinner.com](http://whatthefuckshouldimakefordinner.com/), in 2011 I made [WhatTheFuckIsMyMashup.com](http://whatthefuckismymashup.com/) and released this simple tool, the [WTFEngine](https://github.com/soulwire/WTFEngine/), for generating similar websites.\n\nIt's very simple to use and now allows you to populate it using either vanilla JavaScript objects, JSON files or direct feeds from Google spreadsheets.\n\n## How to use it\n\nTo make your own, simply [clone](github-mac://openRepo/https://github.com/soulwire/WTFEngine) or [download](https://github.com/soulwire/WTFEngine/archive/master.zip) this repository and start populating the engine with your content.\n\nYou can populate it using one of three different methods. Each is controlled from [`main.js`](https://github.com/soulwire/WTFEngine/blob/master/scripts/main.js) (where you will find commented examples of each technique.)\n\n1. JavaScript Object literal\n2. A JSON file\n3. A live feed from a Google spreadsheet\n\nIf you choose to use a Google spreadsheet, you must [publish it first](https://support.google.com/drive/answer/37579?hl=en) and be sure to manually republish it after editing if you want changes to propagate immediately, otherwise they will take around 15 minutes.\n\nHere's an [example spreadsheet](https://docs.google.com/a/soulwire.co.uk/spreadsheet/ccc?key=0AvG1Hx204EyydF9ub1M2cVJ3Z1VGdDhTSWg0ZV9LNGc), which you can clone and use a base for your data source.\n\n_**Note**: For local testing (when using loaded JSON or Google spreadsheet data), you'll need to serve the site from a local webserver. You can easily do this using tools like [SimpleHTTPServer](http://www.linuxjournal.com/content/tech-tip-really-simple-http-server-python) for Python or [http-server](https://github.com/nodeapps/http-server) for Node._\n\n## How it works\n\nThe process is very simple. The WTF Engine takes a sentence template and fills in different types of blanks with different types of words, much like the game [Mad Libs](http://en.wikipedia.org/wiki/Mad_Libs). You can nominate any amount of templates and as many different categories of words or phrases as you like.\n\nFor example, here is a basic corpus\n\n {\n template: [ \"Big @color @animal\", \"Silly @animal with @color fur\" ],\n animal: [ \"dog\", \"cat\", \"rabbit\" ],\n color: [ \"red\", \"blue\", \"green\", \"yellow\" ]\n };\n \nAs you can see, in a template you use the __@__ symbol, followed by the type of word you wish to use to tell the WTF Engine to pick a random word of that type from the corpus and insert it at that point.\n\n## Showcase\n\nI've been pleasantly surprised to find several people using this template to create their own sites. Among them are:\n\n- [WTF is my bot](http://wtfismybot.tech/)\n- [WTF is my startup idea? ](http://whatthefuckismystartup.tech)\n- [Shit UX Ideas](http://shituxideas.com/)\n- [Nordic Larp Generator](http://www.messagefromtheinternet.com/nordiclarp/)\n- [WTF Are My Weekend Plans](http://www.wtfplans.com/)\n- [What The Fuck Is My Hydration Strategy](http://theplan.co.uk/hydration/)\n- [What The Fuck Is Birmingham's Transport Strategy](http://toys.paradisecircus.com/transport/)\n- [What's your fucking weapon](http://scottyboy76567.github.io/WeaponGenerator/)\n- [Who the Fuck is my Superhero Character](http://vanor.co.il/heroes/)\n- [What the Fuck is my Quest](http://whatthefuckismyquest.com/)\n- [What the Fuck is this Japanese Food](http://whatthefuckisthisjapanesefood.com/)\n- [What is my Pony](http://whoismypony.ponyfinder.net/)\n- [Game of Thrones spoiler generator](http://takephive.com/got_spoilergen/)\n- [Who the Fuck is my D&D Character](http://whothefuckismydndcharacter.com/)\n- [RPG Focused Character Idea Generator](http://enklave-23.de/WTF/)\n- [Startup Pitch Generator](http://startuppitchperfect.sebastianruder.com/)\n- [DevOps Vision generator](http://www.percussiverepair.net/devopsvision/)\n- [What the Fuck am I Bringing to Burning Man](http://whatthefuckamibringingtoburningman.com/)\n- [Insult Generator](http://www.omglmaowtf.com/insult-generator)\n- [MasterChef Me](http://www.masterchef.me)\n- [Bieber Blotter](http://www.linkalope.com/bieber-blotter)\n- [What the Fuck is my Wearable Strategy](http://whatthefuckismywearablestrategy.com/)\n- [What the Fuck is my Next TV Format](http://www.whatthefuckismynexttvformat.com/)\n- [What the Fuck is my Twitter Bio](http://whatthefuckismytwitterbio.com/)\n- [What the Fuck is my Award Idea](http://whatthefuckismyawardidea.com/)\n- [What is my SEO Doing](http://www.clicksandclients.com/what-is-my-seo-doing/)\n- [Fucking Valentines](http://fuckingvalentines.com/)\n- [Tony Abbott Excuse](http://abbottexcuse.1apps.com/)\n- [Why the Fuck are you Running Late](http://www.whythefuckareyourunninglate.com/)\n- [What the Fuck is my Brief](http://www.whatthefuckismybrief.com/)\n- [Whip-o-matic](http://whipomatic.com/)\n- [What the Fuck is my SXSW Panel](http://wtfismypanel.com/)\n- [Pitchfork Review Generator](http://pitchforkreviewgenerator.com/)\n- [Shit PR Ideas](http://shitprideas.com/)\n- [What the Fuck is my Mashup](http://whatthefuckismymashup.com/)\n\nIf you have made one, or know of any, please [let me know](https://github.com/soulwire/WTFEngine/issues/new).\n\n## Notes\n\nThis was written simply as a bit of fun. Zach's site was so popular that it inspired references based on other subjects, such as [What The Fuck Is My Social Media Strategy?](http://whatthefuckismysocialmediastrategy.com) (and consequently [What The Fuck Is My Mashup?](http://whatthefuckismymashup.com/)). As far as I am aware, this idea was Zach's alone and so credit to him for the inspiration. As a meme, there are doubtlessly many topics that could do with the WTF treatment; which is why I decided to create this (very) simple platform.\n\n", "readme_type": "markdown", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "dollarshaveclub/scrolldir", "link": "https://github.com/dollarshaveclub/scrolldir", "tags": ["javascript", "scroll", "scrolling", "css", "y-axis", "sticky-elements", "sticky-headers"], "stars": 669, "description": "0 dependency JS plugin to leverage scroll direction with CSS \u2b06\u2b07 \ud83d\udd0c\ud83d\udc89", "lang": "JavaScript", "repo_lang": "", "readme": "

    \u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f

    \n

    \n \n This software is maintained under a new repository located at yowainwright/scrolldir\n \n

    \n

    \u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f

    \n\n***\n\n
    \n \"scrolldir\n
    \n

    Leverage Vertical Scroll Direction with CSS \ud83d\ude0e

    \n\n
    \n\n

    \n \n \"Build\n \n \n \"CDNJS\"\n \n \n \"Greenkeeper\"\n \n \n \"npm\n \n \n \"Bower\n \n \n \"Share\n \n

    \n\n
    \n\n

    ScrollDir \u2b06\u2b07

    \n\nScrollDir, short for Scroll Direction, is a 0 dependency, ~1kb micro Javascript plugin to easily leverage vertical scroll direction in CSS via a data attribute. \ud83d\udcaa\n\n### ScrollDir is perfect for:\n\n- showing or hiding sticky elements based on scroll direction \ud83d\udc25\n- only changing its direction attribute when scrolled a significant amount \ud83d\udd25\n- **ignoring small scroll movements** that cause unwanted jitters \ud83d\ude0e\n\n
    \n\n## Usage\n\nScrollDir will set the `data-scrolldir` attribute on the `` element to `up` or `down`:\n\n```html\n\n```\nor\n```html\n\n```\n\nNow it\u2019s easy to change styles based on the direction the user is scrolling!\n\n```css\n[data-scrolldir=\"down\"] .my-fixed-header { display: none; }\n```\n\n## In Action \ud83c\udfa5\n\n

    \n \n \"Scrolldir\n \n

    \n\n
    \n\n## Install \ud83d\udce6\n\nnpm\n```sh\nnpm install scrolldir --save\n```\nbower\n```sh\nbower install scrolldir --save\n```\nyarn\n```sh\nyarn add scrolldir\n```\n\n## Setup \ud83d\udce4\n\n### Easy Mode\nAdd **dist/scrolldir.auto.min.js** and you\u2019re done. There is nothing more to do! Scrolldir will **just work**.\n\nNow go write some styles using `[data-scrolldir=\"down\"]` and `[data-scrolldir=\"up\"]`.\n\n### Custom Mode \ud83d\udee0\nAdd **dist/scrolldir.min.js**. You have access to the API options below and must invoke scrollDir.\n\n```javascript\nscrollDir();\n```\n\nTo use an attribute besides `data-scrolldir`:\n```javascript\nscrollDir({ attribute: 'new-attribute-name' });\n```\n\nTo add the Scrolldir attribute to a different element:\n```javascript\nscrollDir({ el: 'your-new-selector' });\n```\n\nTo turn Scrolldir off:\n```javascript\nscrollDir({ off: true });\n```\n\nTo turn provide a different scroll direction on page load (or app start):\n```javascript\nscrollDir({ dir: 'up' }); // the default is 'down'\n```\n\nTo change the `thresholdPixels`\u2014the number of pixels to scroll before re-evaluating the direction:\n```javascript\nscrollDir({ thresholdPixels: someNumber }); // the default is 64 pixels\n// example: scrollDir({ thresholdPixels: 10 })\n```\n\n## Example \ud83c\udf34\n\n- [scrolldir](http://codepen.io/yowainwright/pen/9d5a6c6dcf2c17e351dcccfe98158e8b) on codepen.\n\nThis is a modular version of [pwfisher](https://github.com/pwfisher)'s [scroll-intent](https://github.com/pwfisher/scroll-intent.js). If you'd like to use scrolldir with jQuery\u2014use Scroll Intent. Scrolldir should work easily within any front-end framework so it ditches library dependencies. ~TY!\n", "readme_type": "markdown", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "Leleat/Tiling-Assistant", "link": "https://github.com/Leleat/Tiling-Assistant", "tags": ["gnome", "linux", "tiling"], "stars": 669, "description": "A GNOME extension which adds a Windows-like snap assist to the GNOME desktop environment. It also expands the 2x2 grid design.", "lang": "JavaScript", "repo_lang": "", "readme": "# Tiling Assistant for GNOME\n\nAn extension which adds a Windows-like snap assist to GNOME. It also changes GNOME's 2 column tiling design to a 2x2 grid (i.e. 4 quadrants) and *more*...\n\n## Table of Contents\n- [Supported GNOME Versions](#Supported-GNOME-Versions)\n- [Usage and Features](#Usage-and-Features)\n- [Preview](#Preview)\n- [Installation](#Installation)\n- [Translations](#Translations)\n- [License](#License)\n\n## Supported GNOME Versions\n\nSee the [metadata file](https://github.com/Leleat/Tiling-Assistant/blob/main/tiling-assistant%40leleat-on-github/metadata.json#L4) for a list of supported GNOME Shell version. Generally, only the most recent GNOME Shell is supported. You can however install older version of this extension from https://extensions.gnome.org, which may support older GNOME releases. But that extension version may not include all features and won't get any bugfixes.\n\n## Usage and Features\n\n- **Tiling Popup** offers to automatically tile a window to fill the available screen space.\n\n- **Tile Groups** are focused and resized together.\n\n- **Layouts**\n\n- ...\n\nPlease see the ![User Guide](GUIDE.md) for a list and an explanation of every feature.\n\n## Preview\n\n![Preview](media/ReadMe_Preview.gif)\n\n## Installation\n\nYou can install it via https://extensions.gnome.org. Alternatively (or if you want an up-to-date version), download / clone the repository and run the `scripts/build.sh` script with the `-i` flag. Make sure to have `gettext` installed. If you've manually installed the extension, don't forget to reload GNOME Shell afterwards (by logging out). It's also on the AUR but that one isn't maintained me.\n\n## Translations\n\nTranslations (even just partial ones) are very welcome!\nIf you are already familiar with how it works, feel free to directly open a pull request with a `YOUR_LANG.po` file at `translations/`.\nDon't worry, in case you don't know how to create a `.po` file. Just open an issue and I'll set everything up. You'll only need a text editor and your language skills :)\n\n## License\n\nThis extension is distributed under the terms of the GNU General Public License, version 2 or later. See the license file for details.\n", "readme_type": "markdown", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "ZeroCho/nodejs-book", "link": "https://github.com/ZeroCho/nodejs-book", "tags": [], "stars": 669, "description": null, "lang": "JavaScript", "repo_lang": "", "readme": "## This is the source code of the Node.js textbook.\n\nThe source code of the master branch is the revision 3 source code. The revised 2nd edition source code is in the 2pan branch, and the first edition source code is in the 1pan branch.\n\nAfter receiving the source code, you need to install node_modules by entering `npm i` after moving to the root path of the code (where `package.json` is located) in the terminal. The `.env` file and `node_modules` folder are not included in this source code.\n\nIf there are typos & errors in the code or if there are improvements, please actively raise an **issue** or send a **Pull Request**!\n\nWritten by Cho Hyun-young, Gilbeot Publishing, 840 pages, 42,000 won\n\n![Introduction](http://image.yes24.com/momo/TopCate4045/MidCate007/404461732.jpg)\n\n## index\nChapter 1 Getting Started with Nodes\n__1.1 Understanding Key Concepts\n____1.1.1 Server\n____1.1.2 JavaScript Runtime\n____1.1.3 Event-based\n____1.1.4 Non-blocking I/O\n____1.1.5 single-threaded\n__1.2 Nodes as Servers\n__1.3 Non-Server Nodes\n1.4 Setting up the development environment\n____1.4.1 Installing Node\n\n____1.4.2 Updating the npm version\n\n____1.4.3 Installing Visual Studio Code\n__1.5 Good to see together\n\nChapter 2 JavaScript you need to know\n__2.1 ES2015+\n____2.1.1 const, let\n____2.1.2 Template Strings\n\n____2.1.3 Object literals\n____2.1.4 Arrow functions\n____2.1.5 Destructuring Assignment\n\n____2.1.6 Classes\n\n____2.1.7 Promises\n____2.1.8 async/await\n\n____2.1.9 Map/set\n\n____2.1.10 Null merging/optional chaining\n\n__2.2 Front-end JavaScript\n\n____2.2.1 AJAX\n\n____2.2.2 FormData\n____2.2.3 encodeURIComponent, decodeURIComponent\n____2.2.4 Data attributes and datasets\n__2.3 Good to see together\n\nChapter 3 Exploring Node Features\n__3.1 Using the REPL\n__3.2 Running JS files\n__3.3 Making it modular\n\n____3.3.1 CommonJS modules\n\n____3.3.2 ECMAScript modules\n\n____3.3.3 Dynamic Import\n\n____3.3.4 __filename, __dirname\n\n__3.4 Knowing Node Built-in Objects\n\n____3.4.1 global\n____3.4.2 console\n\n____3.4.3 Timer\n\n____3.4.4 process\n____3.4.5 Other built-in objects\n\n__3.5 Using node built-in modules\n____3.5.1 os\n\n____3.5.2 path\n____3.5.3 url\n____3.5.4 dns\n____3.5.5 crypto\n____3.5.6 utils\n\n____3.5.7 worker_threads\n\n____3.5.8 child_process\n____3.5.9 Other modules\n__3.6 Accessing the file system\n\n____3.6.1 Synchronous and Asynchronous Methods\n____3.6.2 Understanding buffers and streams\n____3.6.3 Learn other fs methods\n____3.6.4 Getting to Know the Thread Pool\n\n__3.7 Understanding Events\n__3.8 Handling exceptions\n____3.8.1 Common Errors\n__3.9 Nice to see together\n\nChapter 4 Creating a Server with the http Module\n4.1 Understanding requests and responses\n4.2 Using REST and Routing\n4.3 Understanding Cookies and Sessions\n\n__4.4 https and http2\n__4.5 cluster\n\n__4.6 Good to see together\n\nChapter 5 Package Manager\n__5.1 Getting to know npm\n__5.2 Managing packages with package.json\n5.3 Understanding package versions\n__5.4 Other npm commands\n5.5 Distributing packages\n\n__5.6 Good to see together\n\nChapter 6 Creating an Express Web Server\n__6.1 Starting an Express Project\n__6.2 Frequently Used Middleware\n\n____6.2.1 morgan\n\n____6.2.2 static\n\n____6.2.3 body-parser\n____6.2.4 cookie-parser\n\n____6.2.5 express-session\n\n____6.2.6 Utilizing the characteristics of middleware\n____6.2.7 Multer\n6.3 Separating Routing with Router Objects\n\n__6.4 Examining the req and res objects\n6.5 Using the Template Engine\n____6.5.1 Pug (Jade)\n____6.5.2 Nonjux\n\n____6.5.3 Error Handling Middleware\n\n__6.6 Good to see together\n\nChapter 7 MySQL\n__7.1 What is a database?\n7.2 Installing MySQL\n\n____7.2.1 Windows\n____7.2.2 Mac\n____7.2.3 Linux (Ubuntu)\n\n__7.3 Installing the Workbench\n\n____7.3.1 Windows\n\n____7.3.2 Mac\n\n____7.3.3 Linux (Ubuntu)\n____7.3.4 Creating Connections\n\n7.4 Creating databases and tables\n\n____7.4.1 Creating databases\n____7.4.2 Creating tables\n\n7.5 Working with CRUD\n\n____7.5.1 Create\n____7.5.2 Read (query)\n____7.5.3 Update\n____7.5.4 Delete\n\n7.6 Using equalize\n____7.6.1 Connecting to MySQL\n\n7.6.2 Defining the Model\n\n____7.6.3 Defining Relationships\n____7.6.4 Knowing Queries\n____7.6.5 Performing Queries\n__7.7 Good to see together\n\nChapter 8 MongoDB\n8.1 NoSQL vs. SQL\n8.2 Installing MongoDB\n____8.2.1 Windows\n____8.2.2 Mac\n____8.2.3 Linux (Ubuntu)\n8.3 Installing Compass\n\n____8.3.1 Windows\n____8.3.2 Mac\n____8.3.3 Linux (Ubuntu)\n____8.3.4 Creating Connections\n\n8.4 Creating databases and collections\n8.5 Working with CRUD\n____8.5.1 Create\n____8.5.2 Read (query)\n\n____8.5.3 Update\n \n____8.5.4 Delete\n8.6 Using Mongoose\n____8.6.1 Connecting to MongoDB\n8.6.2 Defining the schema\n8.6.3 Performing Queries\n__8.7 Good to see together\n\nChapter 9 Creating SNS Services with Express\n9.1 Structure your project\n9.2 Setting up the database\n\n9.3 Implementing login with the Passport module\n9.3.1 Implementing Local Login\n____9.3.2 Implementing Kakao Login\n\n__9.4 Implementing image upload with the multer package\n9.5 Finalizing the Project\n____9.5.1 Do It Yourself\n____9.5.2 Key theorems\n__9.6 Good to see together\n\nChapter 10 Creating a Web API Server\n10.1 Understanding the API Server\n10.2 Structure your project\n\n10.3 Authenticating with JWT Tokens\n__10.4 Calling from other services\n\n__10.5 Creating an SNS API Server\n\n10.6 Implementing Usage Limits\n10.7 Understanding CORS\n\n10.8 Finalizing the Project\n____10.8.1 Do It Yourself\n____10.8.2 Key theorems\n____10.8.3 Good to see together\n\nChapter 11 Testing Node Services\n11.1 Preparing for testing\n__11.2 Unit testing\n__11.3 Test Coverage\n__11.4 Integration testing\n\n__11.5 Load testing\n11.6 Finalizing the Project\n____11.6.1 Do It Yourself\n____11.6.2 Key theorems\n\nChapter 12 Sending Real-Time Data with Web Sockets\n12.1 Understanding Web Sockets12.2 Using websockets with the ws module\n\n__12.3 Using Socket.IO\n__12.4 Creating a Live GIF Chat Room\n__12.5 Connecting middleware and sockets\n\n12.6 Implementing Chat\n\n__12.7 Finalizing the Project\n____12.7.1 Do It Yourself\n\n____12.7.2 Key theorems\n____12.7.3 Good to see together\n\nChapter 13 Building a Real-Time Auction System\n13.1 Structure your project\n\n13.2 Using servercent events\n\n13.3 Implementing Scheduling\n\n__13.4 Finalizing the Project\n\n____13.4.1 Do It Yourself\n\n____13.4.2 Key theorems\n\n____13.4.3 Good to see together\n \nChapter 14 Creating CLI Programs\n__14.1 Creating Simple Console Commands\n__14.2 Using commander, inquirer\n__14.3 Finalizing the Project\n____14.3.1 Do It Yourself\n____14.3.2 Key theorems\n____14.3.3 Good to see together\n\nChapter 15 Deploying to AWS and GCP\n__15.1 Packages for Service Operation\n____15.1.1 morgan and express-session\n____15.1.2 Equalize\n____15.1.3 cross-env\n____15.1.4 sanitize-html, csurf\n____15.1.5 pm2\n____15.1.6 winston\n\n____15.1.7 helmet, hpp\n____15.1.8 connect-redis\n____15.1.9 nvm, n\n15.2 Using Git and GitHub\n____15.2.1 Installing Git\n____15.2.2 Using GitHub\n__15.3 Getting Started with AWS\n15.4 Deploying to AWS\n\n__15.5 Getting Started with Google Cloud\n15.6 Deploying to GCP\n\n__15.7 Good to see together\n\nChapter 16 Serverless Node Development\n16.1 Understanding Serverless\n16.2 Using AWS S3\n16.3 Using AWS Lambda\n__16.4 Using Google Cloud Storage\n__16.5 Using Google Cloud Functions\n__16.6 Good to see together\n\nChapter 17 TypeScript Node Development\n\n__17.1 TypeScript Basic Syntax\n\n17.2 Applying community type definitions\n\n17.3 Typing library code\n\n__17.4 Typing my code\n\n__17.5 Good material to look at together\n\nBrowse", "readme_type": "markdown", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "Koenkk/zigbee-herdsman-converters", "link": "https://github.com/Koenkk/zigbee-herdsman-converters", "tags": [], "stars": 669, "description": "Collection of device converters to be used with zigbee-herdsman", "lang": "JavaScript", "repo_lang": "", "readme": "[![NPM](https://nodei.co/npm/zigbee-herdsman-converters.png)](https://nodei.co/npm/zigbee-herdsman-converters/)\n\n# zigbee-herdsman-converters\nCollection of device converters to be used with zigbee-herdsman.\n\n## Breaking changes\n15.0.0\n- OTA `isUpdateAvailable` now returns an object instead of a boolean (e.g. `{available: true, currentFileVersion: 120, otaFileVersion: 125}`)\n- OTA `updateToLatest` now returns a number (`fileVersion` of the new OTA) instead of a void\n\n## Contributing\nSee [Zigbee2MQTT how to support new devices](https://www.zigbee2mqtt.io/advanced/support-new-devices/01_support_new_devices.html).\n\n## Submitting a pull request\nIf you'd like to submit a pull request, you should run the following commands to ensure your changes will pass the tests:\n```sh\nnpm install\nnpm run lint\nnpm test\n```\n\nIf any of those commands finish with an error your PR won't pass the tests and will likely be rejected.\n\n## Documentation of definition meta property\n- `multiEndpoint`: enables the multi endpoint functionallity in e.g. fromZigbee.on_off, example: normally this converter would return {\"state\": \"OFF\"}, when multiEndpoint is enabled the 'endpoint' method of the device definition will be called to determine the endpoint name which is then used as key e.g. {\"state_left\": \"OFF\"}. Only needed when device sends the same attribute from multiple endpoints. (default: false)\n- `multiEndpointSkip`: array of attributes to not suffix with the endpoint name\n- `multiEndpointEnforce`: enforce a certain endpoint for an attribute, e.g. {\"power\": 4} see utils.enforceEndpoint()\n- `disableDefaultResponse`: used by toZigbee converters to disable the default response of some devices as they don't provide one. (default: false)\n- `applyRedFix`: see toZigbee.light_color (default: false)\n- `enhancedHue`: see toZigbee.light_color (default: true)\n- `supportsHueAndSaturation`: see toZigbee.light_color (default: false)\n- `timeout`: timeout for commands to this device used in toZigbee. (default: 10000)\n- `coverInverted`: Set to true for cover controls that report position=100 as open (default: false)\n- `coverStateFromTilt`: Set cover state based on tilt\n- `turnsOffAtBrightness1`: Indicates light turns off when brightness 1 is set (default: false)\n- `pinCodeCount`: Amount of pincodes the lock can handle\n- `disableActionGroup`: Prevents some converters adding the action_group to the payload (default: false)\n- `tuyaThermostatSystemMode`/`tuyaThermostatPreset`: TuYa specific thermostat options\n- `thermostat`: see e.g. HT-08 definition\n - `{dontMapPIHeatingDemand: true}`: do not map piHeatingDemand from 0-255 -> 0-100, see fromZigbee.thermostat (default: false)\n- `battery`:\n - `{dontDividePercentage: true}`: prevents batteryPercentageRemainig from being divided (ZCL 200=100%, but some report 100=100%) (default: false)\n - `{voltageToPercentage: '3V_2100'}`: convert voltage to percentage using specified option. See utils.batteryVoltageToPercentage() (default: null, no voltage to percentage conversion)\n- `fanStateOn`: value used for fan_mode when using fan_state=\"ON\", the default is \"on\"\n", "readme_type": "markdown", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "FNNDSC/ami", "link": "https://github.com/FNNDSC/ami", "tags": ["medical", "javascript", "threejs", "ami", "volume-rendering", "dicom-images", "dicom", "nifti-format", "nrrd", "nifti", "vtk", "stl", "trk", "fs", "webgl", "xtk"], "stars": 669, "description": "AMI Medical Imaging (AMI) JS ToolKit", "lang": "JavaScript", "repo_lang": "", "readme": "

    \n \n

    \n\n

    \n \n \"Build\n \n \n \"CDNJS\n \n \n \"NPM\n \n \n \"Slack\"\n \n

    \n\n\n----------\n\n### Content\n\n1. [Hello AMI](#hello-ami)\n2. [Features](#features)\n3. [Usage](#yarn)\n4. [Developer corner](#developer-corner)\n5. [Change log](#change-log)\n6. [Credits](#credits)\n7. [Citations](#citations)\n\n## Hello AMI\n\n\n\n \n \n \n\n \n \n \n\n\n\n \n \n \n\n \n \n \n\n\n \n \n \n\n \n \n \n\n\n \n \n \n\n \n \n \n\n\n \n \n \n\n
    \n \n \"lesson00\"\n \n \n \n Lesson 00: Load\n \n
    \n Load DICOM Data and get a nice Series/Stack/Frame structure.\n
    \n
    \n \n \"lesson01\"\n \n \n \n Lesson 01: Visualize 3D\n \n
    \n Look at the data we loaded in 3D.\n
    \n
    \n \n \"lesson00\"\n \n \n \n Lesson 02: Mesh\n \n
    \n Add a mesh to the scene.\n
    \n
    \n \n \"lesson00\"\n \n \n \n Lesson 03: Visualize 2D\n \n
    \n Look at the data in 2D.\n
    \n
    \n \n \"lesson00\"\n \n \n \n Lesson 04: Labelmap\n \n
    \n Overlays on top of you data.\n
    \n
    \n \n \n \n \n \n \n Lesson 05: TRK\n \n
    \n TRK - coming soon.\n
    \n
    \n \n \"lesson00\"\n \n \n \n Lesson 06: Volume Rendering\n \n
    \n Volume Rendering.\n
    \n
    \n \n \n \n \n \n \n Lesson 07: Lookup tables\n \n
    \n Lookup Tables - coming soon.\n
    \n
    \n \n \"lesson00\"\n \n \n \n Lesson 08: Custom progress bar\n \n
    \n Custom progress bars.\n
    \n
    \n\n### (more) Advanced demos\n\nVolume rendering, 2D viewer, arbitrary reslicing and more examples and advanced demos [there](https://fnndsc.github.io/ami)!\n\n## Features\n\n> \u2705 READY\n> \ud83d\udd36 IN PROGRESS OR LIMITED SUPPORT\n> \u274c ON ROADMAP\n\n| Capabilities | Volumes | Meshes | Widgets |\n|--------------------|--------------|------------------|------------------------|\n| \u2705 2D Visulization | \u2705 Dicom | \u2705 VTK (THREEJS) | \ud83d\udd36 Handle (2D/3D) |\n| \u2705 3D Visualization | \u2705 NRRD | \u2705 STL (THREEJS) | \ud83d\udd36 Probe (2D/3D) |\n| \u2705 Volume Rendering | \u2705 Nifti | \u2705 TRK | \ud83d\udd36 Ruler (2D/3D) |\n| \u2705 Lookup Tables | \u2705 MHD/(Z)RAW | \u2705 FSM | \ud83d\udd36 Orientation (2D/3D) |\n| \u2705 Label Maps | \u2705 MGH/MGZ | \u274c CURV | \ud83d\udd36 Angle (2D/3D) |\n| | \u274c JPEG | | |\n\n## Usage\n\n### Pre-requisites\n\n- ES2015 promises support. (consider using polyfills if needed)\n- Load THREEJS your index.html **BEFORE** AMI.\n\n```hmtl\n\n\n\n```\n\n### Yarn\n\n```bash\n\n$> yarn add ami.js\n\n```\n\n*Note*: you might need to include [babel](https://github.com/babel/babel) transforms in you build process.\n\n```javascript\n\n// app.js\nimport * as AMI form 'ami.js';\nwindow.console.log('Ready to rock!!');\n\n```\n\n### ami.js\n\nCheck-out the [lessons](#lessons) to get started quickly.\n\n\n**New:** Use the new factory not to have to include `three` in index.html.\n```javascript\nimport * as THREE from 'three';\nimport {stackHelperFactory} from 'ami.js';\n\nconst StackHelper = stackHelperFactory(THREE);\nconst stackHelper = new StackHelper();\n```\n\nAdd AMI in your index.html **after** THREEJS.\n```html\n\n\n\n\n\n\n#app.js\nconst AMI = AMI;\nwindow.console.log('Ready to rock!!');\n\n```\n\n## Developer corner\n\nGet the source code and related packages.\n\n```bash\n\n$> git clone https://github.com/FNNDSC/ami.git\n$> cd ami\n$> yarn install\n\n```\n\nTo run examples (browserify/babelify/serve the example)\n\n```bash\n\n$> yarn example \n\n#run the geometries_slice example\n$> yarn example geometries_slice\n\n```\n\nBuild standalone library to `lib/`\n\n```bash\n\n$> yarn build:ami\n\n```\n\nBuild minified standalone version run\n\n```bash\n\n$> yarn build:ami:prod\n\n```\n\nTests\n\n```bash\n\n$> yarn test\n\n```\n\nDocumentation\n\n```bash\n\n$> yarn doc\n\n```\n\nBuild and deploy dist/ to gh-pages\n\n```bash\n\n$> yarn deploy\n\n```\n\nFind out more about the [API](https://fnndsc.github.io/ami/doc).\n\n# [Change log](https://github.com/FNNDSC/ami/releases)\n\n# Credits\n\nAMI would not exist without them:\n\n##### [THREEJS](https://github.com/mrdoob/three.js/)\n\n- Base components such as Vectors, Matrices and Objects3D.\n- HTML template for example page.\n- Author(s): [mrdoob](https://github.com/mrdoob)\n\n##### [DicomParser](https://github.com/chafey/dicomParser)\n\n- DICOM parsing relies on it.\n- Author(s): [chafey](https://github.com/chafey)\n\n##### [CornerstoneWADOImageLoader](https://github.com/chafey/cornerstoneWADOImageLoader)\n\n- Was used to figure out how to use the dicom parser properly.\n- Author(s): [chafey](https://github.com/chafey)\n\n##### [NIFTI-Reader-JS](https://github.com/rii-mango/NIFTI-Reader-JS)\n\n- Nifti parsing relies on it.\n- Author(s): [rii-mango](https://github.com/rii-mango)\n\n##### [NRRD-JS](https://github.com/scijs/nrrd-js)\n\n- NRRD parsing relies on it.\n- Author(s): [jaspervdg](https://github.com/jaspervdg) \n\n##### [JPEGLosslessDecoderJS](https://github.com/rii-mango/JPEGLosslessDecoderJS)\n\n- JPEG Lossless Decoder for DICOM images\n- Author(s): [rii-mango](https://github.com/rii-mango)\n\n##### [Image-JPEG2000](https://github.com/OHIF/image-JPEG2000)\n\n- JPEG 2000 Decoder for DICOM images\n- Author(s): [jpambrun](https://github.com/jpambrun), [mozilla](https://github.com/mozilla/pdf.js/)\n\n##### [Pako](https://github.com/nodeca/pako)\n\n- GZ file decompression\n- Author(s): [nodeca](https://github.com/nodeca)\n\n# Citations\n### 2017\n- [From brain imaging to weather imaging - McCaie - informaticslab, Met Office (blog post)](http://www.informaticslab.co.uk/side-projects/weather/3d/visualisations/2017/04/04/from-brain-imaging-to-weather-imaging.html)\n- [Medical imaging in the browser with the A* Medical Imaging (AMI) toolkit. - Rannou et al. - ESMRMB 2017 (poster)](http://epostersonline.com/esmrmb2017/node/3443)\n- [Reusable Client-Side JavaScript Modules for Immersive Web-Based Real-Time Collaborative Neuroimage Visualization - Bernal-Rusiel et al. - Frontiers in Neuroinformatics 2017 (article)](http://journal.frontiersin.org/article/10.3389/fninf.2017.00032/full)\n### 2016\n- [Volume Visualization Tools for Medical Applications in Ubiquitous Platforms - Arbelaiz et al. - LNICST 2016 (article)](https://link.springer.com/chapter/10.1007/978-3-319-49655-9_54)\n- [Interoperable communication of quantitative image analysis results using DICOM standard (DICOM4QI) - Fedorov et al. - RSNA 2016 (poster)](https://docs.google.com/presentation/d/16mZbPiXqU7tKTRAcB7bnP1RGybBLqF-O0319raUWYHo/edit#slide=id.p)\n", "readme_type": "markdown", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "jh3y/tyto", "link": "https://github.com/jh3y/tyto", "tags": ["tyto", "javascript", "organisation", "marionette", "backbone", "backbonejs", "backbone-marionette", "gulp", "mvvm", "todo", "todo-app", "mvc", "localstorage"], "stars": 669, "description": "manage and organise things", "lang": "JavaScript", "repo_lang": "", "readme": "[![Build Status](https://travis-ci.org/jh3y/tyto.svg?branch=master)](https://travis-ci.org/jh3y/tyto)\ntyto ![alt tag](https://raw.github.com/jh3y/tyto/master/src/img/tyto.png)\n===\n__tyto__ is an extensible and customizable management and organisation tool\n\njust visit [jh3y.github.io/tyto](http://jh3y.github.io/tyto)!\n\n![alt tag](https://raw.github.com/jh3y/pics/master/tyto/app_three_cols.png)\n\n### Features\n* minimal UI\n* no accounts necessary\n* intuitive\n* extensible\n* localStorage persistence\n* time tracking\n* sortable UI\n* task linking\n* Markdown support\n* etc.\n\n![alt tag](https://raw.github.com/jh3y/pics/master/tyto/add_task.gif)\n\n### Why tyto? What's it for?\n\nTyto arose from the want for an electronic post-it board without the need for accounts. Something simple and intuitive that could be easily shared.\n\nIt's also the product of my own curiosity being used as an opportunity to pick up new tech stacks. It started as a vanilla JS app utilising one file and experimenting with HTML5 drag and drop. It then grew a little more, and a little more after that. Now it uses Backbone w/ Marionette. The next step? Most likely Angular 2.0 or React.\n\n![alt tag](https://raw.github.com/jh3y/pics/master/tyto/edit_view.png)\n\nIn truth, most organisations have some form of tool for what Tyto is doing. In my experience though, they can be cumbersome, clunky and just a bit noisy. Some employees tend to dislike internal tools. You still see whiteboards and walls plastered in sticky notes.\n\nThis is where Tyto came from, It's my personal intuitive and minimal TodoMVC. No accounts necessary and the source isn't too hard to grasp making it rather easy to extend and customise.\n\n![alt tag](https://raw.github.com/jh3y/pics/master/tyto/edit_task.gif)\n\n### Who's it for?\nDeveloper and project managers were the original target audience. A means to share project progression on a more _personal_ level. As opposed to publicly through an internal system. Almost like a complimentary attachment to an email.\n\n![alt tag](https://raw.github.com/jh3y/pics/master/tyto/change_color.gif)\n\nThere are no restrictions though, it's open source. Not quite right out of the box? Change it :smile:\n\nExtensibility provides a means to create a bespoke version based on theme or functionality.\n\nTyto is a personal pet of mine and if it can help others, that's great!\n\n\n\n###Using tyto\nJust want to use it? Do that by visiting [jh3y.github.io/tyto](http://jh3y.github.io/tyto).\n\nGitHub flavored markdown is supported thanks to `marked`.\n\n![alt tag](https://raw.github.com/jh3y/pics/master/tyto/markdown.gif)\n\nThis also enables you to link to boards, columns and other tasks by using the `#` character\n\n![alt tag](https://raw.github.com/jh3y/pics/master/tyto/linking.gif)\n\nChanges are persistent thanks to `localStorage`.\n\nWant to move to a different browser or machine though? Use the export utility to export a json file. Load this using the import utility.\n\nA persistent workflow across devices? I'm afraid I haven't implemented that. Accounts is _not_ something I am keen on implementing/hosting right now. I think it diverts from my original intention with Tyto.\n\n#### Your own environment\n##### Prerequisites\nIf you're cloning the repo and setting up the codebase you are going to need __node__(_preferably __yarn___) and __gulp__ installed.\n\n##### Set up\n1. Clone the repo.\n\n git clone https://github.com/jh3y/tyto.git\n\n2. Navigate into the repo and install the dependencies.\n\n cd tyto\n yarn (alternatively, npm install)\n\n3. Run gulp to take care of preprocessing and running a local static server instance(project utilises BrowserSync).\n\n gulp\n\n#### Hosting\nI would suggest just taking a snapshot of the `gh-pages` branch and ftp'ing this onto your desired server or web space. Alternatively, follow the set up procedure and FTP the contents of the `public` directory.\n\nIf you wish to host on Github. Follow the set up procedure first(ideally, with a fork). When happy with your version, use the `deploy` task. This will require familiarity with `gulp-gh-pages` in order to publish to the correct location if other than `gh-pages`.\n\n![alt tag](https://raw.github.com/jh3y/pics/master/tyto/speed_dial.gif)\n\n### Development\nA strength of tyto is extensibility. Making changes whether it be functional or aesthetic is straightforward once familiar with the codebase.\n\nAny queries as to how things work in the codebase? Feel free to raise an issue with a question!\n\n![alt tag](https://raw.github.com/jh3y/pics/master/tyto/time_track.gif)\n\n####Under the hood\nThere are a range of technologies being used under the hood.\n* jQuery\n* jQuery UI\n* Material Design Lite\n* Lodash\n* Backbone\n* Marionette\n* Marked\n* Jade\n* Stylus\n* Babel\n* Gulp\n\n![alt tag](https://raw.github.com/jh3y/pics/master/tyto/move_task.gif)\n\n### License\n\nMIT\n\n---------------------------\n\nMade with :sparkles: [@jh3y](https://twitter.com/@_jh3y) 2017\n", "readme_type": "markdown", "hn_comments": "previous discussion\\nhttps://news.ycombinator.com/item?id=6886834Is there any website that collates cool Github projects like this?What's new about this? A Trello clone on browser cookies?Very neat. Nice understated design and simple functionality. Probably a good project board for personal projects. Hopefully I'll be able to try it out if I ever get time to do some for-fun coding again =DTrello?Any reason why this has completely disappeared from the first few pages when it was at 25ish a few minutes ago??This is cool. One thing that Trello does well is scale to larger numbers of columns (because it scrolls horizontal rather than shrinks the columns).Regardless, this looks very nice for custom needs.Please don't take the this the wrong way, usability is hard and hey, you actually built something, which can be a goal in and of itself, but: please go read a book on usability. Designed for Use by Lukas Mathis [1] is a great introduction. The first few things that stood out for me:\u2022 It's my first time seeing the page, I want to know what it is. I definitely don't want to load a config. The default config should be the first thing the user sees, as it does a reasonable job of explaining the concepts.\u2022 The button for adding a card is tiny and far away for where the cards get added.\u2022 The menu being hidden by default means its items are not at all discoverable. It could still be collapsible, but open by default if you want users to actually use it.\u2022 Pressing ESC in the initial modal ends up in an irreversibly (without refresh) broken state.\u2022 The only way to save appears to be exporting a JSON file. You should look into LocalStorage or IndexedDB as a way to autosave so the user doesn't lose their content by inadvertently closing the tab, navigating or refreshing.\u2022 Deleting a column is instant and irreversible. You should have confirmation, or, even better, undo.I'm guessing you've built this to fulfil a personal niche, so kudos for getting it built. God knows I never finish anything I build for myself.[1] http://pragprog.com/book/lmuse/designed-for-use (or if you google hard enough there are ahem totally legit free PDFs)I really really really wish I could take feedback as well as @codez is taking in this thread. Incredible attitude man.Congrats for launching. Good luck!Sometimes the page loads just blank, with no modal. Can't get it to do it now but it happened on my first load.So basically it's a lightweight version of Trello? Seems great anyway and I will probably try it out for my next project.Looks good!The one thing I'd like to see changed is that the button to create a new card is dangerously close to the button that deletes a column.Adding a card is a frequent action so deserves such a prominent spot, deleting a column is not.Perhaps you should add an 'edit column' mode where moving, creating & deleting columns is exposed: e.g. on double clicking the space around columns?It's great. I used it right now as I often have things I need to remember but I can't just dumpt it in my team's Trello. I think you can go ahead and brand it as a light weight Trello for a niche that wants privacy/is lazy and just wants something quick.LocalStorage can take you miles ahead if you indeed make sure people use this as I described above. I certainly would.Blank white box for mecodez, for those focusing on the UI aspect, I'd say those are minor issues. If you'd like to make this more usable, add templates/examples somewhere for things like Quad Charts [1], Kanban [2], Zachman Enterprise Architecture [3], Lean Canvas [4], Business Model Canvas [5], etc. Great job![1] http://en.wikipedia.org/wiki/Quad_chart[2] http://en.wikipedia.org/wiki/Kanban_board[3] http://en.wikipedia.org/wiki/Zachman_Framework[4] http://blog.spark59.com/2012/the-different-worldviews-of-a-s...[5] http://en.wikipedia.org/wiki/Business_Model_CanvasVery neat. I'm the kind of person who likes having everything laid out before him, i.e. I don't like organization that relies too much on depth. For example, I usually prefer prefixing my file names rather than splitting them into subfolders.It's a version 0.0.1, so here's my 2 cents: the only thing that really bothers me is the menu. The whole UI is quick and responsive, but this menu opens very slowly. The thing is, I don't think you actually need it. Why hide tools that users will probably interact with a lot? There's so much space in the header, left to the logo. Just put the buttons there and forget about the menu.You're not the only one I see making this \"mistake\": not appropriately using the space available, especially when there are only a few elements to show. The greatest misuse I see is dropdowns [1]. On a personal level, I hate them (because, like I said, I prefer having all my options available before my eyes). But on a more general level, dropdowns are often used for a few items only, and remove any sense of hierarchy. They're just hidden lists of frequently-used options, put on the same level of importance.To give an example related to your app: \"add item\" is on the same level as \"email\". But the former is both frequently used and non-penalizing (you can undo it easily), whereas the latter is rarely used and makes you leave the app, which might make the user lose some valuable data.[1]: http://jgthms.com/dont-use-dropdowns-for-a-few-items-only.ht...I like it, my local Trello! :)Just one small suggestion, it'd be nice if columns were draggable as well.Looks like Trello.I had a look at the CoffeeScript source. Is there some reason why you're not using CoffeeScript's `class`? It would save you having to do all the `tyto::foo` and `tyto = this` stuff.Love the little owl logo and the wing movement. Keep that.I love it, but is there a reason why you limit the height of the box in your demo app? I'd much rather have it use up all of my screen height, and scroll the entire page, rather than the white rectangle part like it does now.Nice little project.\\nI'm not quite sure if it's a bug or if I just can't figure out how it works correctly: Drag and Drop of entries.\\nWhenever i drag something it seems to be push to the bottom. I think it would be better if I could freely rearrange the items. E.g. from position 2 to position 4.Keep the good work :-)JIRA Classic Task Boardhttps://confluence.atlassian.com/display/AGILE/Using+the+Cla...I like it. Minimalist, but all the required features for a good task management app.This is awesome!Hey nice project you got there!(if you're the developer)At first it wasn't really working actually(I guess it was the config/menu thing), but after few reloads everything went smooth...This is Dope! Starred :)Just a small suggestion:CoffeeScript recommends the use of 2 spaces for indentation (I'm seeing a tab of size 8 in your code on github).Very coolSerialising the config json object to localStorage and pulling it back out again on a reload would be useful.well done on building this. Sometimes making is its own reward.Some feedback:I had no idea what it did and the opening screen about loading config etc was confusing. I would have preferred like a tour with tooltips instead. Though once you get into it and play you soon figure out what it does.As a fellow maker - I generally have really basic UI and leave menu items visible and learn from these forums what to do with them. So I suggest expanding your menu and have it always available. (like the menu animation though, could be a little faster).What problem were you trying to fix? Did you try something like Trello.com before you decided to build this? It's cool if you built it just because.If you like this, check out my app:http://listwerk.comI'd say it's a little more polished, though still in need of some key features, namely a mobile app.hey all!just wanted to say to all those that have given feedback, input and insight into tyto and/or have starred, forked or started watching the repo\"THANKS VERY MUCH!\"All of it has been very good and so helpful with taking the project forward. I wasn't sure if people would take their time to show interest or give some insight etc. so once again it is very appreciated and thanks for your time. I will try to get changes implemented and new features and things ironed out as soon as I can and report back.THANKS AGAIN!p.s if you know of people that would be interested in getting involved or using tyto please share it with them so it can get better exposure and a wider range of feedback, insight etc.Looks like one could use this as a agile style whiteboard/stickies replacement.Congrats ! I like the lightweight minimalist approach. The email feature is really neat ! A reason why I tried but stoped using trello, asana or others is because I thought it was overkill for early stages, and all we needed was a todo list inside a mail, but the mail clients doesn't make it easy and practical...I agree with the feedback on the menu, and the possibility to rearrange the items in the same column.How would this compete with Trello?Pretty cool demo. Just a little tip for op, @codez, if you apply float: right; to the menu container (.actions) the buttons will look better while sliding in/out.Thank you for open sourcing it, for people like me who are learning how to code it s awesome!Thanks!Does now work on Firefox 19 (yeah, I know..). The popup does not display. Only blank board.Good job for a pet project, excited to see how it progresses over time.Very nice. As mentioned below, it shouts for a UX/ExD review, but I'm impressed nonetheless.It's nice! I'm actually curious about naming it tyto. It reminds me of Josip Broz Tito (a historical figure form equally historical Yugoslavia) who, by local legends, got his nickname Tito because he would hand out tasks by pointing at it and saying \"Ti, to!\" (translated roughly \"You, do that!\").", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "iqiyi/LiteApp", "link": "https://github.com/iqiyi/LiteApp", "tags": ["ios", "android", "html5", "cross-platform", "hbridge", "weex", "react-native", "xiaochengxu"], "stars": 669, "description": "LiteApp is a high performance mobile cross-platform implementation, The realization of cross-platform functionality is base on webview and provides different ideas and solutions for improve webview performance.", "lang": "JavaScript", "repo_lang": "", "readme": "# Introduction\n\n

    \n \"LiteApp\"\n

    \n\n**LiteApp is a high performance mobile cross-platform framework. The implementation of its cross-platform functionality is based on webview but improved with novel ideas and solutions for better performance.**\n\n`LiteApp` dedicates to enable developers to use modern web development technology to build applications on both Android and iOS with a single codebase. More specifically, you can use javascript and modern front-end framework Vue.js to develop mobile apps by using LiteApp, with which, productivity and performance can coexist ,application you build will be running on web with performance close to native. We achieve this by decoupling the render engine from the syntax layer, see more detail below.\n\n## Requirements\n\n| Platform | System | Notes |\n| :------: | :------------------: | :----------------: |\n| iOS | iOS 9.0 or later | Xcode 9.0 or later |\n| Android | Android 4.0 or later | n/a |\n| Web | n/a | n/a |\n\n## Architecture\n\n`\u7cfb\u7edf\u67b6\u6784\u56fe`\n\n
    \n\"Architecture\"/\n
    `\n\n## \n\n## Demo Project\n\n[ iOS Display ]() \n\n>
    \n>\n> \"iOS\n>\n>
    `\n\n[Android Display]() \n\n
    \n\n\"Android\n
    `\n\n## Features\n\n- [x] **High Performance**: Writing on web, have the same performance as the native app\n- [x] **Load Fast** Fast rendering for all pages , especially for the first time\n- [x] **Mobile Cross-platform** Build both Android and iOS with a single codebase\n- [x] **Asynchronous Threads** the render engines are separated from the syntax layer \n- [x] **Simple Code** Few code but powerful\n- [x] **Expandable** Proprietary API for extension and it can add more features\n- [x] **Complete Documentation** Each section has a corresponding document and easy to understand\n\n## How To Get Started\n\n- [Download LiteApp](https://github.com/iqiyi/LiteApp/wiki/common-Download-LiteApp) and try out the included Mac and iPhone example apps\n- Read the [\"Getting Started\" guide](https://github.com/iqiyi/LiteApp/wiki/common-How-To-Get-Started), or [other articles on the Wiki](https://github.com/iqiyi/LiteApp/wiki/home)\n- Check out the [documentation](https://github.com/iqiyi/LiteApp/wiki/common-Documents) for a comprehensive look at all of the APIs available in LiteApp\n\n## Installation\n\n```\n$ git clone https://github.com/iqiyi/LiteApp.git\n$ cd liteApp\n```\n\n## Communication\n\n- If you **need help**, use [Email](zhangyanqiang@qiyi.com) or [Github](https://github.com/iqiyi/LiteApp) . (Tag 'LiteApp')\n- If you'd like to **ask a general question**, use [Email](zhangyanqiang@qiyi.com) or [Github](https://github.com/iqiyi/LiteApp).\n- If you **found a bug**, _and can provide steps to reliably reproduce it_, open an issue.\n- If you **have a feature request**, open an issue.\n- If you **want to contribute**, submit a pull request.\n\n## Performance Test\n\n`LiteApp VS H5 App Results\uff1a70% reduction in first load time\uff0cSwitch Page is 60 FPS`\n\n| Project | Loading Time/ms | Switch Page/fps |\n| :-------- | :-------------: | :------------------------------: |\n| LiteApp | 250-500 ms | Perfect/60 |\n| HTML5 App | > 1000ms | White screen for a short time/53 |\n\n`LiteApp`\n\n>
    \n>\n> \"iOS\n>\n>
    `\n\n`HTML5 App`\n\n
    \n\n\"Android\n
    `\n\n## \n\n## Credits\n\nLiteApp was originally created by [Guodong Chen](www.breakerror.com) [Chen Zhang](https://github.com/zhch0633) [Jingyuan Zhou](https://github.com/pricelesss) [Yanqiang Zhang](https://github.com/Richard-zhang-iOS) .\n\nLiteApp's logo was designed by [Guodong Chen](www.breakerror.com)\n\nAnd most of all, thanks to LiteApp's Contributors\n\n### Security Disclosure\n\nIf you believe you have identified a security vulnerability with LiteApp, you can contact [Guodong Chen](www.breakerror.com) as soon as possible. Please do not post it to a public issue tracker.\n\n## License\n\nLiteApp is released under the Apache License, Version 2.0. See [LICENSE](http://gitlab.qiyi.domain/cross-team/lite-app/blob/master/LICENSE) for details.\n", "readme_type": "markdown", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "hiproxy/hiproxy", "link": "https://github.com/hiproxy/hiproxy", "tags": ["nodejs", "proxy", "nginx", "reverse-proxy", "hosts", "rewrite", "http", "https", "certificate"], "stars": 669, "description": "\ud83d\udee0 hiproxy is a lightweight proxy tool for Front-End developers based on Node.js that supports an NGINX-like configuration. \ud83d\udd25", "lang": "JavaScript", "repo_lang": "", "readme": "# hiproxy\n\n\"hiproxy\"\n\n**hiproxy** is a lightweight web proxy tool based on [Node.js][node]. The primary purpose of **hiproxy** is to solve the problem of host management and reverse proxy needs of developers.\n\nFor example, if you are working as a team and each of the developers in the team need a different proxy setting, you will no longer need to modify your hosts file or use a web server like [Nginx][nginx] as a reverse proxy.\n\n**hiproxy** extends the syntax of hosts file to support **port numbers**. Besides, hiproxy also supports configuration through a syntax similar to the [Nginx configuration file][nginx-config].\n\n[nginx]: https://nginx.org/\n[nginx-config]: http://nginx.org/en/docs/beginners_guide.html \"nginx Beginner\u2019s Guide\"\n[node]: https://nodejs.org \"Node.js\"\n\n[\u4e2d\u6587\u7248\u6587\u6863](https://github.com/hiproxy/hiproxy/blob/master/README-zh.md)\n\n[![Build Status](https://travis-ci.org/hiproxy/hiproxy.svg?branch=master)](https://travis-ci.org/hiproxy/hiproxy)\n[![Build status](https://ci.appveyor.com/api/projects/status/0g898oor4o82ah8n/branch/master?svg=true)](https://ci.appveyor.com/project/zdying/hiproxy/branch/master)\n[![codecov](https://codecov.io/gh/hiproxy/hiproxy/branch/master/graph/badge.svg)](https://codecov.io/gh/hiproxy/hiproxy)\n[![js-semistandard-style](https://img.shields.io/badge/code%20style-semistandard-brightgreen.svg?style=flat)](https://github.com/Flet/semistandard)\n[![npm](https://img.shields.io/npm/v/hiproxy.svg)](https://www.npmjs.com/package/hiproxy)\n[![Node.js version](https://img.shields.io/badge/node-%3E%3D0.12.7-green.svg)](https://nodejs.org/)\n[![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/hiproxy/hiproxy/blob/master/LICENSE)\n\n## Why Hiproxy?\n\nIf you are a front-end developer, it is not uncommon for you to encounter the following problems:\n\n**Debugging web pages locally**: To develop your web projects in a local development environment, you\u2019ll have to run a back-end server (such as a **Node.js** *express* application, or a **Java SpringBoot** application). As a front-end developer, you might not be familiar with the back-end technology stack, simply setting up the development environment can consume a lot of your time.\n\n**Cross-Origin Issues**: While developing your front-end projects locally, you might need to solve cross-domain and cross-origin resource sharing issues. To address these problems, you will need to modify the response header. \n\n\n**Self-Signed Certificates**: You\u2019ll often need to test https pages. When you visit https pages with a self-signed certificate, your browser will raise security warnings.\n\nOne common way to modify the response header is to put a **proxy** as a \u201cman in the middle\u201d. *NGINX*, for example, has a nice syntax that you can configure as a reverse-proxy to handle all these needs.\n\n\nAlthough NGINX is a great tool to address all the above problems, when setting up NGINX, you\u2019ll also modify your hosts file a lot to proxy the requests to a local NGINX service. This can especially turn out to be a burden if you are working on multiple projects.\n\nCan we have a better way to solve this problem?\n\nWell, yes. Meet **hiproxy**!\n\n\n## Features\n\n* **Nginx.config-style configuration** file syntax with a simple and intuitive configuration\n* **Extended** hosts configuration with **port numbers**.\n* **Plugin extensions** to rewrite *directives*, *command line interface*, and *pages*\n* Automatic generation and management of **TLS certificates**\n* **Auto-detection** of configuration file\n* **Proxy auto-configuration**\n* You can run hiproxy as a **background service** and redirect its output to a log file.\n* You can open a browser window and configure your proxy from its **web interface**.\n* **hiproxy** provides a **Node.js API** for fine-tuning and lower-level control.\n\n## Installation\n\n```bash\nnpm install -g hiproxy\n```\n\n> If you want to experience the latest features of hiproxy, you can install the next version.\n```\nnpm install -g hiproxy@next\n```\n\n## Usage\n\n### CLI\n\nStart proxy server:\n\n```bash\nhiproxy start -p 5525 --debug --workspace ${PATH_TO_WORKSPACE}\n```\n\nConfigure proxy:\n\n```bash\n127.0.0.1:5525\n```\n\n## CLI Usage\n\n```bash\n> hiproxy --help\n\nUsage:\n\n hiproxy [command] [option]\n\nCommands:\n\n start Start a local proxy server\n stop Stop the local proxy server (Only works in daemon mode)\n restart Restart the local proxy service (Only works in daemon mode)\n state Show all the servers state (Only works in daemon mode)\n open Open browser and set proxy\n hello A test command that say hello to you.\n\nOptions:\n\n -v, --version Display version information\n -h, --help Display help information\n --log-dir The log directory when run in background, default: user home directory\n --log-time Show time info before every log message\n --log-level The log levels, format: [, Filter the log data\n```\n\n## Documentation\n\n* \n\n> **Note**: This is an incomplete documentation, we are still writing, \n> if you are willing to help us write or translate the documentation, please contact [zdying@live.com](mailto:zdying@live.com)\n\n### Steps for Contributing Documentation\n\n* The documentation repo is : \n\n* Choose one of the [issues](https://github.com/hiproxy/hiproxy/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aopen%20%5BTranslate%5D) and submit a comment that tell others you will translate this part.\n\n* Create your own [fork](https://github.com/hiproxy/documentation/fork) on github.\n\n* Translate the `md` files that you choose, you can reaplce the file content to the English version directly.\n\n* Submit a PR.\n\nAfter you have submitted your pull request, we'll try to get back to you as soon as possible. We may suggest some changes or improvements.\n\u00a0\n## Wiki\n\n* \n\n## Node.js API\n\n```js\nvar Server = require('hiproxy').Server;\nvar proxy = new Server(8848, 10086);\n\n// events\nproxy.on('request', function(req, res){\n req.someThing = 'some thing';\n console.log('new request =>', req.method, req.url);\n});\n\nproxy.on('data', function(data){\n console.log('on response =>', data.toString());\n});\n\nproxy.start().then(function (servers) {\n console.log('proxy server started at: 127.0.0.1:8848');\n});\n\n// stop proxy server\n// proxy.stop();\n\n// restart proxy server\n// proxy.restart();\n```\n\n## Hosts Configuration Example\n\n**hiproxy** supports enhanced version of `hosts`, the `hosts` file supports not only IP but also **port numbers**.\n\n```bash\n# comment\n127.0.0.1 example.com\n127.0.0.1:8800 blog.example.com life.example.com\n```\n\n## Rewrite Configuration Example\n\n```bash\nset $port 8899;\nset $ip 127.0.0.1;\nset $online 210.0.0.0;\n\ndomain example.com {\n location / {\n proxy_pass http://$online/;\n }\n\n location /blog/ {\n proxy_pass http://$ip:$port/blog/;\n\n proxy_set_header from 'hiproxy';\n\n set_header proxy 'hiproxy';\n }\n}\n```\n\n## Sample Project\n\n[Here is an example project that you can play with](https://github.com/hiproxy/hiproxy-example).\n\n## Running Tests\n\n```bash\nnpm test\n```\n\n## Contributing\n\nPlease read [CONTRIBUTING.md](https://github.com/hiproxy/hiproxy/blob/master/CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.\n\n## Authors\n\n* __zdying__ - _HTML/JavaScript/CSS/Node.js developer_ [zdying](https://github.com/zdying)\n* __zhouhailong__ - _HTML/JavaScript/CSS/Node.js developer_ [zhouhailong](https://github.com/zhouhailong)\n* __Alfred Sang (aka i5ting)__ - a full-stack developer and Node.js evangelist. He works for Alibaba Group as a Principal Front-End Developer and runs a self-media on the topic of Full-stack Node.js. His book \u201cThe Marvelous Node.js\u201d (Part I) was published in July 2019.._\n\nSee also the list of [contributors](https://github.com/hiproxy/hiproxy/graphs/contributors) who participated in this project.\n\n## Built With\n\n* [hemsl](https://www.npmjs.com/package/hemsl) - a lightweight Node.js command line argv parser and command executor.\n* [colors](https://www.npmjs.com/package/colors) - get color and style in your node.js console.\n* [node-forge](https://www.npmjs.com/package/node-forge) - JavaScript implementations of network transports, cryptography, ciphers, PKI, message digests, and various utilities.\n* [op-browser](https://www.npmjs.com/package/op-browser) - Open browser window and set proxy.\n* [os-homedir](https://www.npmjs.com/package/os-homedir) - Node.js 4 `os.homedir()` ponyfill.\n* [url-pattern](https://www.npmjs.com/package/url-pattern) - easier than regex string matching patterns for urls and other strings. turn strings into data or data into strings.\n* [simple-mime](https://www.npmjs.com/package/simple-mime) - A simple mime database.\n\nThanks to the authors of the above libraries to provide such a useful library.\n\n## Thanks To\n\n* [v0lkan](https://github.com/v0lkan)\n* [JayLee404](https://github.com/JayLee404)\n* [Jeoxs](https://github.com/Jeoxs)\n* [James Fancy](https://segmentfault.com/u/jamesfancy)\n\nThanks to the above friends to help translate hiproxy documents.\n\n## Change Log\n\nSee the [CHANGELOG.md](./CHANGELOG.md) for details.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](https://github.com/hiproxy/hiproxy/blob/master/LICENSE) file for details\n\n## Code of Conduct\n\nWe are committed to making participation in this project a harassment-free experience for everyone, regardless of the level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality.\n\n[See the code of conduct for details](CODE_OF_CONDUCT.md).\n", "readme_type": "markdown", "hn_comments": "Haven't many sites like Facebook also been linked provably to massacres and terrorism? Why don't we treat those sites and their users in same way?https://archive.is/FkbEKIn Japan, 5ch.net (formerly 2ch.net), which Nishimura founded, is considered to be very notorious for discrimination, pornography, fake news, murder threats, etc., just like 4chan.org and 8ch.net. However, Nishimura has been treated favorably by major TV stations and major game companies such as Square Enix, perhaps because he has been a board member of major Japanese Internet companies such as Dwango and LINE, and is currently very popular as a YouTuber. He has also published self-help books with major publishing companies.In the past, Nishimura stored and leaked the credit card information of 2ch.net's paying members in plain text, but took no responsibility and received little criticism for it.Interesting how he tells young Japanese to follow the letter of the law instead of the spirit. I feel as if in American following the letter of the law is the default. There is no voluntary conformity here.I think The NY Times caused multiple orders of magnitude more innocent people to die by pushing for the invasion of Iraq than all the massacres caused by all the uncensored forums on the internet combined.The people in 4chan brainwashing others into commiting murders are the same responsible for Havana Syndrome.They have complete electromagnetic surveillance of everyone and use this to harass incels and people without support into lashing out against innocents.4chan is just one site where this happens and it has nothing to do with who owns it.The NYtimes has also been linked to massacres, arguably of greater magnitude.Government investigations into bogus medicine and \u201canti-science\u201d would have some credibility if not so lopsided and partisan. Where are the House committees to investigate homeopathy and chiropractic and all of the pseudo-scientific new-age nonsense that people on the left buy in to? Why aren\u2019t mainstream news outlets pressured to drop astrology columns? How is Ancient Aliens still on TV, harming our children?Edit: I suppose I have to add that I am progressive, pro-science, left-leaning, and vaccinated. But I wonder about the nonsense embraced by people on the left and why they get so worked up about nonsense that seems to get embraced by the right. I know liberals who will talk seriously about megadosing vitamin C to fight cancer and then in the next sentence condemn the MAGA crowd for promoting ivermectin. Most of the vaccine skeptics I have had to listen to come from the political left.US State of Nebraska to allow physicians (a licensed profession) to perform Trump allegiance virtue signalling.Wow, all you need to do is whip up enough of shit storm about some topic, and public officials will knuckle under. I think this should put to rest that idealism about countering bad speech with good speech. As much as I liked that idea in the 1980s and 90s, it just doesn't work when no gatekeepers exist, or when some gatekeepers act in extremely bad faith.https://archive.is/VPQU4I tested the HAProxy with my Raspberry Pi and my 2GB/s ethernet (fiber) and the maximum number of requests was 500.000 /s. Nice job HAProxy! Thanks for share this LinuxBender!", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "adamjmcgrath/react-native-simple-auth", "link": "https://github.com/adamjmcgrath/react-native-simple-auth", "tags": ["react-native", "oauth"], "stars": 669, "description": "OAuth login for React Native", "lang": "JavaScript", "repo_lang": "", "readme": "# react-native-simple-auth [![Build Status](https://travis-ci.org/adamjmcgrath/react-native-simple-auth.svg?branch=chore%2Frelease-tasks)](https://travis-ci.org/adamjmcgrath/react-native-simple-auth)\n\n## OAuth login for React Native\n\n * [Screencast](#screencast)\n * [Install](#install)\n * [Providers Setup](#providers-setup)\n * [Usage](#usage)\n * [License](#license)\n\nScreencast\n==========\n\niOS | Android\n:-------------------------:|:-------------------------:\n![Screencast](https://raw.githubusercontent.com/adamjmcgrath/react-native-simple-auth/master/screencast-ios.gif) | ![Screencast](https://raw.githubusercontent.com/adamjmcgrath/react-native-simple-auth/master/screencast-android.gif)\n\nSource of example app: https://github.com/adamjmcgrath/ReactNativeSimpleAuthExample\n\nInstall\n=======\n- `yarn add react-native-simple-auth`\n- Set up deep linking for your Android and iOS application using the instructions on the [react-native website](https://facebook.github.io/react-native/docs/linking.html) (set the `launchMode` of `MainActivity` to `singleTask` in `AndroidManifest.xml`, create the deep link schemes in [Providers Setup](#providers-setup))\n- Set up your OAuth Providers\n\nProviders Setup\n===============\n\n### Google\n- Go to the [developer console](https://console.cloud.google.com/apis/credentials/oauthclient/) and create credentials for an iOS application (you can also use these for your Android app). More [instructions](https://support.google.com/cloud/answer/6158849) on the Google support site.\n- The \"Bundle ID\" should contain a dot, eg `com.reactnativesimpleauth`\n- Your configuration object should contain the 'Client ID' as `appId` and 'Bundle ID' in the `callback` (note the single `/`, you can put anything as the path), eg\n```js\n{\n appId: '123-123abc.apps.googleusercontent.com',\n callback: 'com.reactnativesimpleauthexample:/oauth2redirect'\n}\n```\n- Add the deep link scheme for the callback (Your Bundle ID, eg `com.reactnativesimpleauthexample`) to your `AndroidManifest.xml` eg https://github.com/adamjmcgrath/ReactNativeSimpleAuthExample/blob/master/android/app/src/main/AndroidManifest.xml#L28-L33\n- Add the deep link scheme for the callback to your iOS app, eg https://dev.twitter.com/cards/mobile/url-schemes\n\n### Facebook\n- Create an app on the [Facebook developers](https://developers.facebook.com) website\n- In `Settings`, click `Add Platform`\n- Select iOS, and in the `Bundle ID` field, add `fb{your App ID}` eg `fb1234567890` (You can use the same configuration for Android)\n- Your configuration object should contain the 'Appid ID' as `appId` and 'Bundle ID' in the `callback` (you must put `://authorize`), eg\n```js\n{\n appId: '1234567890',\n callback: 'fb1234567890://authorize',\n scope: 'user_friends', // you can override the default scope here\n fields: ['email', 'first_name', 'last_name'], // you can override the default fields here\n}\n```\n- Add the deep link scheme for the callback (Your Bundle ID, eg `fb1234567890`) to your `AndroidManifest.xml` eg https://github.com/adamjmcgrath/ReactNativeSimpleAuthExample/blob/master/android/app/src/main/AndroidManifest.xml#L28-L33\n- Add the deep link scheme for the callback to your iOS app, eg https://dev.twitter.com/cards/mobile/url-schemes (Due to A Facebook bug, this should always be the top one in the list)\n\n### Twitter\n- Create an app on https://apps.twitter.com\n- You can put any valid URL as the callback url.\n- Your configuration object should contain the 'Consumer Key (API Key)' as `appId`, the 'Consumer Secret' as `appSecret` and the Twitter `App name` in the `callback`, eg\n```js\n{\n appId: 'abc1234567890',\n appSecret: 'cba0987654321',\n callback: 'testapp://authorize',\n}\n```\n- Add the deep link scheme for the callback (Your App Name, eg `testapp`) to your `AndroidManifest.xml` eg https://github.com/adamjmcgrath/ReactNativeSimpleAuthExample/blob/master/android/app/src/main/AndroidManifest.xml#L28-L33\n- Add the deep link scheme for the callback to your iOS app, eg https://dev.twitter.com/cards/mobile/url-schemes (Due to A Facebook bug, this should always be the top one in the list)\n\n### Tumblr\n- Create an app on https://www.tumblr.com/oauth/apps\n- You can put any valid URL as the callback url.\n- Your configuration object should contain the 'OAuth Consumer Key' as `appId`, the 'OAuth Consumer Secret' as `appSecret` and any `callback`, eg\n```js\n{\n appId: '1234567890abc',\n appSecret: '1234567890abc',\n callback: 'testapp://authorize',\n}\n```\n- Add the deep link scheme for the callback (Your App Name, eg `testapp`) to your `AndroidManifest.xml` eg https://github.com/adamjmcgrath/ReactNativeSimpleAuthExample/blob/master/android/app/src/main/AndroidManifest.xml#L28-L33\n- Add the deep link scheme for the callback to your iOS app, eg https://dev.twitter.com/cards/mobile/url-schemes (Due to A Facebook bug, this should always be the top one in the list)\n\n### Untappd\n- Create an app on https://untappd.com/api/register\n- Use a custom app prefix for the callback url.\n- Your configuration object should contain the app id and your callback url e.g.\n```js\n{\n appId: '123456789',\n callback: 'testapp://authorize',\n}\n```\n- Register your deep link scheme with android and ios as described for other apps.\n\nUsage\n=====\n\nCreate a configuration object for each of the providers you want to authorize with (required keys are in parenthesis):\n\n - google (`appId`, `callback`)\n - facebook (`appId`, `callback`)\n - twitter (`appId`, `appSecret`, `callback`)\n - tumblr (`appId`, `appSecret`, `callback`)\n\nSee [secrets.example.js](https://github.com/adamjmcgrath/ReactNativeSimpleAuthExample/blob/master/secrets.example.js).\n\n```javascript\nimport { google, facebook, twitter, tumblr } from 'react-native-simple-auth';\n\ngoogle({\n appId: '123-123abc.apps.googleusercontent.com',\n callback: 'com.reactnativesimpleauthexample:/oauth2redirect',\n}).then((info) => {\n // info.user - user details from the provider\n // info.credentials - tokens from the provider\n}).catch((error) => {\n // error.code\n // error.description\n});\n```\n\nLicense\n=======\n\nreact-native-simple-auth is released under the MIT license.\n", "readme_type": "markdown", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "commitizen/cz-conventional-changelog", "link": "https://github.com/commitizen/cz-conventional-changelog", "tags": ["commitizen", "javascript", "commitizen-adapter", "git", "commit-hooks", "command-line"], "stars": 669, "description": "A commitizen adapter for the angular preset of https://github.com/conventional-changelog/conventional-changelog", "lang": "JavaScript", "repo_lang": "", "readme": "# cz-conventional-changelog\n\n[![Greenkeeper badge](https://badges.greenkeeper.io/commitizen/cz-conventional-changelog.svg)](https://greenkeeper.io/)\n\nStatus:\n[![npm version](https://img.shields.io/npm/v/cz-conventional-changelog.svg?style=flat-square)](https://www.npmjs.org/package/cz-conventional-changelog)\n[![npm downloads](https://img.shields.io/npm/dm/cz-conventional-changelog.svg?style=flat-square)](http://npm-stat.com/charts.html?package=cz-conventional-changelog&from=2015-08-01)\n[![Build Status](https://img.shields.io/travis/commitizen/cz-conventional-changelog.svg?style=flat-square)](https://travis-ci.org/commitizen/cz-conventional-changelog)\n\nPart of the [commitizen](https://github.com/commitizen/cz-cli) family. Prompts for [conventional changelog](https://github.com/conventional-changelog/conventional-changelog) standard.\n\n## Configuration\n\n### package.json\n\nLike commitizen, you specify the configuration of cz-conventional-changelog through the package.json's `config.commitizen` key.\n\n```json5\n{\n// ... default values\n \"config\": {\n \"commitizen\": {\n \"path\": \"./node_modules/cz-conventional-changelog\",\n \"disableScopeLowerCase\": false,\n \"disableSubjectLowerCase\": false,\n \"maxHeaderWidth\": 100,\n \"maxLineWidth\": 100,\n \"defaultType\": \"\",\n \"defaultScope\": \"\",\n \"defaultSubject\": \"\",\n \"defaultBody\": \"\",\n \"defaultIssues\": \"\",\n \"types\": {\n ...\n \"feat\": {\n \"description\": \"A new feature\",\n \"title\": \"Features\"\n },\n ...\n }\n }\n }\n// ...\n}\n```\n\n### Environment variables\n\nThe following environment variables can be used to override any default configuration or package.json based configuration.\n\n* CZ_TYPE = defaultType\n* CZ_SCOPE = defaultScope\n* CZ_SUBJECT = defaultSubject\n* CZ_BODY = defaultBody\n* CZ_MAX_HEADER_WIDTH = maxHeaderWidth\n* CZ_MAX_LINE_WIDTH = maxLineWidth\n\n### Commitlint\n\nIf using the [commitlint](https://github.com/conventional-changelog/commitlint) js library, the \"maxHeaderWidth\" configuration property will default to the configuration of the \"header-max-length\" rule instead of the hard coded value of 100. This can be ovewritten by setting the 'maxHeaderWidth' configuration in package.json or the CZ_MAX_HEADER_WIDTH environment variable.\n", "readme_type": "markdown", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "Esri/wind-js", "link": "https://github.com/Esri/wind-js", "tags": ["web-development", "javascript", "canvas", "wind", "esri", "visualization", "cartography", "javascript-library", "gfs-data"], "stars": 669, "description": "An demo animation of wind on a Canvas layer in the JSAPI", "lang": "JavaScript", "repo_lang": "", "readme": "# Wind-JS\n\nCheck out the live [demo](http://esri.github.io/wind-js/)\n\n![Wind JS](https://f.cloud.github.com/assets/351164/2349895/36ba1c9a-a569-11e3-859d-5d753ea0898c.jpeg)\n\n\nThis project is an experiment in client-side data processing and visualization. Most of the code in this project is taken from https://github.com/cambecc/earth and has been re-purposed to support easier application to a variety of mapping APIs and Frameworks.\n\n## How it works\n\nThe code for this project uses nothing but an HTML5 Canvas element and pure Javascript. The data come from the Global Forecast System which produces a large variety of datasets as continuous global gridded datasets (more info below). The data is passed into a JS class called `Windy` which takes the bounds of the map, the data, and the canvas element and then applies a [Bilinear Interpolation](http://en.wikipedia.org/wiki/Bilinear_interpolation) to generate a smooth surface. Once the surface has been generated a function randomly places \"particles\" onto the canvas at random x/y points. Each particle is then \"evolved\", moving in a direction and at a velocity dictated by the interpolated surface.\n\n## The Data\n\nBefore [GFS data](http://nomads.ncdc.noaa.gov/data.php?name=access#hires_weather_datasets) can be used with this code it has to be converted into JSON. To do this we used another awesome project by [@cambecc](https://github.com/cambecc) called [`grib2json`](https://github.com/cambecc/grib2json). That tool converts data in the GRIB2 file format into a JSON structure with the grid represented as an array. An example result of that tool can be seen in the `gfs.json` file.\n\n## Resources\n\n* https://github.com/cambecc/earth\n* http://earth.nullschool.net/\n* [http://nomads.ncdc.noaa.gov/data.php...](http://nomads.ncdc.noaa.gov/data.php?name=access#hires_weather_datasets)\n* http://developers.arcgis.com\n* [twitter@esri](http://twitter.com/esri)\n\n## Issues\n\nFind a bug or want to request a new feature? Please let us know by submitting an issue.\n\n## Contributing\n\nEsri welcomes contributions from anyone and everyone. Please see our [guidelines for contributing](https://github.com/esri/contributing).\n\n## Credit\n\nAll the credit for this work goes to [@cambecc](https://github.com/cambecc) for creating [cambecc/earth](https://github.com/cambecc/earth). The majority of this code is directly taken from there, since it's utterly awesome.\n\n## Licensing\n\nThis project inherits an MIT license from [cambecc/earth](https://github.com/cambecc/earth) because 95% of the code here was copied from that project.\n\nA copy of the license is available in the repository's [license.txt]( https://raw.github.com/Esri/wind-js/master/license.txt) file.", "readme_type": "markdown", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "dkfbasel/vuex-i18n", "link": "https://github.com/dkfbasel/vuex-i18n", "tags": ["vuex", "translation", "language", "internationalization-plugin", "vuejs", "vue2", "vuejs-components", "vuejs2"], "stars": 668, "description": "Localization plugin for vue.js 2.0 using vuex as store", "lang": "JavaScript", "repo_lang": "", "readme": "# vuex-i18n\nWe are big fans of the awesome vue, vuex and vue-router libraries and were just\nlooking for an easy to use internationalization plugin, employing as much of\nthe \"standard library\" as possible.\n\nThe main difference to other internationalization plugins is the ease of use\nand support for locales directly with the application or later from the server.\n\n## Requirements\n- Vue ^2.0.0\n- Vuex ^2.0.0\n\n## Installation\n```\n$ npm install vuex-i18n\n```\n\n## Setup\nThe vuex-i18n plugin is intended to be used for applications that use vuex as\nstore and require localized messages. Make sure that both vue and vuex have\nbeen loaded beforehand.\n\nThe plugin provides a vuex module to store the localization information and\ntranslations and a plugin to allow easy access from components.\n\nThe plugin does not make any assumption on how you want to load the localization\ninformation. It can be loaded on start in your application bundle or dynamically\nafter when the user is switching to a different language.\n\nA corresponding example can be found in the test directory.\n\n```javascript\n\n// load vue and vuex instance\nimport Vue from 'vue';\nimport Vuex from 'vuex';\n\n// load vuex i18n module\nimport vuexI18n from 'vuex-i18n';\n\n// IMPORTANT NOTE:\n// The default format for the plugin is in es2015, if you do not use a transpiler\n// such as babel) or for use in server side rendering (such as nuxt)\n// the umd version should be loaded like this\n// import vuexI18n from 'vuex-i18n/dist/vuex-i18n.umd.js';\n\n// initialize the vuex store using the vuex module. note that you can change the\n// name of the module if you wish\nconst store = new Vuex.Store();\n\n// initialize the internationalization plugin on the vue instance. note that\n// the store must be passed to the plugin. the plugin will then generate some\n// helper functions for components (i.e. this.$i18n.set, this.$t) and on the vue\n// instance (i.e. Vue.i18n.set).\nVue.use(vuexI18n.plugin, store);\n\n// please note that you must specify the name of the vuex module if it is\n// different from i18n. i.e. Vue.use(vuexI18n.plugin, store, {moduleName: 'myName'})\n\n\n// add some translations (could also be loaded from a separate file)\n// note that it is possible to use placeholders. translations can also be\n// structured as object trees and will automatically be flattened by the the\n// plugin\nconst translationsEn = {\n\t\"content\": \"This is some {type} content\"\n};\n\n// translations can be kept in separate files for each language\n// i.e. resources/i18n/de.json.\nconst translationsDe = {\n\t\"My nice title\": \"Ein sch\u00f6ner Titel\",\n\t\"content\": \"Dies ist ein toller Inhalt\"\n};\n\n// add translations directly to the application\nVue.i18n.add('en', translationsEn);\nVue.i18n.add('de', translationsDe);\n\n// set the start locale to use\nVue.i18n.set('en');\n\n// create a new component (requires a div with id app as mount point)\n// you can use the method $t to access translations. the value will be returned\n// as is, if no corresponding key is found in the translations\nvar app = new Vue({\n\tstore,\n\tel: '#app',\n\ttemplate: `\n\t\t
    \n\t\t\t

    {{ 'My nice title' | translate }}

    \n\t\t\t

    {{ $t('content', {'type': 'nice'}) }}

    \n\t\t
    \n\t`\n});\n\n```\n\nYou can specify a custom module name for vuex (default is 'i18n') or a callback that is triggered\nwhen a key has no translation for the current locale. Please note, that the function\nsupplied for onTranslationNotFound will be called if the key is not in the actual\nlocale or a parent locale (ie. en for en-us), however, the key might still be available\nin the fallback locale.\n\nIf a return value is given, this will be used as translation text for the key\nthat was not found. It is also possible to return a promise. This will allow you\nto dynamically fetch the data from an api. Be aware, that the key will only\nbe resolved once and then written like any other key into the store. Therefore\nsubsequent calls of the same key will not trigger the onTranslationNotFound method.\n\n```javascript\n\n// without return value (will use fallback translation, default translation or key)\nVue.use(vuexI18n.plugin, store, {\n\tmoduleName: 'i18n',\n\tonTranslationNotFound (locale, key) {\n\t\tconsole.warn(`i18n :: Key '${key}' not found for locale '${locale}'`);\n\t}}\n);\n\n// with string as return value. this will write the new value as translation\n// into the store\n// note: synchronous resolving of keys is not recommended as this functionality\n// should be implemented in a different way\nVue.use(vuexI18n.plugin, store, {\n\tmoduleName: 'i18n',\n\tonTranslationNotFound (locale, key) {\n\t\tswitch(key) {\n\t\tcase: '200':\n\t\t\treturn 'Everything went fine';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn 'There was a problem';\n\t\t}\n\t}}\n);\n\n// with promise as return value. this will write the new value into the store,\n// after the promise is resolved\nVue.use(vuexI18n.plugin, store, {\n\tmoduleName: 'i18n',\n\tonTranslationNotFound (locale, key) {\n\n\t\treturn new Promise((resolve, reject) => {\n\t\t\taxios.get('/api/translations/async', {locale: locale, key:key})\n\t\t\t.then((result) => {\n\t\t\t\tresolve(result.data);\n\n\t\t\t}).catch() {\n\t\t\t\treject();\n\t\t\t}\n\n\t\t})\n\n\t}}\n);\n\n```\n## Config\nYou can pass a config object as the third parameter when use vuex-i18n. \ni.e. Vue.use(vuexI18n.plugin, store, config)\n\nAt present, the configuration options that are supported are as follows:\n\n- `moduleName` (default `i18n`)\n- `identifiers` (default `['{', '}']`)\n- `preserveState` (default `false`)\n- `translateFilterName` (default `translate`)\n- `translateInFilterName` (default `translateIn`)\n- `onTranslationNotFound` (default `function(){}`)\n- `warnings`: default(`true`)\n\n```javascript\n\nconst config = {\n\tmoduleName: 'myName',\n\ttranslateFilterName: 't'\n}\n\nVue.use(vuexI18n.plugin, store, config)\n\n```\n\n## Usage\nvuex-i18n provides easy access to localized information through the use of\nthe `$t()` method or the `translate` filter.\n\nThe plugin will try to find the given string as key in the translations of the\ncurrently defined locale and return the respective translation. If the string\nis not found, it will return as is. This wil allow you to setup an application\nvery quickly without having to first define all strings in a separate template.\n\nIt is also possible to specify a fallback-locale `$i18n.fallback(locale)`. If\nthe key is not found in current locale, vuex-i18n will look for the key in the\nfallback-locale. If the key can not be found in the fallback-locale either,\nthe key itself will be returned as translation.\n\n```javascript\n
    \n\t// will return: \"Some localized information\"\n\t{{ $t('Some localized information')}}\n
    \n\n```\n\nIn larger projects, it is often easier to use a more robust translation key instead\nof the default text. Therefore it is also possible to specify the key and\ndefault translation. The default value will only be used, if the key cannot be\nfound in the current and in the fallback locale.\n\n```javascript\n
    \n\t// will return: \"Default information text\" if the key non.existing.key is\n\t// not specified in the current and the fallback locale\n\t{{ $t('non.existing.key', 'Default information text')}}\n
    \n```\n\nDynamic parameters that can be passed to the translation method in the form of\nkey/value pairs.\n\n```javascript\n
    \n\t// will return: \"You have 5 new messages\"\n\t{{\u00a0$t('You have {count} new messages', {count: 5}) }}\n
    \n```\n\nIt is possible to specify custom identifiers for variable substitutions. The\nrespective identifiers - start and stop - must be passed when initializing the\nmodule. Please note that a regular expression is used to match the tags.\nTherefore it might be necessary to escape certain characters accordingly.\n\n```javascript\n// i.e. to use {{count}} as variable substitution.\nVue.use(vuexI18n.plugin, store, {\n\tidentifiers: ['{{','}}']\n});\n```\n\nBasic pluralization is also supported. Please note, that the singular translation\nmust be specified first, followed by plural translations denoted by `:::`.\nUp to six pluralization forms are supported based on configuration taken from [vue-gettext](https://github.com/Polyconseil/vue-gettext).\nThe second option is used for variable replacements. The third option to define if\nthe singular or pluralized translation should be used (see below for examples).\n\n\n```javascript\n
    \n\t// will return: \"You have 5 new messages\" if the third argument is 5\"\n\t// or \"You have 1 new message\" if the third argument is 1\n\t// or \"You have 0 new messages\" if the third argument is 0 (note pluralized version)\n\n\t// using the translation directly (as specified in the current readme)\n\t{{ $t('You have {count} new message ::: You have {count} new messages', {count: 5}, 5) }}\n\n\n\t// using a key to lookup the translations\n\t{{ $t('mykey', {count: 5}, 5) }}\n\n\t// in the store\n\tconst translations = {\n\t 'mykey': 'You have {count} new message ::: You have {count} new messages'\n\t}\n\n\t// alternative specification with array for translations\n\tconst translations = {\n\t 'mykey': [\n\t 'You have {count} new message',\n\t 'You have {count} new messages'\n\t ]\n\t}\n
    \n```\n\n```javascript\n
    \n\t// In case when there are more than singular and plural versions like in Latvian language.\n\t// will return: \"5 b\u0113rni\" (in english - 5 children) if the third argument is 5\"\n\t// or \"2 b\u0113rni\" if the third argument is 2\n\t// or \"1 b\u0113rns\" if the third argument is 1\n\t// or \"0 b\u0113rnu\" if the third argument is 0\n\t{{\u00a0$t('{count} b\u0113rns ::: {count} b\u0113rni ::: {count} b\u0113rnu', {count: 5}, 5) }}\n
    \n```\n\nThe current locale can be set using the `$i18n.set()` method. By default, the\ntranslation method will select the pre-specified current locale. However, it is\npossible to request a specific locale using the `$tlang()` method.\n\n```javascript\n
    \n\t// will return the english translation regardless of the current locale\n\t{{\u00a0$tlang('en', 'You have {count} new messages', {count: 5}) }}\n
    \n```\n\nThere are also several methods available on the property `this.$i18n` or `Vue.i18n`\n\n```javascript\n\n// translate the given key\n$t(), Vue.i18n.translate()\n\n// translate the given key in a specific locale, also available as filter\n// i.e {{ 'message' | translateIn('en') }}\n$tlang(), Vue.i18n.translateIn()\n\n// get the current locale\n$i18n.locale(), Vue.i18n.locale()\n\n// get all available locales\n// is is however recommended to use a computed property to fetch the locales\n// returning Object.keys(this.$store.state.i18n.translations); as this will\n// make use of vue's caching system.\n$i18n.locales(), Vue.i18n.locales()\n\n// set the current locale (i.e. 'de', 'en')\n$i18n.set(locale), Vue.i18n.set(locale)\n\n// add locale translation to the storage. this will extend existing information\n// (i.e. 'de', {'message': 'Eine Nachricht'})\n$i18n.add(locale, translations), Vue.i18n.add(locale, translations)\n\n// replace locale translations in the storage. this will remove all previous\n// locale information for the specified locale\n$i18n.replace(locale, translations), Vue.i18n.replace(locale, translations)\n\n// remove the given locale from the store\n$i18n.remove(locale), Vue.i18n.remove(locale)\n\n// set a fallback locale if translation for current locale does not exist\n$i18n.fallback(locale), Vue.i18n.fallback(locale)\n\n// check if the given locale translations are present in the store\n$i18n.localeExists(locale), Vue.i18n.localeExists(locale)\n\n// check if the given key is available (will check current, regional and fallback locale)\n$i18n.keyExists(key), Vue.i18n.keyExists(key)\n\n// optional with a second parameter to limit the scope\n// strict: only current locale (exact match)\n// locale: current locale and parent language locale (i.e. en-us & en)\n// fallback: current locale, parent language locale and fallback locale\n// the default is fallback\n$i18n.keyExists(key, 'strict'), $i18n.keyExists(key, 'locale'), $i18n.keyExists(key, 'fallback'),\n\n```\n\n## Third-Party Integration\nThanks to Liip Team Amboss for developing an interactive translation manager for node.js. You can find it at https://github.com/liip-amboss/locale-man.\n\n\n## Contributions\nAny comments or suggestions are very welcome.\n", "readme_type": "markdown", "hn_comments": "", "gh_updated_time": "", "gh_accessed_time": "", "hn_accessed_time": ""}, {"name": "wonday/react-native-orientation-locker", "link": "https://github.com/wonday/react-native-orientation-locker", "tags": ["orientation", "react-native", "listener", "locker", "android", "ios"], "stars": 668, "description": "A react-native module that can listen on orientation changing of device, get current orientation, lock to preferred orientation. ", "lang": "JavaScript", "repo_lang": "", "readme": "# react-native-orientation-locker\n[![npm](https://img.shields.io/npm/v/react-native-orientation-locker.svg?style=flat-square)](https://www.npmjs.com/package/react-native-orientation-locker)\n\nA react-native module that can listen on orientation changing of device, get current orientation, lock to preferred orientation. (cross-platform support)\n\n### Feature\n\n* lock screen orientation to PORTRAIT|LANDSCAPE-LEFT|PORTRAIT-UPSIDEDOWN|LANDSCAPE-RIGHT.\n* listen on orientation changing of device\n* get the current orientation of device\n\n### ChangeLog\n
    \n ChangeLog details\n\nv1.5.0\n1. Fix: threading issue on Windows and fix android not triggering event in some cases\n2. Fix: add stub methods to remove warning while using listeners\n\nv1.4.0\n1. Fix typescript types\n2. Fix some bugs\n\nv1.3.1 \n1. Fix require cycle problem\n\nv1.3.0 **BREAKING CHANGES**\n1. Add support for Window\n2. Modify sample project\n3. Updates Tyescript define\n\nv1.2.0 **BREAKING CHANGES**\n1. Add support for lockAllOrientationsButUpsideDown\n2. Ignore on web and desktop (#115)\n3. Fix for not finding @ReactModule (#125)\n4. Fix unlockAllOrientations on Android (#133)\n5. Implement ActivityLifecycleCallbacks on Android (#131)\n\nPlease be sure to add to `onCreate` of your `MainApplication`\n```\nimport org.wonday.orientation.OrientationActivityLifecycle;\n\n @Override\n public void onCreate() {\n ...\n+ registerActivityLifecycleCallbacks(OrientationActivityLifecycle.getInstance());\n }\n\n```\nv1.1.8\n1. Support FACE-UP and FACE-DOWN on iOS\n\nv1.1.7\n1. Add lockToPortraitUpsideDown() to iOS\n2. Minor case corrections\n\nv1.1.6\n1. Catch unknown device orientation value\n2. When calling unlockAllOrientations(), forcibly unlock whether locked or not\n\nv1.1.5\n1. Add Orientation.isLocked() and Orientation.removeAllListeners()\n\nv1.1.4\n1. Fix TypeScript declarations\n\nv1.1.3\n1. Add `addLockListener` and `removeLockListener`\n2. Improve Android orientation changed event sending condition\n\nv1.1.2\n 1. Improve Android orientation changed event timing\n\nv1.1.1\n 1. Fix show \"supported event type for deviceOrientationDidChange...\" error in debug\n 2. Fix getAutoRotateState() code error\n\n\nv1.1.0 **BREAKING CHANGES** \n 1. Split ```addOrientationListener(function(orientation, deviceOrientation))``` to ```addOrientationListener(function(orientation))``` and ```addDeviceOrientationListener(function(deviceOrientation))```\n 2. Make sure when lockToXXX and unlockAllOrientations resend UI orientation event\n 3. remove setTimout from orientation listener\n 4. Add getAutoRotateState() for Android\n 5. Add TypeScript definitions\n\n[[more]](https://github.com/wonday/react-native-orientation-locker/releases)\n
    \n\n### Notice\n\n1. RN 0.58 + Android target SDK 27 maybe cause \n```Issue: java.lang.IllegalStateException: Only fullscreen activities can request orientation``` problem, \nsee [[#55]](https://github.com/wonday/react-native-orientation-locker/issues/55) for a solution.\n\n2. orientationDidChange will be delayed on iPads if we set upside down to true.\nSimply disable upside down for iPad and everything works like a charm ([[#78]](https://github.com/wonday/react-native-orientation-locker/issues/78) Thanks [truongluong1314520](https://github.com/truongluong1314520))\n\n3. If you get the following build error on iOS: \n```ld: library not found for -lRCTOrientation-tvOS```\nJust remove it from linked libraries and frameworks\n\n4. For Windows, locking to an orientation will only work on devices in tablet mode.\n\n5. For Windows, getting information on device orientation and tracking its changes will only be possible on devices with an orientation sensor. If the device running your application does not have the appropriate hardware to support tracking device orientation, `getDeviceOrientation()` will return UNKNOWN.\n\n#### To run example on Windows Tablet (This will allow one to view modules full functionality)\n1. Open example/windows/example.sln in Visual Studio. \n2. Go to Project > Publish > Create App Packages.\n3. Certificate password is \"password\".\n4. Select \"Sideloading\" and hit \"Next\".\n5. Hit \"Yes, use the current certificate\" and hit \"Next\".\n6. Choose desired output location and hit \"Create\".\n7. Got to output location and copy example__Test directory over to tablet device.\n8. On tablet device open APPXBUNDLE File and hit \"Install\" (make sure tablet is in developer mode). App should launch after install is complete.\n9. Turn on tablet mode on device to see locking to a UI orientation functionality. \n\n### Installation\n#### Using yarn (RN 0.60 and and above)\n\n```\n yarn add react-native-orientation-locker\n```\n\n\n#### Using yarn (RN 0.59 and and below)\n\n```\n yarn add react-native-orientation-locker\n react-native link react-native-orientation-locker\n```\n#### Manual linking\nFor Windows, if you are using RNW v0.63.0 or higher, autolinking should link the module for you. Otherwise, you must follow the steps outlined [here](https://microsoft.github.io/react-native-windows/docs/native-modules-using) for linking module.\n\nAdd following to MainApplication.java\n(This will be added automatically by auto link. If not, please manually add the following )\n\n```diff\n//...\n+import org.wonday.orientation.OrientationPackage;\n @Override\n protected List getPackages() {\n @SuppressWarnings(\"UnnecessaryLocalVariable\")\n List packages = new PackageList(this).getPackages();\n // Packages that cannot be autolinked yet can be added manually here, for example:\n // packages.add(new MyReactNativePackage());\n+ packages.add(new OrientationPackage());\n return packages;\n }\n//...\n```\n\n#### Using CocoaPods (iOS Only)\n\nRun ```pod install``` in the ios directory. Linking is not required in React Native 0.60 and above.\n\n### Configuration\n\n#### iOS\n\nAdd the following to your project's `AppDelegate.m`:\n\n```diff\n+#import \"Orientation.h\"\n\n@implementation AppDelegate\n\n// ...\n\n+- (UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window {\n+ return [Orientation getOrientation];\n+}\n\n@end\n```\n\n#### Android\n\nAdd following to android/app/src/main/AndroidManifest.xml\n\n```diff\n \n\n ....\n\n \n\n```\n\nImplement onConfigurationChanged method (in `MainActivity.java`)\n\n```diff\n// ...\n\n+import android.content.Intent;\n+import android.content.res.Configuration;\n\npublic class MainActivity extends ReactActivity {\n\n+ @Override\n+ public void onConfigurationChanged(Configuration newConfig) {\n+ super.onConfigurationChanged(newConfig);\n+ Intent intent = new Intent(\"onConfigurationChanged\");\n+ intent.putExtra(\"newConfig\", newConfig);\n+ this.sendBroadcast(intent);\n+ }\n\n // ......\n}\n```\n\nAdd following to MainApplication.java\n\n```diff\n+import org.wonday.orientation.OrientationActivityLifecycle;\n @Override\n public void onCreate() {\n+ registerActivityLifecycleCallbacks(OrientationActivityLifecycle.getInstance());\n }\n```\n\n## Usage\n\n### Imperative API\n\nWhenever you want to use it within React Native code now you can:\n`import Orientation from 'react-native-orientation-locker';`\n\n```js\n\nimport Orientation from 'react-native-orientation-locker';\n\n\n _onOrientationDidChange = (orientation) => {\n if (orientation == 'LANDSCAPE-LEFT') {\n //do something with landscape left layout\n } else {\n //do something with portrait layout\n }\n };\n\n componentWillMount() {\n //The getOrientation method is async. It happens sometimes that\n //you need the orientation at the moment the js starts running on device.\n //getInitialOrientation returns directly because its a constant set at the\n //beginning of the js code.\n var initial = Orientation.getInitialOrientation();\n if (initial === 'PORTRAIT') {\n //do stuff\n } else {\n //do other stuff\n }\n },\n\n componentDidMount() {\n\n Orientation.getAutoRotateState((rotationLock) => this.setState({rotationLock}));\n //this allows to check if the system autolock is enabled or not.\n\n Orientation.lockToPortrait(); //this will lock the view to Portrait\n //Orientation.lockToLandscapeLeft(); //this will lock the view to Landscape\n //Orientation.unlockAllOrientations(); //this will unlock the view to all Orientations\n\n //get current UI orientation\n /*\n Orientation.getOrientation((orientation)=> {\n console.log(\"Current UI Orientation: \", orientation);\n });\n\n //get current device orientation\n Orientation.getDeviceOrientation((deviceOrientation)=> {\n console.log(\"Current Device Orientation: \", deviceOrientation);\n });\n */\n\n Orientation.addOrientationListener(this._onOrientationDidChange);\n },\n\n componentWillUnmount: function() {\n Orientation.removeOrientationListener(this._onOrientationDidChange);\n }\n```\n\n### Reactive component ``\n\nIt is possible to have multiple `OrientationLocker` components mounted at the same time. The props will be merged in the order the `OrientationLocker` components were mounted. This follows the same usability of [\\](https://reactnative.dev/docs/statusbar).\n\n```js\nimport React, { useState } from \"react\";\nimport { Text, View } from \"react-native\";\nimport { OrientationLocker, PORTRAIT, LANDSCAPE } from \"react-native-orientation-locker\";\n\nexport default function App() {\n const [showVideo, setShowVideo] = useState(true);\n return (\n \n console.log('onChange', orientation)}\n onDeviceChange={orientation => console.log('onDeviceChange', orientation)}\n />\n