[
  {
    "path": "LICENSE",
    "content": "GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n  The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works.  By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users.  We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors.  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n  To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights.  Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received.  You must make sure that they, too, receive\nor can get the source code.  And you must show them these terms so they\nknow their rights.\n\n  Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n  For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software.  For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n  Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so.  This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software.  The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable.  Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts.  If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n  Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary.  To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                       TERMS AND CONDITIONS\n\n  0. Definitions.\n\n  \"This License\" refers to version 3 of the GNU General Public License.\n\n  \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n  \"The Program\" refers to any copyrightable work licensed under this\nLicense.  Each licensee is addressed as \"you\".  \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n  To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy.  The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n  A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n  To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy.  Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n  To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies.  Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n  An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License.  If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n  1. Source Code.\n\n  The \"source code\" for a work means the preferred form of the work\nfor making modifications to it.  \"Object code\" means any non-source\nform of a work.\n\n  A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n  The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form.  A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n  The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities.  However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work.  For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n  The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n  The Corresponding Source for a work in source code form is that\nsame work.\n\n  2. Basic Permissions.\n\n  All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met.  This License explicitly affirms your unlimited\npermission to run the unmodified Program.  The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work.  This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n  You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force.  You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright.  Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n  Conveying under any other circumstances is permitted solely under\nthe conditions stated below.  Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n  No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n  When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n  4. Conveying Verbatim Copies.\n\n  You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n  You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n  5. Conveying Modified Source Versions.\n\n  You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n    a) The work must carry prominent notices stating that you modified\n    it, and giving a relevant date.\n\n    b) The work must carry prominent notices stating that it is\n    released under this License and any conditions added under section\n    7.  This requirement modifies the requirement in section 4 to\n    \"keep intact all notices\".\n\n    c) You must license the entire work, as a whole, under this\n    License to anyone who comes into possession of a copy.  This\n    License will therefore apply, along with any applicable section 7\n    additional terms, to the whole of the work, and all its parts,\n    regardless of how they are packaged.  This License gives no\n    permission to license the work in any other way, but it does not\n    invalidate such permission if you have separately received it.\n\n    d) If the work has interactive user interfaces, each must display\n    Appropriate Legal Notices; however, if the Program has interactive\n    interfaces that do not display Appropriate Legal Notices, your\n    work need not make them do so.\n\n  A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit.  Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n  6. Conveying Non-Source Forms.\n\n  You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n    a) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by the\n    Corresponding Source fixed on a durable physical medium\n    customarily used for software interchange.\n\n    b) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by a\n    written offer, valid for at least three years and valid for as\n    long as you offer spare parts or customer support for that product\n    model, to give anyone who possesses the object code either (1) a\n    copy of the Corresponding Source for all the software in the\n    product that is covered by this License, on a durable physical\n    medium customarily used for software interchange, for a price no\n    more than your reasonable cost of physically performing this\n    conveying of source, or (2) access to copy the\n    Corresponding Source from a network server at no charge.\n\n    c) Convey individual copies of the object code with a copy of the\n    written offer to provide the Corresponding Source.  This\n    alternative is allowed only occasionally and noncommercially, and\n    only if you received the object code with such an offer, in accord\n    with subsection 6b.\n\n    d) Convey the object code by offering access from a designated\n    place (gratis or for a charge), and offer equivalent access to the\n    Corresponding Source in the same way through the same place at no\n    further charge.  You need not require recipients to copy the\n    Corresponding Source along with the object code.  If the place to\n    copy the object code is a network server, the Corresponding Source\n    may be on a different server (operated by you or a third party)\n    that supports equivalent copying facilities, provided you maintain\n    clear directions next to the object code saying where to find the\n    Corresponding Source.  Regardless of what server hosts the\n    Corresponding Source, you remain obligated to ensure that it is\n    available for as long as needed to satisfy these requirements.\n\n    e) Convey the object code using peer-to-peer transmission, provided\n    you inform other peers where the object code and Corresponding\n    Source of the work are being offered to the general public at no\n    charge under subsection 6d.\n\n  A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n  A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling.  In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage.  For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product.  A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n  \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source.  The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n  If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information.  But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n  The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed.  Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n  Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n  7. Additional Terms.\n\n  \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law.  If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n  When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit.  (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.)  You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n  Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n    a) Disclaiming warranty or limiting liability differently from the\n    terms of sections 15 and 16 of this License; or\n\n    b) Requiring preservation of specified reasonable legal notices or\n    author attributions in that material or in the Appropriate Legal\n    Notices displayed by works containing it; or\n\n    c) Prohibiting misrepresentation of the origin of that material, or\n    requiring that modified versions of such material be marked in\n    reasonable ways as different from the original version; or\n\n    d) Limiting the use for publicity purposes of names of licensors or\n    authors of the material; or\n\n    e) Declining to grant rights under trademark law for use of some\n    trade names, trademarks, or service marks; or\n\n    f) Requiring indemnification of licensors and authors of that\n    material by anyone who conveys the material (or modified versions of\n    it) with contractual assumptions of liability to the recipient, for\n    any liability that these contractual assumptions directly impose on\n    those licensors and authors.\n\n  All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10.  If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term.  If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n  If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n  Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n  8. Termination.\n\n  You may not propagate or modify a covered work except as expressly\nprovided under this License.  Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n  However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n  Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n  Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License.  If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n  9. Acceptance Not Required for Having Copies.\n\n  You are not required to accept this License in order to receive or\nrun a copy of the Program.  Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance.  However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work.  These actions infringe copyright if you do\nnot accept this License.  Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n  10. Automatic Licensing of Downstream Recipients.\n\n  Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License.  You are not responsible\nfor enforcing compliance by third parties with this License.\n\n  An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations.  If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n  You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License.  For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n  11. Patents.\n\n  A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based.  The\nwork thus licensed is called the contributor's \"contributor version\".\n\n  A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version.  For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n  In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement).  To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n  If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients.  \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n  If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n  A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License.  You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n  Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n  12. No Surrender of Others' Freedom.\n\n  If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all.  For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n  13. Use with the GNU Affero General Public License.\n\n  Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work.  The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n  14. Revised Versions of this License.\n\n  The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n  Each version is given a distinguishing version number.  If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation.  If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n  If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n  Later license versions may give you additional or different\npermissions.  However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n  15. Disclaimer of Warranty.\n\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. Limitation of Liability.\n\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n  17. Interpretation of Sections 15 and 16.\n\n  If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n                     END OF TERMS AND CONDITIONS\n\n            How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    {one line to give the program's name and a brief idea of what it does.}\n    Copyright (C) {year}  {name of author}\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\nAlso add information on how to contact you by electronic and paper mail.\n\n  If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n    {project}  Copyright (C) {year}  {fullname}\n    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n    This is free software, and you are welcome to redistribute it\n    under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License.  Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n  You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n<http://www.gnu.org/licenses/>.\n\n  The GNU General Public License does not permit incorporating your program\ninto proprietary programs.  If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library.  If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License.  But first, please read\n<http://www.gnu.org/philosophy/why-not-lgpl.html>.\n"
  },
  {
    "path": "README.md",
    "content": "# Mac for Developer v0.1\n\n将本人在使用Mac作为开发工具的过程中的一些体会做个记录和整理，方便以后自己和团队的参考，提高效率。如果本文对其他开发人员也有所帮助，欢迎您给给出反馈或者提出改进意见。\n\n本文假设您是一个开发工程师，并且是一个Mac的新手。这些步骤在OS X Yosemite下测试通过。\n\n欢迎大家一起改进这个项目，请`Fork`、`Star`或在[Issues](https://github.com/pubyun/macdev/issues)中提交 :)\nPlease improve this project together. Submit your ideas by `Fork`、`Star` or [Issues](https://github.com/pubyun/macdev/issues) :)\n\n您也可以关注我的[新浪微博](http://weibo.com/pubyun)，以获取最新消息。\nYou can also follow my [weibo](http://weibo.com/pubyun) for the latest news.\n\n## Catalog\n\n* [Installation of OS X](https://github.com/pubyun/macdev/blob/master/install.md)\n* [Backup and recovery of OS X](https://github.com/pubyun/macdev/blob/master/recovery.md)\n* [Basic configuration](https://github.com/pubyun/macdev/blob/master/basic.md)\n* [Development enviroment of Python](https://github.com/pubyun/macdev/blob/master/python.en.md)\n* Development enviroment of Ruby - Work in progress ...\n* [Development enviroment of Java](https://github.com/pubyun/macdev/blob/master/java.md)\n* [Development enviroment of PHP](https://github.com/pubyun/macdev/blob/master/php.md)\n* [Useful software](https://github.com/pubyun/macdev/blob/master/apps.md)\n* Config - Work in progress ...\n* Common hotkey - Work in progress ...\n* [Reference documentation](https://github.com/pubyun/macdev/blob/master/refs.md)\n\n\n## 目录\n\n* [OS X的安装](https://github.com/pubyun/macdev/blob/master/install.md)\n* [OS X的备份和恢复](https://github.com/pubyun/macdev/blob/master/recovery.md)\n* [基本设置](https://github.com/pubyun/macdev/blob/master/basic.md)\n* [python开发环境的设置](https://github.com/pubyun/macdev/blob/master/python.md)\n* ruby开发环境的设置 - 整理中...\n* [Java开发环境的设置](https://github.com/pubyun/macdev/blob/master/java.md)\n* [PHP开发环境的设置](https://github.com/pubyun/macdev/blob/master/php.md)\n* [常用软件](https://github.com/pubyun/macdev/blob/master/apps.md)\n* 配置文件 - 整理中 ...\n* 常用快捷键 - 整理中 ...\n* [参考文档](https://github.com/pubyun/macdev/blob/master/refs.md)\n"
  },
  {
    "path": "apps.md",
    "content": "# 常用软件\n\n## 效率工具\n\n* Evernote（知识管理工具）\n    * Geeknote (终端版Evernote)\n* OmniFocus（GTD极品,学习成本比较高）\n* OmniGraffle（流程图）\n* OmniOutliner（提纲思路）\n* Oh My Zsh\n* autojump (直达目录)\n\n## The missing package manager for OS X\n* Homebrew\n\n## 系统工具\n\n* JiTouch\n* OnyX\n* XQuartz（X11）\n* CleanMyMac 3（垃圾清理）\n* iterm2（终端）\n* ShiftIt（快捷键窗口控制）\n* Asepsis (转存 .DS_Store)\n* Gas Mask（Host切换）\n* Itsycal（显示日历）\n* cd to\n* XtraFinder（Finder扩展）\n* Alfred（万能搜索）\n* KeyCue（快捷键大全）\n* PopClip（增强复制粘贴）\n* FileZilla (FTP工具)\n* Retina DisplayMenu (更改显示器分辨率, 可超频)\n\n## 压缩和解压缩\n\n* BetterZip\n* The Unarchiver\n\n## 浏览器\n\n* Chrome\n* Firefox\n\n## 密码管理\n\n* lastpass\n* 1password\n\n## 即时通讯\n\n* QQ\n* AliWangWang\n* Skype\n* LimeChat（IRC）\n\n## 虚拟机\n\n* Parallels Desktop\n* VMware fusion\n* Genymotion（Android虚拟机）\n* VirtualBox\n\n## 云存储\n\n* 百度云\n* 腾讯微云\n* Dropbox\n\n## VPN 和翻墙\n\n* GoAgentX\n* Tunnelblick\n* ShadowsocksX\n\n## 开发相关\n\n* Dash\n* Vagrant\n* Mou（Markdown编辑器）\n* Haroopad（Markdown编辑器）\n* MacDown (Markdown 编辑器)\n* Atom (IDE)\n* TextMate（编辑器）\n* Sublime Text（编辑器）\n* XCode（IDE）\n* Eclipse（IDE）\n* IntelliJ IDEA（IDE）\n* PyCharm（Python IDE）\n* PHPStorm（PHP IDE）\n* WebStorm（Js IDE）\n* Wireshark（网络流量分析）\n* CocoaPacketAnalyzer（网络流量分析）\n* SourceTree（Git图形客户端）\n* GitHub Desktop（Git图形客户端）\n* SmartSVN（SVN图形客户端）\n* Navicat（数据库管理）\n* RoboMongo（MongoDB数据库管理）\n* Axure（原型设计）\n* Coda2（网页开发）\n* xScope（设计度量）\n* Kaleidoscope（文件比较）\n* DiffMerge（文件比较）\n* DiffFork（更好的文件比较）\n\n## 输入法\n\n* 搜狗输入法\n* 百度输入法\n* QQ输入法\n* 鼠鬚管（开源）\n\n## 设计相关\n\n* Adobe CC\n* Corel Painter\n\n## 其他\n\n* 迅雷\n* VLC（影音）\n* f.lux (自动调节色温保护眼睛)\n* CoRD（RDP远程桌面）\n* TeamViewer（远程控制）\n"
  },
  {
    "path": "basic.md",
    "content": "# 基本设置\n\n## Alfred\n\nAlfred是Mac平台上使用最频繁的效率工具，被誉为神兵利器。Alfred 2发布以后，在免费版的基础上加入了Powerpack模式，引入了工作流的概念，可以做出远比快速启动和自定义搜索更酷的事情。\n\n免费版的Alfred已经可以满足我们的日常需要，极大提高我们的工作效率，常用的功能有：\n\n* 快速查找程序和文件\n* 快速搜索互联网\n* 快速搜索联系人\n* 计算器和字典\n* 剪贴板和代码片段\n* 强大的扩展功能和工作流\n\n具体的安装和使用方法可以参见[官方网站](http://www.alfredapp.com/)和搜索相关资料。\n\n## Xcode Command Line Tools\n\nXcode是Apple的一个开发工具和库集合，Xcode Command Line Tools是Xcode的一部分。安装很多Unix软件都需要使用GCC编译器等开发工具，Xcode Command Line Tools就包含这些工具。\n\n检查Xcode Command Line Tools是否已经安装：\n\n    $ xcode-select -p\n    /Applications/Xcode.app/Contents/Developer\n\n打开一个终端窗口(Terminal)，运行命令：\n\n    xcode-select --install\n\n然后点击\"Install\"按钮，安装Xcode的命令行工具\n\n## 软件包管理工具\n\n使用过Debian或者RedHat的操作系统的人，一定非常熟悉aptitude或yum包管理工具。在OS X平台下，同样有优秀的软件包管理工具，可以管理大量Apple没有提供，而你又经常会用到的开源软件包。我们有两种选择——MacPorts和Homebrew。\n\n用过FreeBSD的人应该不会对它的包管理系统port感到陌生，而MacPorts正是由FreeBSD的port移植而来的。Homebrew则是一个全新的包管理系统，用Ruby进行开发。这两种包管理系统的工作方式都是下载source code然后在本地编译。但是这两种包管理系统还是存在很大差异的，主要差异有以下三点：\n\n* MacPorts的理念是尽量减少对系统现有库的依赖，而Homebrew则是尽量依赖系统现有库。\n* MacPorts的Package都是安装到/opt/local，而Homebrew的Package都是安装到/usr/local。\n* Macports使用rsync进行同步（现在也可以使用svn，详情点击[这里](https://trac.macports.org/wiki/howto/SyncingWithSVN)），而Homebrew使用git进行同步。\n\nMacPorts会自己重新编译系统现有库，编译时间较长，好处是不怎么依赖系统。同时Package都被安装到了/opt/local中，不会与系统现有的软件发生冲突。而Homebrew则正好相反，Homebrew会尽量使用系统现有库，所以编译时间会显著减少，坏处是与系统紧密依赖。同时Package都被安装到了/usr/local，有可能与系统自带的软件发生冲突。\n\n总体来说，Homebrew使用简单，编译时间短，比较适合新手使用。MacPorts编译时间长，命令还要带上sudo，易用性上没有Homebrew好，但是比较干净，适合有洁癖的人使用（比如说我(^_-)）。\n\n还有最后一个问题，如果你使用了proxy或者firewall，MacPorts默认的rsync有可能会失效，请切换至svn方式进行同步。\n\n### MacPorts\n\n以下内容可能会随时间的推移而发生变化，请到[官方网站](https://www.macports.org/)查看最新文档（ RTFM ！！）\n\n* 安装MacPorts:\n\n1.安装Xcode和Xcode Command Line Tools\n\n2.在终端中同意Xcode许可\n    \n    sudo xcodebuild －license\n\n3.到[这里](https://www.macports.org/install.php)选择与你系统版本相符的pkg包，下载并安装\n\n* 常用命令\n\n寻求帮助:\n    \n    port help\n这个命令可以指定动作，如:\n    \n    port help selfupdate\n\n同步 ports tree:\n    \n    sudo port selfupdate\n这个命令也会同时检测是否有新版本的MacPorts。\n\n安装软件:\n    \n    sudo port install gcc\n\n列出所有可用包:\n    \n    port list\n当没有指定包名称时，会列出所有可用包，当指定了包名称时，会列出该包的所有可用版本。\n\n查看已安装软件包:\n    \n    port installed\n\n查看可升级软件包:\n    \n    port outdated\n\n升级所有软件:\n    \n    sudo port upgrade outdated\n\n搜索某个软件:\n    \n    port search gcc\n\n查看软件包信息:\n    \n    port info gcc\n\n清除垃圾:\n    \n    sudo port clean --all gcc\n你也可以清除指定文件，详情自行port help clean。\n\n卸载软件:\n    \n    sudo port uninstall gcc\n\n移除已升级的软件包不活跃的版本:\n    \n    sudo port unistall inactive\n\n列出软件包的依赖关系:\n    \n    port deps gcc\n\n* 高级使用技巧（Port Variants）:\n\nPort Variants为我们提供了一种自定义编译选项的方法（和Gentoo中的USE标签类似）。\n\n获取可用的选项:\n    \n    port variants gcc\n\n调用variants进行编译:\n    \n    sudo port －v install fetchmail ＋ssl\n\n### Homebrew\n\nHomebrew为Mac OS X提供了非常方便的软件安装方式，解决了包的依赖问题，不再需要烦人的sudo，一键式编译，无参数困扰。\n\n由于Homebrew的安装方式可能变化，请到[官方网站](http://brew.sh)查看最新的方法和文档。\n\n安装Homebrew:\n\n    ruby -e \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)\"\n    brew doctor\n\n更新formula和Homebrew:\n\n    brew update\n\n显示已经安装的软件列表:\n\n    brew list\n\n搜索某个软件:\n\n    brew search wget\n\n安装某个软件:\n\n    brew install wget\n\n查看需要升级的软件:\n\n    brew outdated\n\n升级所有的软件:\n\n    brew upgrade\n\n升级某个软件:\n\n    brew upgrade wget\n\n删除某个软件:\n\n    brew uninstall wget --force\n\n查看软件包信息:\n\n    brew info wget\n\n列出软件包的依赖关系:\n\n    brew deps wget\n\n出错以后的处理:\n\n    brew update\n    brew doctor\n\n### homebrew-cask\n\n通常OS X下二进制软件是通过App Store安装的，homebrew-cask是一个基于HomeBrew的软件安装程序，使用homebrew-cask可以在命令行下安装软件包，相对Mac App Store，还有一些优势：\n\n* 安装软件体验一致、简洁、优雅、快速\n* 对常用软件支持更全面，例如MPlayerX已经宣布不在更新Mac App Store上的版本\n* 软件更新速度快。例如Alfred 2.0已经出了很久，但在Mac App Store上还是1.2版本，QQ也是这样的情况\n* Mac App Store生态圈远不完善，审核流程过长，限制太多，维护成本过高让很多应用开发者被迫离开。\n\nhomebrew-cask和Homebrew的区别：\n\n* Homebrew安装的是源文件包, 下载源文件、编译、安装，比如安装wget, gnupg, mutt等。\n* homebrew-cask安装的是二进制软件包, 比如QQ，Chrome，evernote等。homebrew-cask安装软件时自动创建软连接到Application目录，这样在Launchpad中也能查看到安装的软件，方便启动软件。\n\n#### 安装homebrew-cask\n\n    brew install caskroom/cask/brew-cask\n\n#### 常用命令\n\n列出所有可以被安装的软件：\n\n    brew cask search\n\n查找所有和drop相关的应用:\n\n    brew cask search drop\n\n查看迅雷应用的信息:\n\n    brew cask info thunder\n\n卸载QQ:\n\n    brew cask uninstall qq\n\n查看已安装的软件\n\n    brew cask list\n\n更新Casks:\n\n    brew update && brew upgrade brew-cask\n\n关于软件更新，目前homebrew-cask并不提供命令直接更新已安装的软件，软件更新主要是通过软件自身的更新流程，不过也可以通过以下命令先删除软件，再重新安装。\n\n    brew cask uninstall APP && brew cask install APP\n\n\n#### 一键装机？有了homebrew-cask就可以\n\n    brew cask install alfred\n    brew cask install qq\n    brew cask install skype\n    brew cask install thunder\n    brew cask install mplayerx\n    brew cask install evernote\n    brew cask install skitch\n    brew cask install dropbox\n    brew cask install google-chrome\n    brew cask install mou\n    brew cask install iterm2\n    brew cask install sublime-text\n\n## iTerm2\n\nMac是一个具有精致图形界面的Unix平台，作为开发人员，经常会使用到终端(Terminal)或者称作控制台(Console)。系统自带的Terminal程序已经做得不错了，但是iTerm2的功能依然要更强大一些。\n\n具体的安装和使用方法可以参见[官方网站](http://www.iterm2.com/)和搜索相关资料。\n\n## Go2Shell\n\nGo2Shell可以方便地实现在Finder当前目录中打开一个终端，如果你经常需要在Finder和终端下切换工作，那么Go2Shell是你的必备工具。\n\n安装完毕之后进入Applications文件夹中按住command键拖动Go2Shell图标到Finder工具栏上，以后点击可开启终端到当前路径。\n\nGo2Shell可以配合Iterm2使用，设置方式是在Termial執行下述命令\n\n    open -a go2shell --args config\n\n跳出Go2Shell Setup，选iTerm2\n\n## zsh\n\n喜欢强大的zsh，直接切换成zsh\n\n    chsh -s /bin/zsh\n\n## oh-my-zsh\n\n## prezto（oh-my-zsh不要用？试试prezto）\n\nhttps://github.com/sorin-ionescu/prezto\n\n## tmux\n\n## 浏览器\n\n### Google Chrome\n\n内置Intel HD 4000/HD 5000/Iris系列显卡的机器，比如2012 Mac Air, 2013 Mac pro 13等，在OS X操作系统上运行Chrome，会频繁发生操作系统死机的情况。这个问题在[2012.6.28就被Google确认](http://gizmodo.com/5922235/we-were-right-google-confirms-chrome-is-to-blame-for-crashing-macbooks)，是OS X内核的一个Bug，直到现在一直没有修正。\n\n临时的解决办法是，关闭Chrome的硬件加速, 在Chrome的设置里，选择\"Show advanced settings\"，然后关闭选项\"Use hardware acceleration when available\"。\n\n### Safari\n\n### Firefox\n\n## 编辑器\n\n### Vim\n\nhttps://github.com/perfectworks/vim\n\n### Emacs\n"
  },
  {
    "path": "install.md",
    "content": "# 系统的安装\n\n## 安装之前\n\n重装之前，使用时光机器(Time Machine)，将所有硬盘资料备份到移动硬盘上。这个也可以方便地作为系统快照，恢复之前某个时刻的机器的状态。数据无价，Time Machine是Mac最有价值的功能之一，一次设置，终生受益。不管是更换机器，重新安装系统，丢失机器，还是硬件损坏，Time Machine都是你最后的保障。\n\n覆盖安装和全新安装（即抹盘安装），默认是覆盖安装。你可以在安装界面使用磁盘工具将系统盘抹掉，这样安装以后就是一个完全干净的系统，但是你的数据和程序也将完全清除。你也可以选择覆盖安装，安装之前无需将系统盘抹掉，这样不会丢失程序和数据，但是可能引起冲突、不一致等问题。\n\n安装时，请将语言选为English，不要使用中文界面。碰到问题的时候，使用英文关键词，在互联网查找、搜索，可以比中文关键字获得更加准确和丰富的信息。\n\n## 网络安装还是本地安装\n\nMac OS X支持网络安装和本地安装。网络安装，就是直接使用command+R，进入恢复模式，然后从互联网下载操作系统进行安装，整个过程自动、方便。安装的时候，注意只能使用wifi网络，并且仅支持WPA/WPA2加密方式，不支持WEP加密方式。\n\n本地安装，就是预先下载安装镜像，制作安装盘，直接从本地安装盘安装。这样时间进度可控，出现问题的风险小。以后进行重新安装和恢复的时候，再也不用重新从网络长时间等待下载，整个安装过程一般在半个小时内完成。\n\n苹果缺省的安装方式是网络安装，但是我们推荐使用本地安装方式。因为网络安装的方式在美国可能很适合，安装速度很快，但是中国大陆需要从境外服务器下载。Yosemite（10.10）安装镜像有5.2G大，即使你的网速有100Mbps或者更高，你也经常会发现网络安装的过程是一个痛苦的体验，往往看着安装进度条蜗牛一般前进，提示还有上百小时才能下载完毕。\n\n## DNS服务器的选择\n\n由于苹果的软件采用网络分发，下载服务器全球分布，选用不同的DNS会很大程度上影响软件的下载速度。推荐的一些DNS有：\n\n* 114.114.114.114 南京信风\n\n* 8.8.8.8         Google\n\n* 178.79.131.110  V2EX\n\n## 制作安装盘\n\n### 分区\n\n准备一个U盘或移动硬盘（大于等于6G），建议使用USB 3或者雷电高速接口。最好使用移动硬盘作为介质，速度比U盘快，同时可以将移动硬盘作为时光机器和恢复磁盘助手(Recovery Disk Assistant)。\n\n首先在磁盘工具内的\"Options\"里，选择GUID，否则无法启动，然后在\"Partision Layout\"将移动硬盘分成三个分区：\n\n* 分区名字Yosemite，大小8G，格式是Mac OS Extended(Journaled)，本地磁盘安装介质的制作，方便以后安装系统。\n\n* 分区名字recovery，大小2G，格式是Mac OS Extended(Journaled)，恢复助手，用于对系统进行恢复。\n\n* 分区名字data，剩余的磁盘空间，格式是Mac OS Extended(Journaled)，数据备份和时光机器的介质。\n\n### 制作安装盘\n\n你可以从Mac App Store下载安装镜像:\n\n    https://itunes.apple.com/us/app/os-x-yosemite/id915041082?mt=12\n\n从App Store完成下载后，OS X Yosemite安装程序会自动启动，不要点击继续，停在安装界面第一页。插入刚才分区好的移动硬盘或者U盘，在命令行输入下面的命令，制作安装盘:\n\n    sudo /Applications/Install\\ OS\\ X\\ Yosemite.app/Contents/Resources/createinstallmedia --volume /Volumes/Yosemite --applicationpath /Applications/Install\\ OS\\ X\\ Yosemite.app --nointeraction\n\n等待创建完成，你就拥有了一个安装启动盘，以后都可以用来安装恢复系统。\n\n### 制作恢复盘\n\n苹果提供OS X Recovery Disk Assistant工具，这个工具将在本地磁盘制作一个恢复分区。下载地址：\n\n    http://support.apple.com/kb/dl1433\n\n## 安装OS X\n\n安装盘制作完毕后，重启并按Option键，选择安装盘安装。安装或者恢复之前，一般使用时光机器进行备份，然后用磁盘工具删掉之前的机器磁盘上的内容。\n\n安装一般需要30分钟左右。\n\n## 安装以后\n\n* 更改安全设置\n\n允许从所有来源安装应用程序，在Security and Privacy里设置\"Allow apps downloaded from\" 选项为\"Anywhere\"\n\n* 更改触摸板默认设置\n\n在\"Trackpad\"里打开\"Tap to click\"设置\n"
  },
  {
    "path": "java.md",
    "content": "# Java开发环境的设置\n\n## Java安装\n\n### 安装Mac原生的Java\n\nMac OS X 系统安装的时候，不带Java，但是可以通过简单的方法快速安装苹果原生的Java，版本是1.6。有三种安装方式：\n\n* 第一次使用java程序，比如打开eclipse的时候，系统就会自动安装Java。\n\n* 命令行下，执行下面的命令：\n\n    java -version\n\n* 直接从苹果官方网站下载Java安装文件:\n\n    http://support.apple.com/kb/DL1572?viewlocale=zh_CN\n\n### 安装新版的Java 1.7\n\n从下列网站下载 Mac OS X 版本的JDK，文件名是jdk-7u51-macosx-x64.dmg：\n\n    http://www.oracle.com/technetwork/java/javase/downloads/index.html\n\n## 设置JAVA_HOME环境变量\n\n很多Java应用需要使用到JAVA_HOME环境变量，在Mac下，可以使用下面的方法，动态获取这个环境变量：\n\n获取Java 1.6的JAVA_HOME：\n\n    /usr/libexec/java_home -v 1.6\n\n获取Java 1.7的JAVA_HOME：\n\n    /usr/libexec/java_home -v 1.7\n\n使用动态的方式设置JAVA_HOME的好处是，当自动升级了新版本的JAVA时，总能找到合适的JAVA_HOME目录。基于这个原因，程序员不要将文件安装在'/System'目录的JDK，因为Java升级的时候，文件会丢失。\n\n也可以通过下列方法设置用户的环境变量，编辑文件'~/.zshrc'或'~/.bash_profile'，加入下面两行之一：\n\n对于Java 1.6：\n\n    export JAVA_HOME=`/usr/libexec/java_home -v 1.6`\n    export PATH=${JAVA_HOME}/bin:$PATH\n\n对于Java 1.7：\n\n    export JAVA_HOME=`/usr/libexec/java_home -v 1.7`\n    export PATH=${JAVA_HOME}/bin:$PATH\n\n## 扩展库(Extension Libraries)的目录位置 \n\n其他平台的Java软件使用'$JAVA_HOME/lib/ext'来存放扩展库的jar文件，Mac OS X的Java虽然也存在这一个'lib/ext'目录，你不能将jar文件存放在这个目录。'/Library/Java/Extensions'目录可以用来存放系统级别的jar文件或JNI库，'~/Library/Java/Extensions'目录用来存放用户级别的jar文件或JNI库。存放在这两个目录下的文件，不需要设置在classpath环境变量下，任何运行的java程序都可以直接使用。\n\n## 安装Eclipse\n\n### 手工安装\n\n从下列地址下载Eclipse的相应版本，我一般选用'Eclipse IDE for Java EE Developers':\n\n    http://www.eclipse.org/downloads/\n\n下载，解压文件，然后将eclipse目录拖到'Applications'目录，双击'/Applications/eclipse/'下的eclipse应用程序图标，就可以启动eclipse。\n\n编辑文件'~/.zshrc'或'~/.bash_profile'，加入：\n\n   export ECLIPSE_HOME=/Applications/eclipse\n\n### 使用homebrew-cask安装\n\n    % brew cask alfred link\n    % brew cask install eclipse-ide\n    ==> Downloading http://download.eclipse.org/technology/epp/downloads/release/kepler/SR1/e\n    ######################################################################## 100.0%\n    ==> Symlinking App 'Eclipse.app' to '/Users/ppyy/Applications/Eclipse.app'\n    ==> Success! eclipse-ide installed to /opt/homebrew-cask/Caskroom/eclipse-ide/4.3.1\n\n这里'brew cask alfred link'可以使homebrew cask安装的程序被Alfed搜索到，可以快速启动。\n\n编辑文件'~/.zshrc'或'~/.bash_profile'，加入：\n\n   export ECLIPSE_HOME=/opt/homebrew-cask/Caskroom/eclipse-ide/4.3.1/eclipse/\n\n### eclipse的优化\n\n安装完毕eclipse以后，为了优化eclipse的运行，可以编辑目录'$ECLIPSE_HOME/Eclipse.app/Contents/MacOS'下的eclipse.ini文件。如果没有设置ECLIPSE_HOME变量，则在'Finder'程序下，右键点击(Ctrl+点击)Eclipse执行程序，选择'Show Package Contents'，然后选择Contents目录下的MacOS目录，打开eclipse.ini文件，修改下列一些变量：\n\n    --launcher.XXMaxPermSize\n    2048m\n    ...\n    -vmargs\n    ...\n    -Xms512m\n    -Xmx850m\n    -XX:PermSize=512m\n    -XX:MaxPermSize=1024m\n\n## 安装ant, maven, tomcat, jetty\n\n    brew install ant maven tomcat jetty\n\n"
  },
  {
    "path": "php.md",
    "content": "# php开发环境设置\n\n### hombrew\n\n``` sh\nruby -e \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)\"\n```\n\n可能需要翻墙，大概率需要`shadowsock`或者其他翻墙工具加上`proxychain-ng`可以做到翻墙使用homebrew。\n\n### php环境\n\n虽然Mac OS X 自带了php，但是我们可以选择使用Homebrew安装php56或者php54因为：\n\n- 使用Homebrew安装更新的php版本\n- 同时安装5.6和5.5和5.4的php\n- Homebrew会同时安装xdebug和mcrypt等工具\n\n安装python 56：\n\n``` \nbrew install homebrew/php/php56\nbrew install homebrew/php/php56-mcrypt\nbrew install homebrew/php/php56-xdebug\n```\n\n安装python 5.4：\n\n``` \nbrew install homebrew/php/php54\n```\n\n一般来说如果php安装了xdebug，大概率composer运行的时候会报错。所以用来运行脚本的php不能安装xdebug。可以这样把已经安装了xdebug调试工具的php从`PATH`中移除。\n\n``` sh\nbrew unlink php56\n```\n\n### composer\n\n##### 英文原版安装（需要翻墙）\n\n参考网址https://getcomposer.org/doc/00-intro.md\n\nYou can place the Composer PHAR anywhere you wish. If you put it in a directorythat is part of your `PATH`, you can access it globally. On unixy systems youcan even make it executable and invoke it without directly using the `php`interpreter.\n\nRun these commands to globally install `composer` on your system:\n\n``` sh\ncurl -sS https://getcomposer.org/installer | php\nmv composer.phar /usr/local/bin/composer\n```\n\nA quick copy-paste version including sudo:\n\n``` sh\ncurl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer\n```\n\n##### 中文镜像库安装\n\n参考网址http://docs.phpcomposer.com/00-intro.html\n\n如果你把它放在系统的 `PATH` 目录中，你就能在全局访问它。 在类Unix系统中，你甚至可以在使用时不加 `php` 前缀。\n\n你可以执行这些命令让 `composer` 在你的系统中进行全局调用：\n\n``` sh\ncurl -sS https://getcomposer.org/installer | php\nmv composer.phar /usr/local/bin/composer\n```\n\n**注意：** 如果上诉命令因为权限执行失败，请使用 sudo 再次尝试运行 `mv` 那行命令。\n\n或者\n\n检查一些 PHP 的设置，然后下载 `composer.phar` 到你的工作目录中。这是 Composer 的二进制文件。这是一个 PHAR 包（PHP 的归档），这是 PHP 的归档格式可以帮助用户在命令行中执行一些操作。\n\n你可以通过 `--install-dir` 选项指定 Composer 的安装目录（它可以是一个绝对或相对路径）：\n\n``` sh\ncurl -sS https://getcomposer.org/installer | php -- --install-dir=bin\n```\n\n"
  },
  {
    "path": "python.en.md",
    "content": "# Configuration of the dev environment of Python\n\n## Python (optional)\nAlthough Mac OS X comes with Python, we can use Homebrew to intall Python 2.7.x because\n\n* Use Homebrew to install more recent version of Python\n* Intall Python 2.7.x and 3.x at the same time\n* Homebrew will install tools like setuptools and pip\n\nTo install Python 2.7.x\n\n    brew install python --with-brewed-openssl\n\nTo install Python 3.x\n\n    brew install python3 --with-brewed-openssl\n\n## pip\n\nWe use pip to manage packages:\n\n    sudo easy_install pip\n\n## virtualenv virtualenvwrapper\n\nTo install packages: \n\n    sudo pip install virtualenv virtualenvwrapper\n\nTo create the virtualenv folder\n\n    mkdir ~/virtualenvs\n\nTo config virtualenv in .zshrc or .bash_profile\n\n    # virtualenvwrapper\n    export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python\n    export WORKON_HOME=~/virtualenvs\n    [ -f /usr/local/bin/virtualenvwrapper.sh ] && source /usr/local/bin/virtualenvwrapper.sh\n    [ -f /etc/bash_completion.d/virtualenvwrapper ] && source /etc/bash_completion.d/virtualenvwrapper\n    export PIP_VIRTUALENV_BASE=$WORKON_HOME\n    export PIP_RESPECT_VIRTUALENV=true\n\n\nTo create the first python 2 virtualenv:\n\n    mkvirtualenv test\n\nTo create the first python 3 virtualenv:\n\n    mkvirtualenv -p python3 test\n\n## PyCharm\n\nPyCharm is the best Python IDE so far. There are community and professional versions for you to choose.\n\n"
  },
  {
    "path": "python.md",
    "content": "# python开发环境的设置\n\n## Python (可选)\n\n虽然Mac OS X 自带了Python，但是我们可以选择使用Homebrew安装Python 2.7.x。因为：\n\n* 使用Homebrew安装更新的python版本\n* 同时安装2.7.x和3.x的python\n* Homebrew会同时安装setuptools和pip等工具\n\n安装python 2.7.x：\n\n    brew install python --with-brewed-openssl\n\n安装python 3.x：\n\n    brew install python3 --with-brewed-openssl\n\n## pip\n\n我们使用pip来管理软件包：\n\n    sudo easy_install pip\n\n由于pip从pypi下载软件包，境外的pypi站点非常慢，导致安装缓慢或者下载失败。所幸清华大学和豆瓣都提供了pypi镜像，可以通过下面的配置文件来配置：\n\n    $ vim ~/.pip/pip.conf\n    ; http://www.pypi-mirrors.org/\n    [global]\n    index-url=https://pypi.doubanio.com/simple\n\n## virtualenv virtualenvwrapper\n\n安装软件包：\n\n    sudo pip install virtualenv virtualenvwrapper\n\n创建virtualenv目录：\n\n    mkdir ~/virtualenvs\n\n在.zshrc或者.bash_profile里配置virtualenv:\n\n    # virtualenvwrapper\n    export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python\n    export WORKON_HOME=~/virtualenvs\n    [ -f /usr/local/bin/virtualenvwrapper.sh ] && source /usr/local/bin/virtualenvwrapper.sh\n    [ -f /etc/bash_completion.d/virtualenvwrapper ] && source /etc/bash_completion.d/virtualenvwrapper\n    export PIP_VIRTUALENV_BASE=$WORKON_HOME\n    export PIP_RESPECT_VIRTUALENV=true\n\n\n创建第一个python 2 的 virtualenv：\n\n    mkvirtualenv test\n\n创建第一个python 3 的 virtualenv：\n\n    mkvirtualenv -p python3 test\n\n## PyCharm\n\nPyCharm是python最好的集成开发工具，目前有专业版和社区版可供选择。\n\n\n"
  },
  {
    "path": "recovery.md",
    "content": "# 备份和恢复\n\n第一次使用Mac OS X下的时光机器(Time Machine)，就被苹果如此完美贴心的备份恢复方案打动。数据无价，电脑里留下了岁月的痕迹和凝结了我们的心血，数据备份的重要性是怎么强调都不为过的。Time Machine是对这些数据最好的保护。只要你已经使用Time Machine备份过，设想一下：\n\n* 当你的Mac丢失或者硬件损坏了以后，你只要从苹果商店新买一台Mac，然后从Time Machine备份中恢复。你会看到一个和之前一模一样的系统，包括数据、设置、状态。\n* 当你给自己奖赏了一台新Mac时候，可以使用Time Machine将所有东西迁移过去。\n* 当你误删除一个文档，几个月以后再想起来，可以从Time Machine恢复。\n* 当你对一个文档做了多次修改，引入了一个错误，希望恢复某次正确的一个版本的时候，Time Machine可以帮助你。\n\n如果你熟悉git，那Time Machine简直就是一个操作系统级别的版本控制！\n\n当我安装好一个新的Mac OS X系统以后，第一件事情，就是设置Time Machine。\n\n现在云存储已经普及，容量也足够大，但是Time Machine还是有不可替代的优势：\n\n* 云存储没有版本历史，不能对之前的数据恢复。删除了就是删除了，也不能恢复之前某个时刻版本的数据资料。\n* 云存储有隐私泄露的问题，爱德华·斯诺登给我们好好上了一课。\n* 云存储不能解决恢复问题，仅仅只能做最基本的文件存储，不能在一台新的Mac上恢复所有数据和配置\n\n简单地说，云存储就是一个简单的Windows操作系统级别的拷贝备份，和Time Machine细颗粒度，多版本，包括数据、配置、状态的完整备份恢复方案相比，弱爆了。\n\n基于上述理由，郑重提醒，在设置Time Machine的exclude目录的时候，千万不要将云存储映射的目录排除在外。否则这些你认为已经被云存储保护过的资料，就不能享受Time Machine的保护，而这些资料往往是你最重要的资料。\n\n## 准备工作\n\nTime Machine可以使用下面一些方式进行，我还是选择简单、可靠、廉价的第一种方案：\n\n* 本地外接移动硬盘\n\n基于速度考虑，建议使用USB 3或者雷电高速接口，硬盘的大小可以选择1T或者2T，这个硬盘将伴随着你，保护你一生的数据资料。移动硬盘的分区方案，参见[安装]部分说明(https://github.com/pubyun/macdev/blob/master/install.md)\n\n* 使用Time Capsule\n\n无线方案，使用方便。缺点是Time Capsule发热量大，速度相对于有线方案也较慢。\n\n* 如果你有一台Linux服务器，可以安装netatalk软件\n\n看上去是一个理想的方案，但是设置好备份以后，不知道由于什么原因出现过几次备份无效，导致需要完全重新备份，后来丢弃了这个方案。\n\n\n## Time Machine的设置\n\nTime Machine这么强大的功能，设置其实很简单，苹果官方网站有详细的[指南](http://support.apple.com/kb/HT1427?viewlocale=zh_CN)，我在这里就不再重复。\n\n需要注意的是，Mac OS X会在运行中产生一些临时数据或者中间数据，这些数据往往占用空间较大，而没有保存价值，可以设置成exclude，常见的有：\n\n    /Library/Application Support/\n    /Library/Caches/\n    /private/var/log/\n    /private/var/vm/\n    /private/var/tmp/\n    ~/Downloads/\n    ~/Library/Caches\n    ~/Library/Application Support/MobileSync/\n    ~/.Trash/\n    ~/Documents/Virtual\\ Machines.localized/\n    ~/Library/Parallels\n\n备份完毕以后，移动硬盘需要在Finder下umount才能拔出，否则有可能数据丢失。\n\n"
  },
  {
    "path": "refs.md",
    "content": "# 参考文档\n\n* [OS X键盘快捷键] (http://support.apple.com/kb/HT1343?viewlocale=zh_CN)\n* [Multi-Touch手势] (http://support.apple.com/kb/HT4721?viewlocale=zh_CN)\n* [Time Machine备份Mac] (http://support.apple.com/kb/HT1427?viewlocale=zh_CN)\n* [全面了解电池] (http://support.apple.com/kb/HT1446?viewlocale=zh_CN)\n* [基于Intel的Mac的启动组合键] (http://support.apple.com/kb/HT1533?viewlocale=zh_CN)\n* [mac-dev-setup] (https://github.com/nicolashery/mac-dev-setup)\n* [mac-dev] (http://www.yangzhiping.com/tech/mac-dev.html)\n* [Best-App] (https://github.com/hzlzh/Best-App)\n* [laptop] (https://github.com/thoughtbot/laptop)\n* [简单4步，创建 OS X Mavericks USB 安装启动盘] (http://ksmx.me/blog/2013/10/24/create-an-os-x-mavericks-usb-installer/)\n* [How to make a bootable OS X 10.10 Yosemite install drive] (http://www.macworld.com/article/2367748/how-to-make-a-bootable-os-x-10-10-yosemite-install-drive.html)\n"
  }
]