laptop | shell script to set up a macOS laptop

 by   thoughtbot Shell Version: 2022-12-02 License: MIT

kandi X-RAY | laptop Summary

kandi X-RAY | laptop Summary

laptop is a Shell library. laptop has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can download it from GitHub.

Laptop is a script to set up a macOS laptop for web and mobile development. It can be run multiple times on the same machine safely. It installs, upgrades, or skips packages based on what is already installed on the machine.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              laptop has a medium active ecosystem.
              It has 8382 star(s) with 1922 fork(s). There are 243 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 0 open issues and 246 have been closed. On average issues are closed in 637 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of laptop is 2022-12-02

            kandi-Quality Quality

              laptop has 0 bugs and 0 code smells.

            kandi-Security Security

              laptop has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              laptop code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              laptop is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              laptop releases are available to install and integrate.
              Installation instructions, examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of laptop
            Get all kandi verified functions for this library.

            laptop Key Features

            No Key Features are available at this moment for laptop.

            laptop Examples and Code Snippets

            copy iconCopy
            const bindAll = (obj, ...fns) =>
              fns.forEach(
                fn => (
                  (f = obj[fn]),
                  (obj[fn] = function() {
                    return f.apply(obj);
                  })
                )
              );
            
            
            var view = {
              label: 'docs',
              click: function() {
                console.log('clicked ' + t  
            copy iconCopy
            def find_keys(dict, val):
              return list(key for key, value in dict.items() if value == val)
            
            
            ages = {
              'Peter': 10,
              'Isabel': 11,
              'Anna': 10,
            }
            find_keys(ages, 10) # [ 'Peter', 'Anna' ]
            
              
            copy iconCopy
            const getSecondsDiffBetweenDates = (dateInitial, dateFinal) =>
              (dateFinal - dateInitial) / 1000;
            
            
            getSecondsDiffBetweenDates(
              new Date('2020-12-24 00:00:15'),
              new Date('2020-12-24 00:00:17')
            ); // 2
            
              

            Community Discussions

            QUESTION

            React Native TextInput closes automatically when opened on android
            Asked 2022-Apr-05 at 08:36

            I switched laptops and cloned the repository of my project, did a quick yarn install and looks like it was a big difference from the one on the main branch but I didn't bother since maybe it's just because of different Node versions.

            Now every time I click on one TextInput the keyboard opens and closes immediately only on android. I attached a quick recording here. Tried some solutions and it looks like switching android:windowSoftInputMode from adjustResize to adjustPan in AndroidManifest.xml fixes the problem with the closing but I'm not really happy with the behaviour of the keyboard in the app when it's set to adjustPan. Maybe this issue starting happening a while ago but I just saw it now.

            Here is just an input centered inside a simple View. https://gfycat.com/ordinaryquestionabledinosaur

            Any suggestions anyone?

            ...

            ANSWER

            Answered 2022-Feb-23 at 16:53

            Was facing a similar issue, turned out that the react-native-screens library was causing the problem. Try setting the version to "~3.10.2". Worked out for me.

            Source https://stackoverflow.com/questions/71227463

            QUESTION

            Unknown host CPU architecture: arm64 , Android NDK SiliconM1 Apple MacBook Pro
            Asked 2022-Apr-04 at 18:41

            I've got a project that is working fine in windows os but when I switched my laptop and opened an existing project in MacBook Pro M1. I'm unable to run an existing android project in MacBook pro M1. first I was getting

            Execution failed for task ':app:kaptDevDebugKotlin'. > A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution > java.lang.reflect.InvocationTargetException (no error message)

            this error was due to the Room database I applied a fix that was adding below library before Room database and also changed my JDK location from file structure from JRE to JDK.

            kapt "org.xerial:sqlite-jdbc:3.34.0"

            ...

            ANSWER

            Answered 2022-Apr-04 at 18:41

            To solve this on a Apple Silicon M1 I found three options

            A

            Use NDK 24

            Source https://stackoverflow.com/questions/69541831

            QUESTION

            np.float32 floating point differences between intel MacBook and M1
            Asked 2022-Mar-29 at 13:23

            I have recently upgraded my Intel MacBook Pro 13" to a MacBook Pro 14" with M1 Pro. Been working hard on getting my software to compile and work again. No big issues fortunately, except for floating point problems in some obscure fortran code and in python. With regard to python/numpy I have the following question.

            I have a large code base bur for simplicity will use this simple function that converts flight level to pressure to show the issue.

            ...

            ANSWER

            Answered 2022-Mar-29 at 13:23

            As per the issue I created at numpy's GitHub:

            the differences you are experiencing seem to be all within a single "ULP" (unit in the last place), maybe 2? For special math functions, like exp, or sin, small errors are unfortunately expected and can be system dependend (both hardware and OS/math libraries).

            One thing that could be would might have a slightly larger effect could be use of SVML that NumPy has on newer machines (i.e. only on the intel one). That can be disabled at build time using NPY_DISABLE_SVML=1 as an environment variable, but I don't think you can disable its use without building NumPy. (However, right now, it may well be that the M1 machine is the less precise one, or that they are both roughly the same, just different)

            I haven't tried compiling numpy using NPY_DISABLE_SVML=1 and my plan now is to use a docker container that can run on all my platforms and use a single "truth" for my tests.

            Source https://stackoverflow.com/questions/71441137

            QUESTION

            ImportError: cannot import name 'safe_str_cmp' from 'werkzeug.security'
            Asked 2022-Mar-28 at 21:19

            any ideas why this error?

            my project was working fine, i copied it to an external drive and onto my laptop to work on the road, it worked fine. i copied back to my desktop and had a load of issues with invalid interpreters etc, so i made a new project and copied just the scripts in, made a new requirements.txt and installed all the packages, but when i run i get this error

            ...

            ANSWER

            Answered 2022-Mar-28 at 21:19

            Werkzeug released v2.1.0 today, removing werkzeug.security.safe_str_cmp.

            You can probably resolve this issue by pinning Werkzeug~=2.0.0 in your requirements.txt file (or similar).

            Source https://stackoverflow.com/questions/71652965

            QUESTION

            Visual Studio Code "Error while fetching extensions. XHR failed"
            Asked 2022-Mar-13 at 12:38

            This problem started a few weeks ago, when I started using NordVPN on my laptop. When I try to search for an extension and even when trying to download through the marketplace I get this error:

            EDIT: Just noticed another thing that might indicate to what's causing the issue. When I open VSCode and go to developer tools I get this error messege (before even doing anything):

            "(node:19368) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.(Use Code --trace-deprecation ... to show where the warning was created)"

            The only partial solution I found so far was to manually download and install extensions.

            I've checked similar question here and in other places online, but I didn't find a way to fix this. So far I've tried:

            1. Flushing my DNS cache and setting it to google's DNS server.
            2. Disabling the VPN on my laptop and restarting VS Code.
            3. Clearing the Extension search results.
            4. Disabling all the extensions currently running.

            I'm using a laptop running Windows 10. Any other possible solutions I haven't tried?

            ...

            ANSWER

            Answered 2021-Dec-10 at 05:26

            December 10,2021.
            I'm using vscode with ubuntu 20.04.
            I came across the XHR errors from yesterday and could not install any extensions.
            Googled a lot but nothing works.
            Eventually I downloaded and installed the newest version of VSCode(deb version) and everything is fine now. (I don't know why but maybe you can give it a try! Good Luck!)

            Source https://stackoverflow.com/questions/70177216

            QUESTION

            Ideas on how to get around Windows 11 ARM not supporting IIS
            Asked 2022-Feb-28 at 21:25

            My new Macbook Pro running on an M1 Max (ARM) chip just came in. I installed Parallels and Windows 11 Preview for ARM, and Visual Studio installs / launches / builds my solution beautifully. Unfortunately the turn windows features on or off dialog doesn't have the option for installing IIS, and others have posted that this is not supported in Windows 11 for ARM.

            Our dev team runs multiple ASP.NET Core 3.1 websites locally under IIS using subdomains, e.g.: https://auth-dev.mydomain.com, https://web-dev.mydomain.com, https://webapi-dev.mydomain.com. This was easy to set up in IIS using the bindings dialog, I could specify for port 443 (https) to use a certain subdomain and our dev SSL certificate.

            Now I need to figure out how to make this work on Windows 11 ARM. Developing on an inferior non-Macbook Pro laptop doesn't seem like a great solution for .NET devs, I have to assume others with M1 chip Macbook Pros have run into this same issue. What are my options?

            I first started looking into using IIS Express, but it seems like every website has to run on a different port, whereas I need them all to run on port 80 (just with different subdomains.) I'd be fine with them running on different ports if there was a way to forward those various ports to the subdomains, but it doesn't seem like the windows HOSTS file supports that.

            I also looked into using the Apache web server for Windows, but I read somewhere that it doesn't support running ASP.NET Core apps.

            ...

            ANSWER

            Answered 2021-Dec-05 at 17:14

            You can download the ASP.NET Core Runtime or .NET 5.0 SDK to allow you run to run ASP.NET applications on Windows, Mac or Linux. See https://support.microsoft.com/en-us/windows/downloads-for-windows-32490f9b-01ee-c13e-b2af-b5057c2d34e8

            Source https://stackoverflow.com/questions/69846747

            QUESTION

            ERROR: Failed building wheel for numpy , ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects
            Asked 2022-Feb-20 at 11:37

            I`m using python poetry(https://python-poetry.org/) for dependency management in my project.

            Though when I`m running poetry install, its giving me below error.

            ...

            ANSWER

            Answered 2022-Jan-03 at 13:24

            I solved it by doing the following steps:-

            1. I updated the pyproject.toml(This file contains all the library/dependency/dev dependency)with the numpy version that I installed using pip install numpy command.

            2. Run poetry lock to update poetry.lock file(contains details information about the library)

            3. Run poetry install again, & it should work fine.

            If you are having any problems, you can comment. I`ll try to answer it.

            Source https://stackoverflow.com/questions/70565965

            QUESTION

            Install XCode on MacOS 10.15 Catalina
            Asked 2022-Feb-18 at 06:21

            I'm getting an error where I can't install XCode because my MacOS version is 10.15 when the requirement is version 11 or higher.

            I don't want to upgrade my mac version because this is a company laptop so my other development tools might get affected.

            How do I create a workaround for this?

            ...

            ANSWER

            Answered 2021-Aug-30 at 12:43

            You can download all versions of Xcode from this site

            https://xcodereleases.com

            Source https://stackoverflow.com/questions/68982941

            QUESTION

            Is the timing of MATLAB reliable? If yes, can we reproduce the performance with julia, fortran, etc.?
            Asked 2022-Jan-05 at 08:26

            Originally this is a problem coming up in mathematica.SE, but since multiple programming languages have involved in the discussion, I think it's better to rephrase it a bit and post it here.

            In short, michalkvasnicka found that in the following MATLAB sample

            ...

            ANSWER

            Answered 2021-Dec-30 at 12:23

            tic/toc should be fine, but it looks like the timing is being skewed by memory pre-allocation.

            I can reproduce similar timings to your MATLAB example, however

            • On first run (clear workspace)

              • Loop approach takes 2.08 sec
              • Vectorised approach takes 1.04 sec
              • Vectorisation saves 50% execution time
            • On second run (workspace not cleared)

              • Loop approach takes 2.55 sec
              • Vectorised approach takes 0.065 sec
              • Vectorisation "saves" 97.5% execution time

            My guess would be that since the loop approach explicitly creates a new matrix via zeros, the memory is reallocated from scratch on every run and you don't see the speed improvement on subsequent runs.

            However, when HH remains in memory and the HH=___ line outputs a matrix of the same size, I suspect MATLAB is doing some clever memory allocation to speed up the operation.

            We can prove this theory with the following test:

            Source https://stackoverflow.com/questions/70531385

            QUESTION

            Win10 Electron Error: Passthrough is not supported, GL is disabled, ANGLE is
            Asked 2022-Jan-03 at 01:54

            I have an electron repo (https://github.com/MartinBarker/RenderTune) which used to work on windows 10 fine when ran with command prompt. After a couple months I come back on a new fresh windows 10 machine with an Nvidia GPU, and the electron app prints an error in the window when starting up:

            ...

            ANSWER

            Answered 2022-Jan-03 at 01:54

            You can try disabling hardware acceleration using app.disableHardwareAcceleration() (See the docs). I don't think this is a fix though, it just makes the message go away for me.

            Example Usage

            main.js

            Source https://stackoverflow.com/questions/70267992

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install laptop

            Review the script (avoid running scripts you haven’t read!):.

            Support

            Edit the mac file. Document in the README.md file. Follow shell style guidelines by using [ShellCheck] and [Syntastic]. [ShellCheck]: http://www.shellcheck.net/about.html [Syntastic]: https://github.com/scrooloose/syntastic. By participating in this project, you agree to abide by the thoughtbot [code of conduct]. [code of conduct]: https://thoughtbot.com/open-source-code-of-conduct.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/thoughtbot/laptop.git

          • CLI

            gh repo clone thoughtbot/laptop

          • sshUrl

            git@github.com:thoughtbot/laptop.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Consider Popular Shell Libraries

            awesome

            by sindresorhus

            ohmyzsh

            by ohmyzsh

            realworld

            by gothinkster

            nvm

            by nvm-sh

            papers-we-love

            by papers-we-love

            Try Top Libraries by thoughtbot

            guides

            by thoughtbotRuby

            bourbon

            by thoughtbotRuby

            paperclip

            by thoughtbotRuby

            factory_bot

            by thoughtbotRuby

            dotfiles

            by thoughtbotShell